Should fix getting free iron buckets from non-iron buckets
This commit is contained in:
parent
bd4b2d2c52
commit
4a86518366
1 changed files with 4 additions and 2 deletions
|
@ -5,6 +5,7 @@ import WayofTime.alchemicalWizardry.ModItems;
|
||||||
import cpw.mods.fml.common.eventhandler.Event.Result;
|
import cpw.mods.fml.common.eventhandler.Event.Result;
|
||||||
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
|
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
|
||||||
import net.minecraft.block.Block;
|
import net.minecraft.block.Block;
|
||||||
|
import net.minecraft.init.Items;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.util.MovingObjectPosition;
|
import net.minecraft.util.MovingObjectPosition;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
@ -15,12 +16,13 @@ public class LifeBucketHandler
|
||||||
@SubscribeEvent
|
@SubscribeEvent
|
||||||
public void onBucketFill(FillBucketEvent event)
|
public void onBucketFill(FillBucketEvent event)
|
||||||
{
|
{
|
||||||
|
if (event.current.getItem() != Items.bucket)
|
||||||
|
return;
|
||||||
|
|
||||||
ItemStack result = fillCustomBucket(event.world, event.target);
|
ItemStack result = fillCustomBucket(event.world, event.target);
|
||||||
|
|
||||||
if (result == null)
|
if (result == null)
|
||||||
{
|
|
||||||
return;
|
return;
|
||||||
}
|
|
||||||
|
|
||||||
event.result = result;
|
event.result = result;
|
||||||
event.setResult(Result.ALLOW);
|
event.setResult(Result.ALLOW);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue