Skip to content
This repository has been archived by the owner on Mar 10, 2021. It is now read-only.

Commit

Permalink
Fix Clay Buckets picking up liquids they don't know, resulting in wat…
Browse files Browse the repository at this point in the history
…er/lava buckets.
  • Loading branch information
bonii-xx committed Sep 10, 2014
1 parent e7d3692 commit 3d995e9
Showing 1 changed file with 3 additions and 2 deletions.
Expand Up @@ -6,6 +6,7 @@
import net.minecraft.block.material.Material;
import net.minecraft.entity.passive.EntityCow;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Blocks;
import net.minecraft.item.ItemStack;
import net.minecraft.util.MovingObjectPosition;
import net.minecraftforge.event.entity.player.EntityInteractEvent;
Expand Down Expand Up @@ -74,15 +75,15 @@ public void bucketFill (FillBucketEvent event)
}

// water and lava
if(bID.getMaterial() == Material.water)
if(bID == Blocks.water || bID == Blocks.flowing_water)
{
event.setResult(Event.Result.ALLOW);
event.result = new ItemStack(IguanaItems.clayBucketWater);
event.world.setBlockToAir(hitX, hitY, hitZ);

return;
}
if(bID.getMaterial() == Material.lava)
if(bID == Blocks.lava || bID == Blocks.flowing_lava)
{
event.setResult(Event.Result.ALLOW);
event.result = new ItemStack(IguanaItems.clayBucketLava);
Expand Down

0 comments on commit 3d995e9

Please sign in to comment.