#Packet blocks?

1 messages · Page 1 of 1 (latest)

obtuse yew
#

Is it possible to use skript to create packet blocks? Like I heard of packet furniture. I have a plugin that utilizes item displays to display a model and puts a barrier block around it, regenerating it after its mined etc, If it is possible can someone give me a small nudge in the right direction?

#

Ping when responding plz

wanton wolf
obtuse yew
#

I am unsure, I know in the past I talked with the HMC people about how they do they're furniture and they said they utilize packets to create they're furniture in a custom plugin they made. Technicall the blocks would be visible to all players, and if one is mined it disappears for all players too.

wanton wolf
#

So it's just a custom texture pack?

obtuse yew
#

I can make the texture pack, like I have a plugin that utilizes display entities to display the custom textures and such.

#

I just want to do packets to make it more server performance

#

better server performance

wanton wolf
#

I don't understand how packets solve anything. If you have a block with custom model data, it is the client (the player's game) that renders it. The block is the same for the server

#

What do you want packets to do?

obtuse yew
#

So how it works rn with a resourcepack I remodel an item to this

#

with the plugin I throw that item into a item display

#

throw a barrier block over it

#

and boom you have a custom modeled ore without removing any vanilla blocks

#

But With alot of them it "could" cause perfomance issues, which is why I have been told that utilizing packets would be the best for server performance

wanton wolf
#

Oh I see, instead of just placing item displays, you want to send packets to all players so that they see it, but it's not placed for the server?

obtuse yew
#

Yes, but its still mineable etc

wanton wolf
#

Well, you're in for a lot of trouble

#

Just let the server do it on its own

#

You're trying to optimize the wrong thing, I think

#

Is it the item display that is mined or just the barrier blocks?

obtuse yew
#

So its a barrier block mined, which then turns into the mined version of the ore, then it reverts back to the old version to simulat regening ore

#

basically when barrier is mined, it changes the custom model data number

#

starts timer for regen time

wanton wolf
#

Oh, then it changes just for the player

#

So it is client sided

obtuse yew
#

No its server wide

wanton wolf
#

Oh okay

obtuse yew
#

like if i go mine it and player 2 is next to me it will change for them too

wanton wolf
#

Okay, so there's not really a need to send packets. I'm still learning to send custom packets, and that's not really an easy thing to do, especially with item displays. I've got no clue how to do it, but it probably starts by player.getHandle().b.a(your packet) to send a packet, and then find the right packet for item displays with all the right arguments filled for it. There's NMS wiki here https://nms.screamingsandals.org/1.20.4/ and all the Minecraft packets here Https://wiki.vg/Protocol (not really sure for the code, it's like that if I remember right)

#

I need to sleep now :X sorry I can't help much

autumn kite