mirror of
https://github.com/FabricMC/fabric.git
synced 2025-04-03 10:39:57 -04:00
Fix render offset not being applied.
Fixes flower and other blocks always rendering in the center of the block
This commit is contained in:
parent
2605c5a557
commit
175d0eb82e
2 changed files with 4 additions and 1 deletions
fabric-renderer-indigo
build.gradle
src/main/java/net/fabricmc/fabric/mixin/client/indigo/renderer
|
@ -1,5 +1,5 @@
|
|||
archivesBaseName = "fabric-renderer-indigo"
|
||||
version = getSubprojectVersion(project, "0.2.20")
|
||||
version = getSubprojectVersion(project, "0.2.21")
|
||||
|
||||
dependencies {
|
||||
compile project(path: ':fabric-api-base', configuration: 'dev')
|
||||
|
|
|
@ -39,6 +39,7 @@ import net.minecraft.client.render.chunk.ChunkRendererRegion;
|
|||
import net.minecraft.client.render.model.BakedModel;
|
||||
import net.minecraft.client.util.math.MatrixStack;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.Vec3d;
|
||||
import net.minecraft.world.BlockRenderView;
|
||||
|
||||
import net.fabricmc.fabric.api.renderer.v1.model.FabricBakedModel;
|
||||
|
@ -103,6 +104,8 @@ public class MixinChunkRebuildTask {
|
|||
final BakedModel model = renderManager.getModel(blockState);
|
||||
|
||||
if (Indigo.ALWAYS_TESSELATE_INDIGO || !((FabricBakedModel) model).isVanillaAdapter()) {
|
||||
Vec3d vec3d = blockState.getOffsetPos(blockView, blockPos);
|
||||
matrix.translate(vec3d.x, vec3d.y, vec3d.z);
|
||||
return ((AccessChunkRendererRegion) blockView).fabric_getRenderer().tesselateBlock(blockState, blockPos, model, matrix);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue