diff --git a/gradle.properties b/gradle.properties index 2617f2b..bb7de73 100644 --- a/gradle.properties +++ b/gradle.properties @@ -4,16 +4,16 @@ org.gradle.parallel=true # Fabric Properties # check these on https://fabricmc.net/develop -minecraft_version=1.20.6 -yarn_mappings=1.20.6+build.3 +minecraft_version=1.21 +yarn_mappings=1.21+build.1 loader_version=0.15.11 # Mod Properties -mod_version = 1.1.3+1.20.6 +mod_version = 1.1.4+1.21 maven_group = systems.brn.televator archives_base_name = televator # Dependencies -fabric_version=0.99.0+1.20.6 -polymer_version=0.8.0+1.20.6 +fabric_version=0.100.1+1.21 +polymer_version=0.8.4+1.20.6 server_translations_api_version=2.3.0+1.20.5-rc2 diff --git a/src/main/java/systems/brn/televator/blocks/TelevatorBlock.java b/src/main/java/systems/brn/televator/blocks/TelevatorBlock.java index 594849a..07c1546 100644 --- a/src/main/java/systems/brn/televator/blocks/TelevatorBlock.java +++ b/src/main/java/systems/brn/televator/blocks/TelevatorBlock.java @@ -30,7 +30,7 @@ public class TelevatorBlock extends Block implements PolymerTexturedBlock { public TelevatorBlock(Settings settings, BlockModelType type, String modelId) { super(settings); - this.polymerBlockState = PolymerBlockResourceUtils.requestBlock(type, PolymerBlockModel.of(new Identifier(Televator.MODID, modelId))); + this.polymerBlockState = PolymerBlockResourceUtils.requestBlock(type, PolymerBlockModel.of(Identifier.of(Televator.MODID, modelId))); } @Override @@ -39,7 +39,7 @@ public class TelevatorBlock extends Block implements PolymerTexturedBlock { } public static void register() { - var modId = new Identifier(Televator.MODID, Televator.MODELID); + var modId = Identifier.of(Televator.MODID, Televator.MODELID); var block = Registry.register(Registries.BLOCK, modId, new TelevatorBlock(AbstractBlock.Settings.copy(Blocks.WHITE_WOOL), BlockModelType.FULL_BLOCK, Televator.MODELID)); @@ -69,7 +69,8 @@ public class TelevatorBlock extends Block implements PolymerTexturedBlock { } private void teleportWithEffect(ServerPlayerEntity player, ServerWorld w, BlockPos tpPos) { - player.teleport(tpPos.getX() + 0.5f, tpPos.getY(), tpPos.getZ() + 0.5f); + + player.teleport(tpPos.getX() + 0.5d, tpPos.getY(), tpPos.getZ() + 0.5d, true); player.setVelocity(0, 0, 0); player.setSneaking(false); w.playSound(null, tpPos, SoundEvents.ENTITY_ENDERMAN_TELEPORT, SoundCategory.PLAYERS, 0.5f, 1.5f); diff --git a/src/main/java/systems/brn/televator/items/TelevatorBlockItem.java b/src/main/java/systems/brn/televator/items/TelevatorBlockItem.java index 440262e..f45771e 100644 --- a/src/main/java/systems/brn/televator/items/TelevatorBlockItem.java +++ b/src/main/java/systems/brn/televator/items/TelevatorBlockItem.java @@ -18,7 +18,7 @@ public class TelevatorBlockItem extends BlockItem implements PolymerItem { public TelevatorBlockItem(Settings settings, Block block, String modelId) { super(block, settings); - this.polymerModel = PolymerResourcePackUtils.requestModel(Items.BARRIER, new Identifier(Televator.MODID, modelId)); + this.polymerModel = PolymerResourcePackUtils.requestModel(Items.BARRIER, Identifier.of(Televator.MODID, modelId)); } @Override