Fix milk bucket is fillable with water or lava when milk is unregistered (#3039)
This commit is contained in:
parent
1a8ad6bbee
commit
18b2eeef90
1 changed files with 2 additions and 1 deletions
|
@ -23,6 +23,7 @@ import javax.annotation.Nullable;
|
||||||
|
|
||||||
import net.minecraft.init.Items;
|
import net.minecraft.init.Items;
|
||||||
import net.minecraft.item.Item;
|
import net.minecraft.item.Item;
|
||||||
|
import net.minecraft.item.ItemBucketMilk;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.util.EnumFacing;
|
import net.minecraft.util.EnumFacing;
|
||||||
import net.minecraftforge.common.ForgeModContainer;
|
import net.minecraftforge.common.ForgeModContainer;
|
||||||
|
@ -118,7 +119,7 @@ public class FluidBucketWrapper implements IFluidHandler, ICapabilityProvider
|
||||||
@Override
|
@Override
|
||||||
public int fill(FluidStack resource, boolean doFill)
|
public int fill(FluidStack resource, boolean doFill)
|
||||||
{
|
{
|
||||||
if (container.stackSize != 1 || resource == null || resource.amount < Fluid.BUCKET_VOLUME || getFluid() != null || !canFillFluidType(resource))
|
if (container.stackSize != 1 || resource == null || resource.amount < Fluid.BUCKET_VOLUME || container.getItem() instanceof ItemBucketMilk || getFluid() != null || !canFillFluidType(resource))
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue