mirror of
https://github.com/ViaVersion/ViaFabricPlus.git
synced 2025-04-15 20:19:12 +02:00
Close classic creative screen when pressing inventory key
This commit is contained in:
parent
687e33ef1c
commit
87f0634fcc
@ -90,6 +90,15 @@ public class GridItemSelectionScreen extends VFPScreen {
|
||||
return super.mouseClicked(mouseX, mouseY, button);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean keyPressed(int keyCode, int scanCode, int modifiers) {
|
||||
if (client.options.inventoryKey.matchesKey(keyCode, scanCode)) {
|
||||
this.close();
|
||||
return true;
|
||||
}
|
||||
return super.keyPressed(keyCode, scanCode, modifiers);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void render(DrawContext context, int mouseX, int mouseY, float delta) {
|
||||
final int halfWidth = this.width / 2;
|
||||
|
@ -65,4 +65,9 @@ public abstract class MixinProtocolc0_30cpeToc0_28_30 extends AbstractProtocol<C
|
||||
});
|
||||
}
|
||||
|
||||
@Inject(method = "init", at = @At("HEAD"))
|
||||
public void resetSnowing(CallbackInfo ci) {
|
||||
CPEAdditions.setSnowing(false);
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user