mirror of
https://github.com/Ellpeck/NaturesAura.git
synced 2024-12-22 14:59:22 +01:00
changed a quirk to aura and added some info on its inner workings to the book
This commit is contained in:
parent
8d075e1dfb
commit
117ca787fe
4 changed files with 15 additions and 9 deletions
|
@ -100,7 +100,7 @@ public class InternalHooks implements NaturesAuraAPI.IInternalHooks {
|
|||
}
|
||||
});
|
||||
BlockPos lowest = lowestSpot.getValue();
|
||||
if (lowest == null)
|
||||
if (lowest == null || lowestAmount.intValue() >= 0)
|
||||
lowest = defaultSpot;
|
||||
return lowest;
|
||||
}
|
||||
|
@ -117,7 +117,7 @@ public class InternalHooks implements NaturesAuraAPI.IInternalHooks {
|
|||
}
|
||||
});
|
||||
BlockPos highest = highestSpot.getValue();
|
||||
if (highest == null)
|
||||
if (highest == null || highestAmount.intValue() <= 0)
|
||||
highest = defaultSpot;
|
||||
return highest;
|
||||
}
|
||||
|
|
|
@ -82,7 +82,8 @@ public interface IAuraChunk extends ICapabilityProvider, INBTSerializable<NBTTag
|
|||
* This method returns the position of the lowest drain spot (meaning the
|
||||
* one that has the least Aura stored) in the given area. This should be
|
||||
* used with any machines that fill up Aura in an area, so that the most
|
||||
* drained spots get selected first.
|
||||
* drained spots get selected first. Note that, when there is no drain spot
|
||||
* with an amount lower than 0, the default will always be returned.
|
||||
*
|
||||
* @param world The world
|
||||
* @param pos The center position
|
||||
|
@ -99,7 +100,8 @@ public interface IAuraChunk extends ICapabilityProvider, INBTSerializable<NBTTag
|
|||
* This method returns the position of the highest drain spot (meaning the
|
||||
* one that has the most Aura stored) in the given area. This should be used
|
||||
* with any machines that use up Aura so that the spots with the highest
|
||||
* amount are drained first.
|
||||
* amount are drained first. Note that, when there is no drain spot with an
|
||||
* amount greater than 0, the defautl will always be returned.
|
||||
*
|
||||
* @param world The world
|
||||
* @param pos The center position
|
||||
|
|
|
@ -28,11 +28,7 @@ public class MigrationEffect implements IDrainSpotEffect {
|
|||
if (highestPos == null)
|
||||
return;
|
||||
IAuraChunk highestChunk = IAuraChunk.getAuraChunk(world, highestPos);
|
||||
MutableInt highestSpot = highestChunk.getDrainSpot(highestPos);
|
||||
if (highestSpot.intValue() <= 0)
|
||||
return;
|
||||
|
||||
int toTransfer = Math.min(25, highestSpot.intValue());
|
||||
int toTransfer = Math.min(25, highestChunk.getDrainSpot(highestPos).intValue());
|
||||
highestChunk.drainAura(highestPos, toTransfer);
|
||||
auraChunk.storeAura(pos, toTransfer);
|
||||
}
|
||||
|
|
|
@ -11,6 +11,14 @@
|
|||
{
|
||||
"type": "text",
|
||||
"text": "However, it isn't always as easy as that. Making use of it wrongly, specifically $(thing)draining$() it completely from an area, will face the culprit with diminishing returns.$(br)So while $(aura) is plentiful and useful, abusing it would certainly be ill-advised.$(p)An additional thing to note is that, based on the world you are in - specifically, the $(item)dimension$(), different types of $(aura) will be present, making some mechanics work unlike expected."
|
||||
},
|
||||
{
|
||||
"type":"text",
|
||||
"text":"When it comes to the inner workings of $(aura), scientists are toubled to admit that they have not quite figured out how exactly it works yet.$(br)The only thing they know is that excess or missing amounts of $(aura) affect an area of varying size (based on the apparatus used) around the place the modification happened from.$(br)If an area is drained and a new generating instrument is added, it will renew the drained area first before creating its own luscious area."
|
||||
},
|
||||
{
|
||||
"type":"text",
|
||||
"text":"Similarly, if a draining instrument is placed close to a rich area, it will first drain that area before moving on to draining the area directly around itself.$(p)While this behavior surely sounds complicated, the consensus is that letting the apparatus and $(aura) do their thing for a while seems to be a good approach of analysis, as sometimes $(aura) tends to migrate and move around to balance itself out naturally."
|
||||
}
|
||||
]
|
||||
}
|
Loading…
Reference in a new issue