mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2025-01-05 15:38:18 +01:00
Piston listeners weren't tracking the last pushed block.
This commit is contained in:
parent
3da8955f8a
commit
6afcce4b7c
@ -69,9 +69,9 @@ public class mcBlockListener implements Listener {
|
|||||||
}
|
}
|
||||||
|
|
||||||
for (Block b : blocks) {
|
for (Block b : blocks) {
|
||||||
if (b.hasMetadata("mcmmoNeedsTracking")) {
|
if (b.getRelative(direction).hasMetadata("mcmmoNeedsTracking")) {
|
||||||
b.setMetadata("mcmmoPlacedBlock", new FixedMetadataValue(plugin, true));
|
b.getRelative(direction).setMetadata("mcmmoPlacedBlock", new FixedMetadataValue(plugin, true));
|
||||||
b.removeMetadata("mcmmoNeedsTracking", plugin);
|
b.getRelative(direction).removeMetadata("mcmmoNeedsTracking", plugin);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -87,7 +87,7 @@ public class mcBlockListener implements Listener {
|
|||||||
|
|
||||||
if (block.hasMetadata("mcmmoPlacedBlock")) {
|
if (block.hasMetadata("mcmmoPlacedBlock")) {
|
||||||
block.removeMetadata("mcmmoPlacedBlock", plugin);
|
block.removeMetadata("mcmmoPlacedBlock", plugin);
|
||||||
event.getBlock().getRelative(event.getDirection(), 1).setMetadata("mcmmoPlacedBlock", new FixedMetadataValue(plugin, true));
|
event.getBlock().getRelative(event.getDirection()).setMetadata("mcmmoPlacedBlock", new FixedMetadataValue(plugin, true));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user