Package vazkii.botania.common.helper
Class EthicalTntHelper
java.lang.Object
vazkii.botania.common.helper.EthicalTntHelper
Helps track TNT entity spawning to check for unethical methods. Used with vanilla piston logic (via mixin) and
Force lens block moving (which is used by mana bursts with the lens itself, but also by the Force Relay block).
The concept of this check is to keep track of any TNT entity that was spawned as a result of a block update while a block structure is converted into moving blocks. Moving blocks are placed in the destination position, so we look for adjacent moving block entities that represent a TNT block and move away from the TNT entity. If we find such a moving block, the TNT entity was unethically sourced.
The concept of this check is to keep track of any TNT entity that was spawned as a result of a block update while a block structure is converted into moving blocks. Moving blocks are placed in the destination position, so we look for adjacent moving block entities that represent a TNT block and move away from the TNT entity. If we find such a moving block, the TNT entity was unethically sourced.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidaddTrackedTntEntity(net.minecraft.world.entity.item.PrimedTnt entity) A TNT entity just spawned.static voidA force relay, force lens mana burst,or vanilla piston finished converting all blocks into moving block entities.static voidA force relay, force lens mana burst or vanilla piston is about to start moving blocks.
-
Constructor Details
-
EthicalTntHelper
public EthicalTntHelper()
-
-
Method Details
-
startTrackingTntEntities
public static void startTrackingTntEntities()A force relay, force lens mana burst or vanilla piston is about to start moving blocks. -
addTrackedTntEntity
public static void addTrackedTntEntity(net.minecraft.world.entity.item.PrimedTnt entity) A TNT entity just spawned. Check it for potentially unethical spawning methods.- Parameters:
entity- The TNT entity.
-
endTrackingTntEntitiesAndCheck
public static void endTrackingTntEntitiesAndCheck()A force relay, force lens mana burst,or vanilla piston finished converting all blocks into moving block entities.
-