Skip to content

Commit 9d2b18e

Browse files
Merge remote-tracking branch 'origin/1.20.1-forge' into 1.21.1-neoforge
2 parents c37a109 + 85051ae commit 9d2b18e

3 files changed

Lines changed: 13 additions & 2 deletions

File tree

src/main/java/cam72cam/mod/gui/screen/ScreenBuilder.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,14 @@ public boolean keyPressed(int typedChar, int keyCode, int mods) {
153153
return true;
154154
}
155155

156+
@Override
157+
public boolean charTyped(char p_charTyped_1_, int p_charTyped_2_) {
158+
if (active != null) {
159+
return active.internal.charTyped(p_charTyped_1_, p_charTyped_2_);
160+
}
161+
return super.charTyped(p_charTyped_1_, p_charTyped_2_);
162+
}
163+
156164
@Override
157165
public boolean mouseClicked(double x, double y, int button) {
158166
Player.Hand hand = button == 0 ? Player.Hand.PRIMARY : Player.Hand.SECONDARY;

src/main/java/cam72cam/mod/gui/screen/TextField.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ public class TextField implements IWidget{
1212
/** Standard constructor */
1313
public TextField(IScreenBuilder builder, int x, int y, int width, int height) {
1414
this(builder,
15-
new EditBox(Minecraft.getInstance().font, builder.getWidth() / 2 + x, builder.getHeight() / 4 + y, width, height,
15+
//Offset x&y by 1 and minus width&height by 2 to let border be within the range specified
16+
new EditBox(Minecraft.getInstance().font, builder.getWidth() / 2 + x + 1, builder.getHeight() / 4 + y + 1, width - 2, height - 2,
1617
Component.literal("")));
1718
}
1819

src/main/java/cam72cam/mod/resource/BuiltinPack.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@
2626
import java.io.InputStream;
2727
import java.nio.file.Files;
2828
import java.nio.file.Path;
29+
import java.io.*;
30+
import java.nio.charset.StandardCharsets;
2931
import java.util.*;
3032
import java.util.function.Function;
3133
import java.util.stream.Collectors;
@@ -286,7 +288,7 @@ && handleRedirect(ident, entry.getKey(), entry.getValue()).canLoad()) {
286288
}
287289

288290
@Override
289-
public void listResources(PackType type, String pathIn, String namespace, PackResources.ResourceOutput output) {
291+
public void listResources(PackType type, String namespace, String pathIn, PackResources.ResourceOutput output) {
290292
//TODO list all redirect/conditional resources, may need new parameters in API?
291293
final String folder = pathIn + "/"; // Ensure folders
292294
DIRECT_RESOURCES.forEach((k, v) -> {

0 commit comments

Comments
 (0)