mirror of
https://github.com/Creators-of-Create/Create.git
synced 2024-12-27 07:27:15 +01:00
Pose stack says no
- TileEntities not appreciative of wrapped worlds are now much less likely to cause a hard crash
This commit is contained in:
parent
976be3470f
commit
d249318b80
1 changed files with 10 additions and 13 deletions
|
@ -54,19 +54,17 @@ public class TileEntityRenderHelper {
|
|||
continue;
|
||||
}
|
||||
|
||||
try {
|
||||
BlockPos pos = tileEntity.getPos();
|
||||
ms.push();
|
||||
MatrixStacker.of(ms)
|
||||
.translate(pos);
|
||||
BlockPos pos = tileEntity.getPos();
|
||||
ms.push();
|
||||
MatrixStacker.of(ms)
|
||||
.translate(pos);
|
||||
|
||||
try {
|
||||
Vector4f vec = new Vector4f(pos.getX() + .5f, pos.getY() + .5f, pos.getZ() + .5f, 1);
|
||||
vec.transform(matrix);
|
||||
BlockPos lightPos = new BlockPos(vec.getX(), vec.getY(), vec.getZ());
|
||||
int worldLight = ContraptionRenderDispatcher.getLightOnContraption(world, renderWorld, pos, lightPos);
|
||||
|
||||
renderer.render(tileEntity, pt, ms, buffer, worldLight, OverlayTexture.DEFAULT_UV);
|
||||
ms.pop();
|
||||
|
||||
} catch (Exception e) {
|
||||
iterator.remove();
|
||||
|
@ -74,14 +72,13 @@ public class TileEntityRenderHelper {
|
|||
String message = "TileEntity " + tileEntity.getType()
|
||||
.getRegistryName()
|
||||
.toString() + " didn't want to render while moved.\n";
|
||||
if (AllConfigs.CLIENT.explainRenderErrors.get()) {
|
||||
if (AllConfigs.CLIENT.explainRenderErrors.get())
|
||||
Create.logger.error(message, e);
|
||||
continue;
|
||||
}
|
||||
|
||||
Create.logger.error(message);
|
||||
continue;
|
||||
else
|
||||
Create.logger.error(message);
|
||||
}
|
||||
|
||||
ms.pop();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue