Update deps + add nullcheck in fluidstorage

This commit is contained in:
Raoul Van den Berge
2016-08-16 21:54:19 +02:00
parent 86f110162d
commit 226b5d3784
4 changed files with 12 additions and 9 deletions

View File

@@ -20,7 +20,7 @@ sourceCompatibility = 1.8
targetCompatibility = 1.8 targetCompatibility = 1.8
minecraft { minecraft {
version = "1.10.2-12.18.1.2046" version = "1.10.2-12.18.1.2065"
runDir = "run" runDir = "run"
useDepAts = true useDepAts = true
mappings = "snapshot_20160518" mappings = "snapshot_20160518"
@@ -43,9 +43,9 @@ repositories {
} }
dependencies { dependencies {
deobfCompile "mezz.jei:jei_1.10.2:3.7.+" deobfCompile "mezz.jei:jei_1.10.2:3.9.+"
compile "net.darkhax.tesla:Tesla:1.10-1.2.+" compile "net.darkhax.tesla:Tesla:1.10-1.2.+"
compile "net.industrial-craft:industrialcraft-2:2.6.37-ex110:api" compile "net.industrial-craft:industrialcraft-2:2.6.41-ex110:api"
deobfCompile "MCMultiPart:MCMultiPart:1.2.1+:universal" deobfCompile "MCMultiPart:MCMultiPart:1.2.1+:universal"
} }

View File

@@ -50,7 +50,11 @@ public abstract class FluidStorageNBT implements IFluidStorage {
NBTTagList list = (NBTTagList) tag.getTag(NBT_FLUIDS); NBTTagList list = (NBTTagList) tag.getTag(NBT_FLUIDS);
for (int i = 0; i < list.tagCount(); ++i) { 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);
}
} }
} }

View File

@@ -6,6 +6,7 @@ import net.minecraft.item.ItemStack;
import refinedstorage.container.slot.SlotSpecimen; import refinedstorage.container.slot.SlotSpecimen;
import refinedstorage.tile.TileStorage; import refinedstorage.tile.TileStorage;
//bla
public class ContainerStorage extends ContainerBase { public class ContainerStorage extends ContainerBase {
public ContainerStorage(TileStorage tile, EntityPlayer player) { public ContainerStorage(TileStorage tile, EntityPlayer player) {
super(tile, player); super(tile, player);

View File

@@ -94,7 +94,7 @@ public class TileConstructor extends TileMultipartNode implements IComparable, I
} else if (type == IType.FLUIDS) { } else if (type == IType.FLUIDS) {
FluidStack stack = fluidFilters.getFluids()[0]; FluidStack stack = fluidFilters.getFluids()[0];
if (stack != null) { if (stack != null && stack.getFluid().canBePlacedInWorld()) {
BlockPos front = pos.offset(getDirection()); BlockPos front = pos.offset(getDirection());
Block block = stack.getFluid().getBlock(); 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); FluidStack took = network.extractFluid(stack, Fluid.BUCKET_VOLUME, compare);
if (took != null) { if (took != null) {
IBlockState state = block.getDefaultState(); // @TODO: Won't update
worldObj.setBlockState(front, block.getDefaultState(), 11);
// @TODO: This doesn't cause the block to flow?
worldObj.setBlockState(front, state, 1 | 2);
} }
} }
} }