SteamWar/BauSystem2.0
Archiviert
12
0

Fix some rotate behaviour
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful

Signed-off-by: yoyosource <yoyosource@nidido.de>
Dieser Commit ist enthalten in:
yoyosource 2022-11-22 15:49:34 +01:00
Ursprung 635d235a87
Commit 8100667da5
2 geänderte Dateien mit 6 neuen und 2 gelöschten Zeilen

Datei anzeigen

@ -54,7 +54,7 @@ public class BlockPlaceBehaviour implements SmartPlaceBehaviour {
smartPlaceResult = SmartPlaceResult.APPLIED; smartPlaceResult = SmartPlaceResult.APPLIED;
} else if (blockData instanceof Rotatable) { } else if (blockData instanceof Rotatable) {
Rotatable rotatable = (Rotatable) blockData; Rotatable rotatable = (Rotatable) blockData;
rotatable.setRotation(rotatable.getRotation()); rotatable.setRotation(rotatable.getRotation().getOppositeFace());
smartPlaceResult = SmartPlaceResult.APPLIED; smartPlaceResult = SmartPlaceResult.APPLIED;
} }
block.setBlockData(blockData); block.setBlockData(blockData);

Datei anzeigen

@ -72,7 +72,11 @@ public class BlockRotatingBehaviour implements SmartPlaceBehaviour {
directional.setFacing(blockFace); directional.setFacing(blockFace);
} }
} else if (blockData instanceof Rotatable) { } else if (blockData instanceof Rotatable) {
((Rotatable) blockData).setRotation(blockFace); try {
((Rotatable) blockData).setRotation(blockFace);
} catch (Exception e) {
// Ignore
}
} }
block.setBlockData(blockData); block.setBlockData(blockData);
return SmartPlaceResult.APPLIED; return SmartPlaceResult.APPLIED;