diff options
Diffstat (limited to 'src/main')
4 files changed, 8 insertions, 9 deletions
diff --git a/src/main/java/com/anthonyhilyard/iceberg/util/DynamicResourcePack.java b/src/main/java/com/anthonyhilyard/iceberg/util/DynamicResourcePack.java index 127fc60..a59449a 100644 --- a/src/main/java/com/anthonyhilyard/iceberg/util/DynamicResourcePack.java +++ b/src/main/java/com/anthonyhilyard/iceberg/util/DynamicResourcePack.java @@ -99,13 +99,13 @@ public class DynamicResourcePack implements PackResources } @Override - public Collection<ResourceLocation> getResources(PackType type, String namespace, String path, int maxDepth, Predicate<String> filter) + public Collection<ResourceLocation> getResources(PackType type, String namespace, String path, Predicate<ResourceLocation> filter) { return dynamicResourceMap.entrySet().stream() .filter(entry -> entry.getKey().namespace.contentEquals(namespace)) .filter(entry -> entry.getKey().path.startsWith(path)) .filter(entry -> entry.getKey().type.contentEquals(type.getDirectory())) - .filter(entry -> filter.test(entry.getKey().path)) + .filter(entry -> filter.test(new ResourceLocation(entry.getKey().namespace, entry.getKey().path))) .map(entry -> new ResourceLocation(namespace, entry.getKey().path)) .collect(Collectors.toList()); } diff --git a/src/main/java/com/anthonyhilyard/iceberg/util/GuiHelper.java b/src/main/java/com/anthonyhilyard/iceberg/util/GuiHelper.java index de61b54..9e0f60c 100644 --- a/src/main/java/com/anthonyhilyard/iceberg/util/GuiHelper.java +++ b/src/main/java/com/anthonyhilyard/iceberg/util/GuiHelper.java @@ -23,8 +23,7 @@ public class GuiHelper BufferBuilder bufferBuilder = tessellator.getBuilder(); bufferBuilder.begin(VertexFormat.Mode.QUADS, DefaultVertexFormat.POSITION_COLOR); drawGradientRect(mat, bufferBuilder, left, top, right, bottom, zLevel, startColor, endColor); - bufferBuilder.end(); - BufferUploader.end(bufferBuilder); + BufferUploader.drawWithShader(bufferBuilder.end()); RenderSystem.disableBlend(); RenderSystem.enableTexture(); diff --git a/src/main/java/com/anthonyhilyard/iceberg/util/StringRecomposer.java b/src/main/java/com/anthonyhilyard/iceberg/util/StringRecomposer.java index 4ad448d..bf87e67 100644 --- a/src/main/java/com/anthonyhilyard/iceberg/util/StringRecomposer.java +++ b/src/main/java/com/anthonyhilyard/iceberg/util/StringRecomposer.java @@ -8,7 +8,7 @@ import net.minecraft.client.gui.screens.inventory.tooltip.ClientTooltipComponent import net.minecraft.network.chat.FormattedText; import net.minecraft.network.chat.MutableComponent; import net.minecraft.network.chat.Style; -import net.minecraft.network.chat.TextComponent; +import net.minecraft.network.chat.Component; import net.minecraft.util.FormattedCharSink; public class StringRecomposer @@ -31,7 +31,7 @@ public class StringRecomposer private static class RecomposerSink implements FormattedCharSink { private StringBuilder builder = new StringBuilder(); - private MutableComponent text = new TextComponent("").withStyle(Style.EMPTY); + private MutableComponent text = Component.literal("").withStyle(Style.EMPTY); @Override public boolean accept(int index, Style style, int charCode) @@ -40,7 +40,7 @@ public class StringRecomposer if (!style.equals(text.getStyle())) { - text.append(new TextComponent(builder.toString()).withStyle(style)); + text.append(Component.literal(builder.toString()).withStyle(style)); builder.setLength(0); } return true; @@ -48,7 +48,7 @@ public class StringRecomposer public FormattedText getFormattedText() { - text.append(new TextComponent(builder.toString()).withStyle(text.getStyle())); + text.append(Component.literal(builder.toString()).withStyle(text.getStyle())); return text; } } diff --git a/src/main/resources/fabric.mod.json b/src/main/resources/fabric.mod.json index 43d53e7..b7adb25 100644 --- a/src/main/resources/fabric.mod.json +++ b/src/main/resources/fabric.mod.json @@ -30,7 +30,7 @@ "depends": { "fabricloader": ">=0.12.5", "fabric": "*", - "minecraft": "1.18.x", + "minecraft": "~1.19", "java": ">=17" }, "custom": { |