Fixed fluid syncing issues, fixed liquid item dropping when block broken
This commit is contained in:
parent
f5bd04db3c
commit
755c64369a
7 changed files with 30 additions and 8 deletions
|
@ -2,13 +2,13 @@ package techreborn.blocks;
|
|||
|
||||
import java.util.Random;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockContainer;
|
||||
import net.minecraft.block.*;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.EnumCreatureType;
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.item.ItemBlock;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
|
@ -131,6 +131,11 @@ public class BlockMachineBase extends BlockContainer {
|
|||
|
||||
if (itemStack != null && itemStack.stackSize > 0)
|
||||
{
|
||||
if(itemStack.getItem() instanceof ItemBlock){
|
||||
if(((ItemBlock) itemStack.getItem()).field_150939_a instanceof BlockLiquid || ((ItemBlock) itemStack.getItem()).field_150939_a instanceof BlockStaticLiquid || ((ItemBlock) itemStack.getItem()).field_150939_a instanceof BlockDynamicLiquid){
|
||||
return;
|
||||
}
|
||||
}
|
||||
Random rand = new Random();
|
||||
|
||||
float dX = rand.nextFloat() * 0.8F + 0.1F;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue