This repository has been archived by the owner on Oct 4, 2024. It is now read-only.
generated from GregTech-Intergalactical/ExampleMod
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
48 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
common/src/main/java/io/github/gregtechintergalactical/gtcore/mixin/MixinHoneycombItem.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package io.github.gregtechintergalactical.gtcore.mixin; | ||
|
||
import io.github.gregtechintergalactical.gtcore.GTCoreConfig; | ||
import net.minecraft.world.InteractionResult; | ||
import net.minecraft.world.item.HoneycombItem; | ||
import net.minecraft.world.item.context.UseOnContext; | ||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.injection.At; | ||
import org.spongepowered.asm.mixin.injection.Inject; | ||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; | ||
|
||
@Mixin(HoneycombItem.class) | ||
public class MixinHoneycombItem { | ||
|
||
@Inject(method = "useOn", at = @At("HEAD"), cancellable = true) | ||
private void injectUseOn(UseOnContext context, CallbackInfoReturnable<InteractionResult> cir){ | ||
if (GTCoreConfig.HONEYCOMB_REPLACEMENT.get()){ | ||
cir.setReturnValue(InteractionResult.PASS); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters