diff --git a/build.gradle b/build.gradle index 5b03c5ec..5ffd147b 100644 --- a/build.gradle +++ b/build.gradle @@ -62,7 +62,7 @@ dependencies { include "com.minelittlepony:Mson:${project.mson_version}" modImplementation "com.minelittlepony:HDSkins:${project.hd_skins_version}" - modImplementation "io.github.prospector:modmenu:${project.modmenu_version}" + // modImplementation "io.github.prospector:modmenu:${project.modmenu_version}" } // diff --git a/gradle.properties b/gradle.properties index 61d9732f..ae6ee075 100644 --- a/gradle.properties +++ b/gradle.properties @@ -2,21 +2,21 @@ org.gradle.jvmargs=-Xmx3G org.gradle.daemon=false # Fabric Properties - # check these on https://fabricmc.net/use - minecraft_version=1.15-pre3 - yarn_mappings=1.15-pre3+build.2:v2 - loader_version=0.7.2+build.174 + # check these on https://fabricmc.net/use + minecraft_version=1.15-pre6 + yarn_mappings=1.15-pre6+build.1:v2 + loader_version=0.7.2+build.174 # Mod Properties - group=com.minelittlepony - displayname=Mine Little Pony - authors=Verdana, Rene_Z, Mumfrey, Killjoy1221, Sollace - description=Mine Little Pony turns players and mobs into ponies. Press F9 ingame to access settings. - version=4 - release=SNAPSHOT + group=com.minelittlepony + displayname=Mine Little Pony + authors=Verdana, Rene_Z, Mumfrey, Killjoy1221, Sollace + description=Mine Little Pony turns players and mobs into ponies. Press F9 ingame to access settings. + version=4 + release=SNAPSHOT # Dependencies modmenu_version=1.8.0.1.15-pre3+build.14 - kirin_version=1.5-1.15-pre3-SNAPSHOT - hd_skins_version=6-1.15-pre3-SNAPSHOT - mson_version=1.1.3-1.15-pre3-SNAPSHOT + kirin_version=1.5-1.15-pre6-SNAPSHOT + hd_skins_version=6-1.15-pre6-SNAPSHOT + mson_version=1.1.3-1.15-pre6-SNAPSHOT diff --git a/src/main/java/com/minelittlepony/client/model/AbstractPonyModel.java b/src/main/java/com/minelittlepony/client/model/AbstractPonyModel.java index 4f498e1c..556b686a 100644 --- a/src/main/java/com/minelittlepony/client/model/AbstractPonyModel.java +++ b/src/main/java/com/minelittlepony/client/model/AbstractPonyModel.java @@ -80,7 +80,7 @@ public abstract class AbstractPonyModel extends ClientPo if (attributes.isCrouching) { ponyCrouch(); - } else if (isRiding) { + } else if (riding) { ponyRide(); } else { adjustBody(BODY_ROT_X_NOTSNEAK, BODY_RP_Y_NOTSNEAK, BODY_RP_Z_NOTSNEAK); diff --git a/src/main/java/com/minelittlepony/client/model/ClientPonyModel.java b/src/main/java/com/minelittlepony/client/model/ClientPonyModel.java index b19e0f9f..544fc2e7 100644 --- a/src/main/java/com/minelittlepony/client/model/ClientPonyModel.java +++ b/src/main/java/com/minelittlepony/client/model/ClientPonyModel.java @@ -34,7 +34,7 @@ public abstract class ClientPonyModel extends MsonPlayer @Override public void updateLivingState(T entity, IPony pony, EquineRenderManager.Mode mode) { - isChild = entity.isBaby(); + child = entity.isBaby(); isSneaking = entity.isInSneakingPose(); attributes.updateLivingState(entity, pony, mode); } @@ -56,7 +56,7 @@ public abstract class ClientPonyModel extends MsonPlayer @Override public Size getSize() { - return isChild ? Size.FOAL : getMetadata().getSize(); + return child ? Size.FOAL : getMetadata().getSize(); } @Override @@ -71,7 +71,7 @@ public abstract class ClientPonyModel extends MsonPlayer @Override public boolean isRiding() { - return isRiding; + return riding; } @Override diff --git a/src/main/java/com/minelittlepony/client/model/entity/BreezieModel.java b/src/main/java/com/minelittlepony/client/model/entity/BreezieModel.java index 4f405910..691eac80 100644 --- a/src/main/java/com/minelittlepony/client/model/entity/BreezieModel.java +++ b/src/main/java/com/minelittlepony/client/model/entity/BreezieModel.java @@ -57,7 +57,7 @@ public class BreezieModel extends MsonBiped implement ((MsonPart)leftLeg) .rotate(swing * MathHelper.cos(move * 0.6662F + PI) * 1.4F, 0, 0); ((MsonPart)rightLeg).rotate(swing * MathHelper.cos(move * 0.6662F) * 1.4F, 0, 0); - if (isRiding) { + if (riding) { leftArm.pitch += -PI / 5; rightArm.pitch += -PI / 5; diff --git a/src/main/java/com/minelittlepony/client/model/entity/WitchPonyModel.java b/src/main/java/com/minelittlepony/client/model/entity/WitchPonyModel.java index ef006082..b97648b2 100644 --- a/src/main/java/com/minelittlepony/client/model/entity/WitchPonyModel.java +++ b/src/main/java/com/minelittlepony/client/model/entity/WitchPonyModel.java @@ -20,7 +20,7 @@ public class WitchPonyModel extends ZebraModel { super.updateLivingState(entity, pony, mode); if (entity.hasCustomName() && "Filly".equals(entity.getCustomName().getString())) { - isChild = true; + child = true; } leftArmPose = ArmPose.EMPTY; rightArmPose = entity.getMainHandStack().isEmpty() ? ArmPose.EMPTY : ArmPose.ITEM; diff --git a/src/main/java/com/minelittlepony/client/model/entity/race/EarthPonyModel.java b/src/main/java/com/minelittlepony/client/model/entity/race/EarthPonyModel.java index 21a4205d..138116f9 100644 --- a/src/main/java/com/minelittlepony/client/model/entity/race/EarthPonyModel.java +++ b/src/main/java/com/minelittlepony/client/model/entity/race/EarthPonyModel.java @@ -34,7 +34,7 @@ public class EarthPonyModel extends AbstractPonyModel public void setAngles(T entity, float move, float swing, float ticks, float headYaw, float headPitch) { super.setAngles(entity, move, swing, ticks, headYaw, headPitch); snout.setGender(getMetadata().getGender()); - cape.pivotY = isSneaking ? 2 : isRiding ? -4 : 0; + cape.pivotY = isSneaking ? 2 : riding ? -4 : 0; } @Override diff --git a/src/main/java/com/minelittlepony/client/modmenu/MineLPModMenuFactory.java b/src/main/java/com/minelittlepony/client/modmenu/MineLPModMenuFactory.java index dbcd8458..d39acf95 100644 --- a/src/main/java/com/minelittlepony/client/modmenu/MineLPModMenuFactory.java +++ b/src/main/java/com/minelittlepony/client/modmenu/MineLPModMenuFactory.java @@ -1,4 +1,4 @@ -package com.minelittlepony.client.modmenu; +/*package com.minelittlepony.client.modmenu; import io.github.prospector.modmenu.api.ModMenuApi; import net.minecraft.client.gui.screen.Screen; @@ -19,3 +19,4 @@ public class MineLPModMenuFactory implements ModMenuApi { return GuiPonySettings::new; } } +*/ diff --git a/src/main/java/com/minelittlepony/client/pony/Pony.java b/src/main/java/com/minelittlepony/client/pony/Pony.java index df7b4cf3..88edc223 100644 --- a/src/main/java/com/minelittlepony/client/pony/Pony.java +++ b/src/main/java/com/minelittlepony/client/pony/Pony.java @@ -192,9 +192,9 @@ public class Pony implements IPony { float delta = MinecraftClient.getInstance().getTickDelta(); return new Vec3d( - MathHelper.lerp(delta, entity.prevRenderX, entity.getX()), - MathHelper.lerp(delta, entity.prevRenderY, entity.getY()), - MathHelper.lerp(delta, entity.prevRenderZ, entity.getZ()) + MathHelper.lerp(delta, entity.prevX, entity.getX()), + MathHelper.lerp(delta, entity.prevY, entity.getY()), + MathHelper.lerp(delta, entity.prevZ, entity.getZ()) ); } diff --git a/src/main/java/com/minelittlepony/client/render/EquineRenderManager.java b/src/main/java/com/minelittlepony/client/render/EquineRenderManager.java index cc2b9012..59f84b86 100644 --- a/src/main/java/com/minelittlepony/client/render/EquineRenderManager.java +++ b/src/main/java/com/minelittlepony/client/render/EquineRenderManager.java @@ -7,8 +7,8 @@ import com.minelittlepony.client.transform.PonyPosture; import com.minelittlepony.mson.api.ModelKey; import com.minelittlepony.pony.IPony; import com.minelittlepony.util.MathUtil; -import com.mojang.blaze3d.platform.GlStateManager.DestFactor; -import com.mojang.blaze3d.platform.GlStateManager.SourceFactor; +import com.mojang.blaze3d.platform.GlStateManager.DstFactor; +import com.mojang.blaze3d.platform.GlStateManager.SrcFactor; import com.mojang.blaze3d.systems.RenderSystem; import javax.annotation.Nonnull; @@ -35,7 +35,7 @@ public class EquineRenderManager { RenderSystem.enableBlend(); RenderSystem.blendFuncSeparate( - SourceFactor.CONSTANT_COLOR, DestFactor.ONE, - SourceFactor.ONE, DestFactor.ZERO); + SrcFactor.CONSTANT_COLOR, DstFactor.ONE, + SrcFactor.ONE, DstFactor.ZERO); }, () -> { RenderSystem.disableBlend(); RenderSystem.defaultBlendFunc(); }); - private static final RenderLayer MAGIC = RenderLayer.of("mlp_magic_glow", VertexFormats.POSITION_COLOR_TEXTURE_LIGHT_NORMAL, 7, 256, RenderLayer.PhaseData.builder() + private static final RenderLayer MAGIC = RenderLayer.of("mlp_magic_glow", VertexFormats.POSITION_COLOR_TEXTURE_LIGHT_NORMAL, 7, 256, RenderLayer.MultiPhaseParameters.builder() .texture(NO_TEXTURE) .writeMaskState(COLOR_MASK) .transparency(LIGHTNING_TRANSPARENCY) @@ -37,7 +37,7 @@ public class MagicGlow extends RenderPhase { } public static RenderLayer getTintedTexturedLayer(Identifier texture, float red, float green, float blue, float alpha) { - return RenderLayer.of("mlp_tint_layer", VertexFormats.POSITION_COLOR_TEXTURE_OVERLAY_LIGHT_NORMAL, 7, 256, true, true, RenderLayer.PhaseData.builder() + return RenderLayer.of("mlp_tint_layer", VertexFormats.POSITION_COLOR_TEXTURE_OVERLAY_LIGHT_NORMAL, 7, 256, true, true, RenderLayer.MultiPhaseParameters.builder() .texture(new Color(texture, red, green, blue, alpha)) .writeMaskState(COLOR_MASK) .alpha(ONE_TENTH_ALPHA) diff --git a/src/main/java/com/minelittlepony/client/render/blockentity/skull/PonySkullRenderer.java b/src/main/java/com/minelittlepony/client/render/blockentity/skull/PonySkullRenderer.java index b29c57f9..24fc5c09 100644 --- a/src/main/java/com/minelittlepony/client/render/blockentity/skull/PonySkullRenderer.java +++ b/src/main/java/com/minelittlepony/client/render/blockentity/skull/PonySkullRenderer.java @@ -39,7 +39,7 @@ public class PonySkullRenderer extends SkullBlockEntityRenderer { ); } - private final Map skullMap = Util.create(Maps.newHashMap(), (skullMap) -> { + private final Map skullMap = Util.make(Maps.newHashMap(), (skullMap) -> { skullMap.put(SkullBlock.Type.SKELETON, new MobSkull(SkeleponyRenderer.SKELETON, MobRenderers.SKELETON)); skullMap.put(SkullBlock.Type.WITHER_SKELETON, new MobSkull(SkeleponyRenderer.WITHER, MobRenderers.SKELETON)); skullMap.put(SkullBlock.Type.ZOMBIE, new MobSkull(ZomponyRenderer.ZOMBIE, MobRenderers.ZOMBIE)); diff --git a/src/main/java/com/minelittlepony/client/render/entity/PlayerPonyRenderer.java b/src/main/java/com/minelittlepony/client/render/entity/PlayerPonyRenderer.java index 3d388867..2f8344d6 100644 --- a/src/main/java/com/minelittlepony/client/render/entity/PlayerPonyRenderer.java +++ b/src/main/java/com/minelittlepony/client/render/entity/PlayerPonyRenderer.java @@ -80,7 +80,7 @@ public class PlayerPonyRenderer extends PlayerEntityRenderer implements IPonyRen @Override public void render(AbstractClientPlayerEntity entity, float entityYaw, float tickDelta, MatrixStack stack, VertexConsumerProvider renderContext, int lightUv) { - field_4673 = manager.getShadowScale(); + shadowSize = manager.getShadowScale(); super.render(entity, entityYaw, tickDelta, stack, renderContext, lightUv); DebugBoundingBoxRenderer.render(manager.getPony(entity), entity, stack, renderContext); @@ -99,11 +99,11 @@ public class PlayerPonyRenderer extends PlayerEntityRenderer implements IPonyRen } @Override - public boolean isVisible(AbstractClientPlayerEntity entity, Frustum camera, double camX, double camY, double camZ) { + public boolean shouldRender(AbstractClientPlayerEntity entity, Frustum camera, double camX, double camY, double camZ) { if (entity.isSleeping() && entity == MinecraftClient.getInstance().player) { return true; } - return super.isVisible(entity, manager.getFrustrum(entity, camera), camX, camY, camZ); + return super.shouldRender(entity, manager.getFrustrum(entity, camera), camX, camY, camZ); } @Override diff --git a/src/main/java/com/minelittlepony/client/render/entity/PonyRenderer.java b/src/main/java/com/minelittlepony/client/render/entity/PonyRenderer.java index 9aa91e0b..d5aceaa2 100644 --- a/src/main/java/com/minelittlepony/client/render/entity/PonyRenderer.java +++ b/src/main/java/com/minelittlepony/client/render/entity/PonyRenderer.java @@ -74,8 +74,8 @@ public abstract class PonyRenderer } @Override - public boolean isVisible(T entity, Frustum visibleRegion, double camX, double camY, double camZ) { - return super.isVisible(entity, manager.getFrustrum(entity, visibleRegion), camX, camY, camZ); + public boolean shouldRender(T entity, Frustum visibleRegion, double camX, double camY, double camZ) { + return super.shouldRender(entity, manager.getFrustrum(entity, visibleRegion), camX, camY, camZ); } @Override @@ -86,10 +86,10 @@ public abstract class PonyRenderer } // shadowRadius - field_4673 = manager.getShadowScale(); + shadowSize = manager.getShadowScale(); if (entity.isBaby()) { - field_4673 *= 3; // undo vanilla shadow scaling + shadowSize *= 3; // undo vanilla shadow scaling } if (!entity.hasVehicle()) { diff --git a/src/main/java/com/minelittlepony/client/render/entity/feature/CapeFeature.java b/src/main/java/com/minelittlepony/client/render/entity/feature/CapeFeature.java index 54f74c04..e283ca32 100644 --- a/src/main/java/com/minelittlepony/client/render/entity/feature/CapeFeature.java +++ b/src/main/java/com/minelittlepony/client/render/entity/feature/CapeFeature.java @@ -26,10 +26,10 @@ public class CapeFeature> @Override public void render(MatrixStack stack, VertexConsumerProvider renderContext, int lightUv, AbstractClientPlayerEntity player, float limbDistance, float limbAngle, float tickDelta, float age, float headYaw, float headPitch) { - M model = getModel(); + M model = getContextModel(); if (player.hasSkinTexture() && !player.isInvisible() - && player.isSkinOverlayVisible(PlayerModelPart.CAPE) && player.getCapeTexture() != null + && player.isPartVisible(PlayerModelPart.CAPE) && player.getCapeTexture() != null && player.getEquippedStack(EquipmentSlot.CHEST).getItem() != Items.ELYTRA) { stack.push(); diff --git a/src/main/java/com/minelittlepony/client/render/entity/feature/ElytraFeature.java b/src/main/java/com/minelittlepony/client/render/entity/feature/ElytraFeature.java index fe25db7b..7c13deab 100644 --- a/src/main/java/com/minelittlepony/client/render/entity/feature/ElytraFeature.java +++ b/src/main/java/com/minelittlepony/client/render/entity/feature/ElytraFeature.java @@ -41,7 +41,7 @@ public class ElytraFeature & IP EntityModel elytra = getElytraModel(); - getModel().copyStateTo(elytra); + getContextModel().copyStateTo(elytra); if (elytra instanceof PonyElytra) { ((PonyElytra)elytra).isSneaking = getContext().getEntityPony(entity).isCrouching(entity); } @@ -76,7 +76,7 @@ public class ElytraFeature & IP if (result != null) return result; } - if (player.hasSkinTexture() && player.isSkinOverlayVisible(PlayerModelPart.CAPE)) { + if (player.hasSkinTexture() && player.isPartVisible(PlayerModelPart.CAPE)) { result = player.getCapeTexture(); if (result != null) return result; diff --git a/src/main/java/com/minelittlepony/client/render/entity/feature/GlowingItemFeature.java b/src/main/java/com/minelittlepony/client/render/entity/feature/GlowingItemFeature.java index 3d73f968..cd5fe62c 100644 --- a/src/main/java/com/minelittlepony/client/render/entity/feature/GlowingItemFeature.java +++ b/src/main/java/com/minelittlepony/client/render/entity/feature/GlowingItemFeature.java @@ -21,7 +21,7 @@ public class GlowingItemFeature } protected boolean isUnicorn() { - return getModel() instanceof IUnicorn && ((IUnicorn)getModel()).canCast(); + return getContextModel() instanceof IUnicorn && ((IUnicorn)getContextModel()).canCast(); } @Override @@ -36,7 +36,7 @@ public class GlowingItemFeature @Override protected void postItemRender(T entity, ItemStack drop, ModelTransformation.Type transform, Arm hand, MatrixStack stack, VertexConsumerProvider renderContext) { if (isUnicorn()) { - PonyRenderDispatcher.getInstance().getMagicRenderer().renderItemGlow(entity, drop, transform, hand, ((IUnicorn)getModel()).getMagicColor(), stack, renderContext); + PonyRenderDispatcher.getInstance().getMagicRenderer().renderItemGlow(entity, drop, transform, hand, ((IUnicorn)getContextModel()).getMagicColor(), stack, renderContext); } } @@ -44,7 +44,7 @@ public class GlowingItemFeature @Override protected void renderArm(Arm arm, MatrixStack stack) { if (isUnicorn()) { - ((IUnicorn)getModel()).getUnicornArmForSide(arm).rotate(stack); + ((IUnicorn)getContextModel()).getUnicornArmForSide(arm).rotate(stack); } else { super.renderArm(arm, stack); } diff --git a/src/main/java/com/minelittlepony/client/render/entity/feature/HeldItemFeature.java b/src/main/java/com/minelittlepony/client/render/entity/feature/HeldItemFeature.java index 4244708c..61a70472 100644 --- a/src/main/java/com/minelittlepony/client/render/entity/feature/HeldItemFeature.java +++ b/src/main/java/com/minelittlepony/client/render/entity/feature/HeldItemFeature.java @@ -40,7 +40,7 @@ public class HeldItemFeature & ItemStack right = getRightItem(entity); if (!left.isEmpty() || !right.isEmpty()) { - M model = getModel(); + M model = getContextModel(); stack.push(); @@ -58,7 +58,7 @@ public class HeldItemFeature & stack.push(); renderArm(arm, stack); - if (getModel().getAttributes().isCrouching) { + if (getContextModel().getAttributes().isCrouching) { stack.translate(0, 0.2F, 0); } @@ -91,6 +91,6 @@ public class HeldItemFeature & * Renders the main arm */ protected void renderArm(Arm arm, MatrixStack stack) { - getModel().setArmAngle(arm, stack); + getContextModel().setArmAngle(arm, stack); } } diff --git a/src/main/java/com/minelittlepony/client/render/entity/feature/IllagerHeldItemFeature.java b/src/main/java/com/minelittlepony/client/render/entity/feature/IllagerHeldItemFeature.java index c23c10a5..f39ce115 100644 --- a/src/main/java/com/minelittlepony/client/render/entity/feature/IllagerHeldItemFeature.java +++ b/src/main/java/com/minelittlepony/client/render/entity/feature/IllagerHeldItemFeature.java @@ -23,7 +23,7 @@ public class IllagerHeldItemFeature p == EntityType.PARROT).ifPresent((entityType) -> { stack.push(); - getModel().transform(BodyPart.BODY, stack); + getContextModel().transform(BodyPart.BODY, stack); stack.translate(left ? 0.25 : -0.25, entity.isInSneakingPose() ? -0.5 : -0.25, 0.35); stack.multiply(Vector3f.POSITIVE_Z.getDegreesQuaternion(left ? -5 : 5)); diff --git a/src/main/java/com/minelittlepony/client/render/entity/npc/IllagerPonyRenderer.java b/src/main/java/com/minelittlepony/client/render/entity/npc/IllagerPonyRenderer.java index 7cea9b62..2faf0a1b 100644 --- a/src/main/java/com/minelittlepony/client/render/entity/npc/IllagerPonyRenderer.java +++ b/src/main/java/com/minelittlepony/client/render/entity/npc/IllagerPonyRenderer.java @@ -78,7 +78,7 @@ public abstract class IllagerPonyRenderer extends PonyR public void render(IllusionerEntity entity, float entityYaw, float tickDelta, MatrixStack stack, VertexConsumerProvider renderContext, int lightUv) { if (entity.isInvisible()) { Vec3d[] clones = entity.method_7065(tickDelta); - float rotation = getAge(entity, tickDelta); + float rotation = getCustomAngle(entity, tickDelta); for (int i = 0; i < clones.length; ++i) { stack.push(); diff --git a/src/main/java/com/minelittlepony/client/render/entity/npc/NpcClothingFeature.java b/src/main/java/com/minelittlepony/client/render/entity/npc/NpcClothingFeature.java index 8b2f1683..e9426659 100644 --- a/src/main/java/com/minelittlepony/client/render/entity/npc/NpcClothingFeature.java +++ b/src/main/java/com/minelittlepony/client/render/entity/npc/NpcClothingFeature.java @@ -37,7 +37,7 @@ class NpcClothingFeature< M extends EntityModel & IPonyModel & ModelWithHat, C extends FeatureRendererContext & IPonyRenderContext> extends AbstractPonyFeature { - private static final Int2ObjectMap LEVEL_TO_ID = Util.create(new Int2ObjectOpenHashMap<>(), a -> { + private static final Int2ObjectMap LEVEL_TO_ID = Util.make(new Int2ObjectOpenHashMap<>(), a -> { a.put(1, new Identifier("stone")); a.put(2, new Identifier("iron")); a.put(3, new Identifier("gold")); @@ -77,7 +77,7 @@ class NpcClothingFeature< HatType typeHatLayer = getHatType(typeHatCache, "type", Registry.VILLAGER_TYPE, type); HatType profHatLayer = getHatType(profHatCache, "profession", Registry.VILLAGER_PROFESSION, profession); - M entityModel = getModel(); + M entityModel = getContextModel(); entityModel.setHatVisible( profHatLayer == VillagerResourceMetadata.HatType.NONE