Compare commits

..

2 commits

Author SHA1 Message Date
a0b7ec9246 removed unused block texture 2021-12-12 11:02:48 +01:00
6c96bb25ba fix #47 crash when pressing E inside wand gui 2021-12-12 10:50:06 +01:00
3 changed files with 9 additions and 4 deletions

View file

@ -15,4 +15,4 @@ mcp_mappings=1.17.1
jei_version=jei-1.17.1:8.3.0.39
version_major=2
version_minor=5
version_minor=6

View file

@ -1,6 +1,7 @@
package thetadev.constructionwand.client;
import com.mojang.blaze3d.vertex.PoseStack;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.components.Button;
import net.minecraft.client.gui.screens.Screen;
import net.minecraft.network.chat.Component;
@ -53,9 +54,13 @@ public class ScreenWand extends Screen
}
@Override
public boolean charTyped(char character, int code) {
if(character == 'e') onClose();
return super.charTyped(character, code);
public boolean keyPressed(int keyCode, int scanCode, int modifiers) {
if (Minecraft.getInstance().options.keyInventory.matches(keyCode, scanCode)) {
this.onClose();
return true;
} else {
return super.keyPressed(keyCode, scanCode, modifiers);
}
}
private void createButton(int cx, int cy, IOption<?> option) {

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.5 KiB