# Example Inv Script brew_menu: type: inventory inventory: CHEST title: Advanced Brewing size: 27 slots: - "[] [] [] [] [] [] [] [] []" - "[] [] [] [] [] [] [] [] []" - "[] [] [] [] [] [] [] [] []" brew_fuellevel: type: item material: COAL_BLOCK display name: Fuel Level lore: - "Fuel Level: ERROR" brew_null: type: item material: GRAY_STAINED_GLASS_PANE display name: 'null' brew_fuelslot: type: item material: COAL display name: Input Blaze Powder, 1 powder = 2 distill brew_pot: type: item material: GLASS_BOTTLE display name: Put filled potion bottles here lore: - "Once removed they cannot be distilled further" brew_valve: type: item material: LEVER display name: Click here to distill ingredient brew_ingredient: type: item material: EGG display name: Ingredients brew_step: type: item material: BLAZE_POWDER display name: Brewing Step lore: - "Next Step: ERROR" brew_handler: type: world events: on player opens brew_menu: - flag brew_step:0 - flag brew_fuel:0 - flag brew_dur:1 - flag brew_str:1 - flag brew_side:0 - flag brew_state:0 - flag brew_pure:0 - flag brew_inversion:true - flag brew_type:POTION - wait 1t # 0 for norm, 1 for splash, 2 for linger - inventory adjust d: slot:19 "lore:Next Step: ]>" - inventory adjust d: slot:13 "lore:Fuel Level: " on player clicks brew_fuellevel in brew_menu: - determine cancelled on player left clicks brew_ingredient in brew_menu: - if == : - determine cancelled - take slot: from: on player left clicks brew_fuelslot in brew_menu: - if == : - take slot: from: - wait 1t - inventory set d: o: slot: - else: - determine cancelled on player right clicks brew_fuelslot in brew_menu: - determine cancelled - if == : - take slot: from: - wait 1t - inventory set d: o: slot: - wait 1t - determine cancelled on player clicks brew_valve in brew_menu: - determine passively cancelled - if == : - flag brew_fuel:+:2 - wait 1t - if != 0: - inventory set d: o:]> slot:15 - else: - inventory set d: o: slot:15 - inventory adjust d: slot:13 "lore:Fuel Level: " - if > 0: - choose : - case 0: - if == : - inventory set d: o: slot:5 - flag brew_step:1 - wait 1t - inventory adjust d: slot:19 "lore:Next Step: ]>" - foreach : - if ].material.name> == potion: - inventory adjust d: slot:<[value]> "potion_effects:AWKWARD,false,false" - else: - stop - case 1: - define catalyst:]> - if <[catalyst]> == NULL: - stop - else: - inventory set d: o: slot:5 - flag brew_step:2 - wait 1t - inventory adjust d: slot:19 "lore:Next Step: ]>" - foreach : - if ].material.name> == potion: - inventory adjust d: slot:<[value]> "potion_effects:THICK,false,false" - flag brew_effect:<[catalyst]> - case 2: - define effect:]> - choose <[effect]>: - case CORRUPT: - define tempEff: - if : - flag brew_effect:]> - if != NULL: - inventory set d: o: slot:5 - flag brew_inversion:false - flag brew_side:+:20 - else: - flag brew_effect:<[tempEff]> - case PURIFY: - if < 4: - inventory set d: o: slot:5 - flag brew_pure:+:1 - flag brew_side:-:10 - case DUR: - if != HEAL && != HARM: - if < 5: - inventory set d: o: slot:5 - flag brew_dur:+:1 - flag brew_side:+:10 - case AMP: - if < 5: - inventory set d: o: slot:5 - flag brew_str:+:1 - flag brew_side:+:15 - case SPLASH: - if == POTION: - inventory set d: o: slot:5 - flag brew_type:SPLASH_POTION - flag brew_side:+:5 - case LINGER: - if == LINGERING_POTION: - inventory set d: o: slot:5 - flag brew_type:LINGERING_POTION - flag brew_side:+:15 - case COMPLETE: - flag brew_step:0 - inventory adjust d: slot:19 "lore:Next Step: ]>" - if > : - inventory set d: o: slot:5 - if == 1: - define secondary1: - define secondary2: - define secondary3: - else: - define secondary1: - define secondary2: - define secondary3: - if == potion: - inventory set d: o:].with[potion_effects=THICK,true,true,&comma&comma|,,],true,true>|<[secondary1]>,,|<[secondary1]>,true,true]>]> slot:22 - if == potion: - inventory set d: o:].with[potion_effects=THICK,true,true,&comma&comma|,,],true,true>|<[secondary2]>,,|<[secondary2]>,true,true]>]> slot:22 - if == potion: - inventory set d: o:].with[potion_effects=THICK,true,true,&comma&comma|,,],true,true>|<[secondary3]>,,|<[secondary3]>,true,true]>]> slot:22 - else: - inventory set d: o: slot:5 - if == potion: - inventory set d: o:].with[potion_effects=THICK,true,true,&comma&comma|,,],true,true>]> slot:22 - if == potion: - inventory set d: o:].with[potion_effects=THICK,true,true,&comma&comma|,,],true,true>]> slot:23 - if == potion: - inventory set d: o:].with[potion_effects=THICK,true,true,&comma&comma|,,],true,true>]> slot:24 - default: - stop - flag brew_fuel:-:1 - inventory adjust d: slot:13 "lore:Fuel Level: " on player clicks brew_null in brew_menu: - determine cancelled on player clicks brew_step in brew_menu: - determine cancelled on player clicks in brew_menu with air priority:50: - if == : - if != && != && != && != && != && != : - if == 22 || == 23 || == 24: - if != 0: - determine cancelled - wait 1t - choose : - case 5: - inventory set d: o: slot:5 - case 15: - inventory set d: o: slot:15 - case 22: - inventory set d: o: slot:22 - case 23: - inventory set d: o: slot:23 - case 24: - inventory set d: o: slot:24 - default: - narrate - else: - determine cancelled on player drags in brew_menu priority:100: - determine cancelled on player clicks brew_pot in brew_menu: - if == : - take slot: from: - wait 1t - inventory set d: o: slot: - wait 1t - determine cancelled - else: - narrate "Please insert water bottles" - determine cancelled on player closes brew_menu: - flag brew_fuel:! - flag brew_pure:! - flag brew_inversion:! - flag brew_type:! - flag brew_step:! - flag brew_dur:! - flag brew_str:! - flag brew_side:! - flag brew_state:! - flag brew_effect:! - foreach : - if ]> != && ]> != && ]> != : - give ]> brew_open: type: world events: on player right clicks brewing_stand: - determine passively cancelled - inventory open d: brew_getStep: type: procedure definitions: stepNum script: - choose <[stepNum]>: - case 0: - determine "Place water bottles and distill nether wart" - case 1: - determine "Determine primary type with catalyst" - case 2: - determine "Add extra effects or complete with nether wart" brew_getSideNeg: type: procedure script: - random: - determine SLOW - determine SLOW_DIGGING - determine HARM - determine BLINDNESS - determine HUNGER - determine WEAKNESS - determine POISON - determine WITHER - determine UNLUCK brew_getSidePos: type: procedure script: - random: - determine SPEED - determine INCREASE_DAMAGE - determine JUMP - determine REGENERATION - determine DAMAGE_RESISTANCE - determine INVISIBILITY - determine HEALTH_BOOST - determine ABSORPTION # CALL THIS ONLY ONCE, USED TO GET EFFECT AND SET A BIT OF THE INITIAL SIDE MODIFIERS brew_getEffect_flag: type: procedure definitions: ingredient|brewer script: - choose <[ingredient].material.name>: - case sugar: - flag <[brewer]> brew_state:1 - flag <[brewer]> brew_side:+:10 - determine SPEED - case rabbit_foot: - flag <[brewer]> brew_state:1 - flag <[brewer]> brew_side:+:10 - determine JUMP - case glistering_melon_slice: - flag <[brewer]> brew_state:1 - flag <[brewer]> brew_side:+:20 - determine HEAL - case spider_eye: - flag <[brewer]> brew_state:2 - flag <[brewer]> brew_side:+:15 - determine POISON - case pufferfish: - flag <[brewer]> brew_state:1 - flag <[brewer]> brew_side:+:20 - determine WATER_BREATHING - case magma_cream: - flag <[brewer]> brew_state:1 - flag <[brewer]> brew_side:+:35 - determine FIRE_RESISTANCE - case golden_carrot: - flag <[brewer]> brew_state:1 - flag <[brewer]> brew_side:+:20 - determine NIGHT_VISION - case blaze_powder: - flag <[brewer]> brew_state:1 - flag <[brewer]> brew_side:+:35 - determine INCREASE_DAMAGE - case ghast_tear: - flag <[brewer]> brew_state:1 - flag <[brewer]> brew_side:+:20 - determine REGENERATION - case turtle_shell: - flag <[brewer]> brew_state:1 - flag <[brewer]> brew_side:+:70 - determine DAMAGE_RESISTANCE - case phantom_membrane: - flag <[brewer]> brew_state:1 - flag <[brewer]> brew_side:+:5 - determine SLOW_FALLING - case heart_of_the_sea: - flag <[brewer]> brew_state:1 - flag <[brewer]> brew_side:+:25 - determine CONDUIT_POWER - case feather: - flag <[brewer]> brew_state:1 - flag <[brewer]> brew_side:+:40 - determine FAST_DIGGING - case emerald: - flag <[brewer]> brew_state:1 - flag <[brewer]> brew_side:+:50 - determine ABSORPTION - case diamond: - flag <[brewer]> brew_state:1 - flag <[brewer]> brew_side:+:50 - determine HEALTH_BOOST - default: - determine NULL brew_getDur: type: procedure definitions: brewer script: - if <[brewer].flag[brew_effect]> != HEAL && <[brewer].flag[brew_effect]> != HARM: - determine <[brewer].flag[brew_dur].mul[30].add[30]> - else: - determine 1 brew_getSecDur: type: procedure definitions: brewer|effect script: - if <[effect]> != HEAL && <[effect]> != HARM: - determine <[brewer].flag[brew_dur].mul[10].add[30]> - else: - determine 1 brew_getMod: type: procedure definitions: ingredient script: - choose <[ingredient]>: - case fermented_spider_eye: - determine CORRUPT - case redstone_dust: - determine DUR - case glowstone_dust: - determine AMP - case gunpowder: - determine SPLASH - case dragon_breath: - determine LINGER - case nether_wart: - determine COMPLETE - case milk_bucket: - determine PURIFY - default: - determine NULL brew_getInv: type: procedure definitions: brewer script: - choose <[brewer].flag[brew_effect]>: - case SPEED: - flag <[brewer]> brew_state:2 - determine SLOW - case JUMP: - flag <[brewer]> brew_state:2 - determine SLOW - case HEAL: - flag <[brewer]> brew_state:2 - determine HARM - case POISON: - flag <[brewer]> brew_state:2 - determine WITHER - case NIGHT_VISION: - flag <[brewer]> brew_state:1 - determine INVISIBILITY - case INCREASE_DAMAGE: - flag <[brewer]> brew_state:2 - determine WEAKNESS - case REGENERATION: - flag <[brewer]> brew_state:2 - determine WEAKNESS - case HEALTH_BOOST: - flag <[brewer]> brew_state:2 - determine BLINDNESS - case ABSORPTION: - flag <[brewer]> brew_state:1 - determine LUCK - default: - determine NULL