mirror of
https://github.com/Creators-of-Create/Create.git
synced 2024-11-11 13:04:19 +01:00
Fix pipe brackets not rendering on contraptions
This commit is contained in:
parent
e3bef624a0
commit
00b01cac55
@ -112,7 +112,8 @@ public abstract class Contraption {
|
||||
private List<BlockFace> pendingSubContraptions;
|
||||
|
||||
// Client
|
||||
public Map<BlockPos, TileEntity> renderedTileEntities;
|
||||
public Map<BlockPos, TileEntity> presentTileEntities;
|
||||
public List<TileEntity> renderedTileEntities;
|
||||
|
||||
public Contraption() {
|
||||
blocks = new HashMap<>();
|
||||
@ -124,7 +125,8 @@ public abstract class Contraption {
|
||||
fluidStorage = new HashMap<>();
|
||||
glueToRemove = new ArrayList<>();
|
||||
initialPassengers = new HashMap<>();
|
||||
renderedTileEntities = new HashMap<>();
|
||||
presentTileEntities = new HashMap<>();
|
||||
renderedTileEntities = new ArrayList<>();
|
||||
pendingSubContraptions = new ArrayList<>();
|
||||
stabilizedSubContraptions = new HashMap<>();
|
||||
}
|
||||
@ -512,6 +514,7 @@ public abstract class Contraption {
|
||||
|
||||
public void readNBT(World world, CompoundNBT nbt, boolean spawnData) {
|
||||
blocks.clear();
|
||||
presentTileEntities.clear();
|
||||
renderedTileEntities.clear();
|
||||
|
||||
nbt.getList("Blocks", 10)
|
||||
@ -549,7 +552,8 @@ public abstract class Contraption {
|
||||
if (te instanceof KineticTileEntity)
|
||||
((KineticTileEntity) te).setSpeed(0);
|
||||
te.getBlockState();
|
||||
renderedTileEntities.put(info.pos, te);
|
||||
presentTileEntities.put(info.pos, te);
|
||||
renderedTileEntities.add(te);
|
||||
}
|
||||
});
|
||||
|
||||
@ -587,7 +591,7 @@ public abstract class Contraption {
|
||||
|
||||
if (spawnData)
|
||||
fluidStorage.forEach((pos, mfs) -> {
|
||||
TileEntity tileEntity = renderedTileEntities.get(pos);
|
||||
TileEntity tileEntity = presentTileEntities.get(pos);
|
||||
if (!(tileEntity instanceof FluidTankTileEntity))
|
||||
return;
|
||||
FluidTankTileEntity tank = (FluidTankTileEntity) tileEntity;
|
||||
|
@ -71,7 +71,7 @@ public class ContraptionRenderer {
|
||||
|
||||
private static void renderTileEntities(World world, Contraption c, MatrixStack ms, MatrixStack msLocal,
|
||||
IRenderTypeBuffer buffer) {
|
||||
TileEntityRenderHelper.renderTileEntities(world, c.renderedTileEntities.values(), ms, msLocal, buffer);
|
||||
TileEntityRenderHelper.renderTileEntities(world, c.renderedTileEntities, ms, msLocal, buffer);
|
||||
}
|
||||
|
||||
private static SuperByteBuffer buildStructureBuffer(Contraption c, RenderType layer) {
|
||||
@ -86,7 +86,7 @@ public class ContraptionRenderer {
|
||||
Random random = new Random();
|
||||
BufferBuilder builder = new BufferBuilder(DefaultVertexFormats.BLOCK.getIntegerSize());
|
||||
builder.begin(GL11.GL_QUADS, DefaultVertexFormats.BLOCK);
|
||||
renderWorld.setTileEntities(c.renderedTileEntities.values());
|
||||
renderWorld.setTileEntities(c.presentTileEntities.values());
|
||||
|
||||
for (BlockInfo info : c.getBlocks()
|
||||
.values())
|
||||
|
@ -52,7 +52,7 @@ public class BasinMovementBehaviour extends MovementBehaviour {
|
||||
}
|
||||
context.tileData.put(key, itemStackHandler.serializeNBT());
|
||||
});
|
||||
TileEntity tileEntity = context.contraption.renderedTileEntities.get(context.localPos);
|
||||
TileEntity tileEntity = context.contraption.presentTileEntities.get(context.localPos);
|
||||
if (tileEntity instanceof BasinTileEntity)
|
||||
((BasinTileEntity) tileEntity).readOnlyItems(context.tileData);
|
||||
context.temporaryData = false; // did already dump, so can't any more
|
||||
|
Loading…
Reference in New Issue
Block a user