Created
March 26, 2023 18:33
-
-
Save isXander/c5a1dbe8e84f9fc71eb5a4e926187253 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
@Mixin(AbstractContainerScreen.class) | |
public abstract class AbstractContainerScreenMixin implements ScreenProcessorProvider { | |
@Shadow @Nullable protected Slot hoveredSlot; | |
@Shadow protected abstract void slotClicked(Slot slot, int slotId, int button, ClickType actionType); | |
@Unique private final ScreenProcessor<?> screenProcessor = new AbstractContainerScreenProcessor<>((AbstractContainerScreen<?>) (Object) this, () -> hoveredSlot, this::slotClicked); | |
@Override | |
public ScreenProcessor<?> screenProcessor() { | |
return screenProcessor; | |
} | |
} |
This file contains hidden or 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
@Mixin(CreativeModeInventoryScreen.class) | |
public abstract class CreativeModeInventoryScreenMixin extends AbstractContainerScreenMixin { | |
@Unique private final CreativeModeInventoryScreenProcessor controlify$screenProcessor | |
= new CreativeModeInventoryScreenProcessor((CreativeModeInventoryScreen) (Object) this, () -> hoveredSlot, this::slotClicked); | |
@Override | |
public ScreenProcessor<?> screenProcessor() { | |
return controlify$screenProcessor; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment