Skip to content

Commit d0593cf

Browse files
committed
Fix crash when registering GUIs on Fabric, Closes CyclopsMC/ColossalChests#200
1 parent b26fdab commit d0593cf

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

loader-common/src/main/java/org/cyclops/cyclopscore/client/gui/container/ContainerScreenExtended.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,8 @@ public void extractBackground(GuiGraphicsExtractor guiGraphics, int mouseX, int
8282
guiGraphics.blit(RenderPipelines.GUI_TEXTURED, getGuiTexture(), leftPos + offsetX, topPos + offsetY, 0, 0, imageWidth - 2 * offsetX, imageHeight - 2 * offsetY, 256, 256);
8383
}
8484

85-
// @Override // This is an override in Forge and NeoForge, but not in Fabric
85+
86+
@Override
8687
public boolean isHovering(Slot slotIn, double mouseX, double mouseY) {
8788
return this.isHovering(slotIn.x - 1, slotIn.y - 1,
8889
18, 18, mouseX, mouseY);

loader-common/src/main/resources/cyclopscore.accesswidener

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ accessible field net/minecraft/world/inventory/InventoryMenu TEXTURE_EMPTY_SLOTS
1010

1111
# Screens
1212
accessible method net/minecraft/client/gui/screens/Screen addRenderableWidget (Lnet/minecraft/client/gui/components/events/GuiEventListener;)Lnet/minecraft/client/gui/components/events/GuiEventListener;
13+
extendable method net/minecraft/client/gui/screens/inventory/AbstractContainerScreen isHovering (Lnet/minecraft/world/inventory/Slot;DD)Z
1314
accessible field net/minecraft/client/gui/screens/inventory/AbstractContainerScreen leftPos I
1415
accessible field net/minecraft/client/gui/screens/inventory/AbstractContainerScreen topPos I
1516
mutable field net/minecraft/client/gui/screens/inventory/AbstractContainerScreen imageWidth I

0 commit comments

Comments
 (0)