Update to 1.14.3

This commit is contained in:
Sollace 2019-06-27 19:28:21 +02:00
parent a1f40c9b59
commit 2950a4de0a
17 changed files with 49 additions and 56 deletions

View file

@ -3,10 +3,10 @@ org.gradle.daemon=false
# Fabric Properties # Fabric Properties
# check these on https://fabricmc.net/use # check these on https://fabricmc.net/use
minecraft_version=1.14.2 minecraft_version=1.14.3
# probably best not to auto-update this # probably best not to auto-update this
yarn_mappings=1.14.2+build.2 yarn_mappings=1.14.3+build.1
loader_version=0.4.8+ loader_version=0.4.8+
# Mod Properties # Mod Properties
group=com.minelittlepony group=com.minelittlepony
@ -18,5 +18,5 @@ org.gradle.daemon=false
# Dependencies # Dependencies
fabric_version=0.3.0+ fabric_version=0.3.0+
kirin_version=1.14.2-1.0.1-SNAPSHOT kirin_version=1.14.3-1.1.0-SNAPSHOT
hd_skins_version=1.14.2-5.0.1-SNAPSHOT hd_skins_version=1.14.3-5.1.0-SNAPSHOT

View file

@ -9,16 +9,16 @@ import com.minelittlepony.common.client.IModUtilities;
import com.minelittlepony.settings.JsonConfig; import com.minelittlepony.settings.JsonConfig;
import com.minelittlepony.settings.PonyConfig; import com.minelittlepony.settings.PonyConfig;
import net.minecraft.ChatFormat;
import net.minecraft.client.MinecraftClient; import net.minecraft.client.MinecraftClient;
import net.minecraft.client.gui.screen.TitleScreen; import net.minecraft.client.gui.screen.TitleScreen;
import net.minecraft.client.options.KeyBinding; import net.minecraft.client.options.KeyBinding;
import net.minecraft.client.render.entity.EntityRenderDispatcher; import net.minecraft.client.render.entity.EntityRenderDispatcher;
import net.minecraft.client.util.InputUtil; import net.minecraft.client.util.InputUtil;
import net.minecraft.network.chat.Style;
import net.minecraft.network.chat.TextComponent;
import net.minecraft.network.chat.TranslatableComponent;
import net.minecraft.resource.ReloadableResourceManager; import net.minecraft.resource.ReloadableResourceManager;
import net.minecraft.text.LiteralText;
import net.minecraft.text.Style;
import net.minecraft.text.TranslatableText;
import net.minecraft.util.Formatting;
import net.minecraft.util.SystemUtil; import net.minecraft.util.SystemUtil;
import org.lwjgl.glfw.GLFW; import org.lwjgl.glfw.GLFW;
@ -82,11 +82,11 @@ public class MineLPClient extends MineLittlePony {
if (InputUtil.isKeyPressed(handle, GLFW.GLFW_KEY_F3) && InputUtil.isKeyPressed(handle, GLFW.GLFW_KEY_M)) { if (InputUtil.isKeyPressed(handle, GLFW.GLFW_KEY_F3) && InputUtil.isKeyPressed(handle, GLFW.GLFW_KEY_M)) {
if (!reloadingModels) { if (!reloadingModels) {
minecraft.inGameHud.getChatHud().addMessage( minecraft.inGameHud.getChatHud().addMessage(
(new TextComponent("")).append( new LiteralText("").append(
new TranslatableComponent("debug.prefix") new TranslatableText("debug.prefix")
.setStyle(new Style().setColor(ChatFormat.YELLOW).setBold(true))) .setStyle(new Style().setColor(Formatting.YELLOW).setBold(true)))
.append(" ") .append(" ")
.append(new TranslatableComponent("minelp.debug.reload_models.message"))); .append(new TranslatableText("minelp.debug.reload_models.message")));
reloadingModels = true; reloadingModels = true;
modelUpdateCounter++; modelUpdateCounter++;

View file

@ -3,7 +3,7 @@ package com.minelittlepony.client.gui;
import net.minecraft.client.gui.Element; import net.minecraft.client.gui.Element;
import net.minecraft.client.gui.screen.Screen; import net.minecraft.client.gui.screen.Screen;
import net.minecraft.client.resource.language.I18n; import net.minecraft.client.resource.language.I18n;
import net.minecraft.network.chat.TranslatableComponent; import net.minecraft.text.LiteralText;
import com.minelittlepony.MineLittlePony; import com.minelittlepony.MineLittlePony;
import com.minelittlepony.client.render.entities.MobRenderers; import com.minelittlepony.client.render.entities.MobRenderers;
@ -39,7 +39,7 @@ public class GuiPonySettings extends GameGui {
private final boolean hiddenOptions; private final boolean hiddenOptions;
public GuiPonySettings() { public GuiPonySettings() {
super(new TranslatableComponent(OPTIONS_PREFIX + "title")); super(new LiteralText(OPTIONS_PREFIX + "title"));
config = MineLittlePony.getInstance().getConfig(); config = MineLittlePony.getInstance().getConfig();

View file

@ -1,16 +1,16 @@
package com.minelittlepony.client.mixin; package com.minelittlepony.client.mixin;
import net.minecraft.entity.Entity; import net.minecraft.entity.Entity;
import net.minecraft.entity.EntitySize; import net.minecraft.entity.EntityDimensions;
import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.gen.Accessor; import org.spongepowered.asm.mixin.gen.Accessor;
@Mixin(Entity.class) @Mixin(Entity.class)
public interface IResizeable { public interface IResizeable {
@Accessor("size") @Accessor("dimensions")
EntitySize getCurrentSize(); EntityDimensions getCurrentSize();
@Accessor("size") @Accessor("dimensions")
void setCurrentSize(EntitySize size); void setCurrentSize(EntityDimensions size);
} }

View file

@ -13,13 +13,7 @@ import net.minecraft.client.render.Camera;
@Mixin(Camera.class) @Mixin(Camera.class)
public abstract class MixinCamera { public abstract class MixinCamera {
@Inject(method = "clipToSpace(D)D",
// cameraDistance;
// float field_18721;
// prevCameraDistance;
// float field_18722;
@Inject(method = "method_19318(D)D",
at = @At("RETURN"), at = @At("RETURN"),
cancellable = true) cancellable = true)
private void redirectCameraDistance(double initial, CallbackInfoReturnable<Double> info) { private void redirectCameraDistance(double initial, CallbackInfoReturnable<Double> info) {

View file

@ -9,7 +9,7 @@ import com.minelittlepony.MineLittlePony;
import com.minelittlepony.pony.IPony; import com.minelittlepony.pony.IPony;
import net.minecraft.entity.EntityPose; import net.minecraft.entity.EntityPose;
import net.minecraft.entity.EntitySize; import net.minecraft.entity.EntityDimensions;
import net.minecraft.entity.LivingEntity; import net.minecraft.entity.LivingEntity;
import net.minecraft.entity.player.PlayerEntity; import net.minecraft.entity.player.PlayerEntity;
@ -18,10 +18,10 @@ public abstract class MixinPlayerEntity extends LivingEntity {
private MixinPlayerEntity() {super(null, null);} private MixinPlayerEntity() {super(null, null);}
@Inject(method = "getActiveEyeHeight(Lnet/minecraft/entity/EntityPose;Lnet/minecraft/entity/EntitySize;)F", @Inject(method = "getActiveEyeHeight(Lnet/minecraft/entity/EntityPose;Lnet/minecraft/entity/EntityDimensions;)F",
at = @At("RETURN"), at = @At("RETURN"),
cancellable = true) cancellable = true)
protected void redirectGetActiveEyeHeight(EntityPose pose, EntitySize size, CallbackInfoReturnable<Float> info) { protected void redirectGetActiveEyeHeight(EntityPose pose, EntityDimensions size, CallbackInfoReturnable<Float> info) {
float value = info.getReturnValueF(); float value = info.getReturnValueF();
IPony pony = MineLittlePony.getInstance().getManager().getPony((PlayerEntity)(Object)this); IPony pony = MineLittlePony.getInstance().getManager().getPony((PlayerEntity)(Object)this);

View file

@ -6,12 +6,12 @@ public class ModelDeadMau5Ears extends SkullEntityModel {
public ModelDeadMau5Ears() { public ModelDeadMau5Ears() {
super(24, 0, 64, 64); super(24, 0, 64, 64);
field_3564.boxes.clear(); skull.boxes.clear();
field_3564.addBox(-9, -13, -1, 6, 6, 1, 0); skull.addBox(-9, -13, -1, 6, 6, 1, 0);
field_3564.addBox(3, -13, -1, 6, 6, 1, 0); skull.addBox(3, -13, -1, 6, 6, 1, 0);
} }
public void setVisible(boolean show) { public void setVisible(boolean show) {
field_3564.field_3664 = !show; skull.field_3664 = !show;
} }
} }

View file

@ -36,7 +36,7 @@ public class ModelPonyHead extends SkullOverlayEntityModel implements ICapitated
@Override @Override
public Cuboid getHead() { public Cuboid getHead() {
return field_3564; return skull;
} }
@Override @Override
@ -45,13 +45,13 @@ public class ModelPonyHead extends SkullOverlayEntityModel implements ICapitated
} }
@Override @Override
public void setRotationAngles(float move, float swing, float ticks, float headYaw, float headPitch, float scale) { public void render(float move, float swing, float ticks, float headYaw, float headPitch, float scale) {
snout.isHidden = metadata.getRace().isHuman(); snout.isHidden = metadata.getRace().isHuman();
ears.field_3664 = snout.isHidden; ears.field_3664 = snout.isHidden;
snout.setGender(metadata.getGender()); snout.setGender(metadata.getGender());
super.setRotationAngles(move, swing, ticks, headYaw, headPitch, scale); super.render(move, swing, ticks, headYaw, headPitch, scale);
if (metadata.hasMagic()) { if (metadata.hasMagic()) {
getHead().applyTransform(scale); getHead().applyTransform(scale);

View file

@ -27,7 +27,7 @@ import net.minecraft.item.ArmorItem;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.resource.Resource; import net.minecraft.resource.Resource;
import net.minecraft.util.Identifier; import net.minecraft.util.Identifier;
import net.minecraft.util.math.BoundingBox; import net.minecraft.util.math.Box;
import net.minecraft.util.math.MathHelper; import net.minecraft.util.math.MathHelper;
import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.Vec3d; import net.minecraft.util.math.Vec3d;
@ -240,14 +240,14 @@ public class Pony implements IPony {
} }
@Override @Override
public BoundingBox getComputedBoundingBox(LivingEntity entity) { public Box getComputedBoundingBox(LivingEntity entity) {
float scale = getMetadata().getSize().getScaleFactor() + 0.1F; float scale = getMetadata().getSize().getScaleFactor() + 0.1F;
Vec3d pos = getAbsoluteRidingOffset(entity); Vec3d pos = getAbsoluteRidingOffset(entity);
float width = entity.getWidth() * scale; float width = entity.getWidth() * scale;
return new BoundingBox( return new Box(
- width, (entity.getHeight() * scale), -width, - width, (entity.getHeight() * scale), -width,
width, 0, width).offset(pos); width, 0, width).offset(pos);
} }

View file

@ -3,7 +3,7 @@ package com.minelittlepony.client.render;
import net.minecraft.client.MinecraftClient; import net.minecraft.client.MinecraftClient;
import net.minecraft.client.render.WorldRenderer; import net.minecraft.client.render.WorldRenderer;
import net.minecraft.entity.LivingEntity; import net.minecraft.entity.LivingEntity;
import net.minecraft.util.math.BoundingBox; import net.minecraft.util.math.Box;
import com.minelittlepony.pony.IPony; import com.minelittlepony.pony.IPony;
@ -23,7 +23,7 @@ public class DebugBoundingBoxRenderer {
return; return;
} }
BoundingBox boundingBox = pony.getComputedBoundingBox(entity); Box boundingBox = pony.getComputedBoundingBox(entity);
enableBlend(); enableBlend();
blendFuncSeparate(SourceFactor.SRC_ALPHA, DestFactor.ONE_MINUS_SRC_ALPHA, SourceFactor.ONE, DestFactor.ZERO); blendFuncSeparate(SourceFactor.SRC_ALPHA, DestFactor.ONE_MINUS_SRC_ALPHA, SourceFactor.ONE, DestFactor.ZERO);

View file

@ -2,7 +2,7 @@ package com.minelittlepony.client.render;
import net.minecraft.client.render.VisibleRegion; import net.minecraft.client.render.VisibleRegion;
import net.minecraft.entity.LivingEntity; import net.minecraft.entity.LivingEntity;
import net.minecraft.util.math.BoundingBox; import net.minecraft.util.math.Box;
import com.minelittlepony.pony.IPony; import com.minelittlepony.pony.IPony;
@ -25,10 +25,10 @@ public class FrustrumCheck<T extends LivingEntity> implements VisibleRegion {
} }
@Override @Override
public boolean intersects(BoundingBox bounds) { public boolean intersects(Box bounds) {
IPony pony = renderer.getPony(entity); IPony pony = renderer.getPony(entity);
BoundingBox boundingBox = pony.getComputedBoundingBox(entity); Box boundingBox = pony.getComputedBoundingBox(entity);
return vanilla.intersects(boundingBox); return vanilla.intersects(boundingBox);
} }

View file

@ -11,7 +11,7 @@ import com.mojang.blaze3d.platform.GlStateManager;
import net.minecraft.client.render.entity.EntityRenderDispatcher; import net.minecraft.client.render.entity.EntityRenderDispatcher;
import net.minecraft.client.render.entity.GuardianEntityRenderer; import net.minecraft.client.render.entity.GuardianEntityRenderer;
import net.minecraft.entity.EntitySize; import net.minecraft.entity.EntityDimensions;
import net.minecraft.entity.mob.ElderGuardianEntity; import net.minecraft.entity.mob.ElderGuardianEntity;
import net.minecraft.entity.mob.GuardianEntity; import net.minecraft.entity.mob.GuardianEntity;
import net.minecraft.util.Identifier; import net.minecraft.util.Identifier;
@ -54,10 +54,10 @@ public class RenderPonyGuardian extends GuardianEntityRenderer {
@Override @Override
public void render(GuardianEntity entity, double x, double y, double z, float entityYaw, float partialTicks) { public void render(GuardianEntity entity, double x, double y, double z, float entityYaw, float partialTicks) {
IResizeable resize = (IResizeable)entity; IResizeable resize = (IResizeable)entity;
EntitySize origin = resize.getCurrentSize(); EntityDimensions origin = resize.getCurrentSize();
// aligns the beam to their horns // aligns the beam to their horns
resize.setCurrentSize(EntitySize.resizeable(origin.width, entity instanceof ElderGuardianEntity ? 6 : 3)); resize.setCurrentSize(EntityDimensions.changing(origin.width, entity instanceof ElderGuardianEntity ? 6 : 3));
super.render(entity, x, y, z, entityYaw, partialTicks); super.render(entity, x, y, z, entityYaw, partialTicks);

View file

@ -30,7 +30,7 @@ public class LayerDJPon3Head<T extends AbstractClientPlayerEntity, M extends Ent
GlStateManager.translatef(0, 0.3F, 0); GlStateManager.translatef(0, 0.3F, 0);
deadMau5.setVisible(true); deadMau5.setVisible(true);
deadMau5.setRotationAngles(move, swing, partialTicks, 0, 0, scale); deadMau5.render(move, swing, partialTicks, 0, 0, scale);
GlStateManager.popMatrix(); GlStateManager.popMatrix();
} }

View file

@ -67,7 +67,6 @@ public class PlayerSkullRenderer extends PonySkull {
@Override @Override
public void render(float animateTicks, float rotation, float scale) { public void render(float animateTicks, float rotation, float scale) {
super.render(animateTicks, rotation, scale); super.render(animateTicks, rotation, scale);
/*render*/ deadMau5.render(animateTicks, 0, 0, rotation, 0, scale);
deadMau5.setRotationAngles(animateTicks, 0, 0, rotation, 0, scale);
} }
} }

View file

@ -20,6 +20,6 @@ public abstract class PonySkull implements ISkull {
@Override @Override
public void render(float animateTicks, float rotation, float scale) { public void render(float animateTicks, float rotation, float scale) {
ponyHead.setRotationAngles(animateTicks, 0, 0, rotation, 0, scale); ponyHead.render(animateTicks, 0, 0, rotation, 0, scale);
} }
} }

View file

@ -29,7 +29,7 @@ public class ClientPonyConfig extends PonyConfig {
super.save(); super.save();
PlayerEntity player = MinecraftClient.getInstance().player; PlayerEntity player = MinecraftClient.getInstance().player;
if (player != null) { if (player != null) {
player.refreshSize(); player.calculateDimensions();
} }
} }
} }

View file

@ -2,7 +2,7 @@ package com.minelittlepony.pony;
import net.minecraft.entity.LivingEntity; import net.minecraft.entity.LivingEntity;
import net.minecraft.util.Identifier; import net.minecraft.util.Identifier;
import net.minecraft.util.math.BoundingBox; import net.minecraft.util.math.Box;
import net.minecraft.util.math.Vec3d; import net.minecraft.util.math.Vec3d;
import com.minelittlepony.MineLittlePony; import com.minelittlepony.MineLittlePony;
@ -109,5 +109,5 @@ public interface IPony {
/** /**
* Gets the actual bounding box of this entity as a pony. * Gets the actual bounding box of this entity as a pony.
*/ */
BoundingBox getComputedBoundingBox(LivingEntity entity); Box getComputedBoundingBox(LivingEntity entity);
} }