Skip to content

Commit

Permalink
Updated Mappings
Browse files Browse the repository at this point in the history
  • Loading branch information
LudoCrypt committed Jan 15, 2023
1 parent b1c712a commit 163ccb9
Show file tree
Hide file tree
Showing 22 changed files with 55 additions and 23 deletions.
5 changes: 4 additions & 1 deletion limlib_effects/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,14 @@ repositories {
maven {
url "https://jitpack.io"
}
flatDir {
dirs 'mappings'
}
}

dependencies {
minecraft libs.minecraft
mappings "org.quiltmc:quilt-mappings:${libs.versions.quilt.mappings.get()}:intermediary-v2"
mappings "mappings:quilt-mappings-1.19.3+fixed:local-v2"

modImplementation libs.quilt.loader

Expand Down
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.quiltmc</groupId>
<artifactId>quilt-mappings</artifactId>
<version>1.19.3+build.16</version>
<version>1.19.3+fixed</version>
</project>
5 changes: 4 additions & 1 deletion limlib_registry/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,14 @@ repositories {
maven {
url "https://jitpack.io"
}
flatDir {
dirs 'mappings'
}
}

dependencies {
minecraft libs.minecraft
mappings "org.quiltmc:quilt-mappings:${libs.versions.quilt.mappings.get()}:intermediary-v2"
mappings "mappings:quilt-mappings-1.19.3+fixed:local-v2"

modImplementation libs.quilt.loader

Expand Down
Binary file not shown.
Binary file not shown.
8 changes: 8 additions & 0 deletions limlib_registry/mappings/quilt-mappings-1.19.3+fixed.pom
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<groupId>org.quiltmc</groupId>
<artifactId>quilt-mappings</artifactId>
<version>1.19.3+fixed</version>
</project>
2 changes: 1 addition & 1 deletion limlib_render/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ repositories {

dependencies {
minecraft libs.minecraft
mappings "mappings:quilt-mappings-1.19.3+build.16:intermediary-v2"
mappings "mappings:quilt-mappings-1.19.3+fixed:local-v2"


modImplementation libs.quilt.loader
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
8 changes: 8 additions & 0 deletions limlib_render/mappings/quilt-mappings-1.19.3+fixed.pom
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<groupId>org.quiltmc</groupId>
<artifactId>quilt-mappings</artifactId>
<version>1.19.3+fixed</version>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

import net.ludocrypt.limlib.render.special.SpecialModelRenderer;

public interface ChunkRenderDataAccess {
public interface RenderedChunkDataAccess {

public Map<SpecialModelRenderer, BufferBuilder.RenderedBuffer> getSpecialModelBuffers();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@
import com.mojang.blaze3d.vertex.BufferBuilder.RenderedBuffer;

import it.unimi.dsi.fastutil.objects.Reference2ObjectArrayMap;
import net.ludocrypt.limlib.render.access.ChunkRenderDataAccess;
import net.ludocrypt.limlib.render.access.RenderedChunkDataAccess;
import net.ludocrypt.limlib.render.special.SpecialModelRenderer;
import net.minecraft.client.render.chunk.ChunkBuilder.BuiltChunk.RebuildTask.ChunkRenderData;
import net.minecraft.client.render.chunk.ChunkBuilder.BuiltChunk.RebuildTask.RenderedChunkData;

@Mixin(ChunkRenderData.class)
public class ChunkRenderDataMixin implements ChunkRenderDataAccess {
@Mixin(RenderedChunkData.class)
public class ChunkRenderDataMixin implements RenderedChunkDataAccess {

@Unique
public final Map<SpecialModelRenderer, BufferBuilder.RenderedBuffer> specialModelBuffers = new Reference2ObjectArrayMap<>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
import net.ludocrypt.limlib.render.access.BakedModelAccess;
import net.ludocrypt.limlib.render.access.BlockBufferBuilderStorageAccess;
import net.ludocrypt.limlib.render.access.BuiltChunkAccess;
import net.ludocrypt.limlib.render.access.ChunkRenderDataAccess;
import net.ludocrypt.limlib.render.access.RenderedChunkDataAccess;
import net.ludocrypt.limlib.render.special.SpecialModelRenderer;
import net.minecraft.block.BlockState;
import net.minecraft.client.render.OverlayTexture;
Expand All @@ -31,7 +31,7 @@
import net.minecraft.client.render.chunk.BlockBufferBuilderStorage;
import net.minecraft.client.render.chunk.ChunkBuilder;
import net.minecraft.client.render.chunk.ChunkBuilder.BuiltChunk.RebuildTask;
import net.minecraft.client.render.chunk.ChunkBuilder.BuiltChunk.RebuildTask.ChunkRenderData;
import net.minecraft.client.render.chunk.ChunkBuilder.BuiltChunk.RebuildTask.RenderedChunkData;
import net.minecraft.client.render.chunk.ChunkOcclusionDataBuilder;
import net.minecraft.client.render.chunk.ChunkRenderRegion;
import net.minecraft.client.render.model.BakedModel;
Expand All @@ -48,8 +48,8 @@ public class RebuildTaskMixin {
@Final
ChunkBuilder.BuiltChunk f_yzjdcnsj;

@Inject(method = "Lnet/minecraft/client/render/chunk/ChunkBuilder$BuiltChunk$RebuildTask;render(FFFLnet/minecraft/client/render/chunk/BlockBufferBuilderStorage;)Lnet/minecraft/client/render/chunk/ChunkBuilder$BuiltChunk$RebuildTask$ChunkRenderData;", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/render/block/BlockRenderManager;renderBlock(Lnet/minecraft/block/BlockState;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/world/BlockRenderView;Lnet/minecraft/client/util/math/MatrixStack;Lcom/mojang/blaze3d/vertex/VertexConsumer;ZLnet/minecraft/util/random/RandomGenerator;)V", shift = Shift.AFTER), locals = LocalCapture.CAPTURE_FAILHARD)
private void limlib$render(float cameraX, float cameraY, float cameraZ, BlockBufferBuilderStorage buffers, CallbackInfoReturnable<ChunkRenderData> ci, ChunkRenderData chunkData, int i, BlockPos blockPos, BlockPos blockPos2, ChunkOcclusionDataBuilder chunkOcclusionDataBuilder, ChunkRenderRegion chunkRenderRegion, MatrixStack matrixStack, Set<RenderLayer> set, RandomGenerator randomGenerator, BlockRenderManager blockRenderManager, Iterator<BlockPos> var15, BlockPos pos, BlockState blockState, BlockState blockState2, FluidState fluidState, RenderLayer renderLayer, BufferBuilder bufferBuilder) {
@Inject(method = "Lnet/minecraft/client/render/chunk/ChunkBuilder$BuiltChunk$RebuildTask;render(FFFLnet/minecraft/client/render/chunk/BlockBufferBuilderStorage;)Lnet/minecraft/client/render/chunk/ChunkBuilder$BuiltChunk$RebuildTask$RenderedChunkData;", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/render/block/BlockRenderManager;renderBlock(Lnet/minecraft/block/BlockState;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/world/BlockRenderView;Lnet/minecraft/client/util/math/MatrixStack;Lcom/mojang/blaze3d/vertex/VertexConsumer;ZLnet/minecraft/util/random/RandomGenerator;)V", shift = Shift.AFTER), locals = LocalCapture.CAPTURE_FAILHARD)
private void limlib$render(float cameraX, float cameraY, float cameraZ, BlockBufferBuilderStorage buffers, CallbackInfoReturnable<RenderedChunkData> ci, RenderedChunkData chunkData, int i, BlockPos blockPos, BlockPos blockPos2, ChunkOcclusionDataBuilder chunkOcclusionDataBuilder, ChunkRenderRegion chunkRenderRegion, MatrixStack matrixStack, Set<RenderLayer> set, RandomGenerator randomGenerator, BlockRenderManager blockRenderManager, Iterator<BlockPos> var15, BlockPos pos, BlockState blockState, BlockState blockState2, FluidState fluidState, RenderLayer renderLayer, BufferBuilder bufferBuilder) {
List<Pair<SpecialModelRenderer, BakedModel>> models = ((BakedModelAccess) blockRenderManager.getModel(blockState)).getModels(blockState);
if (!models.isEmpty()) {
for (Pair<SpecialModelRenderer, BakedModel> pair : models) {
Expand All @@ -68,27 +68,27 @@ public class RebuildTaskMixin {
}
}

@Inject(method = "Lnet/minecraft/client/render/chunk/ChunkBuilder$BuiltChunk$RebuildTask;render(FFFLnet/minecraft/client/render/chunk/BlockBufferBuilderStorage;)Lnet/minecraft/client/render/chunk/ChunkBuilder$BuiltChunk$RebuildTask$ChunkRenderData;", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/render/block/BlockModelRenderer;disableBrightnessCache()V", shift = Shift.BEFORE), locals = LocalCapture.CAPTURE_FAILHARD)
private void limlib$render(float cameraX, float cameraY, float cameraZ, BlockBufferBuilderStorage buffers, CallbackInfoReturnable<ChunkRenderData> ci, ChunkRenderData chunkData) {
@Inject(method = "Lnet/minecraft/client/render/chunk/ChunkBuilder$BuiltChunk$RebuildTask;render(FFFLnet/minecraft/client/render/chunk/BlockBufferBuilderStorage;)Lnet/minecraft/client/render/chunk/ChunkBuilder$BuiltChunk$RebuildTask$RenderedChunkData;", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/render/block/BlockModelRenderer;disableBrightnessCache()V", shift = Shift.BEFORE), locals = LocalCapture.CAPTURE_FAILHARD)
private void limlib$render(float cameraX, float cameraY, float cameraZ, BlockBufferBuilderStorage buffers, CallbackInfoReturnable<RenderedChunkData> ci, RenderedChunkData chunkData) {
for (SpecialModelRenderer modelRenderer : ((BlockBufferBuilderStorageAccess) buffers).getSpecialModelBuffers().keySet()) {
if (!((BlockBufferBuilderStorageAccess) buffers).get(modelRenderer).isBuilding()) {
((BlockBufferBuilderStorageAccess) buffers).get(modelRenderer).begin(VertexFormat.DrawMode.QUADS, VertexFormats.POSITION_COLOR_TEXTURE_LIGHT_NORMAL);
}

BufferBuilder.RenderedBuffer renderedBuffer = ((BlockBufferBuilderStorageAccess) buffers).get(modelRenderer).end();
if (renderedBuffer != null) {
((ChunkRenderDataAccess) (Object) chunkData).getSpecialModelBuffers().put(modelRenderer, renderedBuffer);
((RenderedChunkDataAccess) (Object) chunkData).getSpecialModelBuffers().put(modelRenderer, renderedBuffer);
}
}
}

@Inject(method = "Lnet/minecraft/client/render/chunk/ChunkBuilder$BuiltChunk$RebuildTask;run(Lnet/minecraft/client/render/chunk/BlockBufferBuilderStorage;)Ljava/util/concurrent/CompletableFuture;", at = @At(value = "INVOKE", target = "Ljava/util/Collection;forEach(Ljava/util/function/Consumer;)V", shift = Shift.AFTER), locals = LocalCapture.CAPTURE_FAILHARD)
private void limlib$run(BlockBufferBuilderStorage buffers, CallbackInfoReturnable<CompletableFuture<ChunkBuilder.Result>> ci, Vec3d vec3d, float f, float g, float h, ChunkRenderData chunkRenderData) {
((ChunkRenderDataAccess) (Object) chunkRenderData).getSpecialModelBuffers().values().forEach(BufferBuilder.RenderedBuffer::release);
private void limlib$run(BlockBufferBuilderStorage buffers, CallbackInfoReturnable<CompletableFuture<ChunkBuilder.Result>> ci, Vec3d vec3d, float f, float g, float h, RenderedChunkData RenderedChunkData) {
((RenderedChunkDataAccess) (Object) RenderedChunkData).getSpecialModelBuffers().values().forEach(BufferBuilder.RenderedBuffer::release);
}

@Inject(method = "Lnet/minecraft/client/render/chunk/ChunkBuilder$BuiltChunk$RebuildTask;run(Lnet/minecraft/client/render/chunk/BlockBufferBuilderStorage;)Ljava/util/concurrent/CompletableFuture;", at = @At(value = "INVOKE", target = "Ljava/util/Map;forEach(Ljava/util/function/BiConsumer;)V", shift = Shift.AFTER), locals = LocalCapture.CAPTURE_FAILHARD)
private void limlib$run(BlockBufferBuilderStorage buffers, CallbackInfoReturnable<CompletableFuture<ChunkBuilder.Result>> ci, Vec3d vec3d, float f, float g, float h, ChunkRenderData chunkRenderData, ChunkBuilder.ChunkData chunkData, List<CompletableFuture<Void>> list) {
((ChunkRenderDataAccess) (Object) chunkRenderData).getSpecialModelBuffers().forEach((modelRenderer, renderedBuffer) -> list.add(((BuiltChunkAccess) f_yzjdcnsj).getSuperChunkBuilder().scheduleUpload(renderedBuffer, ((BuiltChunkAccess) f_yzjdcnsj).getBuffer(modelRenderer))));
private void limlib$run(BlockBufferBuilderStorage buffers, CallbackInfoReturnable<CompletableFuture<ChunkBuilder.Result>> ci, Vec3d vec3d, float f, float g, float h, RenderedChunkData RenderedChunkData, ChunkBuilder.ChunkData chunkData, List<CompletableFuture<Void>> list) {
((RenderedChunkDataAccess) (Object) RenderedChunkData).getSpecialModelBuffers().forEach((modelRenderer, renderedBuffer) -> list.add(((BuiltChunkAccess) f_yzjdcnsj).getSuperChunkBuilder().scheduleUpload(renderedBuffer, ((BuiltChunkAccess) f_yzjdcnsj).getBuffer(modelRenderer))));
}
}
3 changes: 1 addition & 2 deletions limlib_render/src/main/resources/limlib_render.accesswidener
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ accessible class net/minecraft/registry/Registries$RegistryBootstrap
accessible class net/minecraft/unmapped/C_uhbbwvga$C_keyyzmde
accessible class net/minecraft/client/render/chunk/ChunkBuilder$Result
accessible class net/minecraft/client/render/chunk/ChunkBuilder$BuiltChunk$RebuildTask
accessible class net/minecraft/client/render/chunk/ChunkBuilder$BuiltChunk$RebuildTask$ChunkRenderData
accessible class net/minecraft/client/render/chunk/ChunkBuilder$BuiltChunk$RebuildTask$ChunkRenderData
accessible class net/minecraft/client/render/chunk/ChunkBuilder$BuiltChunk$RebuildTask$RenderedChunkData
accessible class net/minecraft/client/render/WorldRenderer$ChunkInfo
accessible field net/minecraft/client/render/WorldRenderer$ChunkInfo chunk Lnet/minecraft/client/render/chunk/ChunkBuilder$BuiltChunk;
5 changes: 4 additions & 1 deletion limlib_world/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,14 @@ repositories {
maven {
url "https://jitpack.io"
}
flatDir {
dirs 'mappings'
}
}

dependencies {
minecraft libs.minecraft
mappings "org.quiltmc:quilt-mappings:${libs.versions.quilt.mappings.get()}:intermediary-v2"
mappings "mappings:quilt-mappings-1.19.3+fixed:local-v2"

modImplementation libs.quilt.loader

Expand Down
Binary file not shown.
Binary file not shown.
8 changes: 8 additions & 0 deletions limlib_world/mappings/quilt-mappings-1.19.3+fixed.pom
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<groupId>org.quiltmc</groupId>
<artifactId>quilt-mappings</artifactId>
<version>1.19.3+fixed</version>
</project>

0 comments on commit 163ccb9

Please sign in to comment.