started to work on tester item

This commit is contained in:
SpaceToad 2014-05-24 13:35:40 +02:00
parent 8039dacff8
commit fd5806d499
2 changed files with 30 additions and 0 deletions

View file

@ -9,6 +9,7 @@
package buildcraft.tests;
import net.minecraft.block.Block;
import net.minecraft.item.Item;
import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
@ -23,6 +24,8 @@ public class BuildCraftTests extends BuildCraftMod {
public static Block blockTestPathfinding;
public static Item tester;
@Mod.Instance("BuildCraft|Tests")
public static BuildCraftTests instance;
@ -31,5 +34,9 @@ public class BuildCraftTests extends BuildCraftMod {
blockTestPathfinding = new BlockTestPathfinding();
CoreProxy.proxy.registerBlock(blockTestPathfinding);
CoreProxy.proxy.registerTileEntity(TileTestPathfinding.class, "net.minecraft.src.builders.TileTestPathfinding");
tester = new ItemTester();
tester.setUnlocalizedName("tester");
CoreProxy.proxy.registerItem(tester);
}
}

View file

@ -0,0 +1,23 @@
package buildcraft.tests;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.item.Item;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import buildcraft.core.CreativeTabBuildCraft;
public class ItemTester extends Item {
public ItemTester() {
setCreativeTab(CreativeTabBuildCraft.ITEMS.get());
}
@Override
@SideOnly(Side.CLIENT)
public void registerIcons(IIconRegister par1IconRegister) {
this.itemIcon = par1IconRegister.registerIcon("buildcraft:tester");
}
}