Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
Fixed enderman block data, easified adding recipes
Browse files Browse the repository at this point in the history
  • Loading branch information
14mRh4X0r committed Oct 17, 2011
1 parent 4a2f811 commit 1d078c7
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/OEntityEnderman.java
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
26 changes: 20 additions & 6 deletions src/Server.java
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

/**
Expand Down

0 comments on commit 1d078c7

Please sign in to comment.