SteamWar/BauSystem2.0
Archiviert
12
0

Hotfix PlaceItemUtils and Blackstone placing Walls in 1.19
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful

Signed-off-by: yoyosource <yoyosource@nidido.de>
Dieser Commit ist enthalten in:
yoyosource 2023-10-07 21:05:01 +02:00
Ursprung f82d5815ee
Commit fcb1ce4e4b
2 geänderte Dateien mit 4 neuen und 3 gelöschten Zeilen

Datei anzeigen

@ -31,7 +31,7 @@ public class PlaceItemWrapper15 implements PlaceItemWrapper {
String nonWall = material.name().replace("_WALL_", "").replace("WALL_", "").replace("_WALL", ""); String nonWall = material.name().replace("_WALL_", "").replace("WALL_", "").replace("_WALL", "");
try { try {
Material nonWallMaterial = Material.valueOf(nonWall); Material nonWallMaterial = Material.valueOf(nonWall);
if (nonWallMaterial != material) { if (nonWallMaterial != material && nonWallMaterial.isItem() && !nonWallMaterial.isBlock()) {
BLOCK_MATERIAL_TO_WALL_BLOCK_MATERIAL.put(nonWallMaterial, material); BLOCK_MATERIAL_TO_WALL_BLOCK_MATERIAL.put(nonWallMaterial, material);
} }
} catch (Exception e) { } catch (Exception e) {

Datei anzeigen

@ -162,8 +162,9 @@ public class PlaceItemUtils {
if (blockData == null) return PlaceItemResult.NO_BLOCK_ITEM_HELD; if (blockData == null) return PlaceItemResult.NO_BLOCK_ITEM_HELD;
// Placing a Block inside of Water should set it to Waterlogged // Placing a Block inside of Water should set it to Waterlogged
if (blockData instanceof Waterlogged) { if (blockData instanceof Waterlogged && block.getType() == Material.WATER) {
((Waterlogged) blockData).setWaterlogged(block.getType() == Material.WATER); Levelled levelled = (Levelled) block.getBlockData();
((Waterlogged) blockData).setWaterlogged(levelled.getLevel() == levelled.getMaximumLevel());
} }
if (blockData instanceof Slab) { if (blockData instanceof Slab) {