-
Notifications
You must be signed in to change notification settings - Fork 13
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
1 parent
53101f5
commit 3fcbb92
Showing
7 changed files
with
37 additions
and
33 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
19 changes: 0 additions & 19 deletions
19
src/main/java/me/justahuman/slimefun_essentials/mixins/jec/ILabelMixin.java
This file was deleted.
Oops, something went wrong.
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
30 changes: 30 additions & 0 deletions
30
src/main/java/me/justahuman/slimefun_essentials/mixins/minecraft/SlotMixin.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,30 @@ | ||
package me.justahuman.slimefun_essentials.mixins.minecraft; | ||
|
||
import me.justahuman.slimefun_essentials.config.ModConfig; | ||
import me.justahuman.slimefun_essentials.utils.Utils; | ||
import net.minecraft.item.ItemStack; | ||
import net.minecraft.screen.slot.Slot; | ||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.Shadow; | ||
import org.spongepowered.asm.mixin.injection.At; | ||
import org.spongepowered.asm.mixin.injection.Inject; | ||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; | ||
|
||
@Mixin(Slot.class) | ||
public abstract class SlotMixin { | ||
@Shadow | ||
public abstract ItemStack getStack(); | ||
|
||
@Inject(at = @At("HEAD"), method = "canBeHighlighted", cancellable = true) | ||
public void canBeHighlighted(CallbackInfoReturnable<Boolean> cir) { | ||
if (!ModConfig.hideBackgroundTooltips()) { | ||
return; | ||
} | ||
|
||
final ItemStack itemStack = getStack(); | ||
final String id = Utils.getSlimefunId(itemStack); | ||
if (id != null && Utils.HIDDEN_SF_IDS.contains(id)) { | ||
cir.setReturnValue(false); | ||
} | ||
} | ||
} |
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