mirror of
https://github.com/Theta-Dev/ConstructionWand.git
synced 2024-11-22 06:07:48 +01:00
Compare commits
2 commits
3788c2b8da
...
a0b7ec9246
Author | SHA1 | Date | |
---|---|---|---|
a0b7ec9246 | |||
6c96bb25ba |
3 changed files with 9 additions and 4 deletions
|
@ -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
|
|
@ -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 |
Loading…
Reference in a new issue