From bb63d2ef04295eb4edb31b27dd1b0b3d42830be1 Mon Sep 17 00:00:00 2001 From: Sollace Date: Sun, 21 Jun 2020 00:41:51 +0200 Subject: [PATCH] Update HDSkins --- gradle.properties | 2 +- .../client/hdskins/DummyPony.java | 13 +- .../client/hdskins/DummyPonyModel.java | 9 -- .../client/hdskins/DummyPonyRenderer.java | 126 ------------------ .../client/hdskins/MineLPHDSkins.java | 5 +- .../client/hdskins/PonyPreview.java | 4 +- .../textures/mob/noskin_seapony.png | Bin 2337 -> 2338 bytes 7 files changed, 6 insertions(+), 153 deletions(-) delete mode 100644 src/main/java/com/minelittlepony/client/hdskins/DummyPonyModel.java delete mode 100644 src/main/java/com/minelittlepony/client/hdskins/DummyPonyRenderer.java diff --git a/gradle.properties b/gradle.properties index 17fea49e..73d3bd11 100644 --- a/gradle.properties +++ b/gradle.properties @@ -19,5 +19,5 @@ org.gradle.daemon=false # Dependencies modmenu_version=1.12.+ kirin_version=1.6.4-1.16-rc1-1.16-SNAPSHOT - hd_skins_version=6.1.4-1.16-rc1-1.16-SNAPSHOT + hd_skins_version=6.2-1.16-rc1-1.16-SNAPSHOT mson_version=1.2-1.16-rc1-1.16-SNAPSHOT diff --git a/src/main/java/com/minelittlepony/client/hdskins/DummyPony.java b/src/main/java/com/minelittlepony/client/hdskins/DummyPony.java index af8f2a0d..4c70f39a 100644 --- a/src/main/java/com/minelittlepony/client/hdskins/DummyPony.java +++ b/src/main/java/com/minelittlepony/client/hdskins/DummyPony.java @@ -1,8 +1,5 @@ package com.minelittlepony.client.hdskins; -import net.minecraft.entity.EntityType; -import net.minecraft.entity.SpawnGroup; - import com.minelittlepony.hdskins.client.dummy.DummyPlayer; import com.minelittlepony.hdskins.client.dummy.TextureProxy; import com.minelittlepony.hdskins.profile.SkinType; @@ -14,16 +11,10 @@ import com.minelittlepony.model.IRotatedSwimmer; */ class DummyPony extends DummyPlayer implements IRotatedSwimmer { - public static EntityType TYPE = EntityType.Builder - .create((t, w) -> new DummyPony(t, null), SpawnGroup.MISC) - .disableSaving() - .disableSummon() - .build("minelittlepony:dummy_pony"); - public boolean wet = false; - public DummyPony(EntityType type, TextureProxy textures) { - super(type, textures); + public DummyPony(TextureProxy textures) { + super(textures); } public void setWet(boolean wet) { diff --git a/src/main/java/com/minelittlepony/client/hdskins/DummyPonyModel.java b/src/main/java/com/minelittlepony/client/hdskins/DummyPonyModel.java deleted file mode 100644 index fa318fb1..00000000 --- a/src/main/java/com/minelittlepony/client/hdskins/DummyPonyModel.java +++ /dev/null @@ -1,9 +0,0 @@ -package com.minelittlepony.client.hdskins; - -import com.minelittlepony.client.model.entity.race.EarthPonyModel; - -class DummyPonyModel extends EarthPonyModel { - public DummyPonyModel(boolean smallArms) { - super(smallArms); - } -} diff --git a/src/main/java/com/minelittlepony/client/hdskins/DummyPonyRenderer.java b/src/main/java/com/minelittlepony/client/hdskins/DummyPonyRenderer.java deleted file mode 100644 index d78ed048..00000000 --- a/src/main/java/com/minelittlepony/client/hdskins/DummyPonyRenderer.java +++ /dev/null @@ -1,126 +0,0 @@ -package com.minelittlepony.client.hdskins; - -import com.minelittlepony.api.pony.IPony; -import com.minelittlepony.api.pony.meta.Race; -import com.minelittlepony.client.MineLittlePony; -import com.minelittlepony.client.model.ClientPonyModel; -import com.minelittlepony.client.model.ModelType; -import com.minelittlepony.client.model.ModelWrapper; -import com.minelittlepony.client.render.IPonyRenderContext; -import com.minelittlepony.client.render.EquineRenderManager; -import com.minelittlepony.client.render.entity.feature.GearFeature; -import com.minelittlepony.client.render.entity.feature.GlowingItemFeature; -import com.minelittlepony.client.render.entity.feature.ArmourFeature; -import com.minelittlepony.client.render.entity.feature.ElytraFeature; -import com.minelittlepony.hdskins.client.dummy.DummyPlayerRenderer; -import com.minelittlepony.hdskins.profile.SkinType; -import com.minelittlepony.mson.api.ModelKey; - -import net.minecraft.client.render.VertexConsumerProvider; -import net.minecraft.client.render.entity.EntityRenderDispatcher; -import net.minecraft.client.render.entity.feature.FeatureRenderer; -import net.minecraft.client.render.entity.model.PlayerEntityModel; -import net.minecraft.client.util.math.MatrixStack; -import net.minecraft.util.Identifier; - -/** - * Renderer used for the dummy pony model when selecting a skin. - */ -class DummyPonyRenderer extends DummyPlayerRenderer> implements IPonyRenderContext> { - - protected final EquineRenderManager> manager = new EquineRenderManager<>(this); - - public DummyPonyRenderer(EntityRenderDispatcher dispatcher) { - super(dispatcher, null); - addFeature(new GearFeature<>(this)); - - manager.setModel(ModelType.EARTH_PONY.getKey(false)); - manager.setSkipBlend(); - } - - @Override - public ModelWrapper> getModelWrapper() { - return manager.playerModel; - } - - @Override - public IPony getEntityPony(DummyPony entity) { - return MineLittlePony.getInstance().getManager().getPony(getTexture(entity)); - } - - @Override - protected void scale(DummyPony entity, MatrixStack stack, float tickDelta) { - manager.preRenderCallback(entity, stack, tickDelta); - if (getModel() instanceof PlayerEntityModel) { - ((PlayerEntityModel)getModel()).setVisible(true); - } - - if (entity.isSwimming()) { - if (entity.getVelocity().x < 100) { - entity.addVelocity(100, 0, 0); - } - - model.getAttributes().motionPitch = 70; - } else { - model.getAttributes().motionPitch = 0; - } - - if (getModel().getAttributes().isSitting) { - stack.translate(0, entity.getHeightOffset(), 0); - } - } - - @Override - public void render(DummyPony entity, float entityYaw, float tickDelta, MatrixStack stack, VertexConsumerProvider renderContext, int lightUv) { - super.render(entity, entityYaw, tickDelta, stack, renderContext, lightUv); - } - - @Override - public ClientPonyModel getEntityModel(DummyPony playermodel) { - Identifier loc = getTexture(playermodel); - - boolean slim = playermodel.getTextures().usesThinSkin(); - - IPony thePony = MineLittlePony.getInstance().getManager().getPony(loc); - - Race race = thePony.getRace(false); - - boolean canWet = playermodel.wet && (loc == playermodel.getTextures().getBlankSkin(SkinType.SKIN) || race == Race.SEAPONY); - - - @SuppressWarnings("unchecked") - ModelKey> key = (ModelKey>)(canWet ? ModelType.SEA_PONY.getKey(slim) : ModelType.getPlayerModel(thePony.getRace(true)).getKey(slim)); - - return manager.setModel(key).apply(thePony.getMetadata()).getBody(); - } - - @Override - protected FeatureRenderer> getArmourLayer() { - return new ArmourFeature<>(this); - } - - @Override - protected FeatureRenderer> getHeldItemLayer() { - return new GlowingItemFeature<>(this); - } - - @Override - protected FeatureRenderer> getElytraLayer() { - return new ElytraFeature>(this) { - @Override - protected Identifier getElytraTexture(DummyPony entity) { - return entity.getTextures().get(SkinType.ELYTRA).getId(); - } - }; - } - - @Override - public EquineRenderManager> getInternalRenderer() { - return manager; - } - - @Override - public Identifier findTexture(DummyPony entity) { - return getTexture(entity); - } -} diff --git a/src/main/java/com/minelittlepony/client/hdskins/MineLPHDSkins.java b/src/main/java/com/minelittlepony/client/hdskins/MineLPHDSkins.java index 5862356e..973be5ac 100644 --- a/src/main/java/com/minelittlepony/client/hdskins/MineLPHDSkins.java +++ b/src/main/java/com/minelittlepony/client/hdskins/MineLPHDSkins.java @@ -6,7 +6,7 @@ import com.minelittlepony.common.event.ClientReadyCallback; import com.minelittlepony.hdskins.client.SkinCacheClearCallback; import com.minelittlepony.hdskins.client.gui.GuiSkins; import com.minelittlepony.hdskins.profile.SkinType; -import com.minelittlepony.mson.api.Mson; + import com.mojang.authlib.GameProfile; import net.fabricmc.api.ClientModInitializer; @@ -32,9 +32,6 @@ public class MineLPHDSkins extends SkinsProxy implements ClientModInitializer { // Ponify the skins GUI. GuiSkins.setSkinsGui(GuiSkinsMineLP::new); }); - - // Preview on the select skin gui - Mson.getInstance().getEntityRendererRegistry().registerEntityRenderer(DummyPony.TYPE, DummyPonyRenderer::new); } @Override diff --git a/src/main/java/com/minelittlepony/client/hdskins/PonyPreview.java b/src/main/java/com/minelittlepony/client/hdskins/PonyPreview.java index 7ee31a71..c3e00e38 100644 --- a/src/main/java/com/minelittlepony/client/hdskins/PonyPreview.java +++ b/src/main/java/com/minelittlepony/client/hdskins/PonyPreview.java @@ -15,8 +15,8 @@ class PonyPreview extends PlayerPreview { public static final Identifier NO_SKIN_ALEX_PONY = new Identifier("minelittlepony", "textures/mob/noskin_alex.png"); public static final Identifier NO_SKIN_SEAPONY = new Identifier("minelittlepony", "textures/mob/noskin_seapony.png"); - private final DummyPony localPony = new DummyPony(DummyPony.TYPE, localTextures); - private final DummyPony remotePony = new DummyPony(DummyPony.TYPE, remoteTextures); + private final DummyPony localPony = new DummyPony(localTextures); + private final DummyPony remotePony = new DummyPony(remoteTextures); public void setWet(boolean isWet) { localPony.setWet(isWet); diff --git a/src/main/resources/assets/minelittlepony/textures/mob/noskin_seapony.png b/src/main/resources/assets/minelittlepony/textures/mob/noskin_seapony.png index 69917948bc4a3c846f32dbd46de1186bcb51c087..34fe5ed142c4564a96917cc95954659b4ce36fa5 100644 GIT binary patch delta 2327 zcmV+y3F!8r5~322B!B5iL_t(|+T~l#Yt&p9|J@{$`G`!@(ArigLc0)D1UDjL?XqrM zNPTfp+z2xW3gSZP-c7+jVL$}wLLPUnTng5OAd28Z{*_)z9KUZ0Gpeec>DHk z-~rclQ7jgrXSc4 zUh`))fu!}>*w`2+pUW5nV+{FxUZ^BJq^c@9oeq58hoUIZG!2|{f!eC7!f_mM&c$5B z++O%_-@7{&3>o|1i5Ptpo1;!ZG*4FUo(Id3mZJ`yMb0~^} zZnq20x$w7p?dLPa2%hIbQ558IIjE{CRA1M1=zqG7Teoh3bBFz-}5|ym@_jon4O(PKA%USP{8fmxAE!ICoslv z-ga0zckUbv!@%RmkAJTK z78VwGI4F_n;lqc4_SDoAYPA}>apMMeU01{cwOWkB<#JeFUKX2Cuh)gP(grRqEkz2nR;w*mDwVlN5Zvt%Q&rVS zx8}NT$<|bFvbM)q_t_NR;w+_e=`f9TCH-KADaCuh#>+pGF{IA%E=JAJI-JiXxER_kA$NGWmCkDCL-h=H{HIW;8V) zmo8o60MKf+FfcHHiHV88fX|;li#`B>{(8NRuV23g+DDHbg{rD3m&+I#8Nv7O-vI#Y z>+6xnZqqaa0wa?m=A*oi9JGb|M@L5k?I%y3uqf3hJWz=F-4N}BZQHPI8-JE%p-?Cw zm&;*&eLcW@p->R#2pVtOwqP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