Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: gliscowo/isometric-renders
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 0.4.7+1.21
Choose a base ref
...
head repository: gliscowo/isometric-renders
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 1.21
Choose a head ref
  • 2 commits
  • 2 files changed
  • 1 contributor

Commits on Aug 29, 2024

  1. call 'HandledScreen#close' when opening the render task screen to pre…

    …vent chests from being incorrectly displayed as open afterward (fixes #109)
    gliscowo committed Aug 29, 2024
    Copy the full SHA
    8b87c11 View commit details
  2. Copy the full SHA
    94ce06f View commit details
Original file line number Diff line number Diff line change
@@ -15,12 +15,15 @@
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;

@Mixin(HandledScreen.class)
public class HandledScreenMixin<T extends ScreenHandler> extends Screen {
public abstract class HandledScreenMixin<T extends ScreenHandler> extends Screen {

@Shadow
@Final
protected T handler;

@Shadow
public abstract void close();

protected HandledScreenMixin(Text title) {
super(title);
}
@@ -29,7 +32,9 @@ protected HandledScreenMixin(Text title) {
public void renderInventory(int keyCode, int scanCode, int modifiers, CallbackInfoReturnable<Boolean> cir) {
if (keyCode != GLFW.GLFW_KEY_F12 || !Screen.hasControlDown()) return;

this.close();
client.setScreen(new SelectRenderTaskScreen(handler.slots.stream().map(Slot::getStack).filter(stack -> !stack.isEmpty()).toList()));

cir.setReturnValue(false);
}

Original file line number Diff line number Diff line change
@@ -92,4 +92,10 @@ protected void build(FlowLayout rootComponent) {
mainPanel.child(contentPanel);
rootComponent.child(mainPanel);
}

@Override
public boolean shouldPause() {
return false;
}

}