From 54b84284ec26c979ca796642167bff66e0b89262 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ampflower=20=F0=9F=8C=BA?= Date: Wed, 10 Jul 2024 09:16:04 -0700 Subject: [PATCH] Update to 1.20.5-1.21 --- gradle.properties | 14 +++++++------- .../java/gay/ampflower/polysit/CollisionUtil.java | 4 ++-- src/main/java/gay/ampflower/polysit/Main.java | 2 +- .../java/gay/ampflower/polysit/SeatEntity.java | 10 +--------- 4 files changed, 11 insertions(+), 19 deletions(-) diff --git a/gradle.properties b/gradle.properties index 3ba682e..f138118 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,15 +1,15 @@ # Project Specifics -projectVersion=0.6.1 +projectVersion=0.6.2 modrinthId=G9eJHDO2 # Minecraft -minecraftVersion=1.20.1 -minecraftRequired=1.19.3 -minecraftCompatible=1.19.3,1.19.4,1.20,1.20.1,1.20.2,1.20.3,1.20.4 -yarnMappings=1.20.1+build.5 +minecraftVersion=1.21 +minecraftRequired=1.20.5 +minecraftCompatible=1.20.5,1.20.6,1.21 +yarnMappings=1.21+build.7 loaderVersion=0.15.11 -fabricApiVersion=0.83.1+1.20.1 -polymerVersion=0.5.2+1.20.1 +fabricApiVersion=0.100.6+1.21 +polymerVersion=0.9.4+1.21 # Plugins systemProp.loomVersion=1.+ diff --git a/src/main/java/gay/ampflower/polysit/CollisionUtil.java b/src/main/java/gay/ampflower/polysit/CollisionUtil.java index 8486e13..350da36 100644 --- a/src/main/java/gay/ampflower/polysit/CollisionUtil.java +++ b/src/main/java/gay/ampflower/polysit/CollisionUtil.java @@ -81,7 +81,7 @@ public static EntityDimensions smallest(EntityDimensions... dimensions) { for (int i = 1; i < dimensions.length; i++) { final var comparison = dimensions[i]; - if (comparison.height < min.height && comparison.width < min.width) { + if (comparison.height() < min.height() && comparison.width() < min.width()) { min = comparison; } } @@ -99,7 +99,7 @@ private static EntityPose largest(final Entity entity, final double maxHeight, E EntityPose fittingPose = null; for (final var pose : poses) { - final var poseHeight = entity.getDimensions(pose).height; + final var poseHeight = entity.getDimensions(pose).height(); if (poseHeight < maxHeight && poseHeight > height) { height = poseHeight; fittingPose = pose; diff --git a/src/main/java/gay/ampflower/polysit/Main.java b/src/main/java/gay/ampflower/polysit/Main.java index eb6899a..2c13d07 100644 --- a/src/main/java/gay/ampflower/polysit/Main.java +++ b/src/main/java/gay/ampflower/polysit/Main.java @@ -98,7 +98,7 @@ private static double sum(double[] array, int from, int to) { /** Seat entity type. Disallows manual summoning, makes fire immune. */ public static EntityType SEAT = registerEntity("polysit:seat", - EntityType.Builder.create(SeatEntity::new, SpawnGroup.MISC).setDimensions(0, 0) + EntityType.Builder.create(SeatEntity::new, SpawnGroup.MISC).dimensions(0, 0) .maxTrackingRange(10).disableSummon().makeFireImmune()); /** diff --git a/src/main/java/gay/ampflower/polysit/SeatEntity.java b/src/main/java/gay/ampflower/polysit/SeatEntity.java index 4bdb785..f03158c 100644 --- a/src/main/java/gay/ampflower/polysit/SeatEntity.java +++ b/src/main/java/gay/ampflower/polysit/SeatEntity.java @@ -13,10 +13,7 @@ import net.minecraft.entity.attribute.EntityAttributes; import net.minecraft.entity.data.DataTracker; import net.minecraft.nbt.NbtCompound; -import net.minecraft.network.listener.ClientPlayPacketListener; -import net.minecraft.network.packet.Packet; import net.minecraft.network.packet.s2c.play.EntityAttributesS2CPacket; -import net.minecraft.network.packet.s2c.play.EntitySpawnS2CPacket; import net.minecraft.server.network.ServerPlayerEntity; import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; @@ -100,7 +97,7 @@ public void modifyRawTrackedData(List> data, Serv } @Override - protected void initDataTracker() { + protected void initDataTracker(final DataTracker.Builder builder) { } @Override @@ -170,9 +167,4 @@ private boolean isDiscardable() { private BlockPos getAdjustedPos() { return Main.blockPosOfFloored(getPos().add(0, Main.VERTICAL_CHECK_OFFSET, 0)); } - - @Override - public Packet createSpawnPacket() { - return new EntitySpawnS2CPacket(this); - } }