Skip to content

Commit

Permalink
Actually add 1.14 and 1.16.2 support
Browse files Browse the repository at this point in the history
  • Loading branch information
SeanOMik committed Sep 3, 2020
1 parent e518e26 commit 0c24e0b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/java/net/seanomik/energeticstorage/utils/Utils.java
Original file line number Diff line number Diff line change
Expand Up @@ -131,9 +131,9 @@ public static boolean listStringContainsString(List<String> list, String string)
public static boolean isBlockASystem(Block block) {
NBTTileEntity blockNBT = new NBTTileEntity(block.getState());
String version = Bukkit.getServer().getClass().getPackage().getName().split("\\.")[3];
if (version.equals("v1_15_R1")) {
if (version.substring(0, 5).equals("v1_15") || version.substring(0, 5).equals("v1_14")) {
return blockNBT.getCompound("Owner").getCompound("Properties").getCompoundList("textures").get(0).getString("Value").equals(Skulls.Computer.getTexture());
} else if (version.equals("v1_16_R1")) {
} else if (version.substring(0, 5).equals("v1_16")) {
return blockNBT.getCompound("SkullOwner").getCompound("Properties").getCompoundList("textures").get(0).getString("Value").equals(Skulls.Computer.getTexture());
}

Expand Down

0 comments on commit 0c24e0b

Please sign in to comment.