mirror of
https://github.com/MineLittlePony/MineLittlePony.git
synced 2025-02-13 16:24:23 +01:00
Update to 1.14.3
This commit is contained in:
parent
a1f40c9b59
commit
2950a4de0a
17 changed files with 49 additions and 56 deletions
|
@ -3,10 +3,10 @@ org.gradle.daemon=false
|
|||
|
||||
# Fabric Properties
|
||||
# check these on https://fabricmc.net/use
|
||||
minecraft_version=1.14.2
|
||||
# probably best not to auto-update this
|
||||
yarn_mappings=1.14.2+build.2
|
||||
loader_version=0.4.8+
|
||||
minecraft_version=1.14.3
|
||||
# probably best not to auto-update this
|
||||
yarn_mappings=1.14.3+build.1
|
||||
loader_version=0.4.8+
|
||||
|
||||
# Mod Properties
|
||||
group=com.minelittlepony
|
||||
|
@ -18,5 +18,5 @@ org.gradle.daemon=false
|
|||
|
||||
# Dependencies
|
||||
fabric_version=0.3.0+
|
||||
kirin_version=1.14.2-1.0.1-SNAPSHOT
|
||||
hd_skins_version=1.14.2-5.0.1-SNAPSHOT
|
||||
kirin_version=1.14.3-1.1.0-SNAPSHOT
|
||||
hd_skins_version=1.14.3-5.1.0-SNAPSHOT
|
||||
|
|
|
@ -9,16 +9,16 @@ import com.minelittlepony.common.client.IModUtilities;
|
|||
import com.minelittlepony.settings.JsonConfig;
|
||||
import com.minelittlepony.settings.PonyConfig;
|
||||
|
||||
import net.minecraft.ChatFormat;
|
||||
import net.minecraft.client.MinecraftClient;
|
||||
import net.minecraft.client.gui.screen.TitleScreen;
|
||||
import net.minecraft.client.options.KeyBinding;
|
||||
import net.minecraft.client.render.entity.EntityRenderDispatcher;
|
||||
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.text.LiteralText;
|
||||
import net.minecraft.text.Style;
|
||||
import net.minecraft.text.TranslatableText;
|
||||
import net.minecraft.util.Formatting;
|
||||
import net.minecraft.util.SystemUtil;
|
||||
|
||||
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 (!reloadingModels) {
|
||||
minecraft.inGameHud.getChatHud().addMessage(
|
||||
(new TextComponent("")).append(
|
||||
new TranslatableComponent("debug.prefix")
|
||||
.setStyle(new Style().setColor(ChatFormat.YELLOW).setBold(true)))
|
||||
new LiteralText("").append(
|
||||
new TranslatableText("debug.prefix")
|
||||
.setStyle(new Style().setColor(Formatting.YELLOW).setBold(true)))
|
||||
.append(" ")
|
||||
.append(new TranslatableComponent("minelp.debug.reload_models.message")));
|
||||
.append(new TranslatableText("minelp.debug.reload_models.message")));
|
||||
|
||||
reloadingModels = true;
|
||||
modelUpdateCounter++;
|
||||
|
|
|
@ -3,7 +3,7 @@ package com.minelittlepony.client.gui;
|
|||
import net.minecraft.client.gui.Element;
|
||||
import net.minecraft.client.gui.screen.Screen;
|
||||
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.client.render.entities.MobRenderers;
|
||||
|
@ -39,7 +39,7 @@ public class GuiPonySettings extends GameGui {
|
|||
private final boolean hiddenOptions;
|
||||
|
||||
public GuiPonySettings() {
|
||||
super(new TranslatableComponent(OPTIONS_PREFIX + "title"));
|
||||
super(new LiteralText(OPTIONS_PREFIX + "title"));
|
||||
|
||||
config = MineLittlePony.getInstance().getConfig();
|
||||
|
||||
|
|
|
@ -1,16 +1,16 @@
|
|||
package com.minelittlepony.client.mixin;
|
||||
|
||||
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.gen.Accessor;
|
||||
|
||||
@Mixin(Entity.class)
|
||||
public interface IResizeable {
|
||||
@Accessor("size")
|
||||
EntitySize getCurrentSize();
|
||||
@Accessor("dimensions")
|
||||
EntityDimensions getCurrentSize();
|
||||
|
||||
@Accessor("size")
|
||||
void setCurrentSize(EntitySize size);
|
||||
@Accessor("dimensions")
|
||||
void setCurrentSize(EntityDimensions size);
|
||||
}
|
||||
|
|
|
@ -13,13 +13,7 @@ import net.minecraft.client.render.Camera;
|
|||
|
||||
@Mixin(Camera.class)
|
||||
public abstract class MixinCamera {
|
||||
|
||||
// cameraDistance;
|
||||
// float field_18721;
|
||||
// prevCameraDistance;
|
||||
// float field_18722;
|
||||
|
||||
@Inject(method = "method_19318(D)D",
|
||||
@Inject(method = "clipToSpace(D)D",
|
||||
at = @At("RETURN"),
|
||||
cancellable = true)
|
||||
private void redirectCameraDistance(double initial, CallbackInfoReturnable<Double> info) {
|
||||
|
|
|
@ -9,7 +9,7 @@ import com.minelittlepony.MineLittlePony;
|
|||
import com.minelittlepony.pony.IPony;
|
||||
|
||||
import net.minecraft.entity.EntityPose;
|
||||
import net.minecraft.entity.EntitySize;
|
||||
import net.minecraft.entity.EntityDimensions;
|
||||
import net.minecraft.entity.LivingEntity;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
|
||||
|
@ -18,10 +18,10 @@ public abstract class MixinPlayerEntity extends LivingEntity {
|
|||
|
||||
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"),
|
||||
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();
|
||||
|
||||
IPony pony = MineLittlePony.getInstance().getManager().getPony((PlayerEntity)(Object)this);
|
||||
|
|
|
@ -6,12 +6,12 @@ public class ModelDeadMau5Ears extends SkullEntityModel {
|
|||
|
||||
public ModelDeadMau5Ears() {
|
||||
super(24, 0, 64, 64);
|
||||
field_3564.boxes.clear();
|
||||
field_3564.addBox(-9, -13, -1, 6, 6, 1, 0);
|
||||
field_3564.addBox(3, -13, -1, 6, 6, 1, 0);
|
||||
skull.boxes.clear();
|
||||
skull.addBox(-9, -13, -1, 6, 6, 1, 0);
|
||||
skull.addBox(3, -13, -1, 6, 6, 1, 0);
|
||||
}
|
||||
|
||||
public void setVisible(boolean show) {
|
||||
field_3564.field_3664 = !show;
|
||||
skull.field_3664 = !show;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -36,7 +36,7 @@ public class ModelPonyHead extends SkullOverlayEntityModel implements ICapitated
|
|||
|
||||
@Override
|
||||
public Cuboid getHead() {
|
||||
return field_3564;
|
||||
return skull;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -45,13 +45,13 @@ public class ModelPonyHead extends SkullOverlayEntityModel implements ICapitated
|
|||
}
|
||||
|
||||
@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();
|
||||
ears.field_3664 = snout.isHidden;
|
||||
|
||||
snout.setGender(metadata.getGender());
|
||||
|
||||
super.setRotationAngles(move, swing, ticks, headYaw, headPitch, scale);
|
||||
super.render(move, swing, ticks, headYaw, headPitch, scale);
|
||||
|
||||
if (metadata.hasMagic()) {
|
||||
getHead().applyTransform(scale);
|
||||
|
|
|
@ -27,7 +27,7 @@ import net.minecraft.item.ArmorItem;
|
|||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.resource.Resource;
|
||||
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.BlockPos;
|
||||
import net.minecraft.util.math.Vec3d;
|
||||
|
@ -240,14 +240,14 @@ public class Pony implements IPony {
|
|||
}
|
||||
|
||||
@Override
|
||||
public BoundingBox getComputedBoundingBox(LivingEntity entity) {
|
||||
public Box getComputedBoundingBox(LivingEntity entity) {
|
||||
float scale = getMetadata().getSize().getScaleFactor() + 0.1F;
|
||||
|
||||
Vec3d pos = getAbsoluteRidingOffset(entity);
|
||||
|
||||
float width = entity.getWidth() * scale;
|
||||
|
||||
return new BoundingBox(
|
||||
return new Box(
|
||||
- width, (entity.getHeight() * scale), -width,
|
||||
width, 0, width).offset(pos);
|
||||
}
|
||||
|
|
|
@ -3,7 +3,7 @@ package com.minelittlepony.client.render;
|
|||
import net.minecraft.client.MinecraftClient;
|
||||
import net.minecraft.client.render.WorldRenderer;
|
||||
import net.minecraft.entity.LivingEntity;
|
||||
import net.minecraft.util.math.BoundingBox;
|
||||
import net.minecraft.util.math.Box;
|
||||
|
||||
import com.minelittlepony.pony.IPony;
|
||||
|
||||
|
@ -23,7 +23,7 @@ public class DebugBoundingBoxRenderer {
|
|||
return;
|
||||
}
|
||||
|
||||
BoundingBox boundingBox = pony.getComputedBoundingBox(entity);
|
||||
Box boundingBox = pony.getComputedBoundingBox(entity);
|
||||
|
||||
enableBlend();
|
||||
blendFuncSeparate(SourceFactor.SRC_ALPHA, DestFactor.ONE_MINUS_SRC_ALPHA, SourceFactor.ONE, DestFactor.ZERO);
|
||||
|
|
|
@ -2,7 +2,7 @@ package com.minelittlepony.client.render;
|
|||
|
||||
import net.minecraft.client.render.VisibleRegion;
|
||||
import net.minecraft.entity.LivingEntity;
|
||||
import net.minecraft.util.math.BoundingBox;
|
||||
import net.minecraft.util.math.Box;
|
||||
|
||||
import com.minelittlepony.pony.IPony;
|
||||
|
||||
|
@ -25,10 +25,10 @@ public class FrustrumCheck<T extends LivingEntity> implements VisibleRegion {
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean intersects(BoundingBox bounds) {
|
||||
public boolean intersects(Box bounds) {
|
||||
IPony pony = renderer.getPony(entity);
|
||||
|
||||
BoundingBox boundingBox = pony.getComputedBoundingBox(entity);
|
||||
Box boundingBox = pony.getComputedBoundingBox(entity);
|
||||
|
||||
return vanilla.intersects(boundingBox);
|
||||
}
|
||||
|
|
|
@ -11,7 +11,7 @@ import com.mojang.blaze3d.platform.GlStateManager;
|
|||
|
||||
import net.minecraft.client.render.entity.EntityRenderDispatcher;
|
||||
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.GuardianEntity;
|
||||
import net.minecraft.util.Identifier;
|
||||
|
@ -54,10 +54,10 @@ public class RenderPonyGuardian extends GuardianEntityRenderer {
|
|||
@Override
|
||||
public void render(GuardianEntity entity, double x, double y, double z, float entityYaw, float partialTicks) {
|
||||
IResizeable resize = (IResizeable)entity;
|
||||
EntitySize origin = resize.getCurrentSize();
|
||||
EntityDimensions origin = resize.getCurrentSize();
|
||||
|
||||
// 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);
|
||||
|
||||
|
|
|
@ -30,7 +30,7 @@ public class LayerDJPon3Head<T extends AbstractClientPlayerEntity, M extends Ent
|
|||
GlStateManager.translatef(0, 0.3F, 0);
|
||||
|
||||
deadMau5.setVisible(true);
|
||||
deadMau5.setRotationAngles(move, swing, partialTicks, 0, 0, scale);
|
||||
deadMau5.render(move, swing, partialTicks, 0, 0, scale);
|
||||
|
||||
GlStateManager.popMatrix();
|
||||
}
|
||||
|
|
|
@ -67,7 +67,6 @@ public class PlayerSkullRenderer extends PonySkull {
|
|||
@Override
|
||||
public void render(float animateTicks, float rotation, float scale) {
|
||||
super.render(animateTicks, rotation, scale);
|
||||
/*render*/
|
||||
deadMau5.setRotationAngles(animateTicks, 0, 0, rotation, 0, scale);
|
||||
deadMau5.render(animateTicks, 0, 0, rotation, 0, scale);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -20,6 +20,6 @@ public abstract class PonySkull implements ISkull {
|
|||
|
||||
@Override
|
||||
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);
|
||||
}
|
||||
}
|
|
@ -29,7 +29,7 @@ public class ClientPonyConfig extends PonyConfig {
|
|||
super.save();
|
||||
PlayerEntity player = MinecraftClient.getInstance().player;
|
||||
if (player != null) {
|
||||
player.refreshSize();
|
||||
player.calculateDimensions();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,7 +2,7 @@ package com.minelittlepony.pony;
|
|||
|
||||
import net.minecraft.entity.LivingEntity;
|
||||
import net.minecraft.util.Identifier;
|
||||
import net.minecraft.util.math.BoundingBox;
|
||||
import net.minecraft.util.math.Box;
|
||||
import net.minecraft.util.math.Vec3d;
|
||||
|
||||
import com.minelittlepony.MineLittlePony;
|
||||
|
@ -109,5 +109,5 @@ public interface IPony {
|
|||
/**
|
||||
* Gets the actual bounding box of this entity as a pony.
|
||||
*/
|
||||
BoundingBox getComputedBoundingBox(LivingEntity entity);
|
||||
Box getComputedBoundingBox(LivingEntity entity);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue