parent
							
								
									5719e6f472
								
							
						
					
					
						commit
						c27e40b494
					
				
				 7 changed files with 212 additions and 106 deletions
			
			
		@ -1,17 +0,0 @@ | 
				
			|||||||
// priority: 0
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
onEvent("recipes", event => { | 
					 | 
				
			||||||
  event.remove({ id: "corail_woodcutter:woodcutting/quark/jungle_post_from_jungle_logs" }); | 
					 | 
				
			||||||
  event.remove({ id: "corail_woodcutter:woodcutting/quark/jungle_post_from_jungle_planks" }); | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  event.custom({ | 
					 | 
				
			||||||
    type: "corail_woodcutter:woodcutting", | 
					 | 
				
			||||||
    ingredient: { tag: "minecraft:jungle_logs" }, | 
					 | 
				
			||||||
    result: "quark:jungle_post", count: 4 | 
					 | 
				
			||||||
  }); | 
					 | 
				
			||||||
  event.custom({ | 
					 | 
				
			||||||
    type: "corail_woodcutter:woodcutting", | 
					 | 
				
			||||||
    ingredient: { tag: "forge:planks/jungle" }, | 
					 | 
				
			||||||
    result: "quark:jungle_post", count: 1 | 
					 | 
				
			||||||
  }); | 
					 | 
				
			||||||
}); | 
					 | 
				
			||||||
@ -1,56 +0,0 @@ | 
				
			|||||||
// priority: 0
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
onEvent("recipes", event => { | 
					 | 
				
			||||||
  let minecraft_wood_types = [ | 
					 | 
				
			||||||
    "oak", "spruce", "birch", "jungle", | 
					 | 
				
			||||||
    "acacia", "dark_oak", "crimson", "warped" | 
					 | 
				
			||||||
  ]; | 
					 | 
				
			||||||
  let bop_wood_types = [ | 
					 | 
				
			||||||
    "cherry", "dead", "fir", "jacaranda", "magic", | 
					 | 
				
			||||||
    "mahogany", "palm", "redwood", "umbran", "willow" | 
					 | 
				
			||||||
  ]; | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  // Posts, platforms and steps (Adorn)
 | 
					 | 
				
			||||||
  event.remove({ mod: "adorn", type: "minecraft:stonecutting", output: "#adorn:wooden_posts" }); | 
					 | 
				
			||||||
  event.remove({ mod: "adorn", type: "minecraft:stonecutting", output: "#adorn:wooden_platforms" }); | 
					 | 
				
			||||||
  event.remove({ mod: "adorn", type: "minecraft:stonecutting", output: "#adorn:wooden_steps" }); | 
					 | 
				
			||||||
  for (let wood_type of minecraft_wood_types) { | 
					 | 
				
			||||||
    sawmill(event, `2x adorn:${wood_type}_post`    , `minecraft:${wood_type}_planks`); | 
					 | 
				
			||||||
    sawmill(event, `1x adorn:${wood_type}_platform`, `minecraft:${wood_type}_planks`); | 
					 | 
				
			||||||
    sawmill(event, `2x adorn:${wood_type}_step`    , `minecraft:${wood_type}_planks`); | 
					 | 
				
			||||||
  } | 
					 | 
				
			||||||
  for (let wood_type of bop_wood_types) { | 
					 | 
				
			||||||
    sawmill(event, `2x adorn:biomesoplenty/${wood_type}_post`    , `biomesoplenty:${wood_type}_planks`); | 
					 | 
				
			||||||
    sawmill(event, `1x adorn:biomesoplenty/${wood_type}_platform`, `biomesoplenty:${wood_type}_planks`); | 
					 | 
				
			||||||
    sawmill(event, `2x adorn:biomesoplenty/${wood_type}_step`    , `biomesoplenty:${wood_type}_planks`); | 
					 | 
				
			||||||
  } | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  // Posts (Quark)
 | 
					 | 
				
			||||||
  for (let wood_type of bop_wood_types) { | 
					 | 
				
			||||||
    sawmill(event, `1x compatoplenty:stripped_${wood_type}_post`,  `biomesoplenty:${wood_type}_planks`); | 
					 | 
				
			||||||
    sawmill(event, `4x compatoplenty:stripped_${wood_type}_post`, `#biomesoplenty:${wood_type}_logs`  ); | 
					 | 
				
			||||||
    sawmill(event, `1x compatoplenty:${wood_type}_post`,  `biomesoplenty:${wood_type}_planks`); | 
					 | 
				
			||||||
    sawmill(event, `4x compatoplenty:${wood_type}_post`, `#biomesoplenty:${wood_type}_logs`  ); | 
					 | 
				
			||||||
  } | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  // Vertical planks
 | 
					 | 
				
			||||||
  for (let wood_type of bop_wood_types) { | 
					 | 
				
			||||||
    sawmill(event, `1x compatoplenty:vertical_${wood_type}_planks`,  `biomesoplenty:${wood_type}_planks`); | 
					 | 
				
			||||||
    sawmill(event, `4x compatoplenty:vertical_${wood_type}_planks`, `#biomesoplenty:${wood_type}_logs`  ); | 
					 | 
				
			||||||
  } | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  // Vertical slabs
 | 
					 | 
				
			||||||
  for (let wood_type of bop_wood_types) { | 
					 | 
				
			||||||
    sawmill(event, `2x compatoplenty:${wood_type}_vertical_slab`,  `biomesoplenty:${wood_type}_planks`); | 
					 | 
				
			||||||
    sawmill(event, `8x compatoplenty:${wood_type}_vertical_slab`, `#biomesoplenty:${wood_type}_logs`  ); | 
					 | 
				
			||||||
  } | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  // Ladders
 | 
					 | 
				
			||||||
  event.remove({type: "corail_woodcutter:woodcutting", output: "minecraft:ladder" }); | 
					 | 
				
			||||||
  sawmill(event, `1x minecraft:ladder`,  `minecraft:oak_planks`); | 
					 | 
				
			||||||
  sawmill(event, `4x minecraft:ladder`, `#minecraft:oak_logs`  ); | 
					 | 
				
			||||||
  for (let wood_type of bop_wood_types) { | 
					 | 
				
			||||||
    sawmill(event, `1x compatoplenty:${wood_type}_ladder`,  `biomesoplenty:${wood_type}_planks`); | 
					 | 
				
			||||||
    sawmill(event, `4x compatoplenty:${wood_type}_ladder`, `#biomesoplenty:${wood_type}_logs`  ); | 
					 | 
				
			||||||
  } | 
					 | 
				
			||||||
}); | 
					 | 
				
			||||||
@ -0,0 +1,204 @@ | 
				
			|||||||
 | 
					// priority: 0
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					onEvent("recipes", event => { | 
				
			||||||
 | 
					  event.stonecutting("2x minecraft:stick", "#minecraft:planks"); | 
				
			||||||
 | 
					  event.stonecutting("2x minecraft:bowl" , "#minecraft:planks"); | 
				
			||||||
 | 
					  event.stonecutting("tconstruct:pattern", "#minecraft:planks"); | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  let COSTS = { | 
				
			||||||
 | 
					    // Logs
 | 
				
			||||||
 | 
					    wood:          { log: 1 }, | 
				
			||||||
 | 
					    stripped_log:  { log: 1 }, | 
				
			||||||
 | 
					    stripped_wood: { log: 1, wood: 1, stripped_log: 1, }, | 
				
			||||||
 | 
					    // Items from Logs
 | 
				
			||||||
 | 
					    planks:        { any_log: 4 }, | 
				
			||||||
 | 
					    boat:          { any_log: 1 }, | 
				
			||||||
 | 
					    beam:          { any_log: 1 }, | 
				
			||||||
 | 
					    palisade:      { any_log: 4 }, | 
				
			||||||
 | 
					    post:          { log: 4, wood: 4 }, | 
				
			||||||
 | 
					    stripped_post: { any_log: 4 }, | 
				
			||||||
 | 
					    // Items from Planks
 | 
				
			||||||
 | 
					    stairs:          { planks: 1 }, | 
				
			||||||
 | 
					    slab:            { planks: 2 }, | 
				
			||||||
 | 
					    ladder:          { planks: 2 }, | 
				
			||||||
 | 
					    door:            { planks: 1 }, | 
				
			||||||
 | 
					    trapdoor:        { planks: 1 }, | 
				
			||||||
 | 
					    fence:           { planks: 1 }, | 
				
			||||||
 | 
					    fence_gate:      { planks: 1 }, | 
				
			||||||
 | 
					    button:          { planks: 4 }, | 
				
			||||||
 | 
					    pressure_plate:  { planks: 2 }, | 
				
			||||||
 | 
					    sign:            { planks: 1 }, | 
				
			||||||
 | 
					    support:         { planks: 1 }, | 
				
			||||||
 | 
					    seat:            { planks: 1 }, | 
				
			||||||
 | 
					    vertical_planks: { planks: 1, any_log: 4 }, | 
				
			||||||
 | 
					    vertical_slab:   { planks: 2 }, | 
				
			||||||
 | 
					    chair:           { planks: 1 }, | 
				
			||||||
 | 
					    table:           { planks: 1 }, | 
				
			||||||
 | 
					    shelf:           { planks: 1 }, | 
				
			||||||
 | 
					    bench:           { planks: 2 }, | 
				
			||||||
 | 
					    backpack_shelf:  { planks: 2 }, | 
				
			||||||
 | 
					    banister:        { planks: 2 }, | 
				
			||||||
 | 
					  }; | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  let WOOD_TYPES = { | 
				
			||||||
 | 
					    minecraft:      [ "oak", "spruce", "birch", "jungle", "acacia", "dark_oak", "crimson", "warped" ], | 
				
			||||||
 | 
					    biomesoplenty:  [ "cherry", "dead", "fir", "hellbark", "jacaranda", "magic", "mahogany", "palm", "redwood", "umbran", "willow" ], | 
				
			||||||
 | 
					    twilightforest: [ "twilight_oak", "canopy", "mangrove", "dark", "time", "transformation", "mining", "sorting" ], | 
				
			||||||
 | 
					    quark:          [ "azalea", "blossom" ], | 
				
			||||||
 | 
					  }; | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  let DEFAULT_FORMAT = { | 
				
			||||||
 | 
					    DEFAULT: "{MOD}:{WOOD}_{TYPE}", | 
				
			||||||
 | 
					    any_log: "#{MOD}:{WOOD}_logs", | 
				
			||||||
 | 
					    stripped_log:  "{MOD}:stripped_{WOOD}_log", | 
				
			||||||
 | 
					    stripped_wood: "{MOD}:stripped_{WOOD}_wood", | 
				
			||||||
 | 
					    stripped_post:   "{MOD}:stripped_{WOOD}_post", | 
				
			||||||
 | 
					    vertical_planks: "{MOD}:vertical_{WOOD}_planks", | 
				
			||||||
 | 
					  }; | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  let DEFINITIONS = { | 
				
			||||||
 | 
					    minecraft: [ | 
				
			||||||
 | 
					      { | 
				
			||||||
 | 
					        woods: WOOD_TYPES.minecraft, | 
				
			||||||
 | 
					        types: [ "planks", "stairs", "slab", "door", "trapdoor", "fence", "fence_gate", "sign", "button", "pressure_plate" ], | 
				
			||||||
 | 
					      }, | 
				
			||||||
 | 
					      { | 
				
			||||||
 | 
					        woods: [ "oak", "spruce", "birch", "jungle", "acacia", "dark_oak" ], | 
				
			||||||
 | 
					        types: [ "any_log", "log", "wood", "stripped_log", "stripped_wood", "boat" ], | 
				
			||||||
 | 
					      }, | 
				
			||||||
 | 
					      { | 
				
			||||||
 | 
					        woods: [ "crimson", "warped" ], | 
				
			||||||
 | 
					        types: [ "any_log", "log", "wood", "stripped_log", "stripped_wood" ], | 
				
			||||||
 | 
					        format: { | 
				
			||||||
 | 
					          any_log:       "#{MOD}:{WOOD}_stems", | 
				
			||||||
 | 
					          log:           "{MOD}:{WOOD}_stem", | 
				
			||||||
 | 
					          wood:          "{MOD}:{WOOD}_hyphae", | 
				
			||||||
 | 
					          stripped_log:  "{MOD}:stripped_{WOOD}_stem", | 
				
			||||||
 | 
					          stripped_wood: "{MOD}:stripped_{WOOD}_hyphae", | 
				
			||||||
 | 
					        }, | 
				
			||||||
 | 
					      }, | 
				
			||||||
 | 
					      { | 
				
			||||||
 | 
					        woods: [ "oak" ], | 
				
			||||||
 | 
					        types: [ "ladder" ], | 
				
			||||||
 | 
					        format: { ladder: "{MOD}:{TYPE}" }, | 
				
			||||||
 | 
					      }, | 
				
			||||||
 | 
					    ], | 
				
			||||||
 | 
					    decorative_blocks: [ | 
				
			||||||
 | 
					      { | 
				
			||||||
 | 
					        woods: WOOD_TYPES.minecraft, | 
				
			||||||
 | 
					        types: [ "beam", "palisade", "support", "seat" ], | 
				
			||||||
 | 
					      }, | 
				
			||||||
 | 
					    ], | 
				
			||||||
 | 
					    quark: [ | 
				
			||||||
 | 
					      { | 
				
			||||||
 | 
					        woods: WOOD_TYPES.quark, | 
				
			||||||
 | 
					        types: [ | 
				
			||||||
 | 
					          "any_log", "log", "wood", "stripped_log", "stripped_wood", | 
				
			||||||
 | 
					          "planks", "stairs", "slab", "door", "trapdoor", "fence", "fence_gate", | 
				
			||||||
 | 
					          "sign", "button", "pressure_plate", "boat", | 
				
			||||||
 | 
					          "vertical_planks", "vertical_slab", "post", "stripped_post", | 
				
			||||||
 | 
					        ], | 
				
			||||||
 | 
					        format: { | 
				
			||||||
 | 
					          stairs:        "{MOD}:{WOOD}_planks_{TYPE}", | 
				
			||||||
 | 
					          slab:          "{MOD}:{WOOD}_planks_{TYPE}", | 
				
			||||||
 | 
					          vertical_slab: "{MOD}:{WOOD}_planks_{TYPE}", | 
				
			||||||
 | 
					        }, | 
				
			||||||
 | 
					      }, | 
				
			||||||
 | 
					      { | 
				
			||||||
 | 
					        woods: WOOD_TYPES.minecraft, | 
				
			||||||
 | 
					        types: [ "vertical_planks", "post", "stripped_post" ], | 
				
			||||||
 | 
					      }, | 
				
			||||||
 | 
					      { | 
				
			||||||
 | 
					        woods: WOOD_TYPES.minecraft.concat(WOOD_TYPES.quark).filter(wood => wood != "oak"), | 
				
			||||||
 | 
					        types: [ "ladder" ], | 
				
			||||||
 | 
					      }, | 
				
			||||||
 | 
					    ], | 
				
			||||||
 | 
					    adorn: [ | 
				
			||||||
 | 
					      { | 
				
			||||||
 | 
					        woods: WOOD_TYPES.minecraft, | 
				
			||||||
 | 
					        types: [ "chair", "table", "shelf", "bench" ], | 
				
			||||||
 | 
					      }, | 
				
			||||||
 | 
					      { | 
				
			||||||
 | 
					        woods: WOOD_TYPES.biomesoplenty, | 
				
			||||||
 | 
					        types: [ "chair", "table", "shelf", "bench" ], | 
				
			||||||
 | 
					        format: { DEFAULT: "{MOD}:biomesoplenty/{WOOD}_{TYPE}" }, | 
				
			||||||
 | 
					      }, | 
				
			||||||
 | 
					    ], | 
				
			||||||
 | 
					    backpacked: [ | 
				
			||||||
 | 
					      { | 
				
			||||||
 | 
					        woods: WOOD_TYPES.minecraft, | 
				
			||||||
 | 
					        types: [ "backpack_shelf" ], | 
				
			||||||
 | 
					      }, | 
				
			||||||
 | 
					    ], | 
				
			||||||
 | 
					    biomesoplenty: [ | 
				
			||||||
 | 
					      { | 
				
			||||||
 | 
					        woods: WOOD_TYPES.biomesoplenty, | 
				
			||||||
 | 
					        types: [ | 
				
			||||||
 | 
					          "any_log", "log", "wood", "stripped_log", "stripped_wood", | 
				
			||||||
 | 
					          "planks", "stairs", "slab", "door", "trapdoor", "fence", "fence_gate", | 
				
			||||||
 | 
					          "sign", "button", "pressure_plate", "boat", | 
				
			||||||
 | 
					        ], | 
				
			||||||
 | 
					      } | 
				
			||||||
 | 
					    ], | 
				
			||||||
 | 
					    twilightforest: [ | 
				
			||||||
 | 
					      { | 
				
			||||||
 | 
					        woods: WOOD_TYPES.twilightforest, | 
				
			||||||
 | 
					        types: [ | 
				
			||||||
 | 
					          "any_log", "log", "wood", "stripped_log", "stripped_wood", | 
				
			||||||
 | 
					          "planks", "stairs", "slab", "door", "trapdoor", "fence", "fence_gate", | 
				
			||||||
 | 
					          "button", "pressure_plate", | 
				
			||||||
 | 
					        ], | 
				
			||||||
 | 
					      }, | 
				
			||||||
 | 
					      { | 
				
			||||||
 | 
					        woods: WOOD_TYPES.twilightforest.filter(wood => wood != "dark"), | 
				
			||||||
 | 
					        types: [ "sign" ], | 
				
			||||||
 | 
					      }, | 
				
			||||||
 | 
					      { | 
				
			||||||
 | 
					        woods: WOOD_TYPES.minecraft.concat(WOOD_TYPES.twilightforest).filter(wood => wood != "dark"), | 
				
			||||||
 | 
					        types: [ "banister" ], | 
				
			||||||
 | 
					      }, | 
				
			||||||
 | 
					      { | 
				
			||||||
 | 
					        woods: [ "dark" ], | 
				
			||||||
 | 
					        types: [ "sign", "banister" ], | 
				
			||||||
 | 
					        format: { DEFAULT: "{MOD}:darkwood_{TYPE}" }, | 
				
			||||||
 | 
					      }, | 
				
			||||||
 | 
					    ], | 
				
			||||||
 | 
					    compatoplenty: [ | 
				
			||||||
 | 
					      { | 
				
			||||||
 | 
					        woods: WOOD_TYPES.biomesoplenty, | 
				
			||||||
 | 
					        types: [ "vertical_planks", "vertical_slab", "post", "stripped_post", "ladder" ], | 
				
			||||||
 | 
					      }, | 
				
			||||||
 | 
					    ], | 
				
			||||||
 | 
					  }; | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  let items = {  }; | 
				
			||||||
 | 
					  // Collect all definitions into "items".
 | 
				
			||||||
 | 
					  // { oak: { planks: "minecraft:oak_planks", ... }, ... }
 | 
				
			||||||
 | 
					  for (let mod in DEFINITIONS) { | 
				
			||||||
 | 
					    for (let { woods, types, format } of DEFINITIONS[mod]) { | 
				
			||||||
 | 
					      format = Object.assign({  }, DEFAULT_FORMAT, format); | 
				
			||||||
 | 
					      for (let wood of woods) { | 
				
			||||||
 | 
					        let items_by_wood = items[wood] = items[wood] || {  }; | 
				
			||||||
 | 
					        for (let type of types) { | 
				
			||||||
 | 
					          let item = (format[type] || format.DEFAULT) | 
				
			||||||
 | 
					            .replace("{MOD}", mod) | 
				
			||||||
 | 
					            .replace("{WOOD}", wood) | 
				
			||||||
 | 
					            .replace("{TYPE}", type); | 
				
			||||||
 | 
					          items_by_wood[type] = item; | 
				
			||||||
 | 
					        } | 
				
			||||||
 | 
					      } | 
				
			||||||
 | 
					    } | 
				
			||||||
 | 
					  } | 
				
			||||||
 | 
					  // Register stonecutting recipes based on "COSTS".
 | 
				
			||||||
 | 
					  for (let wood in items) { | 
				
			||||||
 | 
					    for (let [type, item] of Object.entries(items[wood])) { | 
				
			||||||
 | 
					      for (let [input, result_count] of Object.entries(COSTS[type] || {  })) { | 
				
			||||||
 | 
					        let o = `${result_count}x ${item}`; | 
				
			||||||
 | 
					        let i = items[wood] && items[wood][input]; | 
				
			||||||
 | 
					        // console.log(`${wood} ${type} :: ${i} => ${o}`);
 | 
				
			||||||
 | 
					        if (i != null) event.stonecutting(o, i); | 
				
			||||||
 | 
					        else console.error(`Can't create ${wood} ${type} recipe for ${item} since input wasn't found`); | 
				
			||||||
 | 
					      } | 
				
			||||||
 | 
					    } | 
				
			||||||
 | 
					  } | 
				
			||||||
 | 
					}); | 
				
			||||||
@ -1,13 +0,0 @@ | 
				
			|||||||
name = "Corail Woodcutter" | 
					 | 
				
			||||||
filename = "corail_woodcutter-1.18.2-2.3.4.jar" | 
					 | 
				
			||||||
side = "both" | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
[download] | 
					 | 
				
			||||||
hash-format = "sha1" | 
					 | 
				
			||||||
hash = "303ab36eace656cc39312a316e4175036dc5bd7b" | 
					 | 
				
			||||||
mode = "metadata:curseforge" | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
[update] | 
					 | 
				
			||||||
[update.curseforge] | 
					 | 
				
			||||||
file-id = 3818180 | 
					 | 
				
			||||||
project-id = 331983 | 
					 | 
				
			||||||
					Loading…
					
					
				
		Reference in new issue