Skip to content

Commit

Permalink
update filtered list each tick to catch inventory updates
Browse files Browse the repository at this point in the history
  • Loading branch information
Pilzinsel64 committed Jan 9, 2025
1 parent da983df commit a961d55
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/main/java/com/zerofall/ezstorage/gui/GuiStorageCore.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
import net.minecraft.client.gui.inventory.GuiContainer;
import net.minecraft.client.renderer.RenderHelper;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.inventory.Slot;
import net.minecraft.item.ItemStack;
import net.minecraft.util.EnumChatFormatting;
import net.minecraft.util.MathHelper;
Expand Down Expand Up @@ -96,7 +95,6 @@ protected void drawGuiContainerBackgroundLayer(float partialTicks, int mouseX, i
protected void drawGuiContainerForegroundLayer(int mouseX, int mouseY) {
super.drawGuiContainerForegroundLayer(mouseX, mouseY);
handleScrolling(mouseX, mouseY);
// updateFilteredItems();
DecimalFormat formatter = new DecimalFormat("#,###");
String totalCount = formatter.format(this.tileEntity.inventory.getTotalCount());
String max = formatter.format(this.tileEntity.inventory.maxItems);
Expand Down Expand Up @@ -346,10 +344,9 @@ public void handleMouseInput() {
}

@Override
protected void handleMouseClick(Slot p_146984_1_, final int p_146984_2_, final int p_146984_3_,
final int p_146984_4_) {
super.handleMouseClick(p_146984_1_, p_146984_2_, p_146984_3_, p_146984_4_);
public void updateScreen() {
updateFilteredItems();
super.updateScreen();
}

private void scrollTo(float scroll) {
Expand Down

0 comments on commit a961d55

Please sign in to comment.