From b9ec6f236d322518060722df125a3aebf7694a7c Mon Sep 17 00:00:00 2001 From: SquidDev Date: Fri, 12 Apr 2019 19:35:34 +0100 Subject: [PATCH] Update to 1.14pr2 --- build.gradle | 2 +- gradle.properties | 4 ++-- .../computercraft/client/render/TileEntityTurtleRenderer.java | 4 ++-- .../computercraft/shared/command/CommandComputerCraft.java | 4 ++-- .../java/dan200/computercraft/shared/command/CommandCopy.java | 4 ++-- .../dan200/computercraft/shared/computer/apis/CommandAPI.java | 4 ++-- .../shared/mixin/MixinItemFrameEntityRenderer.java | 4 ++-- .../shared/peripheral/modem/wired/BlockCable.java | 2 +- .../shared/peripheral/modem/wireless/BlockWirelessModem.java | 2 +- .../computercraft/shared/turtle/core/TurtlePlaceCommand.java | 2 +- .../computercraft/shared/turtle/upgrades/TurtleTool.java | 2 +- 11 files changed, 17 insertions(+), 17 deletions(-) diff --git a/build.gradle b/build.gradle index df0eeeaf3..0b3bae5b2 100644 --- a/build.gradle +++ b/build.gradle @@ -53,7 +53,7 @@ configurations { dependencies { minecraft "com.mojang:minecraft:${mc_version}" mappings "net.fabricmc:yarn:${mc_version}+build.${mappings_version}" - modCompile "net.fabricmc:fabric-loader:0.4.0+build.119" + modCompile "net.fabricmc:fabric-loader:0.4.0+build.121" modCompile "net.fabricmc:fabric:0.2.7+build.122" // compileOnly "mezz.jei:jei-1.13.2:5.0.0.8:api" diff --git a/gradle.properties b/gradle.properties index fc2936f60..87ec4dd6a 100644 --- a/gradle.properties +++ b/gradle.properties @@ -2,5 +2,5 @@ mod_version=1.82.1 # Minecraft properties -mc_version=1.14 Pre-Release 1 -mappings_version=3 +mc_version=1.14 Pre-Release 2 +mappings_version=1 diff --git a/src/main/java/dan200/computercraft/client/render/TileEntityTurtleRenderer.java b/src/main/java/dan200/computercraft/client/render/TileEntityTurtleRenderer.java index a17bf0d8d..5065697f9 100644 --- a/src/main/java/dan200/computercraft/client/render/TileEntityTurtleRenderer.java +++ b/src/main/java/dan200/computercraft/client/render/TileEntityTurtleRenderer.java @@ -86,13 +86,13 @@ public class TileEntityTurtleRenderer extends BlockEntityRenderer String label = turtle.createProxy().getLabel(); if( label != null && renderManager.hitResult != null && renderManager.hitResult instanceof BlockHitResult && turtle.getPos().equals( ((BlockHitResult) renderManager.hitResult).getBlockPos() ) ) { - method_3570( true ); + disableLightmap( true ); GameRenderer.renderFloatingText( getFontRenderer(), label, (float) posX + 0.5F, (float) posY + 1.2F, (float) posZ + 0.5F, 0, renderManager.cameraEntity.getYaw(), renderManager.cameraEntity.getPitch(), false ); - method_3570( false ); + disableLightmap( false ); } GlStateManager.pushMatrix(); diff --git a/src/main/java/dan200/computercraft/shared/command/CommandComputerCraft.java b/src/main/java/dan200/computercraft/shared/command/CommandComputerCraft.java index 3052c9a77..c8c90a466 100644 --- a/src/main/java/dan200/computercraft/shared/command/CommandComputerCraft.java +++ b/src/main/java/dan200/computercraft/shared/command/CommandComputerCraft.java @@ -44,7 +44,7 @@ import static dan200.computercraft.shared.command.builder.CommandBuilder.args; import static dan200.computercraft.shared.command.builder.CommandBuilder.command; import static dan200.computercraft.shared.command.builder.HelpingArgumentBuilder.choice; import static dan200.computercraft.shared.command.text.ChatHelpers.*; -import static net.minecraft.server.command.ServerCommandManager.literal; +import static net.minecraft.server.command.CommandManager.literal; public final class CommandComputerCraft { @@ -178,7 +178,7 @@ public final class CommandComputerCraft } else { - player.method_14251( (ServerWorld) world, pos.getX() + 0.5, pos.getY(), pos.getZ() + 0.5, 0, 0 ); + player.teleport( (ServerWorld) world, pos.getX() + 0.5, pos.getY(), pos.getZ() + 0.5, 0, 0 ); } return 1; diff --git a/src/main/java/dan200/computercraft/shared/command/CommandCopy.java b/src/main/java/dan200/computercraft/shared/command/CommandCopy.java index 7c554544f..ddd41fc80 100644 --- a/src/main/java/dan200/computercraft/shared/command/CommandCopy.java +++ b/src/main/java/dan200/computercraft/shared/command/CommandCopy.java @@ -16,8 +16,8 @@ import net.minecraft.text.TranslatableTextComponent; import net.minecraft.text.event.ClickEvent; import net.minecraft.text.event.HoverEvent; -import static net.minecraft.server.command.ServerCommandManager.argument; -import static net.minecraft.server.command.ServerCommandManager.literal; +import static net.minecraft.server.command.CommandManager.argument; +import static net.minecraft.server.command.CommandManager.literal; public final class CommandCopy { diff --git a/src/main/java/dan200/computercraft/shared/computer/apis/CommandAPI.java b/src/main/java/dan200/computercraft/shared/computer/apis/CommandAPI.java index e0700b013..e1d8b7fb1 100644 --- a/src/main/java/dan200/computercraft/shared/computer/apis/CommandAPI.java +++ b/src/main/java/dan200/computercraft/shared/computer/apis/CommandAPI.java @@ -20,7 +20,7 @@ import net.minecraft.block.BlockState; import net.minecraft.block.entity.BlockEntity; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.MinecraftServer; -import net.minecraft.server.command.ServerCommandManager; +import net.minecraft.server.command.CommandManager; import net.minecraft.server.command.ServerCommandSource; import net.minecraft.state.property.Property; import net.minecraft.util.math.BlockPos; @@ -81,7 +81,7 @@ public class CommandAPI implements ILuaAPI return new Object[] { false, createOutput( "Command blocks disabled by server" ) }; } - ServerCommandManager commandManager = server.getCommandManager(); + CommandManager commandManager = server.getCommandManager(); TileCommandComputer.CommandReceiver receiver = m_computer.getReceiver(); try { diff --git a/src/main/java/dan200/computercraft/shared/mixin/MixinItemFrameEntityRenderer.java b/src/main/java/dan200/computercraft/shared/mixin/MixinItemFrameEntityRenderer.java index 88fe3940f..8a9ca27f1 100644 --- a/src/main/java/dan200/computercraft/shared/mixin/MixinItemFrameEntityRenderer.java +++ b/src/main/java/dan200/computercraft/shared/mixin/MixinItemFrameEntityRenderer.java @@ -19,8 +19,8 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; @Mixin( ItemFrameEntityRenderer.class ) public class MixinItemFrameEntityRenderer { - @Inject( method = "hasLabel", at = @At( "HEAD" ), cancellable = true ) // TODO: This name is entirely wrong - private void method_3992_Injected( ItemFrameEntity entity, CallbackInfo info ) + @Inject( method = "renderItem", at = @At( "HEAD" ), cancellable = true ) + private void renderItem_Injected( ItemFrameEntity entity, CallbackInfo info ) { ItemStack stack = entity.getHeldItemStack(); if( stack.getItem() instanceof ItemPrintout ) diff --git a/src/main/java/dan200/computercraft/shared/peripheral/modem/wired/BlockCable.java b/src/main/java/dan200/computercraft/shared/peripheral/modem/wired/BlockCable.java index 2724a4f92..5449f14a2 100644 --- a/src/main/java/dan200/computercraft/shared/peripheral/modem/wired/BlockCable.java +++ b/src/main/java/dan200/computercraft/shared/peripheral/modem/wired/BlockCable.java @@ -207,7 +207,7 @@ public class BlockCable extends BlockGeneric implements WaterloggableBlock BlockPos offsetPos = pos.offset( facing ); BlockState offsetState = world.getBlockState( offsetPos ); - return Block.isFaceFullSquare( offsetState.getCollisionShape( world, offsetPos ), facing.getOpposite() ) && !method_9581( offsetState.getBlock() ); + return Block.isFaceFullSquare( offsetState.getCollisionShape( world, offsetPos ), facing.getOpposite() ); } @Nullable diff --git a/src/main/java/dan200/computercraft/shared/peripheral/modem/wireless/BlockWirelessModem.java b/src/main/java/dan200/computercraft/shared/peripheral/modem/wireless/BlockWirelessModem.java index 5a3807617..e6790bdec 100644 --- a/src/main/java/dan200/computercraft/shared/peripheral/modem/wireless/BlockWirelessModem.java +++ b/src/main/java/dan200/computercraft/shared/peripheral/modem/wireless/BlockWirelessModem.java @@ -83,7 +83,7 @@ public class BlockWirelessModem extends BlockGeneric implements WaterloggableBlo Direction facing = state.get( FACING ); BlockPos offsetPos = pos.offset( facing ); BlockState offsetState = world.getBlockState( offsetPos ); - return Block.isFaceFullSquare( offsetState.getCollisionShape( world, offsetPos ), facing.getOpposite() ) && !method_9581( offsetState.getBlock() ); + return Block.isFaceFullSquare( offsetState.getCollisionShape( world, offsetPos ), facing.getOpposite() ); } @Nullable diff --git a/src/main/java/dan200/computercraft/shared/turtle/core/TurtlePlaceCommand.java b/src/main/java/dan200/computercraft/shared/turtle/core/TurtlePlaceCommand.java index 543820050..bd21468b0 100644 --- a/src/main/java/dan200/computercraft/shared/turtle/core/TurtlePlaceCommand.java +++ b/src/main/java/dan200/computercraft/shared/turtle/core/TurtlePlaceCommand.java @@ -299,7 +299,7 @@ public class TurtlePlaceCommand implements ITurtleCommand BlockState state = world.getBlockState( position ); Block block = state.getBlock(); - boolean replaceable = state.method_11587( context ); + boolean replaceable = state.canReplace( context ); if( !allowReplaceable && replaceable ) return false; if( ComputerCraft.turtlesObeyBlockProtection ) diff --git a/src/main/java/dan200/computercraft/shared/turtle/upgrades/TurtleTool.java b/src/main/java/dan200/computercraft/shared/turtle/upgrades/TurtleTool.java index 9cde1e43a..496df29bb 100644 --- a/src/main/java/dan200/computercraft/shared/turtle/upgrades/TurtleTool.java +++ b/src/main/java/dan200/computercraft/shared/turtle/upgrades/TurtleTool.java @@ -146,7 +146,7 @@ public class TurtleTool extends AbstractTurtleUpgrade // Attack the entity boolean attacked = false; - if( !hitEntity.method_5698( turtlePlayer ) ) // hitByEntity + if( !hitEntity.handlePlayerAttack( turtlePlayer ) ) { float damage = (float) turtlePlayer.getAttributeInstance( EntityAttributes.ATTACK_DAMAGE ).getValue(); damage *= getDamageMultiplier();