diff --git a/gradle.properties b/gradle.properties index 06da4d1ae..d10123480 100644 --- a/gradle.properties +++ b/gradle.properties @@ -2,6 +2,6 @@ mod_version=1.90.3 # Minecraft properties (update mods.toml when changing) -mc_version=1.16.1 -forge_version=32.0.75 +mc_version=1.16.2 +forge_version=33.0.3 mappings_version=20200723-1.16.1 diff --git a/src/main/java/dan200/computercraft/shared/computer/blocks/BlockComputerBase.java b/src/main/java/dan200/computercraft/shared/computer/blocks/BlockComputerBase.java index f990647c2..b2e20b72b 100644 --- a/src/main/java/dan200/computercraft/shared/computer/blocks/BlockComputerBase.java +++ b/src/main/java/dan200/computercraft/shared/computer/blocks/BlockComputerBase.java @@ -25,6 +25,7 @@ import net.minecraft.util.Direction; import net.minecraft.util.ResourceLocation; import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.RayTraceResult; +import net.minecraft.util.math.vector.Vector3d; import net.minecraft.world.IBlockReader; import net.minecraft.world.World; import net.minecraft.world.server.ServerWorld; @@ -138,6 +139,7 @@ public abstract class BlockComputerBase extends Bloc public void onBlockHarvested( @Nonnull World world, @Nonnull BlockPos pos, @Nonnull BlockState state, @Nonnull PlayerEntity player ) { if( !(world instanceof ServerWorld) ) return; + ServerWorld serverWorld = (ServerWorld) world; // We drop the item here instead of doing it in the harvest method, as we should // drop computers for creative players too. @@ -146,19 +148,19 @@ public abstract class BlockComputerBase extends Bloc if( tile instanceof TileComputerBase ) { TileComputerBase computer = (TileComputerBase) tile; - LootContext.Builder context = new LootContext.Builder( (ServerWorld) world ) + LootContext.Builder context = new LootContext.Builder( serverWorld ) .withRandom( world.rand ) - .withParameter( LootParameters.POSITION, pos ) + .withParameter( LootParameters.field_237457_g_, Vector3d.copyCentered( pos ) ) .withParameter( LootParameters.TOOL, player.getHeldItemMainhand() ) .withParameter( LootParameters.THIS_ENTITY, player ) - .withNullableParameter( LootParameters.BLOCK_ENTITY, tile ) + .withParameter( LootParameters.BLOCK_ENTITY, tile ) .withDynamicDrop( DROP, ( ctx, out ) -> out.accept( getItem( computer ) ) ); for( ItemStack item : state.getDrops( context ) ) { spawnAsEntity( world, pos, item ); } - state.spawnAdditionalDrops( world, pos, player.getHeldItemMainhand() ); + state.spawnAdditionalDrops( serverWorld, pos, player.getHeldItemMainhand() ); } } 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 a9c5ea36e..99a08a5e0 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,9 +207,7 @@ public class BlockCable extends BlockGeneric implements IWaterLoggable Direction facing = state.get( MODEM ).getFacing(); if( facing == null ) return true; - BlockPos offsetPos = pos.offset( facing ); - BlockState offsetState = world.getBlockState( offsetPos ); - return hasSolidSide( offsetState, world, offsetPos, facing.getOpposite() ); + return hasEnoughSolidSide( world, pos.offset( facing ), 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 9c26780d3..531810ed8 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 @@ -80,12 +80,10 @@ public class BlockWirelessModem extends BlockGeneric implements IWaterLoggable @Override @Deprecated - public boolean isValidPosition( BlockState state, IWorldReader world, BlockPos pos ) + public boolean isValidPosition( BlockState state, @Nonnull IWorldReader world, BlockPos pos ) { Direction facing = state.get( FACING ); - BlockPos offsetPos = pos.offset( facing ); - BlockState offsetState = world.getBlockState( offsetPos ); - return hasSolidSide( offsetState, world, offsetPos, facing.getOpposite() ); + return hasEnoughSolidSide( world, pos.offset( facing ), facing.getOpposite() ); } @Nullable diff --git a/src/main/java/dan200/computercraft/shared/util/FakeNetHandler.java b/src/main/java/dan200/computercraft/shared/util/FakeNetHandler.java index 02fae31ab..03450d233 100644 --- a/src/main/java/dan200/computercraft/shared/util/FakeNetHandler.java +++ b/src/main/java/dan200/computercraft/shared/util/FakeNetHandler.java @@ -65,11 +65,6 @@ public class FakeNetHandler extends ServerPlayNetHandler { } - @Override - public void handleRecipeBookUpdate( @Nonnull CRecipeInfoPacket packet ) - { - } - @Override public void handleSeenAdvancements( @Nonnull CSeenAdvancementsPacket packet ) { diff --git a/src/main/resources/META-INF/accesstransformer.cfg b/src/main/resources/META-INF/accesstransformer.cfg index 0db231ddd..6e87a36ff 100644 --- a/src/main/resources/META-INF/accesstransformer.cfg +++ b/src/main/resources/META-INF/accesstransformer.cfg @@ -2,3 +2,6 @@ public net.minecraft.client.renderer.FirstPersonRenderer func_178100_c(F)F # getMapAngleFromPitch public net.minecraft.client.renderer.FirstPersonRenderer func_228401_a_(Lcom/mojang/blaze3d/matrix/MatrixStack;Lnet/minecraft/client/renderer/IRenderTypeBuffer;IFFLnet/minecraft/util/HandSide;)V # renderArmFirstPerson public net.minecraft.client.renderer.FirstPersonRenderer func_228403_a_(Lcom/mojang/blaze3d/matrix/MatrixStack;Lnet/minecraft/client/renderer/IRenderTypeBuffer;ILnet/minecraft/util/HandSide;)V # renderArm +# ClientTableFormatter +public net.minecraft.client.gui.NewChatGui func_146234_a(Lnet/minecraft/util/text/ITextComponent;I)V # printChatMessageWithOptionalDeletion +public net.minecraft.client.gui.NewChatGui func_146242_c(I)V # deleteChatLine diff --git a/src/main/resources/META-INF/mods.toml b/src/main/resources/META-INF/mods.toml index cf05511a0..29656100f 100644 --- a/src/main/resources/META-INF/mods.toml +++ b/src/main/resources/META-INF/mods.toml @@ -1,5 +1,5 @@ modLoader="javafml" -loaderVersion="[32,33)" +loaderVersion="[33,34)" issueTrackerURL="https://github.com/SquidDev-CC/CC-Tweaked/issues" displayURL="https://github.com/SquidDev-CC/CC-Tweaked" @@ -7,6 +7,7 @@ logoFile="pack.png" credits="Created by Daniel Ratcliffe (@DanTwoHundred)" authors="Daniel Ratcliffe, Aaron Mills, SquidDev" +license="ComputerCraft Public License (https://raw.githubusercontent.com/dan200/ComputerCraft/master/LICENSE)" [[mods]] modId="computercraft" @@ -19,6 +20,6 @@ CC: Tweaked is a fork of ComputerCraft, adding programmable computers, turtles a [[dependencies.computercraft]] modId="forge" mandatory=true - versionRange="[32.0.69,33)" + versionRange="[33.0.3,34)" ordering="NONE" side="BOTH" diff --git a/src/main/resources/pack.mcmeta b/src/main/resources/pack.mcmeta index a0de516e0..59c3b8fab 100755 --- a/src/main/resources/pack.mcmeta +++ b/src/main/resources/pack.mcmeta @@ -1,6 +1,6 @@ { "pack": { - "pack_format": 4, + "pack_format": 6, "description": "CC: Tweaked" } }