Update deps + add nullcheck in fluidstorage
This commit is contained in:
@@ -50,7 +50,11 @@ public abstract class FluidStorageNBT implements IFluidStorage {
|
||||
NBTTagList list = (NBTTagList) tag.getTag(NBT_FLUIDS);
|
||||
|
||||
for (int i = 0; i < list.tagCount(); ++i) {
|
||||
stacks.add(FluidStack.loadFluidStackFromNBT(list.getCompoundTagAt(i)));
|
||||
FluidStack stack = FluidStack.loadFluidStackFromNBT(list.getCompoundTagAt(i));
|
||||
|
||||
if (stack != null) {
|
||||
stacks.add(stack);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@ import net.minecraft.item.ItemStack;
|
||||
import refinedstorage.container.slot.SlotSpecimen;
|
||||
import refinedstorage.tile.TileStorage;
|
||||
|
||||
//bla
|
||||
public class ContainerStorage extends ContainerBase {
|
||||
public ContainerStorage(TileStorage tile, EntityPlayer player) {
|
||||
super(tile, player);
|
||||
|
||||
@@ -94,7 +94,7 @@ public class TileConstructor extends TileMultipartNode implements IComparable, I
|
||||
} else if (type == IType.FLUIDS) {
|
||||
FluidStack stack = fluidFilters.getFluids()[0];
|
||||
|
||||
if (stack != null) {
|
||||
if (stack != null && stack.getFluid().canBePlacedInWorld()) {
|
||||
BlockPos front = pos.offset(getDirection());
|
||||
|
||||
Block block = stack.getFluid().getBlock();
|
||||
@@ -103,10 +103,8 @@ public class TileConstructor extends TileMultipartNode implements IComparable, I
|
||||
FluidStack took = network.extractFluid(stack, Fluid.BUCKET_VOLUME, compare);
|
||||
|
||||
if (took != null) {
|
||||
IBlockState state = block.getDefaultState();
|
||||
|
||||
// @TODO: This doesn't cause the block to flow?
|
||||
worldObj.setBlockState(front, state, 1 | 2);
|
||||
// @TODO: Won't update
|
||||
worldObj.setBlockState(front, block.getDefaultState(), 11);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user