SteamWar/BauSystem2.0
Archiviert
12
0

Fix smartplace destroy blocks
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful

Signed-off-by: yoyosource <yoyosource@nidido.de>
Dieser Commit ist enthalten in:
yoyosource 2022-06-13 14:46:47 +02:00
Ursprung 063495c624
Commit 4951bf3ef7

Datei anzeigen

@ -55,6 +55,9 @@ public class BlockRotatingBehaviour implements SmartPlaceBehaviour {
event.setUseInteractedBlock(Event.Result.DENY); event.setUseInteractedBlock(Event.Result.DENY);
World world = event.getPlayer().getWorld(); World world = event.getPlayer().getWorld();
Block block = world.getBlockAt(event.getClickedBlock().getX() + event.getBlockFace().getModX(), event.getClickedBlock().getY() + event.getBlockFace().getModY(), event.getClickedBlock().getZ() + event.getBlockFace().getModZ()); Block block = world.getBlockAt(event.getClickedBlock().getX() + event.getBlockFace().getModX(), event.getClickedBlock().getY() + event.getBlockFace().getModY(), event.getClickedBlock().getZ() + event.getBlockFace().getModZ());
if (!block.getType().isAir()) {
return SmartPlaceResult.IGNORED;
}
block.setType(event.getMaterial()); block.setType(event.getMaterial());
blockData = event.getItem().getType().createBlockData(); blockData = event.getItem().getType().createBlockData();
BlockFace blockFace = event.getBlockFace(); BlockFace blockFace = event.getBlockFace();