Cache Torus.generate result for Origin (#2845)
* Cache Torus.generate result for Origin Fusion Coils are laggy, not by ticking block entities, just purely by torus.generate(BlockPos.origin, size) * Assign TorusListCache * use cached result
This commit is contained in:
parent
40f4785816
commit
7f415d3ec9
2 changed files with 12 additions and 4 deletions
|
@ -391,7 +391,7 @@ public class FusionControlComputerBlockEntity extends GenericMachineBlockEntity
|
|||
@Override
|
||||
public void writeMultiblock(MultiblockWriter writer) {
|
||||
BlockState coil = TRContent.Machine.FUSION_COIL.block.getDefaultState();
|
||||
Torus.generate(BlockPos.ORIGIN, size).forEach(pos -> writer.add(pos.getX(), pos.getY(), pos.getZ(), coil));
|
||||
Torus.getOriginPositions(size).forEach(pos -> writer.add(pos.getX(), pos.getY(), pos.getZ(), coil));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue