Update to 1.21
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user