Skip to content

Commit

Permalink
Adjust recipes to be far cheaper #28
Browse files Browse the repository at this point in the history
  • Loading branch information
SuperMartijn642 committed Aug 1, 2023
1 parent 950c672 commit 509e2d0
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 29 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,31 +23,31 @@
*/
public enum LanternMaterial {

ANDESITE(true, true, "Andesite", () -> new ItemStack(Blocks.STONE, 5), null, () -> new ItemStack(Blocks.STONE, 5), () -> new ItemStack(Blocks.STONE, 5), 8),
BONE(true, true, "Bone", () -> new ItemStack(Items.BONE), () -> new ItemStack(Items.BONE), () -> new ItemStack(Blocks.BONE_BLOCK), () -> new ItemStack(Items.BONE), 8),
BRICKS(true, true, "Brick", () -> new ItemStack(Items.BRICK), () -> new ItemStack(Items.BRICK), () -> new ItemStack(Blocks.BRICK_BLOCK), () -> new ItemStack(Items.BRICK), 4),
COBBLESTONE(true, true, "Cobblestone", () -> new ItemStack(Blocks.COBBLESTONE), null, () -> new ItemStack(Blocks.COBBLESTONE), () -> new ItemStack(Blocks.COBBLESTONE), 8),
DARK_PRISMARINE(true, true, "Dark Prismarine", () -> new ItemStack(Blocks.PRISMARINE, 2), null, () -> new ItemStack(Blocks.PRISMARINE, 2), () -> new ItemStack(Blocks.PRISMARINE, 2), 6),
DIAMOND(true, true, "Diamond", () -> new ItemStack(Items.DIAMOND), null, () -> new ItemStack(Items.DIAMOND), () -> new ItemStack(Items.DIAMOND), 4),
DIORITE(true, true, "Diorite", () -> new ItemStack(Blocks.STONE, 3), null, () -> new ItemStack(Blocks.STONE, 3), () -> new ItemStack(Blocks.STONE, 3), 8),
EMERALD(true, true, "Emerald", () -> new ItemStack(Items.EMERALD), null, () -> new ItemStack(Items.EMERALD), () -> new ItemStack(Items.EMERALD), 4),
END_STONE(true, true, "End Stone", () -> new ItemStack(Blocks.END_STONE), null, () -> new ItemStack(Blocks.END_STONE), () -> new ItemStack(Blocks.END_STONE), 8),
GOLD(true, true, "Gold", () -> new ItemStack(Items.GOLD_NUGGET), () -> new ItemStack(Items.GOLD_NUGGET), () -> new ItemStack(Items.GOLD_INGOT), () -> new ItemStack(Items.GOLD_NUGGET), 6),
GRANITE(true, true, "Granite", () -> new ItemStack(Blocks.STONE, 1), null, () -> new ItemStack(Blocks.STONE, 1), () -> new ItemStack(Blocks.STONE, 1), 8),
IRON(true, false, "Iron", () -> new ItemStack(Items.IRON_INGOT), null, null, null, 0),
MOSSY_COBBLESTONE(true, false, "Mossy Cobblestone", () -> new ItemStack(Blocks.MOSSY_COBBLESTONE), null, () -> new ItemStack(Blocks.MOSSY_COBBLESTONE), () -> new ItemStack(Blocks.MOSSY_COBBLESTONE), 8),
NORMAL(true, true, "", () -> new ItemStack(Items.IRON_NUGGET), () -> new ItemStack(Items.IRON_NUGGET), () -> new ItemStack(Items.IRON_INGOT), () -> new ItemStack(Items.IRON_NUGGET), 1),
NORMAL_NETHER_BRICKS(true, true, "Nether Brick", () -> new ItemStack(Items.NETHERBRICK), null, () -> new ItemStack(Blocks.NETHER_BRICK), () -> new ItemStack(Items.NETHERBRICK), 4),
NORMAL_SANDSTONE(true, true, "Sandstone", () -> new ItemStack(Blocks.SANDSTONE), null, () -> new ItemStack(Blocks.SANDSTONE), () -> new ItemStack(Blocks.SANDSTONE), 8),
OBSIDIAN(true, true, "Obsidian", () -> new ItemStack(Blocks.OBSIDIAN), null, () -> new ItemStack(Blocks.OBSIDIAN), () -> new ItemStack(Blocks.OBSIDIAN), 8),
PRISMARINE(true, true, "Prismarine", () -> new ItemStack(Items.PRISMARINE_SHARD), () -> new ItemStack(Items.PRISMARINE_SHARD), () -> new ItemStack(Blocks.PRISMARINE, 1), () -> new ItemStack(Items.PRISMARINE_SHARD), 6),
PURPUR(true, true, "Purpur", () -> new ItemStack(Items.CHORUS_FRUIT_POPPED), () -> new ItemStack(Items.CHORUS_FRUIT_POPPED), () -> new ItemStack(Blocks.PURPUR_BLOCK), () -> new ItemStack(Items.CHORUS_FRUIT_POPPED), 4),
QUARTZ(true, true, "Quartz", () -> new ItemStack(Items.QUARTZ), () -> new ItemStack(Items.QUARTZ), () -> new ItemStack(Blocks.QUARTZ_BLOCK), () -> new ItemStack(Items.QUARTZ), 4),
RED_NETHER_BRICKS(true, true, "Red Nether Brick", () -> new ItemStack(Blocks.RED_NETHER_BRICK), null, () -> new ItemStack(Blocks.RED_NETHER_BRICK), () -> new ItemStack(Items.NETHERBRICK), 4),
RED_SANDSTONE(true, true, "Red Sandstone", () -> new ItemStack(Blocks.RED_SANDSTONE), null, () -> new ItemStack(Blocks.RED_SANDSTONE), () -> new ItemStack(Blocks.RED_SANDSTONE), 8),
SMOOTH_STONE(true, true, "Smooth Stone", () -> new ItemStack(Blocks.STONE), null, () -> new ItemStack(Blocks.STONE), () -> new ItemStack(Blocks.STONE), 8),
STONE(true, true, "Stone", () -> new ItemStack(Blocks.STONE, 0), null, () -> new ItemStack(Blocks.STONE, 0), () -> new ItemStack(Blocks.STONE, 0), 8),
STONE_BRICKS(true, true, "Stone Bricks", () -> new ItemStack(Blocks.STONEBRICK, 0), null, () -> new ItemStack(Blocks.STONEBRICK, 0), () -> new ItemStack(Blocks.STONEBRICK, 0), 8);
ANDESITE(true, true, "Andesite", () -> new ItemStack(Blocks.STONE, 5), null, 12, () -> new ItemStack(Blocks.STONE, 5), () -> new ItemStack(Blocks.STONE, 5), 16),
BONE(true, true, "Bone", () -> new ItemStack(Items.BONE), () -> new ItemStack(Items.BONE),4, () -> new ItemStack(Blocks.BONE_BLOCK), () -> new ItemStack(Items.BONE), 8),
BRICKS(true, true, "Brick", () -> new ItemStack(Items.BRICK), null, 2, () -> new ItemStack(Blocks.BRICK_BLOCK), () -> new ItemStack(Items.BRICK), 8),
COBBLESTONE(true, true, "Cobblestone", () -> new ItemStack(Blocks.COBBLESTONE), null, 12, () -> new ItemStack(Blocks.COBBLESTONE), () -> new ItemStack(Blocks.COBBLESTONE), 16),
DARK_PRISMARINE(true, true, "Dark Prismarine", () -> new ItemStack(Blocks.PRISMARINE, 2), null, 12, () -> new ItemStack(Blocks.PRISMARINE, 2), () -> new ItemStack(Blocks.PRISMARINE, 2), 8),
DIAMOND(true, true, "Diamond", () -> new ItemStack(Items.DIAMOND), null, 8, () -> new ItemStack(Items.DIAMOND), () -> new ItemStack(Items.DIAMOND), 4),
DIORITE(true, true, "Diorite", () -> new ItemStack(Blocks.STONE, 3), null, 12, () -> new ItemStack(Blocks.STONE, 3), () -> new ItemStack(Blocks.STONE, 3), 16),
EMERALD(true, true, "Emerald", () -> new ItemStack(Items.EMERALD), null, 8, () -> new ItemStack(Items.EMERALD), () -> new ItemStack(Items.EMERALD), 4),
END_STONE(true, true, "End Stone", () -> new ItemStack(Blocks.END_STONE), null, 12, () -> new ItemStack(Blocks.END_STONE), () -> new ItemStack(Blocks.END_STONE), 16),
GOLD(true, true, "Gold", () -> new ItemStack(Items.GOLD_NUGGET), () -> new ItemStack(Items.GOLD_NUGGET), 1, () -> new ItemStack(Items.GOLD_INGOT), () -> new ItemStack(Items.GOLD_NUGGET), 1),
GRANITE(true, true, "Granite", () -> new ItemStack(Blocks.STONE, 1), null, 12, () -> new ItemStack(Blocks.STONE, 1), () -> new ItemStack(Blocks.STONE, 1), 16),
IRON(true, false, "Iron", () -> new ItemStack(Items.IRON_INGOT), null, 4, null, null, 0),
MOSSY_COBBLESTONE(true, true, "Mossy Cobblestone", () -> new ItemStack(Blocks.MOSSY_COBBLESTONE), null, 12, () -> new ItemStack(Blocks.MOSSY_COBBLESTONE), () -> new ItemStack(Blocks.COBBLESTONE), 16),
NORMAL(true, true, "", () -> new ItemStack(Items.IRON_NUGGET), () -> new ItemStack(Items.IRON_NUGGET), 1, () -> new ItemStack(Items.IRON_INGOT), () -> new ItemStack(Items.IRON_NUGGET), 1),
NORMAL_NETHER_BRICKS(true, true, "Nether Brick", () -> new ItemStack(Items.NETHERBRICK), null, 4, () -> new ItemStack(Blocks.NETHER_BRICK), () -> new ItemStack(Items.NETHERBRICK), 16),
NORMAL_SANDSTONE(true, true, "Sandstone", () -> new ItemStack(Blocks.SANDSTONE), null, 12, () -> new ItemStack(Blocks.SANDSTONE), () -> new ItemStack(Blocks.SANDSTONE), 16),
OBSIDIAN(true, true, "Obsidian", () -> new ItemStack(Blocks.OBSIDIAN), null, 12, () -> new ItemStack(Blocks.OBSIDIAN), () -> new ItemStack(Blocks.OBSIDIAN), 16),
PRISMARINE(true, true, "Prismarine", () -> new ItemStack(Items.PRISMARINE_SHARD), null, 4, () -> new ItemStack(Blocks.PRISMARINE, 1), () -> new ItemStack(Items.PRISMARINE_SHARD), 8),
PURPUR(true, true, "Purpur", () -> new ItemStack(Items.CHORUS_FRUIT_POPPED), null, 1, () -> new ItemStack(Blocks.PURPUR_BLOCK), () -> new ItemStack(Items.CHORUS_FRUIT_POPPED), 8),
QUARTZ(true, true, "Quartz", () -> new ItemStack(Items.QUARTZ), () -> new ItemStack(Items.QUARTZ), 4, () -> new ItemStack(Blocks.QUARTZ_BLOCK), () -> new ItemStack(Items.QUARTZ), 8),
RED_NETHER_BRICKS(true, true, "Red Nether Brick", () -> new ItemStack(Blocks.RED_NETHER_BRICK), null, 12, () -> new ItemStack(Blocks.RED_NETHER_BRICK), () -> new ItemStack(Items.NETHERBRICK), 8),
RED_SANDSTONE(true, true, "Red Sandstone", () -> new ItemStack(Blocks.RED_SANDSTONE), null, 12, () -> new ItemStack(Blocks.RED_SANDSTONE), () -> new ItemStack(Blocks.RED_SANDSTONE), 16),
SMOOTH_STONE(true, true, "Smooth Stone", () -> new ItemStack(Blocks.STONE), null, 12, () -> new ItemStack(Blocks.STONE), () -> new ItemStack(Blocks.STONE), 16),
STONE(true, true, "Stone", () -> new ItemStack(Blocks.STONE, 0), null, 12, () -> new ItemStack(Blocks.STONE, 0), () -> new ItemStack(Blocks.STONE, 0), 16),
STONE_BRICKS(true, true, "Stone Bricks", () -> new ItemStack(Blocks.STONEBRICK, 0), null, 12, () -> new ItemStack(Blocks.STONEBRICK, 0), () -> new ItemStack(Blocks.STONEBRICK, 0), 16);

public final boolean canBeColored;
public final boolean hasChains;
Expand All @@ -59,15 +59,17 @@ public enum LanternMaterial {
private Item chainItem;
public final String englishTranslation;
public final Supplier<ItemStack> primaryLanternIngredient, secondaryLanternIngredient;
public final int lanternRecipeCount;
public final Supplier<ItemStack> primaryChainIngredient, secondaryChainIngredient;
public final int chainRecipeCount;

LanternMaterial(boolean canBeColored, boolean hasChains, String englishTranslation, Supplier<ItemStack> primaryLanternIngredient, Supplier<ItemStack> secondaryLanternIngredient, Supplier<ItemStack> primaryChainIngredient, Supplier<ItemStack> secondaryChainIngredient, int chainRecipeCount){
LanternMaterial(boolean canBeColored, boolean hasChains, String englishTranslation, Supplier<ItemStack> primaryLanternIngredient, Supplier<ItemStack> secondaryLanternIngredient, int lanternRecipeCount, Supplier<ItemStack> primaryChainIngredient, Supplier<ItemStack> secondaryChainIngredient, int chainRecipeCount){
this.canBeColored = canBeColored;
this.hasChains = hasChains;
this.englishTranslation = englishTranslation;
this.primaryLanternIngredient = primaryLanternIngredient;
this.secondaryLanternIngredient = secondaryLanternIngredient;
this.lanternRecipeCount = lanternRecipeCount;
this.primaryChainIngredient = primaryChainIngredient;
this.secondaryChainIngredient = secondaryChainIngredient;
this.chainRecipeCount = chainRecipeCount;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,19 +39,19 @@ private void addLanternRecipe(LanternMaterial material){
return;

if(material.primaryLanternIngredient == null)
this.shaped(Item.getItemFromBlock(material.getLanternBlock()))
this.shaped(Item.getItemFromBlock(material.getLanternBlock()), material.lanternRecipeCount)
.pattern("B B").pattern(" C ").pattern("B B")
.input('B', material.secondaryLanternIngredient.get())
.input('C', Item.getItemFromBlock(Blocks.TORCH))
.unlockedBy(Item.getItemFromBlock(Blocks.TORCH));
else if(material.secondaryLanternIngredient == null)
this.shaped(Item.getItemFromBlock(material.getLanternBlock()))
this.shaped(Item.getItemFromBlock(material.getLanternBlock()), material.lanternRecipeCount)
.pattern(" A ").pattern("ACA").pattern(" A ")
.input('A', material.primaryLanternIngredient.get())
.input('C', Item.getItemFromBlock(Blocks.TORCH))
.unlockedBy(Item.getItemFromBlock(Blocks.TORCH));
else
this.shaped(Item.getItemFromBlock(material.getLanternBlock()))
this.shaped(Item.getItemFromBlock(material.getLanternBlock()), material.lanternRecipeCount)
.pattern("BAB").pattern("ACA").pattern("BAB")
.input('A', material.primaryLanternIngredient.get())
.input('B', material.secondaryLanternIngredient.get())
Expand Down

0 comments on commit 509e2d0

Please sign in to comment.