Initial commit of BM 1.8
This commit is contained in:
parent
d99eadbea7
commit
c5681dc831
713 changed files with 6502 additions and 27334 deletions
|
@ -1,14 +1,15 @@
|
|||
package WayofTime.alchemicalWizardry.common;
|
||||
|
||||
import WayofTime.alchemicalWizardry.ModBlocks;
|
||||
import WayofTime.alchemicalWizardry.ModItems;
|
||||
import cpw.mods.fml.common.eventhandler.Event.Result;
|
||||
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.event.entity.player.FillBucketEvent;
|
||||
import net.minecraftforge.fml.common.eventhandler.Event.Result;
|
||||
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
|
||||
import WayofTime.alchemicalWizardry.ModBlocks;
|
||||
import WayofTime.alchemicalWizardry.ModItems;
|
||||
|
||||
public class LifeBucketHandler
|
||||
{
|
||||
|
@ -28,11 +29,12 @@ public class LifeBucketHandler
|
|||
|
||||
public ItemStack fillCustomBucket(World world, MovingObjectPosition pos)
|
||||
{
|
||||
Block block = world.getBlock(pos.blockX, pos.blockY, pos.blockZ);
|
||||
IBlockState state = world.getBlockState(pos.func_178782_a());
|
||||
Block block = state.getBlock();
|
||||
|
||||
if (block != null && (block.equals(ModBlocks.blockLifeEssence)) && world.getBlockMetadata(pos.blockX, pos.blockY, pos.blockZ) == 0)
|
||||
if (block != null && (block.equals(ModBlocks.blockLifeEssence)) && block.getMetaFromState(state) == 0)
|
||||
{
|
||||
world.setBlockToAir(pos.blockX, pos.blockY, pos.blockZ);
|
||||
world.setBlockToAir(pos.func_178782_a());
|
||||
return new ItemStack(ModItems.bucketLife);
|
||||
} else
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue