show in the creative menus
This commit is contained in:
parent
76f80dac4d
commit
73422fcd5e
|
@ -11,9 +11,14 @@
|
|||
package cpw.mods.ironchest;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
import cpw.mods.fml.common.Side;
|
||||
import cpw.mods.fml.common.asm.SideOnly;
|
||||
|
||||
import net.minecraft.src.BlockContainer;
|
||||
import net.minecraft.src.CreativeTabs;
|
||||
import net.minecraft.src.EntityItem;
|
||||
import net.minecraft.src.EntityLiving;
|
||||
import net.minecraft.src.EntityPlayer;
|
||||
|
@ -41,6 +46,7 @@ public class BlockIronChest extends BlockContainer {
|
|||
}
|
||||
setBlockBounds(0.0625F, 0F, 0.0625F, 0.9375F, 0.875F, 0.9375F);
|
||||
random = new Random();
|
||||
setCreativeTab(CreativeTabs.tabDeco);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -205,13 +211,14 @@ public class BlockIronChest extends BlockContainer {
|
|||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings({ "rawtypes", "unchecked" })
|
||||
@Override
|
||||
public void addCreativeItems(ArrayList itemList) {
|
||||
for (IronChestType type : IronChestType.values()) {
|
||||
if (type.isValidForCreativeMode()) {
|
||||
itemList.add(new ItemStack(this, 1, type.ordinal()));
|
||||
}
|
||||
}
|
||||
}
|
||||
@SuppressWarnings({ "rawtypes", "unchecked" })
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void getSubBlocks(int par1, CreativeTabs par2CreativeTabs, List par3List) {
|
||||
for (IronChestType type : IronChestType.values()) {
|
||||
if (type.isValidForCreativeMode()) {
|
||||
par3List.add(new ItemStack(this, 1, type.ordinal()));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
package cpw.mods.ironchest;
|
||||
|
||||
import cpw.mods.fml.common.ObfuscationReflectionHelper;
|
||||
import net.minecraft.src.CreativeTabs;
|
||||
import net.minecraft.src.EntityPlayer;
|
||||
import net.minecraft.src.Item;
|
||||
import net.minecraft.src.ItemStack;
|
||||
|
@ -28,6 +29,7 @@ public class ItemChestChanger extends Item {
|
|||
this.type=type;
|
||||
setIconIndex(type.ordinal());
|
||||
setItemName(type.itemName);
|
||||
setTabToDisplayOn(CreativeTabs.tabMisc);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -7,7 +7,6 @@ import net.minecraft.src.EntityAITaskEntry;
|
|||
import net.minecraft.src.EntityOcelot;
|
||||
import net.minecraftforge.event.ForgeSubscribe;
|
||||
import net.minecraftforge.event.entity.living.LivingEvent;
|
||||
import net.minecraftforge.event.entity.living.LivingSpecialSpawnEvent;
|
||||
|
||||
public class OcelotsSitOnChestsHandler {
|
||||
@ForgeSubscribe
|
||||
|
|
Loading…
Reference in New Issue