Skip to content

Commit

Permalink
Update to 1.20.5-1.21
Browse files Browse the repository at this point in the history
  • Loading branch information
Ampflower committed Jul 10, 2024
1 parent 702195b commit 54b8428
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 19 deletions.
14 changes: 7 additions & 7 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -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.+
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/gay/ampflower/polysit/CollisionUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
Expand All @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/gay/ampflower/polysit/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -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<SeatEntity> SEAT = registerEntity("polysit:seat",
EntityType.Builder.<SeatEntity>create(SeatEntity::new, SpawnGroup.MISC).setDimensions(0, 0)
EntityType.Builder.<SeatEntity>create(SeatEntity::new, SpawnGroup.MISC).dimensions(0, 0)
.maxTrackingRange(10).disableSummon().makeFireImmune());

/**
Expand Down
10 changes: 1 addition & 9 deletions src/main/java/gay/ampflower/polysit/SeatEntity.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -100,7 +97,7 @@ public void modifyRawTrackedData(List<DataTracker.SerializedEntry<?>> data, Serv
}

@Override
protected void initDataTracker() {
protected void initDataTracker(final DataTracker.Builder builder) {
}

@Override
Expand Down Expand Up @@ -170,9 +167,4 @@ private boolean isDiscardable() {
private BlockPos getAdjustedPos() {
return Main.blockPosOfFloored(getPos().add(0, Main.VERTICAL_CHECK_OFFSET, 0));
}

@Override
public Packet<ClientPlayPacketListener> createSpawnPacket() {
return new EntitySpawnS2CPacket(this);
}
}

0 comments on commit 54b8428

Please sign in to comment.