From 7b476cb24b1e173d03a42ba79bea5d0acc0f40b0 Mon Sep 17 00:00:00 2001 From: Jonathan Coates Date: Sat, 9 Jan 2021 18:49:40 +0000 Subject: [PATCH] Remove usage of deprecated event constructor This requires a Forge bump, but probably no harm in doing so anyway. We're on an ancient (2nd Nov) version. Fixes #665. --- gradle.properties | 2 +- .../computercraft/shared/turtle/core/TurtlePlaceCommand.java | 2 +- src/main/resources/META-INF/mods.toml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/gradle.properties b/gradle.properties index 1f603ff9c..d17e38609 100644 --- a/gradle.properties +++ b/gradle.properties @@ -3,5 +3,5 @@ mod_version=1.95.1 # Minecraft properties (update mods.toml when changing) mc_version=1.16.4 -forge_version=35.0.1 +forge_version=35.1.16 mappings_version=20201028-1.16.3 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 d7932fca7..bf1124fb6 100644 --- a/src/main/java/dan200/computercraft/shared/turtle/core/TurtlePlaceCommand.java +++ b/src/main/java/dan200/computercraft/shared/turtle/core/TurtlePlaceCommand.java @@ -353,7 +353,7 @@ public class TurtlePlaceCommand implements ITurtleCommand TileEntity existingTile = turtle.getWorld().getTileEntity( position ); // See PlayerInteractionManager.processRightClickBlock - PlayerInteractEvent.RightClickBlock event = ForgeHooks.onRightClickBlock( turtlePlayer, Hand.MAIN_HAND, position, side ); + PlayerInteractEvent.RightClickBlock event = ForgeHooks.onRightClickBlock( turtlePlayer, Hand.MAIN_HAND, position, hit ); if( !event.isCanceled() ) { if( item.onItemUseFirst( stack, context ).isSuccessOrConsume() ) diff --git a/src/main/resources/META-INF/mods.toml b/src/main/resources/META-INF/mods.toml index 49042e1d8..ee8b92f44 100644 --- a/src/main/resources/META-INF/mods.toml +++ b/src/main/resources/META-INF/mods.toml @@ -20,6 +20,6 @@ CC: Tweaked is a fork of ComputerCraft, adding programmable computers, turtles a [[dependencies.computercraft]] modId="forge" mandatory=true - versionRange="[35.0.1,36)" + versionRange="[35.1.16,36)" ordering="NONE" side="BOTH"