#Some questions about

1 messages ยท Page 1 of 1 (latest)

candid tusk
#
  • Does PrepareSmithingEvent keeps triggering every few ticks in a similar manner than PrepareAnvilEvent ?

  • Also, is there a way to allow to put anything in smithing table slots ?
    I thought, maybe try to setCancelled(false) in InventoryClickEvent with the highest priority for when its the smithing table
    But I'm not entirely sure, I could test but if someone knows the answer, or has a strong feeling, it would be very handy for me to know and would give me courage to actually test this

green vigil
#

I assume you're on an older version than 1.20

candid tusk
#

1.20.1 iirc

green vigil
#

1.20.1 is newer than 1.20

candid tusk
#

yeah

#

my bad

#

yeah i'm in 1.20.1

green vigil
#

Do you mean the first slot of the smithing table?

candid tusk
#

wait hold on!!!
my server is 1.20.1 but my plugin 1.20 sorry

green vigil
#

That's fine

candid tusk
green vigil
#

2 slots should already be fine

candid tusk
#

nop

#

i can't put what i want in the trim pattern slot

green vigil
#

Yeah that I know

candid tusk
#

nor in the trim material slot

green vigil
#

Have you registered your smithing recipe?

candid tusk
#

nah i don't really wanna make a recipe

#

what i'm currently doing rn is the following:
first slot of anvil = armor
second slot of anvil = book/writtable book containing information on how to modify my armor
result slot = the modified armor which dynamically updates based on whats in the book

#

i think it would make more sense if it was the smithing table rather than the anvil (as it's armour related)

green vigil
#

Try registering a recipe

#

You can then modify the result in the prepare event

candid tusk
#

oki

candid tusk
green vigil
#

I don't think so

candid tusk
#

alr, ty ๐Ÿ™‚

#

oh @green vigil i have another idea, tell me what you think of it:

  • take an existing trim pattern item
  • when players click with it in main/off hand (in whatever direction), it will open a writable book UI. what they write in that book will be saved in the PersistentData/nbt of the trim pattern item
  • i guess that armor + that trim should be able to go through the smithing table (then set the result in the preparesmithingevent based on nbt of the trim pattern), it also looks cooler to be a trim pattern texture than a book texture ๐Ÿ˜›
green vigil
#

Yeah you can do that

#

I was thinking the same thing earlier

candid tusk
#

nice ๐Ÿ™‚
is there a way to do smth like
waitForFirst(PlayerEditBookEvent, (PlayerEditBookEvent event) -> {stuf here that returns a boolean wether we keep waiting or not}, (PlayerEditBookEvent event) -> {callback that triggers when conditions are met})
which would ofc run async

#

or should i make an event listener for each & some variables to keep the state of each sessions