mirror of
https://github.com/Ellpeck/ActuallyAdditions.git
synced 2024-11-26 08:48:34 +01:00
parent
a4ac7ccb81
commit
be3c7a81b1
1 changed files with 10 additions and 7 deletions
|
@ -43,10 +43,7 @@ import net.minecraftforge.common.IPlantable;
|
|||
import net.minecraftforge.common.util.FakePlayer;
|
||||
import net.minecraftforge.common.util.FakePlayerFactory;
|
||||
import net.minecraftforge.event.ForgeEventFactory;
|
||||
import net.minecraftforge.fluids.FluidContainerRegistry;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
import net.minecraftforge.fluids.IFluidBlock;
|
||||
import net.minecraftforge.fluids.IFluidContainerItem;
|
||||
import net.minecraftforge.fluids.*;
|
||||
import net.minecraftforge.fluids.capability.CapabilityFluidHandler;
|
||||
import net.minecraftforge.fluids.capability.IFluidHandler;
|
||||
import net.minecraftforge.items.CapabilityItemHandler;
|
||||
|
@ -182,12 +179,18 @@ public final class WorldUtil{
|
|||
fluid = ((IFluidContainerItem)stack.getItem()).getFluid(stack);
|
||||
}
|
||||
|
||||
if(fluid != null && fluid.amount >= Util.BUCKET && fluid.getFluid().getBlock() != null && fluid.getFluid().getBlock().canPlaceBlockAt(world, offsetPos)){
|
||||
if(world.setBlockState(offsetPos, fluid.getFluid().getBlock().getDefaultState(), 2)){
|
||||
if(fluid != null && fluid.amount >= Util.BUCKET){
|
||||
Fluid theFluid = fluid.getFluid();
|
||||
if(theFluid != null){
|
||||
Block fluidBlock = theFluid.getBlock();
|
||||
if(fluidBlock != null && fluidBlock.canPlaceBlockAt(world, offsetPos)){
|
||||
if(world.setBlockState(offsetPos, fluidBlock.getDefaultState(), 2)){
|
||||
return stack.getItem().getContainerItem(stack);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//Redstone
|
||||
if(replaceable && stack.getItem() == Items.REDSTONE){
|
||||
|
|
Loading…
Reference in a new issue