1.21 changes

This commit is contained in:
Oth3r 2024-06-13 10:40:34 -05:00
commit ca86597498
2 changed files with 2 additions and 2 deletions

View file

@ -247,7 +247,7 @@ public class Events {
BlockState blockState = player.getWorld().getBlockState(pos); BlockState blockState = player.getWorld().getBlockState(pos);
// check if said block is still there // check if said block is still there
if (blockState.isAir()) { if (blockState.isAir()) {
player.teleport(player.getX(),player.getBlockY()+1,player.getZ()); player.teleport(player.getX(),player.getBlockY()+1,player.getZ(),false);
entity.setRemoved(Entity.RemovalReason.DISCARDED); entity.setRemoved(Entity.RemovalReason.DISCARDED);
entityLoop.remove(); entityLoop.remove();
} }

View file

@ -10,7 +10,7 @@ import one.oth3r.sit.Sit;
public class CustomPayloads { public class CustomPayloads {
public record SettingsPayload(String value) implements CustomPayload { public record SettingsPayload(String value) implements CustomPayload {
public static final Id<SettingsPayload> ID = new Id<>(new Identifier(Sit.MOD_ID,"settings_v1.1")); public static final Id<SettingsPayload> ID = new Id<>(Identifier.of(Sit.MOD_ID,"settings_v1.1"));
public static final PacketCodec<RegistryByteBuf, SettingsPayload> CODEC = PacketCodecs.STRING.xmap(SettingsPayload::new, SettingsPayload::value).cast(); public static final PacketCodec<RegistryByteBuf, SettingsPayload> CODEC = PacketCodecs.STRING.xmap(SettingsPayload::new, SettingsPayload::value).cast();