diff options
author | Anthony Hilyard <anthony.hilyard@gmail.com> | 2022-06-14 20:42:46 -0700 |
---|---|---|
committer | Anthony Hilyard <anthony.hilyard@gmail.com> | 2022-06-14 20:42:46 -0700 |
commit | 2e8fbe2faa63ffba2066901135eb9799572614ae (patch) | |
tree | f60fa63616ba43fb4f611257164b0e357d01f9a5 | |
parent | bb600c7a27816d8390e5bb44cfe53d8736070902 (diff) | |
download | Iceberg-2e8fbe2faa63ffba2066901135eb9799572614ae.tar.gz Iceberg-2e8fbe2faa63ffba2066901135eb9799572614ae.tar.bz2 Iceberg-2e8fbe2faa63ffba2066901135eb9799572614ae.zip |
Initial Fabric 1.19 port.
-rw-r--r-- | CHANGELOG.md | 1 | ||||
-rw-r--r-- | build.gradle | 4 | ||||
-rw-r--r-- | gradle.properties | 6 | ||||
-rw-r--r-- | src/main/java/com/anthonyhilyard/iceberg/util/DynamicResourcePack.java | 4 | ||||
-rw-r--r-- | src/main/java/com/anthonyhilyard/iceberg/util/GuiHelper.java | 3 | ||||
-rw-r--r-- | src/main/java/com/anthonyhilyard/iceberg/util/StringRecomposer.java | 8 | ||||
-rw-r--r-- | src/main/resources/fabric.mod.json | 2 |
7 files changed, 14 insertions, 14 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index 6ecf7bb..b0230b7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ ### 1.0.38 - Added support for tooltip components that use tooltip component generation event. +- First Forge/Fabric 1.19 release. ### 1.0.37 - Reverted first change from 1.0.35, as it was causing conflicts with other mod's tooltips. diff --git a/build.gradle b/build.gradle index 15779cb..bdfc5b2 100644 --- a/build.gradle +++ b/build.gradle @@ -1,5 +1,5 @@ plugins { - id 'fabric-loom' version '0.10-SNAPSHOT' + id 'fabric-loom' version '0.12-SNAPSHOT' id 'maven-publish' } @@ -61,7 +61,7 @@ jar { manifest { attributes(["Specification-Title": project.name, "Specification-Vendor": project.author, - "Specification-Version": "24.0", + "Specification-Version": project.version, "Implementation-Title": project.name, "Implementation-Version": project.version, "Implementation-Vendor" : project.author, diff --git a/gradle.properties b/gradle.properties index 7d3e3c0..2177b99 100644 --- a/gradle.properties +++ b/gradle.properties @@ -8,6 +8,6 @@ group=com.anthonyhilyard.${name.toLowerCase()} author=anthonyhilyard version=1.0.38 -mcVersion=1.18.1 -fabricVersion=0.45.0+1.18 -loaderVersion=0.12.12 +mcVersion=1.19 +fabricVersion=0.55.1+1.19 +loaderVersion=0.14.6 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": { |