Update to 1.21
Some checks are pending
build / build (17, ubuntu-22.04) (push) Waiting to run
build / build (17, windows-2022) (push) Waiting to run

This commit is contained in:
Bruno Rybársky 2024-06-14 14:37:18 +02:00
parent 24a61bcd23
commit 719702cb6d
3 changed files with 10 additions and 9 deletions

@ -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

@ -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);

@ -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