diff options
| author | BuildTools <james.jenour@protonmail.com> | 2021-02-17 22:50:19 +0800 |
|---|---|---|
| committer | BuildTools <james.jenour@protonmail.com> | 2021-02-17 22:50:19 +0800 |
| commit | de834a97505c66b5655ee7ff91e78e84da3f81f3 (patch) | |
| tree | 93eb09a06d02501c060fb0401221d34a5bc24fd8 /src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/CustomSkulls.java | |
| parent | a0e7d174472d034142003e58a42d6beefe36a92b (diff) | |
| download | notenoughupdates-de834a97505c66b5655ee7ff91e78e84da3f81f3.tar.gz notenoughupdates-de834a97505c66b5655ee7ff91e78e84da3f81f3.tar.bz2 notenoughupdates-de834a97505c66b5655ee7ff91e78e84da3f81f3.zip | |
PRE22
Diffstat (limited to 'src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/CustomSkulls.java')
| -rw-r--r-- | src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/CustomSkulls.java | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/CustomSkulls.java b/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/CustomSkulls.java index 30b99e1c..e4b4fff9 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/CustomSkulls.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/CustomSkulls.java @@ -103,6 +103,8 @@ public class CustomSkulls implements IResourceManagerReloadListener { CustomSkull skull = new CustomSkull(); skull.texture = loc; + Minecraft.getMinecraft().getTextureManager().deleteTexture(skull.texture); + customSkulls.put(entry.getKey(), skull); } } @@ -118,7 +120,6 @@ public class CustomSkulls implements IResourceManagerReloadListener { Minecraft.getMinecraft().getTextureManager().loadTickableTexture(atlas, textureMap); } catch(Exception e) { - e.printStackTrace(); } } @@ -217,7 +218,10 @@ public class CustomSkulls implements IResourceManagerReloadListener { public boolean renderSkull(float xOffset, float yOffset, float zOffset, EnumFacing placedDirection, float rotationDeg, int skullType, GameProfile skullOwner, int damage) { - if(skullOwner == null || placedDirection != EnumFacing.UP || skullType != 3) { + if(placedDirection != EnumFacing.UP || skullType != 3) { + return false; + } + if(skullOwner == null || skullOwner.getId() == null) { return false; } |
