Skip to content

Commit

Permalink
fix: added missing nether log recipes
Browse files Browse the repository at this point in the history
  • Loading branch information
rooooose-b committed Aug 14, 2024
1 parent 1a4eaf6 commit 545c189
Showing 1 changed file with 45 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ public static void setWoodcuttingRecipes() {
// Handles dark oak.
if (materialArray.length > 2 && materialArray[2] != null) {
materialArray[0] = materialArray[0].concat("_").concat(materialArray[1]);
materialArray[1] = materialArray[2];
}

List<ItemStack> itemStackList = new ArrayList<ItemStack>();
Expand All @@ -55,21 +56,62 @@ public static void setWoodcuttingRecipes() {

// Adds ItemStack for stripped logs if the log isn't already stripped.
if (!stripped) {
Material itemName = Material.getMaterial("STRIPPED_".concat(materialArray[0]).concat("_LOG"));
Material itemName;
boolean nether = materialArray[0].equals("CRIMSON") || materialArray[0].equals("WARPED");
if (nether) {
if (materialArray[1].equals("STEM")) {
itemName = Material.getMaterial("STRIPPED_".concat(materialArray[0]).concat("_STEM"));
} else {
itemName = Material.getMaterial("STRIPPED_".concat(materialArray[0]).concat("_HYPHAE"));
}
} else {
if (materialArray[1].equals("WOOD")) {
itemName = Material.getMaterial("STRIPPED_".concat(materialArray[0]).concat("_WOOD"));
} else {
itemName = Material.getMaterial("STRIPPED_".concat(materialArray[0]).concat("_LOG"));
}
}

if (itemName != null) {
ItemStack itemStack = new ItemStack(itemName);
itemStackList.add(itemStack);
}

itemName = Material.getMaterial(materialArray[0].concat("_WOOD"));
if (nether) {
if (materialArray[1].equals("STEM")) {
itemName = Material.getMaterial(materialArray[0].concat("_HYPHAE"));
} else {
itemName = Material.getMaterial(materialArray[0].concat("_STEM"));
}
} else {
if (materialArray[1].equals("LOG")) {
itemName = Material.getMaterial(materialArray[0].concat("_WOOD"));
} else {
itemName = Material.getMaterial(materialArray[0].concat("_LOG"));
}
}

if (itemName != null) {
ItemStack itemStack = new ItemStack(itemName);
itemStackList.add(itemStack);
}
} else {
Material itemName = Material.getMaterial("STRIPPED_".concat(materialArray[0]).concat("_WOOD"));
Material itemName;
boolean nether = materialArray[0].equals("CRIMSON") || materialArray[0].equals("WARPED");

if (nether) {
if (materialArray[1].equals("STEM")) {
itemName = Material.getMaterial("STRIPPED_".concat(materialArray[0]).concat("_HYPHAE"));
} else {
itemName = Material.getMaterial("STRIPPED_".concat(materialArray[0]).concat("_STEM"));
}
} else {
if (materialArray[1].equals("LOG")) {
itemName = Material.getMaterial("STRIPPED_".concat(materialArray[0]).concat("_WOOD"));
} else {
itemName = Material.getMaterial("STRIPPED_".concat(materialArray[0]).concat("_LOG"));
}
}

if (itemName != null) {
ItemStack itemStack = new ItemStack(itemName);
Expand Down

0 comments on commit 545c189

Please sign in to comment.