SteamWar/BauSystem2.0
Archiviert
12
0

Optmize Detonator.getBlock
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful

Signed-off-by: yoyosource <yoyosource@nidido.de>
Dieser Commit ist enthalten in:
yoyosource 2022-08-06 11:38:10 +02:00
Ursprung 659f09cb82
Commit 2e4825c4a9

Datei anzeigen

@ -192,15 +192,9 @@ public class Detonator {
if (block.getType() == Material.STONE_BUTTON) {
return Detoblock.STONE_BUTTON;
}
if (block.getType().name().contains("BUTTON")) {
return Detoblock.WOOD_BUTTON;
}
if (block.getType() == Material.HEAVY_WEIGHTED_PRESSURE_PLATE || block.getType() == Material.LIGHT_WEIGHTED_PRESSURE_PLATE) {
return Detoblock.WEIGHTED_PRESSURE_PLATE;
}
if (block.getType().name().contains("PRESSURE_PLATE")) {
return Detoblock.PRESSURE_PLATE;
}
switch (block.getType()) {
case LEVER:
@ -215,6 +209,12 @@ public class Detonator {
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;
}
}