Fix tripwires (#11790)

This commit is contained in:
Lulu13022002 2024-12-23 19:14:35 +01:00 committed by GitHub
parent 793d36106d
commit c76809973b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -71,7 +71,7 @@
} }
+ +
+ // CraftBukkit start - Call interact even when triggering connected tripwire + // CraftBukkit start - Call interact even when triggering connected tripwire
+ if (flag != poweredValue && poweredValue && blockState.getValue(TripWireBlock.ATTACHED)) { + if (poweredValue != flag && flag && blockState.getValue(TripWireBlock.ATTACHED)) {
+ org.bukkit.World bworld = level.getWorld(); + org.bukkit.World bworld = level.getWorld();
+ org.bukkit.plugin.PluginManager manager = level.getCraftServer().getPluginManager(); + org.bukkit.plugin.PluginManager manager = level.getCraftServer().getPluginManager();
+ org.bukkit.block.Block block = bworld.getBlockAt(pos.getX(), pos.getY(), pos.getZ()); + org.bukkit.block.Block block = bworld.getBlockAt(pos.getX(), pos.getY(), pos.getZ());