Named models
This commit is contained in:
parent
302b15551a
commit
8261be3d80
2 changed files with 8 additions and 1 deletions
|
@ -96,6 +96,12 @@ public class GlueInstance extends EntityInstance<SuperGlueEntity> implements ITi
|
|||
}
|
||||
|
||||
public static class GlueModel implements IModel {
|
||||
|
||||
@Override
|
||||
public String name() {
|
||||
return "glue";
|
||||
}
|
||||
|
||||
@Override
|
||||
public void buffer(VecBuffer buffer) {
|
||||
Vec3 diff = Vec3.atLowerCornerOf(Direction.SOUTH.getNormal());
|
||||
|
|
|
@ -41,6 +41,7 @@ public class RenderedContraption extends ContraptionRenderInfo {
|
|||
|
||||
private final Matrix4f modelViewPartial = new Matrix4f();
|
||||
private boolean modelViewPartialReady;
|
||||
// floats because we're uploading this to the gpu
|
||||
private AABB lightBox;
|
||||
|
||||
public RenderedContraption(Contraption contraption, PlacementSimulationWorld renderWorld) {
|
||||
|
@ -125,7 +126,7 @@ public class RenderedContraption extends ContraptionRenderInfo {
|
|||
List<RenderType> blockLayers = RenderType.chunkBufferLayers();
|
||||
|
||||
for (RenderType layer : blockLayers) {
|
||||
Supplier<IModel> layerModel = () -> new WorldModel(renderWorld, layer, contraption.getBlocks().values());
|
||||
Supplier<IModel> layerModel = () -> new WorldModel(renderWorld, layer, contraption.getBlocks().values(), layer + "_" + contraption.entity.getId());
|
||||
|
||||
ModelRenderer renderer;
|
||||
if (Backend.getInstance().compat.vertexArrayObjectsSupported())
|
||||
|
|
Loading…
Reference in a new issue