Small update to ContainerCreative hook for better compatibility with mods that extend block IDs.
This commit is contained in:
parent
2319eec68b
commit
3bb04f70ca
1 changed files with 15 additions and 16 deletions
|
@ -1,34 +1,33 @@
|
|||
--- ../src_base/minecraft/net/minecraft/src/ContainerCreative.java 0000-00-00 00:00:00.000000000 -0000
|
||||
+++ ../src_work/minecraft/net/minecraft/src/ContainerCreative.java 0000-00-00 00:00:00.000000000 -0000
|
||||
@@ -64,20 +64,23 @@
|
||||
@@ -64,18 +64,21 @@
|
||||
}
|
||||
itemList.add(new ItemStack(ablock[l1], 1, k2));
|
||||
}
|
||||
-
|
||||
- for (int i2 = 256; i2 < Item.itemsList.length; i2++)
|
||||
+
|
||||
+ for(int x = 0; x < 256; x++)
|
||||
+ {
|
||||
+ for(int x = 0; x < Block.blocksList.length; x++)
|
||||
{
|
||||
- if (Item.itemsList[i2] != null && Item.itemsList[i2].shiftedIndex != Item.potion.shiftedIndex && Item.itemsList[i2].shiftedIndex != Item.field_44019_bC.shiftedIndex)
|
||||
- {
|
||||
- itemList.add(new ItemStack(Item.itemsList[i2]));
|
||||
- }
|
||||
+ if (Block.blocksList[x] != null)
|
||||
+ {
|
||||
+ Block.blocksList[x].addCreativeItems((ArrayList)itemList);
|
||||
+ }
|
||||
+ }
|
||||
}
|
||||
-
|
||||
- for (int j2 = 1; j2 < 16; j2++)
|
||||
+
|
||||
for (int i2 = 256; i2 < Item.itemsList.length; i2++)
|
||||
+ for (int i2 = Block.blocksList.length; i2 < Item.itemsList.length; i2++)
|
||||
{
|
||||
- if (Item.itemsList[i2] != null && Item.itemsList[i2].shiftedIndex != Item.potion.shiftedIndex && Item.itemsList[i2].shiftedIndex != Item.field_44019_bC.shiftedIndex)
|
||||
- itemList.add(new ItemStack(Item.dyePowder.shiftedIndex, 1, j2));
|
||||
+ if (Item.itemsList[i2] != null)
|
||||
{
|
||||
- itemList.add(new ItemStack(Item.itemsList[i2]));
|
||||
+ {
|
||||
+ Item.itemsList[i2].addCreativeItems((ArrayList)itemList);
|
||||
}
|
||||
+ }
|
||||
}
|
||||
|
||||
- for (int j2 = 1; j2 < 16; j2++)
|
||||
- {
|
||||
- itemList.add(new ItemStack(Item.dyePowder.shiftedIndex, 1, j2));
|
||||
- }
|
||||
-
|
||||
Integer integer;
|
||||
for (Iterator iterator = EntityList.field_44041_a.keySet().iterator(); iterator.hasNext(); itemList.add(new ItemStack(Item.field_44019_bC.shiftedIndex, 1, integer.intValue())))
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue