use of com.simibubi.create.content.logistics.block.inventories.CreativeCrateTileEntity in project Create by Creators-of-Create.
the class Contraption method addBlock.
protected void addBlock(BlockPos pos, Pair<StructureBlockInfo, BlockEntity> pair) {
StructureBlockInfo captured = pair.getKey();
BlockPos localPos = pos.subtract(anchor);
StructureBlockInfo StructureBlockInfo = new StructureBlockInfo(localPos, captured.state, captured.nbt);
if (blocks.put(localPos, StructureBlockInfo) != null)
return;
bounds = bounds.minmax(new AABB(localPos));
BlockEntity te = pair.getValue();
if (te != null && MountedStorage.canUseAsStorage(te))
storage.put(localPos, new MountedStorage(te));
if (te != null && MountedFluidStorage.canUseAsStorage(te))
fluidStorage.put(localPos, new MountedFluidStorage(te));
if (AllMovementBehaviours.contains(captured.state.getBlock()))
actors.add(MutablePair.of(StructureBlockInfo, null));
if (AllInteractionBehaviours.contains(captured.state.getBlock()))
interactors.put(localPos, AllInteractionBehaviours.of(captured.state.getBlock()));
if (te instanceof CreativeCrateTileEntity && ((CreativeCrateTileEntity) te).getBehaviour(FilteringBehaviour.TYPE).getFilter().isEmpty())
hasUniversalCreativeCrate = true;
}
Aggregations