19w45b + Fix missed optional mixin fixes

MixinChunkRebuildTask should have been ported yesterday, but it was only logging out a warning.
This commit is contained in:
modmuss50 2019-11-08 13:23:12 +00:00
parent 58e820e06c
commit f947d671a1
3 changed files with 9 additions and 9 deletions

View file

@ -12,8 +12,8 @@ plugins {
def ENV = System.getenv() def ENV = System.getenv()
class Globals { class Globals {
static def baseVersion = "0.4.10" static def baseVersion = "0.4.11"
static def mcVersion = "19w45a" static def mcVersion = "19w45b"
static def yarnVersion = "+build.1" static def yarnVersion = "+build.1"
} }

View file

@ -1,5 +1,5 @@
archivesBaseName = "fabric-renderer-indigo" archivesBaseName = "fabric-renderer-indigo"
version = getSubprojectVersion(project, "0.2.11") version = getSubprojectVersion(project, "0.2.12")
dependencies { dependencies {
compile project(path: ':fabric-api-base', configuration: 'dev') compile project(path: ':fabric-api-base', configuration: 'dev')

View file

@ -62,19 +62,19 @@ import net.fabricmc.fabric.impl.client.indigo.renderer.render.TerrainRenderConte
* Renderer authors are responsible for creating the hooks they need. * Renderer authors are responsible for creating the hooks they need.
* (Though they can use these as an example if they wish.) * (Though they can use these as an example if they wish.)
*/ */
@Mixin(targets = "net.minecraft.client.render.chunk.ChunkBatcher$ChunkRenderer$class_4578") @Mixin(targets = "net.minecraft.client.render.chunk.ChunkBuilder$BuiltChunk$RebuildTask")
public class MixinChunkRebuildTask { public class MixinChunkRebuildTask {
@Shadow @Shadow
protected ChunkRendererRegion field_20838; protected ChunkRendererRegion region;
@Shadow @Shadow
protected BuiltChunk field_20839; protected BuiltChunk field_20839;
@Inject(at = @At("HEAD"), method = "method_22785") @Inject(at = @At("HEAD"), method = "method_22785")
private void hookChunkBuild(float float_1, float float_2, float float_3, ChunkBuilder.ChunkData renderData, BlockBufferBuilderStorage builder, CallbackInfoReturnable<Set<BlockEntity>> ci) { private void hookChunkBuild(float float_1, float float_2, float float_3, ChunkBuilder.ChunkData renderData, BlockBufferBuilderStorage builder, CallbackInfoReturnable<Set<BlockEntity>> ci) {
if (field_20838 != null) { if (region != null) {
TerrainRenderContext renderer = TerrainRenderContext.POOL.get(); TerrainRenderContext renderer = TerrainRenderContext.POOL.get();
renderer.prepare(field_20838, field_20839, renderData, builder); renderer.prepare(region, field_20839, renderData, builder);
((AccessChunkRendererRegion) field_20838).fabric_setRenderer(renderer); ((AccessChunkRendererRegion) region).fabric_setRenderer(renderer);
} }
} }
@ -95,7 +95,7 @@ public class MixinChunkRebuildTask {
* driven off of render type. (Not recommended or encouraged, but also not prevented.) * driven off of render type. (Not recommended or encouraged, but also not prevented.)
*/ */
@Redirect(method = "method_22785", require = 1, at = @At(value = "INVOKE", @Redirect(method = "method_22785", require = 1, at = @At(value = "INVOKE",
target = "Lnet/minecraft/client/render/block/BlockRenderManager;tesselateBlock(Lnet/minecraft/block/BlockState;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/world/BlockRenderView;Lnet/minecraft/client/util/math/MatrixStack;Lnet/minecraft/client/render/VertexConsumer;ZLjava/util/Random;)Z")) 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;Lnet/minecraft/client/render/VertexConsumer;ZLjava/util/Random;)Z"))
private boolean hookChunkBuildTesselate(BlockRenderManager renderManager, BlockState blockState, BlockPos blockPos, BlockRenderView blockView, MatrixStack matrix, VertexConsumer bufferBuilder, boolean checkSides, Random random) { private boolean hookChunkBuildTesselate(BlockRenderManager renderManager, BlockState blockState, BlockPos blockPos, BlockRenderView blockView, MatrixStack matrix, VertexConsumer bufferBuilder, boolean checkSides, Random random) {
if (blockState.getRenderType() == BlockRenderType.MODEL) { if (blockState.getRenderType() == BlockRenderType.MODEL) {
final BakedModel model = renderManager.getModel(blockState); final BakedModel model = renderManager.getModel(blockState);