mirror of
https://github.com/Creators-of-Create/Create.git
synced 2024-11-10 03:53:12 +01:00
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 {
|
public static class GlueModel implements IModel {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String name() {
|
||||||
|
return "glue";
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void buffer(VecBuffer buffer) {
|
public void buffer(VecBuffer buffer) {
|
||||||
Vec3 diff = Vec3.atLowerCornerOf(Direction.SOUTH.getNormal());
|
Vec3 diff = Vec3.atLowerCornerOf(Direction.SOUTH.getNormal());
|
||||||
|
|
|
@ -41,6 +41,7 @@ public class RenderedContraption extends ContraptionRenderInfo {
|
||||||
|
|
||||||
private final Matrix4f modelViewPartial = new Matrix4f();
|
private final Matrix4f modelViewPartial = new Matrix4f();
|
||||||
private boolean modelViewPartialReady;
|
private boolean modelViewPartialReady;
|
||||||
|
// floats because we're uploading this to the gpu
|
||||||
private AABB lightBox;
|
private AABB lightBox;
|
||||||
|
|
||||||
public RenderedContraption(Contraption contraption, PlacementSimulationWorld renderWorld) {
|
public RenderedContraption(Contraption contraption, PlacementSimulationWorld renderWorld) {
|
||||||
|
@ -125,7 +126,7 @@ public class RenderedContraption extends ContraptionRenderInfo {
|
||||||
List<RenderType> blockLayers = RenderType.chunkBufferLayers();
|
List<RenderType> blockLayers = RenderType.chunkBufferLayers();
|
||||||
|
|
||||||
for (RenderType layer : blockLayers) {
|
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;
|
ModelRenderer renderer;
|
||||||
if (Backend.getInstance().compat.vertexArrayObjectsSupported())
|
if (Backend.getInstance().compat.vertexArrayObjectsSupported())
|
||||||
|
|
Loading…
Reference in a new issue