Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[neoforge] Update for event api break. #2540

Merged
merged 1 commit into from
May 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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