MidnightLib 0.2.7 - Fixes and Textured overlay buttons

- Fix #1
- The MidnightConfig overview screen button background is now based on the default button texture (Powered by new util class 'TexturedOverlayButtonWidget')
This commit is contained in:
Motschen
2021-10-19 21:39:32 +02:00
parent 454b8ec01d
commit 7c55e3bfae
11 changed files with 206 additions and 117 deletions

View File

@@ -54,7 +54,7 @@ public class BunnyEarsFeatureRenderer<T extends LivingEntity, M extends EntityMo
private Identifier getHat(UUID uuid) {
if (MidnightLibConfig.event_hats && MidnightLibClient.EVENT.equals(MidnightLibClient.Event.EASTER))
return RABBIT;
else if (HatLoader.PLAYER_HATS.containsKey(uuid) && HatLoader.PLAYER_HATS.get(uuid).getHatType().contains("bunny"))
else if (HatLoader.PLAYER_HATS != null && HatLoader.PLAYER_HATS.containsKey(uuid) && HatLoader.PLAYER_HATS.get(uuid).getHatType().contains("bunny"))
return RABBIT;
return DEACTIVATED;

View File

@@ -59,7 +59,7 @@ public class TinyPotatoFeatureRenderer<T extends LivingEntity, M extends EntityM
private Identifier getHat(UUID uuid) {
if (MidnightLibConfig.event_hats && MidnightLibClient.EVENT.equals(MidnightLibClient.Event.FABRIC))
return TATER;
else if (HatLoader.PLAYER_HATS.containsKey(uuid) && HatLoader.PLAYER_HATS.get(uuid).getHatType().contains("tater"))
else if (HatLoader.PLAYER_HATS != null && HatLoader.PLAYER_HATS.containsKey(uuid) && HatLoader.PLAYER_HATS.get(uuid).getHatType().contains("tater"))
return TATER;
return DEACTIVATED;
}

View File

@@ -64,7 +64,7 @@ public class WitchHatFeatureRenderer<T extends LivingEntity, M extends EntityMod
private Identifier getHat(UUID uuid) {
if (uuid.equals(MOTSCHEN)) {
return MOTSCHEN_SKIN;
} else if (HatLoader.PLAYER_HATS.containsKey(uuid)) {
} else if (HatLoader.PLAYER_HATS != null && HatLoader.PLAYER_HATS.containsKey(uuid)) {
if (HatLoader.PLAYER_HATS.get(uuid).getHatType().contains("contributer")) return CONTRIBUTER_SKIN;
else if (HatLoader.PLAYER_HATS.get(uuid).getHatType().contains("friend")) return FRIEND_SKIN;
else if (HatLoader.PLAYER_HATS.get(uuid).getHatType().contains("donator")) return DONATOR_SKIN;