8 Commits

Author SHA1 Message Date
9266a89dc3 Merge pull request #11 from TopchetoEU/TopchetoEU/1.19.2-testing
fix: Add "breaks" dependencies
2022-09-21 20:50:37 +03:00
b3c608b0eb fix: Add "breaks" dependencies 2022-09-21 20:49:54 +03:00
17efcd379f Merge pull request #10 from TopchetoEU/TopchetoEU/1.19.2-testing
fix: Wrong minecraft, bro
2022-09-21 20:46:17 +03:00
c25bb19cf9 fix: Wrong minecraft, bro 2022-09-21 20:45:05 +03:00
842ed01212 Merge pull request #9 from TopchetoEU/TopchetoEU/1.19.2-testing
fix: Change required versions to be less restrictive
2022-09-21 20:40:45 +03:00
2c2a902280 fix: Change required versions to be less restrictive 2022-09-21 20:39:38 +03:00
33419b9ebc Merge pull request #8 from TopchetoEU/TopchetoEU/1.19.2-testing
Resolves #3
2022-09-21 20:06:06 +03:00
972af6719d chore: Fix all mapping issues 2022-09-21 20:04:37 +03:00
7 changed files with 25 additions and 26 deletions

1
.gitignore vendored
View File

@@ -14,3 +14,4 @@
!LICENSE
!readme.md
!settings.gradle
!run/

View File

@@ -3,9 +3,9 @@
org.gradle.jvmargs=-Xmx4G
# Fabric Properties
minecraft_version=1.18.2
yarn_mappings=1.18.2+build.1
loader_version=0.13.3
minecraft_version=1.19.2
yarn_mappings=1.19.2+build.17
loader_version=0.14.9
# Mod Properties
mod_version=0.2.0
@@ -13,8 +13,5 @@ maven_group=me.topchetoeu
archives_base_name=animated-chunks
# Dependencies
fabric_version=0.47.8+1.18.2
autoconfig_version=3.3.1
cloth_version=3.2.24
modmenu_version=3.2.1
fabric_version=[0.0.0,)
modmenu_version=[4.0.0,)

View File

@@ -4,7 +4,6 @@ import net.minecraft.client.gui.screen.Screen;
import net.minecraft.client.sound.PositionedSoundInstance;
import net.minecraft.client.util.math.MatrixStack;
import net.minecraft.sound.SoundEvents;
import net.minecraft.text.LiteralText;
import net.minecraft.text.Text;
import net.minecraft.util.Formatting;
import net.minecraft.util.math.ColorHelper.Argb;
@@ -82,17 +81,17 @@ public class AnimatedChunksScreen extends Screen {
buttonSection.order = OrderType.Justified;
buttonSection.children.addChild(new Label(
5, 7,
new LiteralText(manager.get().getDisplayName()).formatted(Formatting.BOLD)
Text.of(manager.get().getDisplayName()).copy().formatted(Formatting.BOLD)
));
buttonSection.children.addSelectableChild(new Button(5, 5, Text.of("Select ..."), () -> client.setScreen(selectScreen)));
res.children.addSelectableChild(buttonSection);
res.children.addChild(new Label(
5, 3,
new LiteralText("Author: " + manager.get().getAuthorOrDefault())
Text.of("Author: " + manager.get().getAuthorOrDefault())
).setMaxWidth(width / 2));
res.children.addChild(new Label(
5, 3,
new LiteralText(manager.get().getDescriptionOrDefault()).formatted(Formatting.ITALIC)
Text.of(manager.get().getDescriptionOrDefault()).copy().formatted(Formatting.ITALIC)
).setMaxWidth(width / 2));
return res;

View File

@@ -128,8 +128,7 @@ public class ChunkPreview extends DrawableHelper implements Drawable, Element, S
bufferBuilder.vertex(p2.getX(), p2.getY(), p2.getZ()).color(r, g, b, a).next();
bufferBuilder.vertex(p3.getX(), p3.getY(), p3.getZ()).color(r, g, b, a).next();
bufferBuilder.vertex(p4.getX(), p4.getY(), p4.getZ()).color(r, g, b, a).next();
bufferBuilder.end();
BufferRenderer.draw(bufferBuilder);
BufferRenderer.drawWithShader(bufferBuilder.end());
RenderSystem.enableTexture();
RenderSystem.disableBlend();
}

View File

@@ -9,7 +9,6 @@ import net.minecraft.client.MinecraftClient;
import net.minecraft.client.font.TextRenderer;
import net.minecraft.client.gui.screen.Screen;
import net.minecraft.client.util.math.MatrixStack;
import net.minecraft.text.LiteralText;
import net.minecraft.text.Text;
import net.minecraft.util.Formatting;
import net.minecraft.util.math.ColorHelper.Argb;
@@ -45,11 +44,11 @@ public class SelectionScreen<T> extends Screen {
float y = 0;
matrices.push();
matrices.translate(20, 5, 0);
textRenderer.draw(matrices, new LiteralText(element.getDisplayNameOrDefault()).formatted(Formatting.BOLD), 0, y, 0xFFFFFFFF);
textRenderer.draw(matrices, Text.of(element.getDisplayNameOrDefault()).copy().formatted(Formatting.BOLD), 0, y, 0xFFFFFFFF);
y += textRenderer.fontHeight + 3;
textRenderer.draw(matrices, new LiteralText("Author: " + element.getAuthorOrDefault()), 0, y, 0xFFFFFFFF);
textRenderer.draw(matrices, Text.of("Author: " + element.getAuthorOrDefault()), 0, y, 0xFFFFFFFF);
y += textRenderer.fontHeight + 2;
y += drawWarpedText(textRenderer, matrices, new LiteralText(element.getDescriptionOrDefault()).formatted(Formatting.ITALIC), 0, (int)y, width - 40);
y += drawWarpedText(textRenderer, matrices, Text.of(element.getDescriptionOrDefault()).copy().formatted(Formatting.ITALIC), 0, (int)y, width - 40);
y += 5;
matrices.pop();

View File

@@ -7,8 +7,8 @@ import net.minecraft.client.render.GameRenderer;
import net.minecraft.client.render.LightmapTextureManager;
import net.minecraft.client.render.RenderLayer;
import net.minecraft.client.render.Shader;
import net.minecraft.client.render.VertexFormat;
import net.minecraft.client.render.WorldRenderer;
import net.minecraft.client.render.WorldRenderer.ChunkInfo;
import net.minecraft.client.render.chunk.ChunkBuilder.BuiltChunk;
import net.minecraft.client.util.math.MatrixStack;
import net.minecraft.util.math.Matrix4f;
@@ -53,9 +53,9 @@ abstract class WorldRendererMixin {
getProgressManager().unloadAllFar((int)((WorldRenderer)(Object)this).getViewDistance(), chunkX, chunkY, chunkZ);
}
@Inject(method = "renderLayer", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/gl/VertexBuffer;drawVertices()V"), locals=LocalCapture.CAPTURE_FAILHARD)
@Inject(method = "renderLayer", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/gl/VertexBuffer;drawElements()V"), locals=LocalCapture.CAPTURE_FAILHARD)
private void renderChunkBefore(RenderLayer renderLayer, MatrixStack matrices, double playerX, double playerY, double playerZ, Matrix4f positionMatrix, CallbackInfo ci,
boolean _1, ObjectListIterator<?> _2, VertexFormat _3, Shader shader, GlUniform _4, boolean _5, WorldRenderer.ChunkInfo _6, BuiltChunk chunk) {
boolean _1, ObjectListIterator<?> _2, Shader shader, GlUniform _4, ChunkInfo _6, BuiltChunk chunk) {
matrices.push();
@@ -88,9 +88,9 @@ abstract class WorldRendererMixin {
matrices.pop();
shader.bind();
}
@Inject(method = "renderLayer", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/gl/VertexBuffer;drawVertices()V"), locals=LocalCapture.CAPTURE_FAILHARD)
@Inject(method = "renderLayer", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/gl/VertexBuffer;drawElements()V"), locals=LocalCapture.CAPTURE_FAILHARD)
private void renderChunkAfter(RenderLayer renderLayer, MatrixStack matrices, double playerX, double playerY, double playerZ, Matrix4f positionMatrix, CallbackInfo ci,
boolean _1, ObjectListIterator<?> _2, VertexFormat _3, Shader _4, GlUniform _5, boolean _6, WorldRenderer.ChunkInfo _7, BuiltChunk chunk) {
boolean _1, ObjectListIterator<?> _2, Shader shader, GlUniform _4, ChunkInfo _6, BuiltChunk chunk) {
int x = chunk.getOrigin().getX();
int z = chunk.getOrigin().getZ();
getProgressManager().load(x, 0, z);

View File

@@ -23,7 +23,11 @@
"depends": {
"fabricloader": ">=0.9.3+build.207",
"fabric": "*",
"minecraft": ">=1.18.2",
"modmenu": ">=3.2.1"
"minecraft": "=1.19.2",
"modmenu": ">=4.0.0"
},
"breaks": {
"sodium": "*",
"iris": "*"
}
}