diff --git a/build.gradle b/build.gradle index 478d960..2240a99 100644 --- a/build.gradle +++ b/build.gradle @@ -1,10 +1,9 @@ buildscript { dependencies { - classpath 'com.github.dexman545:Outlet:1.3.6' + classpath 'com.github.dexman545:Outlet:1.3.10' } } plugins { - id 'java-library' id 'fabric-loom' version '0.12-SNAPSHOT' id 'maven-publish' id 'com.modrinth.minotaur' version '2.+' diff --git a/gradle.properties b/gradle.properties index b69ce98..e2f7c50 100644 --- a/gradle.properties +++ b/gradle.properties @@ -3,10 +3,10 @@ org.gradle.daemon=false # Fabric Properties # check these on https://fabricmc.net/develop - minecraft_version=1.19.2 - yarn_mappings=1.19.2+build.3 - loader_version=0.14.9 - fabric_version=0.59.0+1.19.2 + minecraft_version=1.19.3 + yarn_mappings=1.19.3+build.2 + loader_version=0.14.11 + fabric_version=0.68.1+1.19.3 # Mod Properties group=com.minelittlepony @@ -15,12 +15,12 @@ org.gradle.daemon=false description=Ah am a big pony! # Publishing - minecraft_version_range=>=1.18 + minecraft_version_range=>=1.19.3 modrinth_loader_type=fabric modrinth_project_id=h9pJxJR9 # Dependencies - modmenu_version=4.0.6 - minelp_version=4.6.1 - hd_skins_version=6.6.1 - kirin_version=1.11.0 + modmenu_version=5.0.0-alpha.3 + minelp_version=4.7.1 + hd_skins_version=6.7.2 + kirin_version=1.13.2 diff --git a/src/main/java/com/minelittlepony/bigpony/BigPony.java b/src/main/java/com/minelittlepony/bigpony/BigPony.java index 258d454..876fa56 100644 --- a/src/main/java/com/minelittlepony/bigpony/BigPony.java +++ b/src/main/java/com/minelittlepony/bigpony/BigPony.java @@ -17,13 +17,13 @@ public static BigPony getInstance() { return instance; } - private final Config config = new Config(GamePaths.getConfigDirectory().resolve("bigpony.json")); + private final BigPonyConfig config = new BigPonyConfig(GamePaths.getConfigDirectory().resolve("bigpony.json")); public BigPony() { instance = this; } - public Config getConfig() { + public BigPonyConfig getConfig() { return config; } diff --git a/src/main/java/com/minelittlepony/bigpony/Config.java b/src/main/java/com/minelittlepony/bigpony/BigPonyConfig.java similarity index 73% rename from src/main/java/com/minelittlepony/bigpony/Config.java rename to src/main/java/com/minelittlepony/bigpony/BigPonyConfig.java index 7492533..9b17dd5 100644 --- a/src/main/java/com/minelittlepony/bigpony/Config.java +++ b/src/main/java/com/minelittlepony/bigpony/BigPonyConfig.java @@ -2,18 +2,17 @@ import java.nio.file.Path; -import com.minelittlepony.common.util.settings.JsonConfig; +import com.minelittlepony.common.util.settings.Config; import com.minelittlepony.common.util.settings.Setting; -public class Config extends JsonConfig { - +public class BigPonyConfig extends Config { public final Setting scale = value("scale", new Scaling(new Triple(1), new Cam(1))); public final Setting allowHitboxChanges = value("allowHitboxChanges", true); public final Setting allowCameraChanges = value("allowCameraChanges", true); public final Setting allowFreeformResizing = value("allowFreeformResizing", true); - public Config(Path path) { - super(path); + public BigPonyConfig(Path path) { + super(FLATTENED_JSON_ADAPTER, path); } } diff --git a/src/main/java/com/minelittlepony/bigpony/minelittlepony/Main.java b/src/main/java/com/minelittlepony/bigpony/minelittlepony/Main.java index 0db8f2d..ddd1782 100644 --- a/src/main/java/com/minelittlepony/bigpony/minelittlepony/Main.java +++ b/src/main/java/com/minelittlepony/bigpony/minelittlepony/Main.java @@ -51,7 +51,7 @@ public boolean isFillyCam() { @Override public boolean isPony(PlayerEntity player) { - return !MineLittlePony.getInstance().getManager().getPony(player).getRace(false).isHuman(); + return !MineLittlePony.getInstance().getManager().getPony(player).race().isHuman(); } @Override @@ -60,8 +60,8 @@ public CompletableFuture detectPreset(GameProfile profile, Scaling i // Turn on filly cam so we can get the camera parameters MineLittlePony.getInstance().getConfig().fillycam.set(true); - IPony pony = IPony.forResource(skin); - Size size = pony.getMetadata().getSize(); + IPony pony = IPony.getManager().getPony(skin); + Size size = pony.metadata().getSize(); into.setScale(new Triple(size.getScaleFactor())); into.setCamera(new Cam(size.getEyeDistanceFactor(), size.getEyeHeightFactor())); diff --git a/src/main/java/com/minelittlepony/bigpony/mixin/MixinServerPlayerEntity.java b/src/main/java/com/minelittlepony/bigpony/mixin/MixinServerPlayerEntity.java index 9d6346f..8816dd6 100644 --- a/src/main/java/com/minelittlepony/bigpony/mixin/MixinServerPlayerEntity.java +++ b/src/main/java/com/minelittlepony/bigpony/mixin/MixinServerPlayerEntity.java @@ -13,7 +13,7 @@ @Mixin(ServerPlayerEntity.class) abstract class MixinServerPlayerEntity extends PlayerEntity implements ScreenHandlerListener { - MixinServerPlayerEntity() { super(null, null, 0, null, null); } + MixinServerPlayerEntity() { super(null, null, 0, null); } @Inject(method = "copyFrom(Lnet/minecraft/server/network/ServerPlayerEntity;Z)V", at = @At("RETURN")) public void injectCopyFrom(ServerPlayerEntity other, boolean alive, CallbackInfo info) { diff --git a/src/main/java/com/minelittlepony/bigpony/mixin/client/MixinGameRenderer.java b/src/main/java/com/minelittlepony/bigpony/mixin/client/MixinGameRenderer.java index 262c776..13dbdf1 100644 --- a/src/main/java/com/minelittlepony/bigpony/mixin/client/MixinGameRenderer.java +++ b/src/main/java/com/minelittlepony/bigpony/mixin/client/MixinGameRenderer.java @@ -14,7 +14,7 @@ import net.minecraft.entity.player.PlayerEntity; import net.minecraft.resource.SynchronousResourceReloader; import net.minecraft.util.math.MathHelper; -import net.minecraft.util.math.Vec3f; +import net.minecraft.util.math.RotationAxis; @Mixin(GameRenderer.class) abstract class MixinGameRenderer implements SynchronousResourceReloader, AutoCloseable { @@ -42,10 +42,10 @@ private void onBobView(MatrixStack matrices, float f, CallbackInfo info) { -Math.abs(MathHelper.cos(h * (float)Math.PI) * i) * scale.y, 0 ); - matrices.multiply(Vec3f.POSITIVE_Z.getDegreesQuaternion( + matrices.multiply(RotationAxis.POSITIVE_Z.rotationDegrees( MathHelper.sin(h * (float)Math.PI) * i * 3 * scale.z )); - matrices.multiply(Vec3f.POSITIVE_X.getDegreesQuaternion( + matrices.multiply(RotationAxis.POSITIVE_X.rotationDegrees( Math.abs(MathHelper.cos(h * (float)Math.PI - 0.2f) * i) * 5 * scale.x )); }