-Add vanilla Ores to the Ore Dictionary. No recipe replacement required.
-Add NBT-sensitive getMaxDamage() for ItemStack. Signed-off-by: King Lemming <kinglemming@gmail.com>
This commit is contained in:
parent
4da2992df5
commit
b8a17e2748
|
@ -49,6 +49,12 @@ public class OreDictionary
|
||||||
registerOre("stickWood", Item.stick);
|
registerOre("stickWood", Item.stick);
|
||||||
registerOre("treeSapling", new ItemStack(Block.sapling, 1, WILDCARD_VALUE));
|
registerOre("treeSapling", new ItemStack(Block.sapling, 1, WILDCARD_VALUE));
|
||||||
registerOre("treeLeaves", new ItemStack(Block.leaves, 1, WILDCARD_VALUE));
|
registerOre("treeLeaves", new ItemStack(Block.leaves, 1, WILDCARD_VALUE));
|
||||||
|
registerOre("oreGold", Block.oreGold);
|
||||||
|
registerOre("oreIron", Block.oreIron);
|
||||||
|
registerOre("oreLapis", Block.oreLapis);
|
||||||
|
registerOre("oreDiamond", Block.oreDiamond);
|
||||||
|
registerOre("oreRedstone", Block.oreRedstone);
|
||||||
|
registerOre("oreEmerald", Block.oreEmerald);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Build our list of items to replace with ore tags
|
// Build our list of items to replace with ore tags
|
||||||
|
|
|
@ -60,7 +60,7 @@
|
||||||
Vec3 vec31 = vec3.addVector((double)f7 * d3, (double)f6 * d3, (double)f8 * d3);
|
Vec3 vec31 = vec3.addVector((double)f7 * d3, (double)f6 * d3, (double)f8 * d3);
|
||||||
return par1World.rayTraceBlocks_do_do(vec3, vec31, par3, !par3);
|
return par1World.rayTraceBlocks_do_do(vec3, vec31, par3, !par3);
|
||||||
}
|
}
|
||||||
@@ -720,4 +736,480 @@
|
@@ -720,4 +736,491 @@
|
||||||
{
|
{
|
||||||
StatList.initStats();
|
StatList.initStats();
|
||||||
}
|
}
|
||||||
|
@ -517,6 +517,17 @@
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ /**
|
+ /**
|
||||||
|
+ * Return the maxDamage for this ItemStack. Defaults to the maxDamage field in this item, but can be overridden here for other sources such as NBT.
|
||||||
|
+ *
|
||||||
|
+ * @param stack The itemstack that is damaged
|
||||||
|
+ * @return the damage value
|
||||||
|
+ */
|
||||||
|
+ public int getItemMaxDamageFromStack(ItemStack stack)
|
||||||
|
+ {
|
||||||
|
+ return maxDamage;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ /**
|
||||||
+ * Return if this itemstack is damaged. Note only called if {@link #isDamageable()} is true.
|
+ * Return if this itemstack is damaged. Note only called if {@link #isDamageable()} is true.
|
||||||
+ * @param stack the stack
|
+ * @param stack the stack
|
||||||
+ * @return if the stack is damaged
|
+ * @return if the stack is damaged
|
||||||
|
|
|
@ -41,6 +41,15 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -286,7 +281,7 @@
|
||||||
|
*/
|
||||||
|
public int getMaxDamage()
|
||||||
|
{
|
||||||
|
- return Item.itemsList[this.itemID].getMaxDamage();
|
||||||
|
+ return this.getItem().getItemMaxDamageFromStack(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean func_96631_a(int par1, Random par2Random)
|
||||||
@@ -382,7 +377,7 @@
|
@@ -382,7 +377,7 @@
|
||||||
*/
|
*/
|
||||||
public int getDamageVsEntity(Entity par1Entity)
|
public int getDamageVsEntity(Entity par1Entity)
|
||||||
|
|
Loading…
Reference in New Issue