From 307241e7fd59052680d4658541deaaa2c94d642f Mon Sep 17 00:00:00 2001 From: simibubi <31564874+simibubi@users.noreply.github.com> Date: Sun, 4 Apr 2021 00:58:23 +0200 Subject: [PATCH] Port new Changes --- .../create/blockstates/radial_chassis.json | 72 +++++++++---------- .../data/create/advancements/aesthetics.json | 4 +- .../gui/AbstractSimiContainerScreen.java | 14 ++-- .../foundation/gui/AbstractSimiScreen.java | 15 ++-- 4 files changed, 54 insertions(+), 51 deletions(-) diff --git a/src/generated/resources/assets/create/blockstates/radial_chassis.json b/src/generated/resources/assets/create/blockstates/radial_chassis.json index f97d8c8bc..8bd829ffc 100644 --- a/src/generated/resources/assets/create/blockstates/radial_chassis.json +++ b/src/generated/resources/assets/create/blockstates/radial_chassis.json @@ -89,8 +89,8 @@ }, { "when": { - "sticky_west": "true", - "axis": "x" + "axis": "x", + "sticky_west": "true" }, "apply": { "model": "create:block/radial_chassis_side_x_sticky", @@ -99,8 +99,8 @@ }, { "when": { - "sticky_west": "true", - "axis": "y" + "axis": "y", + "sticky_west": "true" }, "apply": { "model": "create:block/radial_chassis_side_y_sticky", @@ -109,8 +109,8 @@ }, { "when": { - "sticky_west": "true", - "axis": "z" + "axis": "z", + "sticky_west": "true" }, "apply": { "model": "create:block/radial_chassis_side_z_sticky", @@ -119,8 +119,8 @@ }, { "when": { - "sticky_west": "false", - "axis": "x" + "axis": "x", + "sticky_west": "false" }, "apply": { "model": "create:block/radial_chassis_side_x", @@ -129,8 +129,8 @@ }, { "when": { - "sticky_west": "false", - "axis": "y" + "axis": "y", + "sticky_west": "false" }, "apply": { "model": "create:block/radial_chassis_side_y", @@ -139,8 +139,8 @@ }, { "when": { - "sticky_west": "false", - "axis": "z" + "axis": "z", + "sticky_west": "false" }, "apply": { "model": "create:block/radial_chassis_side_z", @@ -149,8 +149,8 @@ }, { "when": { - "sticky_north": "true", - "axis": "x" + "axis": "x", + "sticky_north": "true" }, "apply": { "model": "create:block/radial_chassis_side_x_sticky" @@ -158,8 +158,8 @@ }, { "when": { - "sticky_north": "true", - "axis": "y" + "axis": "y", + "sticky_north": "true" }, "apply": { "model": "create:block/radial_chassis_side_y_sticky", @@ -168,8 +168,8 @@ }, { "when": { - "sticky_north": "true", - "axis": "z" + "axis": "z", + "sticky_north": "true" }, "apply": { "model": "create:block/radial_chassis_side_x_sticky", @@ -178,8 +178,8 @@ }, { "when": { - "sticky_north": "false", - "axis": "x" + "axis": "x", + "sticky_north": "false" }, "apply": { "model": "create:block/radial_chassis_side_x" @@ -187,8 +187,8 @@ }, { "when": { - "sticky_north": "false", - "axis": "y" + "axis": "y", + "sticky_north": "false" }, "apply": { "model": "create:block/radial_chassis_side_y", @@ -197,8 +197,8 @@ }, { "when": { - "sticky_north": "false", - "axis": "z" + "axis": "z", + "sticky_north": "false" }, "apply": { "model": "create:block/radial_chassis_side_x", @@ -207,8 +207,8 @@ }, { "when": { - "sticky_east": "true", - "axis": "x" + "axis": "x", + "sticky_east": "true" }, "apply": { "model": "create:block/radial_chassis_side_x_sticky", @@ -217,8 +217,8 @@ }, { "when": { - "sticky_east": "true", - "axis": "y" + "axis": "y", + "sticky_east": "true" }, "apply": { "model": "create:block/radial_chassis_side_y_sticky", @@ -227,8 +227,8 @@ }, { "when": { - "sticky_east": "true", - "axis": "z" + "axis": "z", + "sticky_east": "true" }, "apply": { "model": "create:block/radial_chassis_side_z_sticky" @@ -236,8 +236,8 @@ }, { "when": { - "sticky_east": "false", - "axis": "x" + "axis": "x", + "sticky_east": "false" }, "apply": { "model": "create:block/radial_chassis_side_x", @@ -246,8 +246,8 @@ }, { "when": { - "sticky_east": "false", - "axis": "y" + "axis": "y", + "sticky_east": "false" }, "apply": { "model": "create:block/radial_chassis_side_y", @@ -256,8 +256,8 @@ }, { "when": { - "sticky_east": "false", - "axis": "z" + "axis": "z", + "sticky_east": "false" }, "apply": { "model": "create:block/radial_chassis_side_z" diff --git a/src/generated/resources/data/create/advancements/aesthetics.json b/src/generated/resources/data/create/advancements/aesthetics.json index 59a86f429..d723cbe38 100644 --- a/src/generated/resources/data/create/advancements/aesthetics.json +++ b/src/generated/resources/data/create/advancements/aesthetics.json @@ -28,8 +28,8 @@ "trigger": "create:bracket_apply", "conditions": { "accepted_entries": [ - "create:large_cogwheel", - "create:cogwheel" + "create:cogwheel", + "create:large_cogwheel" ] } }, diff --git a/src/main/java/com/simibubi/create/foundation/gui/AbstractSimiContainerScreen.java b/src/main/java/com/simibubi/create/foundation/gui/AbstractSimiContainerScreen.java index 2510cca53..7e3364131 100644 --- a/src/main/java/com/simibubi/create/foundation/gui/AbstractSimiContainerScreen.java +++ b/src/main/java/com/simibubi/create/foundation/gui/AbstractSimiContainerScreen.java @@ -89,13 +89,15 @@ public abstract class AbstractSimiContainerScreen extends C return true; } + if (super.keyPressed(code, p_keyPressed_2_, p_keyPressed_3_)) + return true; + InputMappings.Input mouseKey = InputMappings.getInputByCode(code, p_keyPressed_2_); - if (code == 256 || this.minecraft.gameSettings.keyBindInventory.isActiveAndMatches(mouseKey)) { - this.minecraft.player.closeScreen(); - return true; - } - - return super.keyPressed(code, p_keyPressed_2_, p_keyPressed_3_); + if (this.client.gameSettings.keyBindInventory.isActiveAndMatches(mouseKey)) { + this.onClose(); + return true; + } + return false; } @Override diff --git a/src/main/java/com/simibubi/create/foundation/gui/AbstractSimiScreen.java b/src/main/java/com/simibubi/create/foundation/gui/AbstractSimiScreen.java index c30a954d5..1e2174214 100644 --- a/src/main/java/com/simibubi/create/foundation/gui/AbstractSimiScreen.java +++ b/src/main/java/com/simibubi/create/foundation/gui/AbstractSimiScreen.java @@ -4,7 +4,6 @@ import java.util.ArrayList; import java.util.List; import com.mojang.blaze3d.matrix.MatrixStack; -import com.mojang.blaze3d.systems.RenderSystem; import com.simibubi.create.foundation.gui.widgets.AbstractSimiWidget; import net.minecraft.client.Minecraft; @@ -72,13 +71,15 @@ public abstract class AbstractSimiScreen extends Screen { if (widget.keyPressed(code, p_keyPressed_2_, p_keyPressed_3_)) return true; + if (super.keyPressed(code, p_keyPressed_2_, p_keyPressed_3_)) + return true; + InputMappings.Input mouseKey = InputMappings.getInputByCode(code, p_keyPressed_2_); - if (code == 256 || this.minecraft.gameSettings.keyBindInventory.isActiveAndMatches(mouseKey)) { - this.minecraft.player.closeScreen(); - return true; - } - - return super.keyPressed(code, p_keyPressed_2_, p_keyPressed_3_); + if (this.client.gameSettings.keyBindInventory.isActiveAndMatches(mouseKey)) { + this.onClose(); + return true; + } + return false; } @Override