Special case vanilla liquids

This commit is contained in:
Raoul Van den Berge
2016-08-17 16:02:51 +02:00
parent 61e5d97111
commit 7608752801

View File

@@ -4,6 +4,7 @@ import mcmultipart.microblock.IMicroblock;
import net.minecraft.block.Block; import net.minecraft.block.Block;
import net.minecraft.block.SoundType; import net.minecraft.block.SoundType;
import net.minecraft.block.state.IBlockState; import net.minecraft.block.state.IBlockState;
import net.minecraft.init.Blocks;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.EnumFacing; import net.minecraft.util.EnumFacing;
@@ -103,8 +104,15 @@ 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) {
// @TODO: Won't update IBlockState state = block.getDefaultState();
worldObj.setBlockState(front, block.getDefaultState(), 11);
if (state.getBlock() == Blocks.WATER) {
state = Blocks.FLOWING_WATER.getDefaultState();
} else if (state.getBlock() == Blocks.LAVA) {
state = Blocks.FLOWING_LAVA.getDefaultState();
}
worldObj.setBlockState(front, state, 1 | 2);
} }
} }
} }