#dropping things in one spot = crafts new item

1 messages · Page 1 of 1 (latest)

spark sundial
#

i tried to do something yk but its not rlly working out the best, any directions?

swift tulip
#

Well, first sent what youve tried and we can go from there

spark sundial
#

im pretty sure that it will take longer but sure

#
  if event-item is a golden apple:
    wait 1 second
    set {_loc} to location of dropped item
    broadcast {_loc}
    loop all entities in radius 5 of {_loc}:
      if loop-value is golden apple:
        add 1 to {_ingrediants}
        if {_ingrediants} is 2:
          drop enchanted golden apple at {_loc}
          loop 2 times:
            loop entities in radius 5 of {_loc}:
              kill loop-value-1
          exit```
#

its basically making 2 golden apples into one enchanted golden apple

swift tulip
#

Well,

  1. Its “ingredients”, “e” and not “a”
  2. You loop a second time, even though its the exact same as your first loop, but then you kill loop-value-1 instead of 2. But just kill it in the first loop
  3. I think the items will merge, and so it will actually be 2 of golden apple, so that condition will fail and your {_ingredients} will be 1.
  4. Radius of 5 blocks is quite large imo
  5. Since the item types are the same, you could use on item merge
spark sundial
#

english is my second language u cant judge me

#

imma try it one sec

#

wait how do i check how many items are in the stack that i merged

#

and then loop between those too to delete them

swift tulip
#

Item amount could work

spark sundial
#

how do i use item amount

swift tulip
#

readthedocs item amount of %item%

spark sundial
#

i literally am reading the docs ;-;

#

is this not how it works

swift tulip
#

If it doesnt work then i guess not

#

Are there any errors?

spark sundial
#

cant understand statement

swift tulip
#

Yup

spark sundial
#

what now

swift tulip
#

Because thats not the syntax

#

You can also look at the first example

spark sundial
#

yeah thats what i did no?

#

i referred to the itemstack by event-itemstack

swift tulip
spark sundial
#

no it still fires

#

without the if statement

#

perfectly

#

i changed it now and it still gives the same error

swift tulip
#

Well, then debug and broadcast the event item stack and the item amount of it

spark sundial
#

if i could get the amount of it i would

swift tulip
#

Well the broadcast the item stack

spark sundial
#

yeah so i just tried that and it apperantly it just doesnt recognize the term event-itemstack

#

maybe its outdated skript or smthing

#

prob cuz spigot

swift tulip
#

Or maybe use the future one

#

Itemstack may just be for items, itementity may be for dropped ones

#

Cause those are entities

spark sundial
#

i just tried some of the examples and really only event-entity worked and it returns dropped golden apple

#

i tried to get the amount of it but it says it can only have one value

swift tulip
#

Honestly just broadcast them all then lol

spark sundial
#

sure lmao

#

yeah most of them are just errors

#

but if u care apperantly event-entity are event-item are the same except one is dropped golden apple and the other is just golden apple

swift tulip
#

Then check the item amount of both of those

spark sundial
#

nope

#

same error with both

swift tulip
#

item amount of

#

Not just amount of

spark sundial
#

ok so

#

it kinda works but needs a little polishing

#

it seems to kinda skip one

swift tulip
#

Can you send the code thats doing that?

spark sundial
#

happens more if u drop faster

swift tulip
#

Broadcast the event item, wait a tick and try again

#

Maybe the event is called just before it merges

spark sundial
#

so just add wait 1 tick?

spark sundial
#

one of the most broken things ive made cuz if you drop more than 2 it takes all of it but here u go