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