mirror of
https://github.com/exituser/Brewery.git
synced 2026-09-17 07:49:03 +00:00
Less String Comparisons, More Cleanup
This commit is contained in:
@@ -628,7 +628,12 @@ public class Barrel implements InventoryHolder {
|
||||
default:
|
||||
wood = spigot.getRelative(0, 0, -1);
|
||||
}
|
||||
return LegacyUtil.getWoodType(wood);
|
||||
try {
|
||||
return LegacyUtil.getWoodType(wood);
|
||||
} catch (NoSuchFieldError | NoClassDefFoundError noSuchFieldError) {
|
||||
// Using older minecraft versions some fields and classes do not exist
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
// returns the Sign of a large barrel, the spigot if there is none
|
||||
|
||||
Reference in New Issue
Block a user