Added creative node creators for all node types

This commit is contained in:
makeo committed 2015-11-04 20:55:39 +01:00
1 parent d0eb1fd087
commit 33cdd7ef3d
5 files changed
+76 -17

No files matched your search

@@ -6,6 +6,7 @@ import makeo.gadomancy.common.blocks.tiles.TileManipulatorPillar;
import makeo.gadomancy.common.registration.RegisteredBlocks;
import makeo.gadomancy.common.registration.RegisteredItems;
import net.minecraft.block.Block;
import net.minecraft.block.BlockContainer;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.creativetab.CreativeTabs;
@@ -20,6 +21,7 @@ import net.minecraft.util.MovingObjectPosition;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
import thaumcraft.common.config.ConfigBlocks;
import thaumcraft.common.lib.utils.InventoryUtils;
import thaumcraft.common.tiles.TilePedestal;
import java.util.List;
@@ -120,6 +122,13 @@ public class BlockStoneMachine extends Block {
return super.getItemDropped(metadata, random, fortune);
}
public void breakBlock(World world, int x, int y, int z, Block block, int metadata) {
if(metadata == 1) {
InventoryUtils.dropItems(world, x, y, z);
}
super.breakBlock(world, x, y, z, block, metadata);
}
@Override
public boolean canReplace(World world, int x, int y, int z, int side, ItemStack stack) {
if (stack.getItemDamage() == 0 && (y < 1 || world.getBlock(x, y - 1, z) != RegisteredBlocks.blockNodeManipulator)) {