From fb3973a3f17ab311859ad0d80a2507e2256ed6d0 Mon Sep 17 00:00:00 2001 From: Sollace Date: Sat, 1 Apr 2023 21:44:21 +0100 Subject: [PATCH] Baby zombie ponies have a small chance of spawning as cozy glow --- .../client/render/entity/ZomponyRenderer.java | 19 ++++++++++++------ .../textures/entity/zombie/demon_child.png | Bin 0 -> 1692 bytes 2 files changed, 13 insertions(+), 6 deletions(-) create mode 100644 src/main/resources/assets/minelittlepony/textures/entity/zombie/demon_child.png diff --git a/src/main/java/com/minelittlepony/client/render/entity/ZomponyRenderer.java b/src/main/java/com/minelittlepony/client/render/entity/ZomponyRenderer.java index 52480380..70a5bbda 100644 --- a/src/main/java/com/minelittlepony/client/render/entity/ZomponyRenderer.java +++ b/src/main/java/com/minelittlepony/client/render/entity/ZomponyRenderer.java @@ -14,23 +14,30 @@ public class ZomponyRenderer extends PonyRenderer< public static final Identifier HUSK = new Identifier("minelittlepony", "textures/entity/zombie/husk_pony.png"); public static final Identifier DROWNED = new Identifier("minelittlepony", "textures/entity/zombie/drowned_pony.png"); - public ZomponyRenderer(EntityRendererFactory.Context context, Identifier texture, float scale) { - super(context, ModelType.ZOMBIE, TextureSupplier.of(texture), scale); + public static final Identifier DEMON_CHILD = new Identifier("minelittlepony", "textures/entity/zombie/demon_child.png"); + + public ZomponyRenderer(EntityRendererFactory.Context context, TextureSupplier texture, float scale) { + super(context, ModelType.ZOMBIE, texture, scale); } public static ZomponyRenderer zombie(EntityRendererFactory.Context context) { - return new ZomponyRenderer<>(context, ZOMBIE, 1); + return new ZomponyRenderer<>(context, entity -> { + if (entity.isBaby() && entity.getUuid().getLeastSignificantBits() % 160 == 0) { + return DEMON_CHILD; + } + return ZOMBIE; + }, 1); } public static ZomponyRenderer husk(EntityRendererFactory.Context context) { - return new ZomponyRenderer<>(context, HUSK, 1.0625F); + return new ZomponyRenderer<>(context, TextureSupplier.of(HUSK), 1.0625F); } public static ZomponyRenderer drowned(EntityRendererFactory.Context context) { - return new ZomponyRenderer<>(context, DROWNED, 1); + return new ZomponyRenderer<>(context, TextureSupplier.of(DROWNED), 1); } public static ZomponyRenderer giant(EntityRendererFactory.Context context) { - return new ZomponyRenderer<>(context, ZOMBIE, 3); + return new ZomponyRenderer<>(context, TextureSupplier.of(ZOMBIE), 3); } } diff --git a/src/main/resources/assets/minelittlepony/textures/entity/zombie/demon_child.png b/src/main/resources/assets/minelittlepony/textures/entity/zombie/demon_child.png new file mode 100644 index 0000000000000000000000000000000000000000..e9b83781f16f3d6a9498d985ae93ad603910df19 GIT binary patch literal 1692 zcmV;N24ne&P)A{v!p>Iz^1m@+K~+=h9>c$5=HD28X&ZZ4}2LC z64F43m93~BinbvHh%rqH+ZatY)}@`&m(+3IShtE%Ae}~I$G)-ewXg5tL*%Zp9mj1P zZ;JhVx%ZrV-k$$C|K~jCxkvnTBrcU_e!*i;Juc+X*Q9mBkEo^muBDZ%OQSsyK(*4m zW7;5dZ2v?HXJ-CKc=HD2e2PDuIn8}tU3gWUtfun($zdMq>E-i&O_XcjjE>53-<2Qs zw1~%^dRzdA-Omevfrk&Qs?z!P2Od5^M&!USkqX$VhHa*ar_#)4EmWB!F_*;c^>N4i z8^ng6L~(K?hY$1P?ycNpPOW$>T46@?yWg(K%;)>jvkE&~*ORcb{3DT~Np;Z?@}j!D zWSHaM=?vTL3EKA`K$7L&ijQ7$O{YRc%RptASJj;7&i;G4I z;nhh=&{Uo7kdJMj4529!70LGXL2eEPIC1JF(rF2fkKV3+OmiO7lDrjpvHAd9G*UHL z0T+!Ft$rU$F2}#(3C_n87?~_Go8`RaV4E45+#VE{#)$iKWHL6FXJZT`0>tBKOe;b2 zuJ2SIfL6b+CN`ke?_224>&CK7%=t9lCO?sc!FJ@Ps?BJoE2MmAks^^+?aU5M3?JxTJ$i(>QhREIT)>7XflPTIe;SI=+F?3Tj$XJyG3L&N?S{ioP@bV zlB}|z>O?GoDm1pX_?M=D86CwF?nKIk#UX^ijE)v5U+#OQ;%Ew!@6R$m8AWxwIDGFt z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