Permalink
Browse files

Fixed enderman block data, easified adding recipes

  • Loading branch information...
14mRh4X0r committed Oct 17, 2011
1 parent 4a2f811 commit 1d078c7caefa4396994388a46672df3f7bd0bbc9
Showing with 21 additions and 7 deletions.
  1. +1 −1 src/OEntityEnderman.java
  2. +20 −6 src/Server.java
View
@@ -35,7 +35,7 @@ public void b(ONBTTagCompound var1) {
public void a(ONBTTagCompound var1) {
super.a(var1);
this.b(var1.d("carried"));
- this.d(var1.d("carryingData"));
+ this.d(var1.d("carriedData")); // CanaryMod: fix Notch bug
}
protected OEntity o() {
View
@@ -960,22 +960,36 @@ public World getWorld(int dimension) {
* Adds a recipe to the crafting manager.
* Due to deadlines, this documentation isn't written yet, you may want to
* refer to MCP in the meantime.
- * @param i The item to return
+ * @param item The item to return
* @param recipe The recipe to return the item for
*/
- public void addRecipe(Item i, Object... recipe) {
- OCraftingManager.a().a(i.getBaseItem(), recipe);
+ public void addRecipe(Item item, Object... recipe) {
+ for (int i = 0; i < recipe.length; i++) {
+ if (recipe[i] instanceof Block.Type) {
+ recipe[i] = OBlock.m[((Block.Type) recipe[i]).getType()];
+ } else if (recipe[i] instanceof Item.Type) {
+ recipe[i] = OItem.c[((Item.Type) recipe[i]).getId()];
+ }
+ }
+ OCraftingManager.a().a(item.getBaseItem(), recipe);
}
/**
* Adds a shapeless recipe to the crafting manager.
* Due to deadlines, this documentation isn't written yet, you may want to
* refer to MCP in the meantime.
- * @param i The item to return
+ * @param item The item to return
* @param recipe The recipes to return the item for.
*/
- public void addShapelessRecipe(Item i, Object... recipe) {
- OCraftingManager.a().b(i.getBaseItem(), recipe);
+ public void addShapelessRecipe(Item item, Object... recipe) {
+ for (int i = 0; i < recipe.length; i++) {
+ if (recipe[i] instanceof Block.Type) {
+ recipe[i] = OBlock.m[((Block.Type) recipe[i]).getType()];
+ } else if (recipe[i] instanceof Item.Type) {
+ recipe[i] = OItem.c[((Item.Type) recipe[i]).getId()];
+ }
+ }
+ OCraftingManager.a().b(item.getBaseItem(), recipe);
}
/**

0 comments on commit 1d078c7

Please sign in to comment.