Skip to content

Commit

Permalink
[neoforge] Update for event api break.
Browse files Browse the repository at this point in the history
  • Loading branch information
wizjany authored and octylFractal committed May 27, 2024
1 parent 17029fe commit 05db94c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ fabric-minecraft = "com.mojang:minecraft:1.20.6"
fabric-loader = "net.fabricmc:fabric-loader:0.15.10"
fabric-permissions-api = "me.lucko:fabric-permissions-api:0.3.1"

neoforge = "net.neoforged:neoforge:20.6.42-beta"
neoforge = "net.neoforged:neoforge:20.6.88-beta"

# Mojang-provided libraries, CHECK AGAINST MINECRAFT for versions
guava = "com.google.guava:guava:32.1.3-jre!!"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@
import net.minecraft.world.InteractionHand;
import net.minecraft.world.entity.player.Player;
import net.minecraft.world.level.biome.Biome;
import net.neoforged.bus.api.Event;
import net.neoforged.bus.api.IEventBus;
import net.neoforged.bus.api.SubscribeEvent;
import net.neoforged.fml.ModContainer;
Expand Down Expand Up @@ -278,7 +277,7 @@ private boolean skipInteractionEvent(Player player, InteractionHand hand) {

@SubscribeEvent
public void onLeftClickBlock(PlayerInteractEvent.LeftClickBlock event) {
if (skipInteractionEvent(event.getEntity(), event.getHand()) || event.getUseItem() == Event.Result.DENY) {
if (skipInteractionEvent(event.getEntity(), event.getHand()) || event.getUseItem().isFalse()) {
return;
}

Expand All @@ -301,7 +300,7 @@ public void onLeftClickBlock(PlayerInteractEvent.LeftClickBlock event) {

@SubscribeEvent
public void onRightClickBlock(PlayerInteractEvent.RightClickBlock event) {
if (skipInteractionEvent(event.getEntity(), event.getHand()) || event.getUseItem() == Event.Result.DENY) {
if (skipInteractionEvent(event.getEntity(), event.getHand()) || event.getUseItem().isFalse()) {
return;
}

Expand Down

0 comments on commit 05db94c

Please sign in to comment.