#there

1 messages · Page 1 of 1 (latest)

shell charm
#

.

left remnant
#

So @woven mantle. I've actually created something like that before, there is no way you can check the block when it's landed.

#

You can debug the EntityChangeBlockEvent, when it's landed it's not a falling block anymore.

woven mantle
#

isOnGround? I remember debugging it before and it returned once it landed but for some reason i can't get back to that point

#

Might just use a different way off spawning falling block

left remnant
#

I lost my airdrop plugin code.

woven mantle
#

yeah thats exactly what im after

#

damn

left remnant
#

I kinda forgot how I did that xd.

#

From my understanding, once FallingBlock lands, it doesn't become an Entity anymore.

#

It's actually become a Block ig.

woven mantle
#

Yeahh I think i may have figured it out

left remnant
#

Let me know how you did that xd.

woven mantle
#

That broadcasted when it landed

#

So how do i change it to an itemstack now?

left remnant
#

You can't

#

But, you can put pdc on the Entity when you spawn the falling block.

woven mantle
#

then what though?

#

i added it to a arraylist

#

to check for it not pdc, can use pdc though

left remnant
#

When it landed, replace it with chest containing the items you want.

#

Check for the pdc.

woven mantle
#

how do i replace it though

left remnant
#

You can set a block in a location.

woven mantle
#

so i need to set this entity to air? then spawn a block at its location

left remnant
#

Just set it directly, you don't need to set it to air.

woven mantle
#

What does blockstate do?

#

I'm making it so you right or left click it, it then turns to air and items pop out so just need to change it to a chest, testing it now

#

how do i use block data so i can refer back to this chest that lands as i need to check for it in an event

left remnant
woven mantle
#

Okay cool one more question, in the params it asks for block, how do i call this specific block? i'm using event.getblock.settype(Material.Chest)

left remnant
#

What do you mean?

woven mantle
#

It's asking for a block as the first args

left remnant
#

It's event.getBlock.

woven mantle
#

ahh so now that variable is set to this current block that's been set in this event

#

so every time it's called thats the way to check for it

left remnant
#

So basically, when the block landed, set chest at location and put pdc on the block, and then you listen to PlayerInteractEvent, check for the pdc. If the pdc is valid, set the block to AIR and drop the items.

woven mantle
#

yeah sound, so i do it like a normal pdc check?

left remnant
woven mantle
#

Still doesn't change when it lands :/

left remnant
woven mantle
#

0_o

left remnant
#

Yeah, you need to shade the libs.

woven mantle
#

How do you do that? i saw that but my maven got no config section?

left remnant
#

Try to look up on spigot forums how to shade a libs.

woven mantle
#

kk

left remnant
#

It's almost midnight on my time so I think I'm gonna be off soon.

woven mantle
#

kk no probs

#

whats the deal with the big file??

left remnant
#

Custom Block Data shouldn't add that much size.

woven mantle
#

Nope none

left remnant
#

Give me your pom

woven mantle
left remnant
#

You do have other libs.

#

You have lombok.

#

Also fix this configuration <shadedPattern>your.package.name.CustomBlockData</shadedPattern>

woven mantle
#

ok fixed

#

I'll remove lombok i dont even use it

left remnant
#

Okay, the file should be much smaller now.

woven mantle
#

also for the block landing, it sends broadcast but doesn't change

left remnant
#

Maybe try event.getEntity().getLocation().getBlock().setType(Material.CHEST)

woven mantle
#

nope still nothing how weird

#

I had this issue before

left remnant
#

Maybe you need to do it in the next tick.

#

Using scheduler.