SteamWar/BauSystem2.0
Archiviert
12
0

Fix Detonator type selection
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful

Dieser Commit ist enthalten in:
Chaoscaot 2022-08-23 11:50:28 +02:00
Ursprung 5a32b90499
Commit d9d383679f

Datei anzeigen

@ -189,13 +189,6 @@ public class Detonator {
}
static Detoblock getBlock(Block block) {
if (block.getType() == Material.STONE_BUTTON) {
return Detoblock.STONE_BUTTON;
}
if (block.getType() == Material.HEAVY_WEIGHTED_PRESSURE_PLATE || block.getType() == Material.LIGHT_WEIGHTED_PRESSURE_PLATE) {
return Detoblock.WEIGHTED_PRESSURE_PLATE;
}
switch (block.getType()) {
case LEVER:
return Detoblock.SWITCH;
@ -205,16 +198,19 @@ public class Detonator {
return Detoblock.NOTEBLOCK;
case DAYLIGHT_DETECTOR:
return Detoblock.DAYLIGHTSENSOR;
case HEAVY_WEIGHTED_PRESSURE_PLATE:
case LIGHT_WEIGHTED_PRESSURE_PLATE:
return Detoblock.WEIGHTED_PRESSURE_PLATE;
default:
if (block.getBlockData() instanceof Powerable) {
if (block.getType().name().contains("STONE_BUTTON")) {
return Detoblock.STONE_BUTTON;
} else if (block.getType().name().contains("BUTTON")) {
return Detoblock.WOOD_BUTTON;
} else if (block.getType().name().contains("PRESSURE_PLATE")) {
return Detoblock.PRESSURE_PLATE;
} else if (block.getBlockData() instanceof Powerable) {
return Detoblock.POWERABLE;
} else {
if (block.getType().name().contains("BUTTON")) {
return Detoblock.WOOD_BUTTON;
}
if (block.getType().name().contains("PRESSURE_PLATE")) {
return Detoblock.PRESSURE_PLATE;
}
return Detoblock.INVALID;
}
}