#is there a better way?

1 messages · Page 1 of 1 (latest)

lapis ginkgo
#

I want to make it so when u craft with a log it only gives u 1 plank
so is there a better way then removing every single plank recipe and then creating a new plank recipe for every single plank?

    remove recipe "minecraft:oak_planks"
    remove recipe "minecraft:birch_planks"
    remove recipe "minecraft:spruce_planks"
    remove recipe "minecraft:dark_oak_planks"
    remove recipe "minecraft:jungle_planks"
    remove recipe "minecraft:acacia_planks"
    remove recipe "minecraft:mangrove_planks"
    remove recipe "minecraft:cherry_planks"
    remove recipe "minecraft:bamboo_planks"
    remove recipe "minecraft:crimson_planks"
    remove recipe "minecraft:warped_planks"```
alpine seal
#

i dont know much about recipes, but i do know a thing or two about optimizing code
maybe this isn't what you're asking for, but you can put each of those recipes into a list and loop that list to remove their recipes
something like:

set {_list::*} to "recipe_name" and ...
loop {_list::*}:
  remove recipe "minecraft:" + loop-value # uses 2.9 syntax

this would significantly reduce repeated code (you could even combine {_list::*} into the same line as the loop, may make it less readable)

lapis ginkgo
#

@alpine seal is there any way I can do this?

    set {_planks::*} to "oak_planks" and "birch_planks" and "spruce_planks" and "dark_oak_planks" and "jungle_planks" and "acacia_planks" and "mangrove_planks" and "cherry_planks" and "crimson_planks" and "warped_planks"
    loop {_planks::*}:
        remove recipe loop-value
        register shapeless recipe:
            id: "custom:%loop-value%"
            result: loop-value #remove the "_"
            category: "building"
            ingredients:
                add oak log to ingredients #remove the "planks"```
#

like edit the loop-value

#

@alpine seal ?

alpine seal
#
  • no need to ping twice, once is enough
  • parse loop-value as a block type or blockdata
final flame
#

Couldnt you also on craft of any planks: and then set the amount to 1?

final flame
#

Start with the line I gave you

#

Then check the docs for an event value you can modify

#

I think there also might be an event for crafting prepare

#

Which would be better, doesnt require them to complete the craft. Displays one from the beginning

lapis ginkgo
#

no

lapis ginkgo
final flame
#

For whichever event youre using

lapis ginkgo
#

on craft I was looking at the event values

lapis ginkgo
final flame
#

No, im not asking you to give me the link so i can read it.

Im asking you to read it
(And then use what you find)

lapis ginkgo
#

I red the whole thing

final flame
#

Ok, nice

#

What did you learn?

lapis ginkgo
final flame
#

Hmm

#

Looks like theres some event-value there

#

Like event-item

lapis ginkgo
#

umm

#

theres a lot of event values

#

and I dont know what any of them are

final flame
#

Well, the examples might shed some light. Or you could broadcast them and see. But the one your looking for is event-item in this case

alpine seal
#

the examples of that doc help a lot too:

on craft:
    loop 9 times:
        if slot loop-number of player's current inventory is iron nugget named "&fNot Iron Nugget":
            cancel event
on craft:
  if item is a dispenser:
    give 10 dispensers to player

if you combine them and modify them a bit, you'll get pretty close to what you want to accomplish

lapis ginkgo
#

I saw the examples bruh

#

hm

lapis ginkgo
alpine seal
#

then try to understand
read what the examples do, and understand its syntax
after understanding how it's supposed to work, use that knowledge to create what you want to do

i'll help start: you'll want to use the first example to detect if the crafting recipe contains planks

lapis ginkgo
final flame
#

Okay, then try making something

lapis ginkgo
alpine seal
#

try it and see

lapis ginkgo
#

try what

alpine seal
#

see if it works

lapis ginkgo
#

it does?

alpine seal
#

if it does, then good job 🎉

lapis ginkgo
#

WDYM???

alpine seal
#

now make it only return 1 plank and you're done

lapis ginkgo
final flame
#

I cant be bothered to scroll for 10min

#

But at some point i said you can set an event-value

#

Like event-item, which I mentioned earlier

#

What item do you think that would be in an on craft: event?

lapis ginkgo
#

ok

final flame
#

Thats not the answer i was expecting

final flame
#

Which item?

lapis ginkgo
#

idk

#

items used to craft or item being crafted

final flame
#

Yup

#

event-item should be the result

lapis ginkgo
final flame
#

Try it

lapis ginkgo
#

ok

final flame
#

I think its relatively interchangeable with event-itemstack

lapis ginkgo
#

oh

lapis ginkgo
#

wait so how do I change the event-item to 1?

final flame
#

Set the item amount of it maybe

#

Or set it to 1 of …

lapis ginkgo
#

set event-item to 1

final flame
#

No

#

I gave you two examples

lapis ginkgo
#

no?

lapis ginkgo
final flame
#
  • set the item amount
  • set the event-item
lapis ginkgo
#

oh

#

oh

lapis ginkgo
final flame
lapis ginkgo
alpine seal
#

why are you putting a - between item-amount?
it should be item amount

lapis ginkgo
#

I even gave myself every single recipe

#

and am in surrvial

#

for some reason I can only craft with the oak log

final flame
#

Hmm

lapis ginkgo
#

wait

#

I think ik why

#

but idk how to fix it

lapis ginkgo
# final flame <:send_code:688375650582790339>
    loop {_planks::*}:
        remove recipe loop-value
        register shapeless recipe:
            id: "custom:%loop-value%"
            result: loop-value #remove the "_"
            category: "building"
            ingredients:
                add oak log to ingredients #remove the "planks"
    register shapeless recipe:
        id: "custom:oak_planks"
        result: oak plank
        category: "building"
        ingredients:
            add oak log to ingredients``` this was the code before but I removed it
final flame
#

Why are you registering another one after the loop

#

And yeah, youre putting an oak log each time

lapis ginkgo
#

ok so I restarted the server

#

but the skript doesn't work

#

x8ight?

final flame
lapis ginkgo
#

no errors

#

its nothing

#

what is should be doing

lapis ginkgo
#

so uh

#

x8ight?

final flame
#

hmm

#

interesting

lapis ginkgo
#

ok

final flame
#

so,

  1. I cant see anything wrong because I cant see the code
  2. if theres no errors, and "nothing happens" (which i've told you at least 50 times is not very helpful), that means you have a logic error
  • so now its time for your favourite part; debugging
lapis ginkgo
#

hi (╯°□°)╯︵ ┻━┻

#

/untableflip

final flame
#

hmm

#

the event is cancellable, but maybe cant do it like that for some reason

#

maybe waitatick and then set the item amount of the cursor slot

#

although I think I already found a way to bypass that

#

(press q to drop it out of the result slot)

lapis ginkgo
#

ummm ok

lavish fulcrum
#

cant u just remove the basic recipe

#

and make a custom one

lapis ginkgo
#

I was gonna do that

#

buts its many lines

#

for every single plank

lavish fulcrum
#

well.. it mgiht be better then this

lapis ginkgo
#

yeah

#

I think ur right

final flame
lapis ginkgo
#

THE SKRIPT IS NOT DOING

lavish fulcrum
#

code

final flame
#

OKAY, GREAT

lapis ginkgo
#

WHAT ITS SUPPOSE TO BE DOING

lavish fulcrum
#

send code

lavish fulcrum
lapis ginkgo
#
    wait 1 tick
    set item amount of event-item to 1```
lavish fulcrum
#

broadcast event-item

lapis ginkgo
# lavish fulcrum and make a custom one

actually I think am gonna just do this cuz even if it works when the go to craft the item it will say they are getting 4 planks but then they only get one

lavish fulcrum
#

enjoy

#

x8ight please help me in my post lol

lapis ginkgo
final flame
#

thats not what I said

lapis ginkgo
#

oh

lapis ginkgo
#

wait

#

is it event-slot?

#

no

#

it doesnt work

#
    wait 1 tick
    set item amount of event-slot to 1```
#

no errors

final flame
#

set the item amount of the player's cursor slot

final flame
#

literally have all of skript at your fingertips

lavish fulcrum
lapis ginkgo
#
    wait 1 tick
    set item amount of player's cursor slot to 1``` it didnt work
#

no errors

final flame
#

debug

#
  • make sure the event is triggered
  • broadcast the cursor slot; see what it is
lapis ginkgo
#
    remove recipe "minecraft:bucket"
    set {_planks::*} to "oak_planks" and "birch_planks" and "spruce_planks" and "dark_oak_planks" and "jungle_planks" and "acacia_planks" and "mangrove_planks" and "cherry_planks" and "crimson_planks" and "warped_planks"
    loop {_planks::*}:
        remove recipe loop-value
        register shapeless recipe:
            id: "custom:%loop-value%"
            result: loop-value #remove the _ from the loop-value
            category: "building"
            ingredients:
                add oak log to ingredients #remove the "planks" from the loop-value``` Is it possible to do this
final flame
lapis ginkgo
#

oh

final flame
#

i said you should use on craft prepare:. but looking at the docs description says its no too reliable. can try it if you want

lavish fulcrum
#

to save u the trouble and time

lapis ginkgo
lavish fulcrum
lapis ginkgo
final flame
#

how

lapis ginkgo
#

am confused

#

with what u said

final flame
#

okay, focus on the first part

#

get something working first

lapis ginkgo
#

what is A|

lapis ginkgo
lavish fulcrum
lapis ginkgo
#
        id: "custom:oak_planks"
        result: oak plank
        category: "building"
        ingredients:
            add oak log to ingredients```
lavish fulcrum
#

its really the most obvious thing

lapis ginkgo
#

ai

lavish fulcrum
#

u cant say it generally

lapis ginkgo
#

AI?

lavish fulcrum
#

idk how u did that

lapis ginkgo
#

oh\

final flame
#

you could also make a loop or something

lapis ginkgo
final flame
#

cool

lapis ginkgo
#
    remove recipe "minecraft:bucket"
    set {_planks::*} to "oak_planks" and "birch_planks" and "spruce_planks" and "dark_oak_planks" and "jungle_planks" and "acacia_planks" and "mangrove_planks" and "cherry_planks" and "crimson_planks" and "warped_planks"
    loop {_planks::*}:
        remove recipe loop-value
        register shapeless recipe:
            id: "custom:%loop-value%"
            result: loop-value #remove the _ from the loop-value
            category: "building"
            ingredients:
                add oak log to ingredients #remove the "planks" from the loop-value
    register shapeless recipe:
        id: "custom:oak_planks"
        result: oak plank
        category: "building"
        ingredients:
            add oak log to ingredients```
lapis ginkgo
final flame
lapis ginkgo
#

remove the 4 planks recipe
and add the 1 planks recipe

lavish fulcrum
#

hes saying dont u need to add minecraft: before

final flame
#

i know what you want

#

i dont think your current line is actually removing the recipe

#

cause it doesnt have the minecraft: category

lavish fulcrum
lapis ginkgo
#

I can fix that

#
    remove recipe "minecraft:bucket"
    set {_planks::*} to "oak_planks" and "birch_planks" and "spruce_planks" and "dark_oak_planks" and "jungle_planks" and "acacia_planks" and "mangrove_planks" and "cherry_planks" and "crimson_planks" and "warped_planks"
    loop {_planks::*}:
        remove recipe "minecraft:%loop-value%"
        register shapeless recipe:
            id: "custom:%loop-value%"
            result: loop-value #remove the _ from the loop-value
            category: "building"
            ingredients:
                add oak log to ingredients #remove the "planks" from the loop-value
    register shapeless recipe:
        id: "custom:oak_planks"
        result: oak plank
        category: "building"
        ingredients:
            add oak log to ingredients```
#

there

lapis ginkgo
final flame
#

If you want to make it easier with a list, I would use

set {_itemLog::*} to oak log, ..., and warped log
set {_ID::*} to "oak_planks", ..., and "warped_planks"

loop {_ID::*}:
  remove recipe "minecraft:%{_ID::%loop-index%}%"

  register...:
    result: {_itemPlank::%loop-index%}
    ingrediens:
      add {_itemLog::%loop-index%}```
lapis ginkgo
#

ok

lapis ginkgo
final flame
#

in some cases

lapis ginkgo
final flame
#

you dont need to

lapis ginkgo
#

why\

#

wdym\

#

I do need to

final flame
lapis ginkgo
final flame
#
  • have lists for IDs, the planks, and logs
  • then you can get an element from each list
  • use the element from the ID list to remove the default recipe
  • use the element from the planks list for the result
  • use the element from the log list for the ingredient
lapis ginkgo
#
  • e
  • e
    • e
final flame
#

2.718281828

lapis ginkgo
lapis ginkgo
final flame
#

you said e

#

so did I

final flame
lapis ginkgo
lapis ginkgo
#

I'll use lists

final flame
#

??

#

you were using one earlier

lapis ginkgo
#

oh

#

wait

#

nvm

#

I see

#

I mean

final flame
#

you've had it for like a day

lapis ginkgo
#

I'll use ur system

lapis ginkgo
#

why dont u use am/pm time

final flame
#

because I can count past 12

lapis ginkgo
#

ok

#

does that mean I cant?

final flame
#

it does not

lapis ginkgo
#

ok

final flame
#

it just means that I can, and prefer to do so

lapis ginkgo
#

oh

lavish fulcrum
#

💀

#

have u spawned in today lol

#

also there is personal preference

#

of ppl

#

i was brought up with am pm.. but tons of ppl go with military time

lapis ginkgo
lavish fulcrum
lapis ginkgo
#
    remove recipe "minecraft:bucket"
    set {_planksname::*} to "oak_planks" and "birch_planks" and "spruce_planks" and "dark_oak_planks" and "jungle_planks" and "acacia_planks" and "mangrove_planks" and "cherry_planks" and "crimson_planks" and "warped_planks"
    set {_planks::*} to "oak planks" and "birch planks" and "spruce planks" and "dark oak planks" and "jungle planks" and "acacia planks" and "mangrove planks" and "cherry planks" and "crimson planks" and "warped planks"
    set {_plankstype::*} to "oak log" and "birch log" and "spruce log" and "dark oak log" and "jungle log" and "acacia log" and "mangrove log" and "cherry log" and "crimson log" and "warped log"
    loop {_planks::*}:
        remove recipe "minecraft:%loop-value%"
    register shapeless recipe:
        loop {_planksname::*}:
            id: "custom:%loop-value%"
        loop {_planks::*}:
            result: loop-value 
        category: "building"
        ingredients:
            loop {_plankstype}:
                add loop-value to ingredients```
#

I will test this

lavish fulcrum
#

Bro

lapis ginkgo
#

why did u delete ur msg

lavish fulcrum
#

I was reading the pros of 24 hr time

#

Send it back dhjsdbksvejevrbr

lapis ginkgo
final flame
#

becuase all the lists contain strings...

#

you want 2 of them to contain items

lapis ginkgo
#

oh

lavish fulcrum
lapis ginkgo
#
    remove recipe "minecraft:bucket"
    set {_planksname::*} to "oak_planks" and "birch_planks" and "spruce_planks" and "dark_oak_planks" and "jungle_planks" and "acacia_planks" and "mangrove_planks" and "cherry_planks" and "crimson_planks" and "warped_planks"
    set {_planks::*} to oak planks and birch planks and spruce planks and dark oak planks and jungle planks and acacia planks and mangrove planks and cherry planks and crimson planks and warped planks
    set {_plankstype::*} to oak log and birch log and spruce log and dark oak log and jungle log and acacia log and mangrove log and cherry log and crimson log and warped log
    loop {_planks::*}:
        remove recipe "minecraft:%loop-value%"
    register shapeless recipe:
        loop {_planksname::*}:
            id: "custom:%loop-value%"
        loop {_planks::*}:
            result: loop-value 
        category: "building"
        ingredients:
            loop {_plankstype}:
                add loop-value to ingredients``` x8ight now?
lavish fulcrum
#

Try it and see?

lapis ginkgo
lavish fulcrum
#

That’s the point

#

You need to try it

lapis ginkgo
lavish fulcrum
#

The errors help you focus in on the problems

lavish fulcrum
#

And what do u expect x8ight to do

#

He’s gonna have to read every line

lapis ginkgo
lavish fulcrum
#

And then somehow not miss a mistake which is really hard

lapis ginkgo
lavish fulcrum
lapis ginkgo
#

the recipe will stay there

lavish fulcrum
#

Just do it and restart

#

/reload

#

Is real

lapis ginkgo
#

that doesnt work

lavish fulcrum
#

/reload is a command

lapis ginkgo
#

it does not restart the server tho

lavish fulcrum
#

It will reset the recipes

#

It’s like restarting without restarting

lapis ginkgo
#

oh

#

wait

lavish fulcrum
lapis ginkgo
#

this wont work

#

and idk how to fix it

lavish fulcrum
#

Error?

final flame
#

12h time:

  • repeats itself; therefore to be specific need to specify AM/PM or morning/afternoon/evening/night
  • adds an extra position on (digital) clocks: hh:mm:ss (AM|PM) (or is omitted and ambiguous)
  • takes longer to read/write/type the "AM/PM" or "morning/afternoon/evening/night" at the end

24h time:

  • does not repeat; always precise
  • no extra stuff at the end or extra position on digital clocks: hh:mm:ss
  • faster to to read/write/type
  • while the number of hours does go up, its not that bad. The hours with the most syllables is "eleven" and "seventeen".
  • 13-16 and 19-24 all have 2 syllables (20 has 1)
  • seventeen is the only number to have "more" syllables than its 12h counterpart, but its exactly the same amount as "eleven"
  • 12h has 2*"eleven", 24h has "eleven" and "seventeen";
  • 12h has 2*"ten", 24h has "ten" and "twenty";
  • => 24h time has no added syllables
lapis ginkgo
final flame
#

you only need one loop man

lavish fulcrum
#

Put this in showcase

#

Fr

final flame
#

i already gave you the structure

lapis ginkgo
lapis ginkgo
final flame
#

yours is more

#

all you need is 1 loop

lavish fulcrum
#

Just let bro do it manually

#

He would have finished 10 hrs ago no joke

#

lol

final flame
#

yeah idk if hes ready for loops yet

lavish fulcrum
#

Ok like 2 hrs ago lol

final flame
#

just go hardcode each permutaion

#

imma go sleep

lavish fulcrum
lavish fulcrum
#

👍👍

lapis ginkgo
lapis ginkgo
lapis ginkgo
#

I KNOW HOW TO USE LOOPS

final flame
#

Says the guy asking what loop-index is

final flame
lapis ginkgo
final flame
#

One core concept for loops.

I really need to finish that list page on syntask

#

Im sleeping now. I will not respond until i wake up

lapis ginkgo
#

wait

#

I have a idea

#

what if I used a function

#

and put paramaters in

#

but I have no idea how to use a function

#

i guess

#

there was never a better way

lapis ginkgo
#

I thought I removed oak planks recipe?

lapis ginkgo
#

I figured it out

#
    remove recipe "minecraft:bucket"
    set {_planks::*} to "oak_planks" and "birch_planks" and "spruce_planks" and "dark_oak_planks" and "jungle_planks" and "acacia_planks" and "mangrove_planks" and "cherry_planks" and "crimson_planks" and "warped_planks"
    loop {_planks::*}:
        remove recipe "minecraft:%loop-value%"
    register shapeless recipe:
        id: "custom:oak_plank"
        result: oak plank
        category: "building"
        ingredients:
            add material choice of oak log or stripped oak log to ingredients``` this doesnt work tho
lapis ginkgo
final flame
lavish fulcrum
final flame
#

Key word being sometimes. When installing addons or editing the config an actual restart is better

polar saddle
polar saddle
# lapis ginkgo no

then there's your issue. you are changing the recipes, but the recipe updates are only sent to a player's client when they join

lapis ginkgo
lapis ginkgo
final flame
lapis ginkgo
# final flame <:send_code:688375650582790339>
    remove recipe "minecraft:bucket"
    set {_planks::*} to "oak_planks" and "birch_planks" and "spruce_planks" and "dark_oak_planks" and "jungle_planks" and "acacia_planks" and "mangrove_planks" and "cherry_planks" and "crimson_planks" and "warped_planks"
    loop {_planks::*}:
        remove recipe "minecraft:%loop-value%"
    register shapeless recipe:
        id: "custom:oak_plank"
        result: oak plank
        category: "building"
        ingredients:
            add material choice of oak log and stripped oak log to ingredients```
final flame
#

Youre only adding one recipe

lapis ginkgo
final flame
#

If you want one for each wood species, it must be in the loop

#

Youre removing them all (in the loop), but then you exit the loop

lapis ginkgo
#

what

#

what?

final flame
#

Your indentation

lapis ginkgo
final flame
#

You have a bunch

lapis ginkgo
#

am trying to make it so then can also use stripped oak log to craft

lapis ginkgo
final flame
#

Which problem do you mena

lapis ginkgo
#

add material choice of oak log and stripped oak log to ingredients

final flame
#

Okay

lapis ginkgo
#

how do I fix it

final flame
#

Love losing data

#

It’s probably a parsing issue. It thinks you mean
(material choice of (oak log)) and (stripped oak log)

  • is basically adding these 2 separate items to the ingredients list; therefore creating a new recipe that requires both a log and a stripped log

You want
(material choice of (oak log and stripped oak log))

  • this clarifies and tells skript its a choice out of 2 items, and its not a choice out of 1 item and then another item afterwards
lapis ginkgo
lapis ginkgo
final flame
#

Yeah, cause you added that recipe in the past

#

Restart the server and the old versions should be gone

lapis ginkgo
#

ok

lapis ginkgo
#

X*IGHT

final flame
#

#

You forgot a part of the line

#

When you have an error like that it means your syntax is wrong

lapis ginkgo
#

ok

lapis ginkgo
final flame
#

Compare it to your old one and figure it out

lapis ginkgo
#

ok

#

oh

#

I see

lapis ginkgo
#
    remove recipe "minecraft:bucket"
    set {_planks::*} to "oak_planks" and "birch_planks" and "spruce_planks" and "dark_oak_planks" and "jungle_planks" and "acacia_planks" and "mangrove_planks" and "cherry_planks" and "crimson_planks" and "warped_planks"
    loop {_planks::*}:
        remove recipe "minecraft:%loop-value%"
    register shapeless recipe:
        id: "custom:oak_plank"
        result: oak plank
        category: "building"
        ingredients:
            add (material choice of (oak log and stripped oak log)) to ingredients```
lavish fulcrum
#

PLEASE DO IT MANUALLY

#

ITS BEEN 2 days

lapis ginkgo
#

ok

lavish fulcrum
#

loops and stuff can be finnicky and tough to deal with

lapis ginkgo
#

e ┬─┬ノ( º _ ºノ)

lapis ginkgo
#

so uh

#

this post as been a waste of time?

lavish fulcrum
#

no 💀

lapis ginkgo
#

but

#

u said I just do it manually

#

and the whole point of the post

#

is to simplify it

lavish fulcrum
#

oh ye ig

#

i mean u learned abt loops

#

and how finnicky they can be

lavish fulcrum
#

sometimes you just dont know what to do even if there is a way

lavish fulcrum
polar saddle
#

there is a way to do it the way you want to, but it will involve a bit of splitting words at certain parts, and parsing things as items and whatnot

lapis ginkgo
#

ok

polar saddle
#

so you could set a list like {_materials::*} to "oak", "dark_oak" and "spruce" (etc.)

lapis ginkgo
#

ok

polar saddle
#

then for the planks, you can loop the list and remove recipe "minecraft:%loop-value%_planks"

lapis ginkgo
#

ok

final flame
#

honestly, if we're using loops, set one list to the plank items
then use minecraft name of loop-value to remove the ID

polar saddle
#

then when you register the new recipes, you can still use the custom id (or just override the minecraft: recipe which is also allowed), and loop the list of materials again: loop {_materials::*}: register shapeless recipe: # I haven't converted my recipes to the new recipe structures yet, so this is new to me id: "custom:%loop_value%_planks" result: ("1 %loop-value% plank" parsed as item) category: "building" ingredients: add material choice of (("%loop-value% log" parsed as item) and ("stripped %loop-value% log" parsed as item)) to ingredients
Have not tested, but something like this might work (for the warped and crimson stems, you might be able to use log instead of stem, not sure)

final flame
#

also possible without parsing, but adds more lists:

#

although you can get the ID from the plank item itself, so you dont need the ID list

#

just chose whichever option you find simplest

lapis ginkgo
#

ok

polar saddle
#

dude..STOP

#

(you're fine, Axoy)

lapis ginkgo
lapis ginkgo
lapis ginkgo
polar saddle
#

1 oak plank, for example

lapis ginkgo
#

so much wood

polar saddle
#

it's a string, so Skript needs to be told it should be an item

lapis ginkgo
#

ok

lapis ginkgo
#

but why do u have ()

polar saddle
#

by overriding minecraft:, I mean registering a recipe using the same namespace and key: minecraft:oak_planks

#

I have the parentheses so the parser doesn't freak out when loading the file

lapis ginkgo
#

oh ok

lapis ginkgo
polar saddle
#

it's two different items

#

otherwise Skript will get confused

lapis ginkgo
#

oh ok

#

ok

#

am testing this set {_materials::*} to "oak" and "birch" and "spruce" and "dark_oak" and "jungle" and "acacia" and "mangrove" and "cherry" and "crimson" and "warped" loop {_materials::*}: register shapeless recipe: id: "custom:%loop_value%_planks" result: ("%loop-value% plank" parsed as item) category: "building" ingredients: add material choice of (((("%loop-value% log" parsed as item) and ("stripped %loop-value% log" parsed as item) and ("%loop-value% wood" parsed as item) and ("stripped %loop-value% wood" parsed as item)))) to ingredients

#
    remove recipe "minecraft:bucket"
    set {_materials::*} to "oak" and "birch" and "spruce" and "dark_oak" and "jungle" and "acacia" and "mangrove" and "cherry" and "crimson" and "warped"
    loop {_materials::*}:
        register shapeless recipe:
            id: "custom:%loop_value%_planks"
            result: ("%loop-value% plank" parsed as item)
            category: "building"
            ingredients:
                add material choice of (((("%loop-value% log" parsed as item) and ("stripped %loop-value% log" parsed as item) and ("%loop-value% wood" parsed as item) and ("stripped %loop-value% wood" parsed as item)))) to ingredients
    register shaped recipe:
        id: "custom:bucket"
        result: bucket
        shape: "   ", "a a", " a "
        category: "equipment"
        ingredients:
            set ingredient of "a" to iron block```
#

@polar saddle it didnt work

alpine seal
#

why did you put so many ()? you can remove two of the outer layer ()

polar saddle
#

yeah, I was worried that might happen. I know it's possible, I just can't rememebr how to at the moment

lapis ginkgo
alpine seal
#

well yeah ik it wouldn’t work, but you make your code less readable by wrapping it in so many parentheses
maybe try itemtype instead of just item

lapis ginkgo
#

ok

#

wait but theres no errors for the other stuff

#

I'll never get this to work 😭

final flame
#

youve been given 3 different options

lapis ginkgo
final flame
#

okay, 4 or 5

lapis ginkgo
lapis ginkgo
final flame
#


Be patient and dont ping people

#

.

I wonder if its possible to just modify the result of the existing recipes without creating new ones; something like

  set recipe result of loop-value to 1 of (recipe result of loop-value)```
lavish fulcrum
#

Or you can do it manually

#

I don’t understand why you won’t just do it manually at this point

#

It’s been going on for so long

lapis ginkgo
#

I kenw it

#

it just errors

final flame
#

Well, I am on mobile

lapis ginkgo
#

ok

final flame
#

Youll need to retype the quotes

lapis ginkgo
#

quotes?

final flame
#

Yes

lapis ginkgo
#

how will that fix anything

#

like "e" quote

lavish fulcrum
#

Just remove the quiues

#

Quotes and put them back

lapis ginkgo
#

u mean the indentation?

final flame
#

Just retype the quotation marks

lavish fulcrum
final flame
#

Because mobile quotes are different

lapis ginkgo
#

oh ok

lavish fulcrum
#

When he says something he means exactly what he says

final flame
#

Look at them, they’re curvy

lavish fulcrum
lapis ginkgo
#
    remove recipe "minecraft:bucket"
    loop (recipes where [input contains "planks"]):
        set recipe result of loop-value to 1 of (recipe result of loop-value)
    register shaped recipe:
        id: "custom:bucket"
        result: bucket
        shape: "   ", "a a", " a "
        category: "equipment"
        ingredients:
            set ingredient of "a" to iron block```
lavish fulcrum
#

Set Variable to loop-value parsed as item type

final flame
#

Nah

#

Broadcast loop-value

#

I wonder if its the ID

lapis ginkgo
#

ok

final flame
#

Maybe recipe result of recipe loop-value

lapis ginkgo
#

its just minecraft:oak_planks

#

and

#

so on

#

for every plank

final flame
#

That is the id…

lapis ginkgo
#

oh

lapis ginkgo
#
    remove recipe "minecraft:bucket"
    loop (recipes where [input contains "planks"]):
        broadcast "%loop-value%"
        set recipe result of recipe loop-value
    register shaped recipe:
        id: "custom:bucket"
        result: bucket
        shape: "   ", "a a", " a "
        category: "equipment"
        ingredients:
            set ingredient of "a" to iron block```
#

it didnt weork

#

errored

final flame
#

Ah, i got the syntax wrong for the result. Have some practice searching the docs

#

Also, why put “skript” in the script name?

  1. Is script, with a “c”
  2. Why do you need a note that it is a script?
final flame
lapis ginkgo
#

oh

final flame
lapis ginkgo
#

idk

final flame
#

Well, what did you look for on the docs

lapis ginkgo
#

no

final flame
#

Not a keyword I would input

#

Do you mean you havent looked at the docs? Do we need to have this conversation again

lapis ginkgo
#

wdym?

#

why do I need to look at the docs

lavish fulcrum
#

To understand syntax and not become so dependent.

lapis ginkgo
#

what am I looking for in the docs?

lavish fulcrum
#

How to do that syntax correctly

final flame
lapis ginkgo
#

oh

#

ok

#
#

I did it

#

x8ight now what

final flame
#

No

#

Not that

lapis ginkgo
#

???

final flame
#

Thats the effect to register a recipe

You want the expression for the result of a recipe

lapis ginkgo
#

how

#

wait nvm

#

so x8ight

#

how od I use set {_result} to result of recipe "my_recipes:some_custom_recipe" to help me

#

x8ight

#

I dont udnerstand

polar saddle
lapis ginkgo
#

ok

final flame
#

i made a little mistake in what I gave you

#

the syntax from the docs will tell you what the mistake is

lapis ginkgo
#

ok

#

omg

#

cap locks

#

is so annoying

#

set recipe result of recipe loop-value to 1

final flame
#

that will set it to a number

final flame
lapis ginkgo
#

OH

#

ogmn cap lco)ckDEIO FZ8UW8SRU98U98E5TR]]\\

#

RDGREWYGG8ERY9UHRET5\\\

lavish fulcrum
#

wow interesting observation

final flame
#

you're familiar with how to set things in skript?

#

set %something% to %value%

#

in this case, the expression is the thing

#

except I added an extra word

final flame
#

okay, figure out which extra word I added an remove it

lapis ginkgo
#

hmmmmmmmmm

#

recipe or

#

x

lapis ginkgo
#

idk

#

which one?

lavish fulcrum
#

Bro which one do u think it is

#

Like it’s not hard

#

It’s common sense

final flame
lapis ginkgo
#

ok

lapis ginkgo
lavish fulcrum
#

Please do it manually

#

Just make a working version of one.. and then make a I just make all the versions for each material your doing

final flame
#

#

Why did you change the whole line

#

I only told you to remove 1 word, not half of it

#

And read that line, it makes no sense

lapis ginkgo
#

I removed 1 word???

final flame
#

no, you remove the last half of the line as well..

lapis ginkgo
#

no

final flame
#

if you didnt remove it, then where'd it go?

#

was it Herobrine?

lapis ginkgo
#

remove what?

lapis ginkgo
lapis ginkgo
#

no'

final flame
#

Cool.

vale charm
#

I read itall and write simple code, u can check if it works:

on load:
    set {_list::*} to "oak_planks", "birch_planks", "spruce_planks", "dark_oak_planks", "jungle_planks", "acacia_planks", "mangrove_planks", "cherry_planks", "bamboo_planks", "crimson_planks" and "warped_planks"
    loop {_list::*}:
        set {_x} to "%loop-value%"
        replace all "_" with " " in {_x}
        replace all " planks" with "" in {_x}
        set {_x} to "%{_x}% log"
        set {_ingredient} to {_x} parsed as item
        set {_x} to "%{_x}% plank"
        set {_result} to {_x} parsed as item
        remove recipe "minecraft:" + loop-value # uses 2.9 syntax
        register shapeless recipe:
            id: "custom:%loop-value%"
            result: 1 of {_result}
            group: "custom planks"
            category: "blocks"
            ingredients:
                add {_ingredient} to ingredients
#

Btw u can update server recipes like that:
update server recipes

honest gorgeBOT
#

mugu suggests that you read this embed @vale charm

Spoonfeeding
What is spoonfeeding?

When a person trying to help someone sends the entire code/solution the other person needs without letting them figure it out and learn it themselves it is considered spoonfeeding.

Why is this a bad thing?

This becomes an issue because the person seeking help does not learn anything. When they are handed the code it is just a simple copy and paste to fix their issue rather than applying and gaining knowledge so that they can fix the issue on their own. This also develops a reliance on getting code from others leading to them wanting and needing to get spoonfed again

What can I do instead?

It is better to suggest ideas and make a plan on how to solve their issue, helping them walk through the process of fixing their code. This can involve sending link to relevant documentation or suggestion syntax