use of com.simibubi.create.foundation.item.SmartInventory in project Create by Creators-of-Create.
the class MechanicalPressTileEntity method applyCompactingOnBasin.
protected void applyCompactingOnBasin() {
if (level.isClientSide)
return;
pressedItems.clear();
applyBasinRecipe();
Optional<BasinTileEntity> basin = getBasin();
if (basin.isPresent()) {
SmartInventory inputs = basin.get().getInputInventory();
for (int slot = 0; slot < inputs.getSlots(); slot++) {
ItemStack stackInSlot = inputs.getItem(slot);
if (stackInSlot.isEmpty())
continue;
pressedItems.add(stackInSlot);
}
}
sendData();
}
use of com.simibubi.create.foundation.item.SmartInventory in project Create by Creators-of-Create.
the class MechanicalMixerTileEntity method renderParticles.
public void renderParticles() {
Optional<BasinTileEntity> basin = getBasin();
if (!basin.isPresent() || level == null)
return;
for (SmartInventory inv : basin.get().getInvs()) {
for (int slot = 0; slot < inv.getSlots(); slot++) {
ItemStack stackInSlot = inv.getItem(slot);
if (stackInSlot.isEmpty())
continue;
ItemParticleOption data = new ItemParticleOption(ParticleTypes.ITEM, stackInSlot);
spillParticle(data);
}
}
for (SmartFluidTankBehaviour behaviour : basin.get().getTanks()) {
if (behaviour == null)
continue;
for (TankSegment tankSegment : behaviour.getTanks()) {
if (tankSegment.isEmpty(0))
continue;
spillParticle(FluidFX.getFluidParticle(tankSegment.getRenderedFluid()));
}
}
}
Aggregations