mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-20 18:07:43 +01:00
Shears can defuse TNT
Shears can now defuse TNT. Each world can have a configured chance for the TNT to be defused when right clicking with a set of shears and damage dealt to the shears accordingly. If the TNT is defused then it will drop the TNT item instead and the entity removed from the world no longer existing. All the interaction is handled within the net.minecraft.world.entity.item.PrimedTnt class similar to how it is handled for when sheep are sheared. By default the option is disabled to avoid breaking any possible vanilla mechanics.
This commit is contained in:
@@ -3422,4 +3422,11 @@ public class PurpurWorldConfig {
|
||||
cauldronDripstoneWaterFillChance = (float) getDouble("blocks.cauldron.fill-chances.dripstone-water", cauldronDripstoneWaterFillChance);
|
||||
cauldronDripstoneLavaFillChance = (float) getDouble("blocks.cauldron.fill-chances.dripstone-lava", cauldronDripstoneLavaFillChance);
|
||||
}
|
||||
|
||||
public float shearsCanDefuseTntChance = 0.00F;
|
||||
public boolean shearsCanDefuseTnt = false;
|
||||
private void shearsCanDefuseTntSettings() {
|
||||
shearsCanDefuseTntChance = (float) getDouble("gameplay-mechanics.item.shears.defuse-tnt-chance", 0.00D);
|
||||
shearsCanDefuseTnt = shearsCanDefuseTntChance > 0.00F;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user