diff options
author | HacktheTime <l4bg0jb7@duck.com> | 2023-07-13 12:46:40 +0200 |
---|---|---|
committer | hackthetime <l4bg0jb7@duck.com> | 2023-09-05 08:21:59 +0200 |
commit | 2bb0bc909c95dd534b404f21e17b7985ce97777c (patch) | |
tree | 2055105d1afc35ee4273c6d23f27c39e3f004001 /src/main/java/de/hype/bbsentials/mixins | |
parent | ee998f5a34e3fff6ddebc24bbcc71ac406e5783b (diff) | |
download | BBsentials-2bb0bc909c95dd534b404f21e17b7985ce97777c.tar.gz BBsentials-2bb0bc909c95dd534b404f21e17b7985ce97777c.tar.bz2 BBsentials-2bb0bc909c95dd534b404f21e17b7985ce97777c.zip |
changed the item highlighter for the hub. did some other small changes as well
Diffstat (limited to 'src/main/java/de/hype/bbsentials/mixins')
-rw-r--r-- | src/main/java/de/hype/bbsentials/mixins/renderItemMixin.java | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/src/main/java/de/hype/bbsentials/mixins/renderItemMixin.java b/src/main/java/de/hype/bbsentials/mixins/renderItemMixin.java new file mode 100644 index 0000000..c4ab2cd --- /dev/null +++ b/src/main/java/de/hype/bbsentials/mixins/renderItemMixin.java @@ -0,0 +1,26 @@ +import com.anthonyhilyard.itemborders.ItemBorders; +import com.mojang.blaze3d.vertex.PoseStack; + +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.At.Shift; +import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; + +import net.minecraft.client.gui.screens.Screen; +import net.minecraft.client.gui.screens.inventory.AbstractContainerScreen; +import net.minecraft.world.inventory.Slot; +import net.minecraft.network.chat.Component; + +@Mixin(AbstractContainerScreen.class) +public class AbstractContainerScreenMixin extends Screen +{ + protected AbstractContainerScreenMixin(Component titleIn) { super(titleIn); } + + @Inject(method = "renderSlot", at = @At(value = "INVOKE", + target = "Lnet/minecraft/client/renderer/entity/ItemRenderer;renderAndDecorateItem(Lnet/minecraft/world/entity/LivingEntity;Lnet/minecraft/world/item/ItemStack;III)V", shift = Shift.AFTER)) + public void renderSlot(PoseStack poseStack, Slot slot, CallbackInfo info) + { + ItemBorders.renderBorder(poseStack, slot); + } +}
\ No newline at end of file |