#help-development

1 messages · Page 1142 of 1

vagrant stratus
#

Nah, I haven't signed the CLA

remote swallow
#

sign it

vagrant stratus
#

and still need thoughts before wasting time even if I did want to sign it KEK

remote swallow
#

md will come and visit you on his kangaroo

remote swallow
blazing ocean
remote swallow
blazing ocean
#

i'm not selling out my firstborn to daddy md5

eternal oxide
#

I signed it a while back and no one has come calling for my kidneys yet

remote swallow
#

The Elgarl the 1st

#

real name for sure

vagrant stratus
remote swallow
#

you can call hima nerd more

vagrant stratus
#

Not really that interesting

remote swallow
#

but inventory prs

vagrant stratus
#

Yea, not interesting in the slightest to me

#

This though, would clean up some NMS code & make a particle related method public

blazing ocean
#

miles prs suck, says spigotmc staff (2024, colourised)

torn shuttle
#

ignore the partially busted stuff

#

bad schematic saves

#

but it's starting to take shape

eternal oxide
#

not using structures?

vagrant stratus
#

It's quite likely I'll just end up maintaining it without it being public in the slightest in the spigot API lmao @remote swallow

torn shuttle
#

building it for a plugin that was already using worledit so I already have a whole pipeline for secondary systems in it

eternal oxide
#

ah

torn shuttle
#

got a builder working on this right now hoping to have some relaly neat stuff by the end of the day

river oracle
river oracle
#

My first decree as spigotmc inventory shill is to use InventoryView!!!

#

The git tree is getting annoying right now

#

I hate having so many entries

#

welp time to add one more

vagrant stratus
# remote swallow smh

Well, I'm not gonna waste time if I don't get any thoughts on it lmfao
I already have a spigot only impl so 🤷‍♀️

river oracle
#

what we talking about here

remote swallow
#

make feature requests on jira and maybe coll y2k or the chocolate will pr them

river oracle
#

yeah yeah what are we talking about PRing though

remote swallow
#

tyhis

#

its a lot of text

blazing ocean
#

i just saw a rat in an underground shaft

remote swallow
#

damn cant believe miles is with you

vagrant stratus
remote swallow
#

nah

#

sometimes

ocean hollow
eternal oxide
#

BoundingBox#getCenter()

ocean hollow
#

nonono thats like screen

#

i need to get cursor

vagrant stratus
pseudo hazel
#

like a raycast?

ocean hollow
#

yes

#

but on screen

river oracle
#

I don't really see too much utility in adding such an API, I coul dbe wrong but I'm not sure if it'd be accepted. One this could be easily replicated with just the API all the methods seem to really do is apply some particles around the entity and apply some basic math to it. You could maybe make an argument for exposing getRandom[X,Y,Z] to allow yourself to use the players random, but then again you could just instanciate random yourself

pseudo hazel
#

wdym on screen

#

do you want a 2d position or 3d

ocean hollow
#

a rectangle with two corners

slender elbow
#

that's called a line run

pseudo hazel
#

whats the goal

river oracle
#

are you asking to get the coordinates on the persons physical screen?

#

that wouldn't be possible

eternal oxide
#

I've no cluew what he wants, an intersection of teh raycast I guess

river oracle
#

I mean you could assume 1920x1080 but that's such a naive assumption

vagrant stratus
pseudo hazel
#

why do you need those coordinates

river oracle
ocean hollow
river oracle
#

I think it might be reasonable to ping choco and coll with the proposal

vagrant stratus
#

gonna ping choco cause he's a nerd KEK

pseudo hazel
#

what is a screen system

vagrant stratus
#

@worldly ingot @young knoll

THOUGHTS

pseudo hazel
ocean hollow
# pseudo hazel what is a screen system

Just imagine how a player walks, and there is a conditionally screen (that is, TextDisplay), a player cursor that acts like a projection of a vector onto this “screen”/fictitious rectangle

eternal oxide
#

put an Interaction entity on any clickable areas

worldly ingot
#

It's probably too general to be considered API. "addParticlesAroundSelf()" would vary in definition from entity to entity, and in some cases just fail silently. For some entities it might show love mode particles, and for some it might show taming particles, but how do you make that distinction from an Entity? So it's not great API.

slender elbow
#

interface Particlable

worldly ingot
ocean hollow
slender elbow
#

or ParticleAroundSelfable

worldly ingot
#

AbleToSpawnParticlesAroundSelfButEachEntityHasItsOwnDefinitionSoGoodLuckIdiot

vagrant stratus
#

I can look to see what deviates from the above

chrome beacon
eternal oxide
#

There are two ways to interact. a clickable entity when the player looks at it and clicks, or in a UI IF they click on a slot

rough drift
chrome beacon
worldly ingot
#

The silent failing is less what I'm concerned about because whatever, more that you can't really determine what that method does

slender elbow
#

hasAddParticlesAroundSelf()? or is?

vagrant stratus
#

Don't need has

rough drift
#

fyi

vagrant stratus
#

It just spawns particles lol

ocean hollow
slender elbow
#

is it is

ocean hollow
#

like hologram

vagrant stratus
worldly ingot
#

It'd be like Entity#dance() but only Villagers, Allays, and Wolfs could dance, and you're not really sure what dance move they'd do

pseudo hazel
#

if the screen is following the player how can they ever click on something

chrome beacon
slender elbow
#

and piglins, choco

worldly ingot
#

Right, Pigstep, how could I forget

rough drift
slender elbow
#

smh

vagrant stratus
rough drift
#

is it worth the extra maintaining?

chrome beacon
#

Well I guess you could have a static screen in the world

worldly ingot
#

Mojang didn't make any bad decisions. We'd be imposing bad decisions by introducing a common interface

rough drift
#

Or would it be better to just have a javadoc?

pseudo hazel
#

what about parrots

chrome beacon
#

Anyways it's the same math

pseudo hazel
#

they can dance too

worldly ingot
#

I DON'T CARE ABOUT THE DANCING KEKW

remote swallow
#

why not

pseudo hazel
#

tsk

remote swallow
#

do you not want to dance choco

ocean hollow
chrome beacon
#

You use trig to calculate the where the cursor should be

pseudo hazel
#

know what your users care about

remote swallow
#

can we implement piglin dancing on players

worldly ingot
#

From what I understand, Optic says entities have methods that spawn particles around them with no abstraction to it whatsoever. He's proposing adding an interface that those NMS entities can implement so they are commoned out, then adding a method to Bukkit's Entity class to call it

#

Which imo is not correct

pseudo hazel
#

doesnt make sense for most entities

worldly ingot
#

Mojang's decision to not have that commoned out is correct

pseudo hazel
#

also what would it even do for villagers

worldly ingot
#

Because it varies from entity to entity

rough drift
#

well, what if you just made it it's own interface and don't add it on entity

pseudo hazel
#

villagers have like a billion types of particles

worldly ingot
#

Not even just particle type, but particle data and velocity

rough drift
#

so some entities implement ICanHabeParticles

worldly ingot
#

The issue is that the NMS entities don't have a common interface for it

pseudo hazel
#

IParticleable

worldly ingot
#

You'd have to add one

chrome beacon
# ocean hollow why?

Err what I mean is the cursor has little point if the player can move freely. The player already has their crosshair

vagrant stratus
worldly ingot
#

I just don't feel confident that it would be good API. It's too loosely defined. I'm sure md would probably agree

#

You can try if you want though

vagrant stratus
#

Particle Type, Y offset, amount

                double d0 = this.random.nextGaussian() * 0.02D;
                double d1 = this.random.nextGaussian() * 0.02D;
                double d2 = this.random.nextGaussian() * 0.02D;

what ever the fuck 0.02D represents here

worldly ingot
#

I recently opted against adding Entity#setPhysics(false) because it too varies from entity to entity and is too loose

pseudo hazel
#

but is the particle thing only in nms then now?

worldly ingot
#

0.02 is probably offset on the x/y/z axis

pseudo hazel
#

like is there no api whatsoever

worldly ingot
#

between -0.02 and 0.02

pseudo hazel
#

or is there just no common api

worldly ingot
#

There's no common API in NMS, there's no common API in Bukkit

vagrant stratus
worldly ingot
#

There are methods to spawn particles around entities on a need-be basis defined locally

#

e.g. a dog would have its own method to spawn particles when tamed

vagrant stratus
#

Each of the classes I've listed do the exact same thing with slight deviations, which can be shoved into a common method with a few params

pseudo hazel
#

right

worldly ingot
ocean hollow
pseudo hazel
#

sounds like the dev can make their own common api then

vagrant stratus
vagrant stratus
worldly ingot
#

There are effects for probably most of those btw

#

Taming for instance has EntityEffect#WOLF_SMOKE and #WOLF_HEARTS

#

The names are a bit dated, but they apply to all tameable entities

vagrant stratus
#

They've got it setup to be a single method, but the nerds haven't done so

worldly ingot
#

There are also villager entity effects

#

I think all of what you want to achieve is already done with entity effects

vagrant stratus
#

EntityAnimal. EntityDolphin, for example

worldly ingot
#

Yes, those are entity effects lol

vagrant stratus
worldly ingot
#

Yes. They have been

#

Entity effects

#

You are looking at the entity effect packet implementations

vagrant stratus
#

Yes, for specific entities

worldly ingot
#

Right. How would you be more specific about it?

#

You don't need to know the details of the particles. You can just dispatch the entity event (effect)

vagrant stratus
#

note genericization. allows devs to impl their own stuff

worldly ingot
#

I just want you to be aware that what you sent are client-sided methods

#

They're never called on the server

#

The first screenshot is EntityEffect.LOVE_HEARTS and the second EntityEffect.DOLPHIN_FED

#

What you're looking for is Entity#playEffect(EntityEffect). So if you want to play the breeding particles around an entity, you would do entityBeingBread.playEffect(EntityEffect.LOVE_HEARTS);

#

Oh, not entityBeingBread

#

lol

#

🍞

sly topaz
#

I mean, it would be nice if Entity had a method to get its Entity-specific effect/particle

worldly ingot
#

No one entity has one specific entity effect

vagrant stratus
sly topaz
worldly ingot
#

Villagers also have effects for when a raid is won, when in love, and when angry

#

Each spawn particles around the entity, and each have an EntityEffect constant for it :)

sly topaz
#

ig it would be a pain to maintain

candid galleon
#

doesn’t make much sense to tie effects to a given entity

worldly ingot
#

I do wonder if we're up to date on those though. We tend to leave them out of date all the time

#

Nope, we're up to date. Nice

vagrant stratus
worldly ingot
#

Like I said, they're client-sided methods, there is existing API for it, it's done via EntityEffects because that's what you're wanting to use

#

You don't have to reimplement the particles yourself

#

You just have to know which EntityEffect to send :p

vagrant stratus
#

Doesn't allow you to do stuff outside of EntityEffects though, which a generic method would let you do

worldly ingot
#

Yeah but then you're defining API for things that don't exist in the vanilla server

sly topaz
#

I mean, that doesn't really matter, does it

worldly ingot
#

Sure it does

sly topaz
#

there's plenty of API that doesn't exist in the vanilla server

worldly ingot
#

I don't know of any

sly topaz
#

showEntity/hideEntity is entirely a Spigot concept

worldly ingot
#

It just sends the add/remove packets

echo basalt
#

health scaling?

worldly ingot
#

Health scaling exists in vanilla

sly topaz
#

health scaling does exist

echo basalt
#

events

worldly ingot
#

Events are just hooks for plugins :p

#

You'd be able to do the same thing with mixins

sly topaz
worldly ingot
#

Or editing server source directly

sly topaz
#

I just don't see why draw the line here to be honest, aside from maintainability

worldly ingot
#

I mean regardless, we're not adding API for client-sided methods

#

I already did that once for creative categories and now we have dead API

candid galleon
#

were creative categories deprecated?

worldly ingot
#

(they were server-sided at the time, but got moved to client-sided later :p different situation)

candid galleon
#

o

worldly ingot
#

In Bukkit, yes

sly topaz
#

I mean, creative categories are one thing, but this kind of method wouldn't matter if it ever gets removed since it is just the concept of adding particles around an entity

#

then again, I don't see too many people requesting such a feature so it is eh

worldly ingot
#

Yeah, and the reason those methods exist is because they're handling entity effects!

vagrant stratus
remote swallow
#

coll prd that

sly topaz
#

there is a method to show demo screen tho

remote swallow
#

iirc

vagrant stratus
#

it was previously done with NMS or protocollib

worldly ingot
#

That's generally how things work

#

We need to be aware of something before we add API for it lol

sly topaz
#

a valid one would be NPCs or entity disguises in general

#

or the damned armor change event

worldly ingot
#

NPCs, nobody's proposed it. I've consider proposing a player disguise API (still wanting to draft one), and the armour change event is stuckin PR purgatory atm lol

#

Author got busy

vagrant stratus
sly topaz
#

I mean, it is a simple method so just maybe if you PR it, somebody will argue against Choco around the idea teef

worldly ingot
#

What I think you're failing to understand is that those particle methods exists in response to the entity effect/event methods. They could have just as easily implemented it in the handleEntityEvent() methods (like they did with the villager), but they moved it out into separate methods for some entities for the sake of readability.

#

Some entity effects are being handled but they don't show particles. They have sounds instead

#

But we shouldn't have methods that expose getSoundFromEffect()

#

Those too would be client-sided

sly topaz
#

I wonder what an API to expose that kind of stuff would look like

#

in a way that it doesn't matter if it doesn't exist anymore in the future

vagrant stratus
#

If anything just re-create the method in API w/o touching the NMS method directly

worldly ingot
#

The API you're wanting to propose would, in effect, just be invoking the handle event methods but on the server

#

Which isn't correct

vagrant stratus
worldly ingot
#

And no, we're not going to reimplement or copy/paste the client implementations of those methods because that's a maintenance burden lol

sly topaz
#

tbf, I kind of see the point here after looking at launchProjectile implementation

vagrant stratus
#
    private void addParticlesAroundSelf(ParticleParam particleparam) {
        for (int i = 0; i < 7; ++i) {
            double d0 = this.random.nextGaussian() * 0.01D;
            double d1 = this.random.nextGaussian() * 0.01D;
            double d2 = this.random.nextGaussian() * 0.01D;

            this.level().addParticle(particleparam, this.getRandomX(1.0D), this.getRandomY() + 0.2D, this.getRandomZ(1.0D), d0, d1, d2);
        }

    }

The method would basiclly just be this, but bukkit friendly and more configurable

sly topaz
#

it just turned into a monster with the time

worldly ingot
#

But at that point plugins can just reimplement it. Having utility methods like that isn't Bukkit's responsibility

vagrant stratus
#

Which I yoinked from EntityDolphin btw, but every other damn instance just copy-pastes the method code and changes 2 things lmao

vagrant stratus
sly topaz
vagrant stratus
#

Why reimplement when it's already a thing

worldly ingot
#

Because it's client-sided cryign

#

In response to a packet that has existing API

vagrant stratus
#

this.level().addParticle unless this happens to be client-side, which I wouldn't be surprised

#

but that's the same way Chorus fruit handles it

sly topaz
#

I mean, while I agree it wouldn't hurt to have the method, I also see the point of maintainability being a burden that just nobody wants to deal with

#

sure it looks simple now, but if it is added as a general method in Entity, then every single entity where their hitbox is something special would have to override it

worldly ingot
#

Hilariously enough, chorus fruit is also in response to an effect

#

Only it's a world effect, not an entity effect lol

vagrant stratus
#

Oh wait, I was thinking of randomTeleport for that one lmao

worldly ingot
#

Random teleportation would be server-sided, yes

vagrant stratus
#

PR KEK

worldly ingot
#

I feel like there already is API for that? Maybe I'm wrong

vagrant stratus
#

No

worldly ingot
#

but yeah it would be an API candidate because it's well-defined behaviour

vagrant stratus
#

teleport(Entity), teleport(Location), teleport(Entity, TeleportCause), teleport(Location, TeleportCause),

worldly ingot
#

Well, I dunno, maybe. Because chorus fruit's teleportation behaviour is now a component lol

vagrant stratus
#

No randomTeleport or teleportRandom

vagrant stratus
worldly ingot
#

There would probably have to be a Player#consume(ItemStack) or something now

sly topaz
vagrant stratus
#

Nah

worldly ingot
#

Oh I mean if there's just a randomTeleport() method then that's fine

#

Easier

vagrant stratus
#
    public static boolean randomTeleport(int retries, Player player, boolean showTeleportParticles) {
        Random random = new Random();
        World world = player.getLocation().getWorld();
        CraftPlayer craftPlayer = (CraftPlayer) player;
        for (int i = 0; i < retries; ++i) {
            // TODO: Make this configurable. Need to figure out what the values are exactly
            double x = player.getLocation().getX() + (random.nextDouble() - 0.5D) * 16.0D;
            double y = Math.max(world.getMinHeight(), Math.min(player.getLocation().getY() + (random.nextInt(16) - 8), world.getMaxHeight() - 1));
            double z = player.getLocation().getZ() + (random.nextDouble() - 0.5D) * 16.0D;
            boolean succeeded = craftPlayer.getHandle().randomTeleport(x, y, z, showTeleportParticles);
            if (succeeded) {
                return true;
            }
        }
        return false;
    }

This is a spigot-ish impl of the same randomTeleport

#

Just yoink that choco lmao

worldly ingot
#

Oh, yeah, if that randomTeleport() method is on Entity or something it can have API for it easy

vagrant stratus
#

Do it

#

PR it

worldly ingot
#

idk where it's defined. Probably Entity or EntityLiving

vagrant stratus
#

I can look lmao

rough drift
#

@fair rock

#

I tried to make it as fast as I could lol

sly topaz
#

tbh I'm fine with it not being API lol, I've seen enough people causing lag-machine plugins with random tp

worldly ingot
#

It's EntityLiving and we have a patch there already

rough drift
#

oh the video is corrupted

#

great

vagrant stratus
sly topaz
#

eh, those things sound kind of extra

#

why would it have to retry even

vagrant stratus
#

That's why enderman & chorus fruit loop it, so there's a guaranteed teleport

#

You may/may not want the particles, so you add a toggle

sly topaz
#

does it fail if it is not a valid block or what

vagrant stratus
#

It can return false for a few reasons

sly topaz
#

well, that's the internal method so ¯_(ツ)_/¯

vagrant stratus
#

we'd be calling the internal method, just putting something bukkit friendly on top 😎

worldly ingot
#

Yeah, that one at least has justification for API

#

LivingEntity#teleportRandomly() is probably fine, with some parameters in there

vagrant stratus
worldly ingot
#

Probably a TeleportCause

#

Well, no, we'd just call the internal method PES_BlushGiggle

sly topaz
#

inb4 it gets removed next version

#

chorus fruit ceases to exist

#

the Choco curse

vagrant stratus
#

Eh, not point in directly calling it as there's useful toggles like the particles and retry count

#

also EntityLiving#randomTeleport requires the particle flag, so get rekt @worldly ingot

#

takes an x, y, z, flag

worldly ingot
#

I mean that's fine. It could accept a boolean lol

#

x/y/z is probably range

vagrant stratus
vagrant stratus
sly topaz
#

that's probably why yarn just calls it teleport

#

safeTeleport is probably a better name

vagrant stratus
#

gimme api @worldly ingot

worldly ingot
#

the second double looks like a starting y position, the other two doubles look like a target x/z

#

So, randomTeleport(targetX, startingY, targetZ)

#

It will start searching at the given y value at the column at x/z, then go down until it finds a block

#

If that position is obstructed, it will teleport to self (so, do nothing)

vagrant stratus
#

Guess you could get two api methods out of it.

Just one called safeTeleport and then randomTeleport which implements the randomization which Chrous Fruit & Enderman use

#

safeTeleport(x,y,z,flag) randomTeleport(retries, flag)

#

Flag, again, being a boolean that decides if the particles you get when you use a chorus fruit or when an enderman show or not

vagrant stratus
#
double x = player.getLocation().getX() + (random.nextDouble() - 0.5D) * 16.0D;
double y = Math.max(world.getMinHeight(), Math.min(player.getLocation().getY() + (random.nextInt(16) - 8), world.getMaxHeight() - 1));
double z = player.getLocation().getZ() + (random.nextDouble() - 0.5D) * 16.0D;

I assume this is a range (16x16) @worldly ingot but I'm not sure on what the 0.5D & (random.nextInt(16) - 8) are meant for though.

torn shuttle
#

progress

#

I somehow messed up the rollback logic though, it really doesn't like rerolling floor level stuff somehow

#

kinda weird

rough drift
vagrant stratus
#
            if (flag) {
                world.broadcastEntityEvent(this, (byte) 46);
            }

All the flag does is show particles via an entity event if true, otherwise it doesn't

rough drift
vagrant stratus
#

what exactly would be future proofed lmao

rough drift
vagrant stratus
#

As it stands, no point in trying to future proof when we don't even know what that case would look like

#

for now supporting what exists is good enough
x,y,z range and the particle flag

#

Returns a boolean, so one can always pass false & do their own particles. I believe Enderman uses the boolean value for their sounds

#

yea

            boolean flag2 = this.randomTeleport(d0, d1, d2, true);

            if (flag2) {
                this.level().gameEvent((Holder) GameEvent.TELEPORT, vec3d, GameEvent.a.of((Entity) this));
                if (!this.isSilent()) {
                    this.level().playSound((EntityHuman) null, this.xo, this.yo, this.zo, SoundEffects.ENDERMAN_TELEPORT, this.getSoundSource(), 1.0F, 1.0F);
                    this.playSound(SoundEffects.ENDERMAN_TELEPORT, 1.0F, 1.0F);
                }
            }
worldly ingot
vagrant stratus
#

but for now, devs can just rely on the boolean value

glossy laurel
#

How do I make a person execute a proxy command

worldly ingot
#

performCommand() will work just fine

worldly ingot
#

Looks like it's just adding anywhere from -8 to 8

#

No clue why it's written that way, but it is

vagrant stratus
#

Ah, realistically I guess only the x,z range matters as a param since it's range

worldly ingot
#

player.getLocation().getX() + ThreadLocalRandom.curent().nextInt(-8, 9) would be equivalent

vagrant stratus
#

boolean safeTeleport(x, z, flag) & boolean randomTeleport(int retries, xRange, zRange, flag)

#

I guess?

worldly ingot
#

The x/z aren't ranges, they're target x/z positions

#

The "randomness" of the teleporation isn't really random, which is weird lol

#

It's more like teleportHighest(x, z)

vagrant stratus
#

The randomness comes from the uses of randomTeleport, e.g. chorus fruit has

                double d0 = entityliving.getX() + (entityliving.getRandom().nextDouble() - 0.5D) * 16.0D;
                double d1 = MathHelper.clamp(entityliving.getY() + (double) (entityliving.getRandom().nextInt(16) - 8), (double) world.getMinBuildHeight(), (double) (world.getMinBuildHeight() + ((WorldServer) world).getLogicalHeight() - 1));
                double d2 = entityliving.getZ() + (entityliving.getRandom().nextDouble() - 0.5D) * 16.0D;

                if (entityliving.isPassenger()) {
                    entityliving.stopRiding();
                }

                Vec3D vec3d = entityliving.position();

                if (entityliving.randomTeleport(d0, d1, d2, true)) {

See d0, d1, d2

Bukkit's randomTeleport just takes into account the actual randomness, safeTeleport just calls randomTeleport directly

#

EntityEnderman does something similar with its teleport and teleportTowards(Entity) methods, both of which calls teleport(double x, double y, double z), which in turn calls randomTeleport

#

So the bukkit api would have a correctly named safeTeleport(location, flag) and a proper randomTeleport method, which takes into account randomness like ItemChorusFruit & EntityEnderman

#

LivingEntity#randomTeleport is better named as safeTeleport, and thinking of it as such.
Where as ItemChorusFruit & EntityEnderman, again, actually implement proper randomness.

So we'd get a safeTeleport, due to this "randomTeleport" just making sure things are safe.
The randomTeleport comes in due to there actually being a use for random teleportation. See the many RTP plugins and commands, plus EntityEnderman & ItemChrousFruit

#

which would give us a total of

// Current
Entity#teleport(Entity)
Entity#teleport(Entity, PlayerTeleportEvent.TeleportCause)
Entity#teleport(Location)
Entity#teleport(Location, PlayerTeleportEvent.TeleportCause)

// New
Entity#safeTeleport(Location, flag) // Flag determines if teleport particles are used
Entity#randomTeleport(retries, xRange, yRange, flag) // Flag determines if teleport particles are used

plus extra methods for PlayerTeleportEvent.TeleportCause

#

looks like EntityCat also uses randomTeleport too in giveMorningGift, instead it has the flag set as false and calls it as so

            RandomSource randomsource = this.cat.getRandom();
            BlockPosition.MutableBlockPosition blockposition_mutableblockposition = new BlockPosition.MutableBlockPosition();

            blockposition_mutableblockposition.set(this.cat.isLeashed() ? this.cat.getLeashHolder().blockPosition() : this.cat.blockPosition());
            this.cat.randomTeleport((double) (blockposition_mutableblockposition.getX() + randomsource.nextInt(11) - 5), (double) (blockposition_mutableblockposition.getY() + randomsource.nextInt(5) - 2), (double) (blockposition_mutableblockposition.getZ() + randomsource.nextInt(11) - 5), false);
#

I believe we'd really only care about how EntityEnderman & ItemChorusFruit use it though

#

Also I looked at EntityEffect, it could be improved still

WOLF_SMOKE & CAT_TAME_FAIL are the same. Should just be TAME_FAIL
WOLF_HEARTS & CAT_TAME_SUCCESS are the same. Should just be TAME_SUCCESS

They both use Smoke & Heart

worldly ingot
#

Yeah but they're different effect ids

#

That's mostly Mojang's fault lol

vagrant stratus
#

As does the Horse,

vagrant stratus
worldly ingot
#

Could be to do with sounds though. Don't know if either play sounds

vagrant stratus
#

Nope. Taming is always Heart or Smoke

worldly ingot
#

Or, actually, I'd bet you it's because at one point cats were ocelots, which weren't tameable entities

vagrant stratus
#

Don't see any sound calls

worldly ingot
#

Then cats became their own tameable entities so it handled the event

vagrant stratus
#

Note, that ocelots aren't supported in EntityEffects nor are horses kek

#

This is also why I did particles the way I did kek

#

No duplicates and it still gives the right values & stuff lmao

#

Seems like EntityEffect is missing the allay hearts as well

vagrant stratus
#

Current entity effects @worldly ingot

Snowball -> Snowball or a specified item stack byte: 3
Egg -> egg particle byte: 3
tipped arrow -> RGB'd effect byte: 0
Villager:
 HEART byte: 12
 ANGRY_VILLAGER byte: 13
 HAPPY_VILLAGER byte: 14
 SPLASH byte: 42
Witch:
 WITCH byte: 15
EntityTameableAnimal:
 HEART tame success byte: 7
 SMOKE tame fail byte: 6
EntityLiving:
 PORTAL byte: 46
Entity:
 HONEY_SLIDE byte:53
EntityHorseAbstract
 HEART tame success byte: 7
 SMOKE tame fail byte: 6
Ocelot:
 HEART trusting byte: 41
 SMOKE not trusting byte: 40
Fox:
 item particle byte: 45
Dolphin:
 HAPPY_VILLAGER byte: 38
EntityAnimal:
 HEART byte: 18
Allay:
 HEART byte: 18
#

Some do play sounds, but I need to double check if they're client-sided or not

worldly ingot
#

The sounds would be

#

but those all have constants in EntityEffect

#

You'd have to look at source to see which constants match up with which id

vagrant stratus
#

Yea, checking handleEntityEvent, which is how I got the above updated list

worldly ingot
#

Right but I mean EntityEffect in Bukkit

#

It's just an enum, the effect ids are in the constructor

nova notch
#

You'd have to track the time of the last attack each mob performed then compare that to whatever you want your cooldown to be, and cancel it if they try to attack while on cooldown

Or alternatively just set player no damage ticks if you only care about zombies attacking players

vagrant stratus
worldly ingot
#

I think it's up to date

#

At least according to the protocol it is

#

The names are a bit dated though

vagrant stratus
#

Yea, exactly. The names are fucked

nova notch
#

Oh wait you said decrease

vagrant stratus
#

Nothing for horses, allays, ocelots, etc

nova notch
#

So yeah this would work with multiple zombies if you wanted the player to take damage more frequently but you can't directly make a zombie attack faster

vagrant stratus
#

The EntityEffect system could probably be overhauled in general to have less duplicates, considering effects are reused outside of different bytes

#

Deprecate the aforementioned effects, replace with TAME_SUCCESS & TAME_FAILURE and you replace those too and cover EntityTameableAnimal and EntityHorseAbstract. If you make it just SUCCESS & FAILURE, then you cover Ocelot taming too

#

Wait, no. Different bytes for those. Impossible with the current system.
No idea why they're 40 & 41, instead of 6 & 7 like the other two

#

EntityEffect is dumb

sly topaz
#

why

#

what does EntityEffect abstract out anyway

#

like, are these constants backed by a registry or something?

#

Or is it just defined in the craftbukkit impl

worldly ingot
#

They're just magic numbers. Not registry based

vagrant stratus
worldly ingot
vagrant stratus
warm musk
#

guys how can i parse all placeholders?
(i know PlaceholderAPI.setPlaceholders())

example:
%luckperms_prefix% output is %img_owner%

how can i parse?

worldly ingot
#

They were accurate for the time, but those status definitions change all the time

vagrant stratus
#

Yes, and they need updated to match kek

worldly ingot
#

It's just not really worth it most of the time

#

Unless it gets registry backed and needs to match a key

#

But right now it doesn't :p

vagrant stratus
#

It's an easy fix though?
Deprecate WOLF_SMOKE, CAT_TAME_FAIL, CAT_TAME_SUCCESS.

Add TAME_SUCCESS, TAME_FAIL. They all use 6 & 7

young knoll
#

One of the places mojank still uses magic values

vagrant stratus
#

Not the first time something is deprecated within EntityEffect. See DEATH, and SHEEP_EAT for one's that got split and HURT for something that got replaced with a method

young knoll
#

:(((

vagrant stratus
#

You'd still need magic numbers, but the rest would be registry based or whatever

carmine mica
#

it really needs to not be an enum cause enums suck

vagrant stratus
#

no u

wet breach
nova notch
#

why do enums suck? first time I'm hearing this

carmine mica
#

enums don't always suck, but the Bukkit API used them in SO many places they shouldn't have. You don't get generics, you can't have "custom" ones (see Biome), can't have server implementations so its harder to add API surrounding them

#

or rather, them being enums at the start is fine. Pretty sure even vanilla used enums way back then, but they should've done the ItemType/BlockType to Material a long time ago

vagrant stratus
#

Makes sense to have an enum for hands, for example.
Biomes would be better as a registry which allows custom biomes

nova notch
#

ok I see

#

custom biomes would be cool

vagrant stratus
#

Alas, I doubt custom biomes are happening anytime soon if ever

worldly ingot
#

DayOfWeek is an enum

#

Ain't no way we're getting a Gregorian Calendar 2.0 update to add a new week day

nova notch
#

wait then how does something like Terralith (datapack) have custom biome names

vagrant stratus
#

datapacks are vanilla code, not bukkit

nova notch
#

You can't do it in the api?

vagrant stratus
#

Nooooope

shadow night
nova notch
#

Fr how did this happen

vagrant stratus
#

Bukkit's old as hell

shadow night
#

Sounds like we want a whole rewrite of bukkit

nova notch
#

Well I guess one thing datapacks don't have is basic fucking math

shadow night
vagrant stratus
blazing ocean
river oracle
#

Idk if I'd ever put enums in my front facing api even if minecraft defines them as an enum

nova notch
blazing ocean
#

well

#

pretty sure that one guy did it

shadow night
#

and it should be possible in theory

nova notch
#

It's close enough

#

It is

#

But with a lot of work

wet breach
nova notch
#

And the whole scoreboard system for storing shit sounds miserable

vagrant stratus
#

realistically 1.13 should have seen major rewrites, but weren't added due to backwards compatability

shadow night
wet breach
#

I would be in favor of a rewrite

shadow night
#

Fuck backwards compat

blazing ocean
#

rewrite in rust

wet breach
vagrant stratus
blazing ocean
shadow night
blazing ocean
#

he made a physic engine in datapacks

#

I wrote a 3D rigid body physics engine datapack for Minecraft 1.20, and I'm also releasing the CBScript compiler that I used to make it.
Datapack: https://sethbling.s3.us-west-2.amazonaws.com/Downloads/DataPacks/physics_sandbox.zip
CBScript Code: https://github.com/SethBling/cbscript
Mysticat's "Fake Mobile Game": https://www.youtube.com/watch?v...

▶ Play video
nova notch
#

Sethbling is not just "one guy" he is a god among men

blazing ocean
#

real

nova notch
#

Dudes brain just built different

river oracle
blazing ocean
#

he made his own datapack language

wet breach
wet breach
#

I hate old versions

shadow night
#

We don't need 1.8 support

#

Or 1.9

#

Or 1.10

wet breach
#

but yes the spigot api/server needs a rewrite

nova notch
#

The people still a decade in the past need 1.8 support for whatever reason

#

Quite literally a decade

shadow night
#

They aren't relevant

blazing ocean
#

^

#

Banish them

river oracle
vagrant stratus
river oracle
#

we still have the Legacy material stuff e.g. LEGACY_REDSTONE_BLOCK etc

wet breach
#

yeah, a lot of that stuff can be removed

blazing ocean
#

Get every spigot contributor to learn rust and finish FerrumC.

#

ez

vagrant stratus
#

No

#

fuck rust

river oracle
#

No

#

fuck rust

wet breach
#

however, implementation needs some rewriting too though

nova notch
#

What's the difference between a redstone block and a legacy one

blazing ocean
vagrant stratus
blazing ocean
#

😔

shadow night
river oracle
nova notch
#

But how are they even different

vagrant stratus
#

one sucks, one is spigot 😎

river oracle
#

hell I'm working on a rewrite of the entire Bukkit#createInventory system right now

wet breach
#

but rewriting it would be far better

vagrant stratus
#

99% of the API is create & forget

river oracle
#

I think its a good thing that could be taken to an extreme

nova notch
#

still better than Windows

vagrant stratus
#

It should have dropped compat on 1.13, making 1.13 the earliest supported version

nova notch
#

can't even name a fuckin file con

blazing ocean
#

you can

shadow night
river oracle
vagrant stratus
#

md won't lol

nova notch
#

I miss him :(

shadow night
#

I see no reason to name your file con

river oracle
#

an actual constructive one at that

blazing ocean
#

breaking all laws of windows

shadow night
#

Lmao

vagrant stratus
river oracle
vagrant stratus
#

I say 1.13 since that was the flattening iirc

#

gave the perfect timing

river oracle
#

true, I think if you really love cross-version compat as we all know plugin devs do, I think 5 version cut-off is super fair tho

#

I mean at 1.21 that puts us back to 1.17

vagrant stratus
#

ofc but 1.13 would have been the best compromise, drop everything legacy & don't remove anything after

river oracle
#

1.8 is getting too old

#

plus their are already a ton of 1.8.8 forks too

river oracle
#

enums are much more rigid

#

Bukkit API should probably be close to 95% interfaces

#

and 0% of that should be enums just imho

rough drift
#

it can't be something else

river oracle
#

that's a spigot value

rough drift
#

Yeah, but that was my first example

pseudo hazel
#

what about directions

river oracle
#

no minecraft value should be represented as an enum even if its an enum internally imho

vagrant stratus
# river oracle 1.8 is getting too old

Exactly. Could have dropped a lot of the old API. Bad ItemStack impl, Bad Biome impl, Bad Material impl etc, etc
Replaced it with better & more modern code which made the best use out of 1.13 code

river oracle
#

I'd say it could be a okay enum, but not perfect

rough drift
#

fuck item stack

vagrant stratus
#

Yea, certain things aren't possible with how it's currently done

shadow night
#

Doesn't paper have their own item stack impl or something

rough drift
#

yk optic you can just contribute to my API instead if you want kekW

river oracle
river oracle
vagrant stratus
rough drift
#

it supports breaking changes without needing to do weird hacks :P

#

(i.e. the API can have huge breaking changes and old plugins will still work, because of how the API is managed)

vagrant stratus
river oracle
#

ItemMeta could really use a rewrite, but that is a tall task

blazing ocean
#

Everybody always acts as if NMS was that bad

#

it really isn't

vagrant stratus
#

or you handle the relevant event, which is 🤢

#

Why handle it when you can just let vanilla do it for you lmao

river oracle
blazing ocean
#

mods are better anyway

river oracle
#

its the reason of having an API in the first place otherwise all you need is a thin NMS wrapper

river oracle
rough drift
river oracle
#

its the trade offs

vagrant stratus
vagrant stratus
rough drift
blazing ocean
#

I really don't like that

rough drift
#

I don't want everyone to use it, I just want a good and reliable system for my projects, if others want to use it, be my guest

young knoll
#

Smh

vagrant stratus
#

Yea, little reason to use it when forge & fabric are already huge lol

river oracle
rough drift
#

It's a Fabric/Forge mod anyways

#

It's platform independent for 90% of it

blazing ocean
river oracle
#

its supposed to be easy and user friendly

shadow night
#

I might get beaten for saying this, but
I like forge

rough drift
river oracle
#

there are options out there for those who rather blow their foot off

vagrant stratus
blazing ocean
#

Hot take: Messing with NMS is wayyy more fun than using bukkit

#

runs

vagrant stratus
#

EntityType != Entity

young knoll
#

setSpawnedEntity

river oracle
#

🤓 erm actually

#

You can use an EntitySnapshot

vagrant stratus
#

Yes, entity type

young knoll
#

No

blazing ocean
river oracle
#

?jd-s

undone axleBOT
rough drift
#

how about you just manually track the entity and send the packets for it, huh? you priviledged kids

young knoll
#

An EntitySnapshot is a snapshot of the entire state of an entity

#

Minus location

vagrant stratus
#

Oh, that's new

river oracle
#

yes very new

vagrant stratus
#

when tf did that get added?

river oracle
#

praise be to coll

young knoll
#

Some time 1.20 iirc

river oracle
rough drift
#

that is WILD

young knoll
#

It’s usable with spawners too

rough drift
#

thank you whoever added that

river oracle
#

Thank coll

#

he's right here

rough drift
#

Oh

#

THANK YOU COLL

#

MY SAVIOR

young knoll
#

:3

rough drift
#

I had to do something like that arounddddd 6 months before 1.20 dropped, but thank you nonetheless

vagrant stratus
#

lmfao I complained about that repeatedly ages ago and completely forgot about it

#

Didn't realize something FINALLY got implemented KEK

rough drift
blazing ocean
#

Why are you unloading mods

river oracle
#

I get left doing the thankless jobs 😭 I spend all this time working on and shilling the great Inventory PR and I get 0 love, Coll writes some useless entity thing and all of a sudden everyone loves him

rough drift
#

Because I found a safe way to do so?

blazing ocean
#

still don't

vagrant stratus
#

Go back in your hole and finish it

river oracle
#

I gotta take baby steps cuz its so big

rough drift
river oracle
#

5/5 is deprecating everything 😄 I genuinely can't wait

rough drift
#

@young knoll Make entity snapshot serializable

dawn flower
#

How do I make fullbright for all players without night vision

rough drift
rough drift
#

You do, rad

river oracle
rough drift
#

you are just skill issued

blazing ocean
#

shaders 🧌

dawn flower
rough drift
river oracle
#

idk if MD will ever accept that though

rough drift
dawn flower
#

Sad

river oracle
#

because I don't think he likes Bytes

blazing ocean
young knoll
#

Yeah should probably make it SNBT serializable at some point

vagrant stratus
#

@rough drift give us back spout fr fr

river oracle
#

just sayin

young knoll
#

Both are good

rough drift
#

What's that

rugged fern
#

Does anyone know how i fix this error: java.lang.NoSuchMethodError: 'net.minecraft.server.level.ServerPlayer org.bukkit.craftbukkit.v1_21_R1.entity.CraftPlayer.getHandle()'

river oracle
#

remap your plugin

#

?nms

blazing ocean
#

ffs

rugged fern
#

it is: <dependencies> <!--This adds the Spigot API artifact to the build --> <dependency> <groupId>org.spigotmc</groupId> <artifactId>spigot</artifactId> <version>1.21.1-R0.1-SNAPSHOT</version> <classifier>remapped-mojang</classifier> <scope>provided</scope> </dependency> </dependencies>

blazing ocean
vagrant stratus
# rough drift Spout?

Server <-> Client modding.
basic ```It allows a complete join between the client and the server.

So that if someone makes a plugin and requires the client to have a certain mod, spout will automatically install the mod to the client. ```

river oracle
rugged fern
#

uhm

rough drift
rugged fern
#

oops xD

rough drift
#

kinda

river oracle
#

wheres my 100

blazing ocean
vagrant stratus
river oracle
#

pay up bucko

rugged fern
rough drift
#

It lets the server do things such as client side keybindings, client side rendering and better registry sync

#

it's neat-o

vagrant stratus
#

Spout does waaaay more than just those lol

blazing ocean
#

10 years ago

rough drift
blazing ocean
#

nice website

vagrant stratus
young knoll
#

Yeah letting the server just send an entire mod to the client is big yikes

vagrant stratus
#

just get good

river oracle
#

coll writing for that long just for one sentence

#

that's wild

young knoll
#

It makes more sense to have an existing client mod that enables the server to add custom functionality

vagrant stratus
young knoll
#

Basically how the bedrock client works

rough drift
#

I will open source it by the end of the year under two conditions:

  1. I either get meds
  2. or I manage to willpower through my head
young knoll
#

Is it called CabernetMC

rough drift
#

I fucking love it but it's not ready yet

young knoll
#

It wouldn’t be that hard to implement a lot more customization into the client

#

Would be much nicer if you could do it directly though, saves a lot of mixin fuckery

vagrant stratus
#

there was a wip spout forge version actually

young knoll
#

@microsoft I’ll buy minecraft off you for $7

vagrant stratus
#

iirc the repo correctly anyways

young knoll
#

Does it support custom blocks yet

rough drift
#

I am working on other stuff before blocks/items/entities/etc

blazing ocean
#

polymer for helix when

rough drift
#

I'll probs add that sometime late October, at least items

rough drift
#

kinda

blazing ocean
#

interesting

rough drift
#

there are a few parts

young knoll
#

Items actually seem super easy

blazing ocean
#

they are

young knoll
#

What base data does an item even have that you’d have to sync

rough drift
#

helix-experimental-api (main API for helix)
helix-experimental-loader (loads helix and plugins, doesn't load as plugin/mod)
helix-experimental-translator (server only using helix)
helix-experimental-connector (client <-> server both using helix)

then there's

helix-spigot-loader
helix-fabric-loader
helix-forge-loader

etc

blazing ocean
#

also Ike I'm still interested to see how you're gonna make your rendering api because the way you want it is very likely not possible lmao

rough drift
blazing ocean
#

because you'd have to have a set of predefined fonts / shaders for vertical offsets

young knoll
blazing ocean
#

if you're planning to do the whole thing with shaders you'd need a fuckton generated at server load

rough drift
#

Kind of, when I was working at yora they'd made some fuckery to do dynamic positioning of stuff on the screen

#

which I'm very impressed by

young knoll
#

If you have a custom client mod you don’t need any of that tho

#

You can just draw text wherever you want

rough drift
#

The client mod is optional

young knoll
#

I see

rough drift
#

You can join a helix-powered server (Platform of choice + Helix) and it'll work for 99%

#

that 1% is keybinds and the likes

blazing ocean
rough drift
rugged fern
#

Hey how can i change the skin for the player itself? for others the skin got changed

blazing ocean
#

We used to have ~250 fonts

#

of just offset variants

#

So yeah, either you have a 1mb shader or some shit or 1mb of font json files

#

there really isn't a good way to do this

#

We are currently at 137 font offsets. We have two fonts that we use...

rough drift
#

Trust me for I shall cook

blazing ocean
#

mhm

vagrant stratus
#

oh yea, how the fuck do I show the credits and/or loading screen(s)?
I know it's a Game Event event packet for credits w/

4     Win game     0: Just respawn player.
1: Roll the credits and respawn player.
Note that 1 is only sent by notchian server when player has not yet achieved advancement "The end?", else 0 is sent. 

but iirc that didn't work, but I could have just fucked it up somehow

blazing ocean
#

Also with shaders you just eliminate cross version compatibility as a whole

rugged fern
blazing ocean
#

so yeah, they're fun

blazing ocean
rough drift
#

Probably not question mark

river oracle
#

who knows offlinemode ain't supported brother

worthy yarrow
#

I mean

#

Is there not still a connection of client -> server?

young knoll
#

Online mode? Offline mode? How about a Clothesline mode!

river oracle
vagrant stratus
worthy yarrow
#

Win_game

#

What game are we winning

young knoll
#

Minecraft

blazing ocean
#

end screen

young knoll
#

Duh

worthy yarrow
#

I never believed in the notion that defeating enderdragon is the end of the game psh

vagrant stratus
#

Used like this though. Like, it should work lmfao

if (!this.wonGame) {
    this.wonGame = true;
    this.connection.send(new PacketPlayOutGameStateChange(PacketPlayOutGameStateChange.WIN_GAME, this.seenCredits ? 0.0F : 1.0F));
    this.seenCredits = true;
}
worthy yarrow
#

It should work is the story of my life

young knoll
worthy yarrow
#

Nerd

#

I found hi softs

rough drift
river oracle
#

I give it a 0% that that's the csae

rough drift
#

Oh fair

river oracle
#

there is a big difference between I'm using offline mode and I'm behind a proxy

#

those who actually use bungeecord will likely say I'm using bungeecord will it still work? Instead of I'm supporting cracked or I'm using offline mode

rugged fern
#

how do i get the seed of the level from a nmsPlayer?

#

*ServerPlayer

vagrant stratus
#

seems like it might just be getSeed or something

wet breach
vagrant stratus
#

They're using NMS

wet breach
#

and?

#

doesn't mean the api can't be used

#

not sure why people think they can only use one or the other and not both at the same time o.O

vagrant stratus
rugged fern
#

WorldServer isnt existing in remapped

vagrant stratus
#

yea, you'll have to figure out the equivalent

#

1.21.1 has it as ServerLevel, for example

rugged fern
#
        CraftPlayer craftPlayer = (CraftPlayer) player;
        ServerPlayer nmsPlayer = craftPlayer.getHandle();
        ServerGamePacketListenerImpl connection = nmsPlayer.connection;

        ClientboundPlayerInfoRemovePacket removePacket = new ClientboundPlayerInfoRemovePacket(Collections.singletonList(nmsPlayer.getUUID()));
        ClientboundPlayerInfoUpdatePacket addPacket = new ClientboundPlayerInfoUpdatePacket(ClientboundPlayerInfoUpdatePacket.Action.ADD_PLAYER, nmsPlayer);

        for(Player online : Bukkit.getOnlinePlayers()) {
            CraftPlayer onlineCraftPlayer = (CraftPlayer) online;
            ((CraftPlayer) online).getHandle().connection.send(removePacket);
            ((CraftPlayer) online).getHandle().connection.send(addPacket);
        }

        Holder<DimensionType> dimensionTypeHolder = nmsPlayer.level().dimensionTypeRegistration();
        ResourceKey<Level> dimension = nmsPlayer.level().dimension();
        long seed = player.getWorld().getSeed();
        GameType gameMode = nmsPlayer.gameMode.getGameModeForPlayer();
        GameType previousGameMode = nmsPlayer.gameMode.getPreviousGameModeForPlayer();
        Optional<GlobalPos> spawnPos = Optional.empty();
        int portalCooldown = 1;

        // Create the CommonPlayerSpawnInfo object
        CommonPlayerSpawnInfo spawnInfo = new CommonPlayerSpawnInfo(
                dimensionTypeHolder,   // DimensionType Holder
                dimension,             // Level ResourceKey
                seed,                  // World Seed
                gameMode,              // Current GameMode
                previousGameMode,      // Previous GameMode (nullable)
                false,               // Is debug world
                false,                // Is flat world
                spawnPos,              // Optional GlobalPos for spawn location
                portalCooldown         // Portal cooldown
        );

        connection.send(new ClientboundRespawnPacket(spawnInfo, (byte) 1));
        player.teleport(player.getLocation());
    }``` im trying to do it like this but now there is a error? because the skin is black
dawn flower
#

Why are you "refreshing" the player

rugged fern
#

for letting myself see the skin too

#

but now its just black

#

for other it is the skin i chose

dawn flower
#

Are you just changing the player's skin

#

Because I'm like 99% sure there is a method for that in Spigot

rugged fern
#

to update the player?

rugged fern
#

of the player* in order to change the skin

dawn flower
#

Give me a second, let me look for it

rugged fern
#

i hide and show the player for all online players to update the skin for them and thats works fine but only for myself its the same skin as before or its turning black

dawn flower
#

setTextures to be exact

rugged fern
#

im confused haha

#

i actually have this for changing the skin: ``` public static void applySkin(Player player, String value, String signature) {
CraftPlayer craftPlayer = (CraftPlayer) player;
ServerPlayer nmsPlayer = craftPlayer.getHandle();
GameProfile profile = nmsPlayer.getGameProfile();

    profile.getProperties().removeAll("textures");
    profile.getProperties().put("textures", new Property("textures", value, signature));

    for(Player online : Bukkit.getOnlinePlayers()) {
        online.hidePlayer(Main.getInstance(), player);
        online.showPlayer(Main.getInstance(), player);
    }

    refreshPlayer(player);

}```
dawn flower
#

You gotta do something similar to this

Player player = ...;
player.getPlayerProfile().setTextures(...);```
eternal oxide
#

send a respawn packet to yourself to refresh your own skin

rugged fern
#

will it update automatically?

dawn flower
#

Idk, try

rugged fern
rugged fern
cedar flume
#

Hey,
How can I get the world Item when a dispenser dispenses?
BlockDispenseEvent gives the ItemStack.
ItemSpawnEvent gives Item, but i dont know if it was a dispenser that made it? getThrower returns an entity UUID, not a block -- and there is no "SpawnReason" or similar it seems

candid galleon
#

oh you right

river oracle
#

unfortunately it doesn't work for player skins actually setting a player skin is way more involved

#

you have to send extra packets etc and iirc its very volatile and glitchy too, I can't see it really being great API

cedar flume
cold lintel
#

Any MC java devs able to assist me real quick? Needing some help on figuring out how to impimplement liment something and my brain is fried after trying multiple things... Need to make it so a plugin can detect if a player is flying on an elytra and if they press space bar something happens... I just cannot detect the spacebar! I've tried protocollib, invisable entities, everything haha

river oracle
#

well no you can't just detect them pressing the spacebar

#

that's not even possible, you can detect the actions that occur from pressing it e.g. gliding or jumping, but just pressing the spacebar isn't possible to detect

cold lintel
#

Just wasn't sure if there was something I was missing or if someone knew a workaround type of thing

#

My logic was if while the player was gliding they would be controlling an invisible entity and the entity could detect a space bar or something

nova notch
#

...can you even be gliding while controlling a horse or something?

candid galleon
#

with the recent 1.21 developments you might be able to listen directly to movement keys

#

WASD at least i've heard are possible

nova notch
#

thats always been possible to some extent using velocity while riding an entity

cold lintel
#

Yeah I was hoping to just listen direct to the keys, but I couldn't get it working, the entity thing was a random thought but nothing was working

#

I was just hoping someone here just figure out a way to detect a space bar input while gliding

nova notch
#

why specifically space bar?

cold lintel
#

Essentially I want to make it so if a player is gliding with an elytra, holding the space bar will increase their velocity

#

Space bar just makes most sense

#

I could do an item in the inventory but that's boring haha

nova notch
#

yeah Q is probably the best option

#

or just right clicking

pseudo hazel
cold lintel
#

Essentially my game glitched recently and my elytra just went upwards when holding space and it was fun, I was trying to recreate it haha

nova notch
#

you should make a thing where you have an ability that does the riptide animation and while its doing that you reflect projectiles or some shit

#

make dogfighting

cold lintel
#

Still doesn't defeat the fact I need to somehow detect input

nova notch
#

yeah but it'd be cool af

cold lintel
#

I legit spent 4 hours earlier trying every possible way haha

nova notch
#

is it just a fun side project or does it have to be a plugin?

#

if you dont care about vanilla then try modding its pretty fun as well

cold lintel
#

Doesn't have to be a plugin, plugins are just something I know haha

cedar flume
pseudo hazel
#

I think the thrower would be the dispenser blockentity

#

so you might be able to check it that way

#

but idk

cedar flume
#

blockentity?

pseudo hazel
#

well yeah

#

the dispenser itself

#

but

#

idk if you can even do something with that information

#

because thats still not the item

#

so there is probably no way

#

its probably called before the item gets created

#

the dispense event

cedar flume
eternal oxide
#

you could try putting a flag in the ItemStacks PDC in the dispense event and check for that flag in the spawn event

cedar flume
#

il give that a go, thank you, but id guess the caveat then would be; dispensed items would no longer stack with non-dispensed I assume

eternal oxide
#

correct, but you can always remove the flag on spawn

pseudo hazel
#

good one

cedar flume
#

hmm annoyingly it seems the two events might happen in the same tick.

#

numbers being System.currentTimeMillis()

young knoll
#

Is that an issue?

#

Seems the order is right at least

cedar flume
#

i guess not, with adding a delay before checking the PDC for the flag. which im now doing to be safe.
but im not finding my key on the itemstack it appears.

i must be adding it wrong

young knoll
#

You shouldn’t need a delay

cedar flume
young knoll
#

No

#

You should be adding it with the ItemMeta instance you have

#

Since each call to getItemMeta returns a new copy

cedar flume
#

oh, of course. thats silly of me. 1 mo il retry

eternal oxide
#

event.setItem(itemdtack)

#

have to update the event

cedar flume
#

Ah I see

eternal oxide
#

in teh dispense event just call setItem at the end

cedar flume
#

Yeah, sorry. tis late and my brain is running 5 seconds behind my eyes 😄

eternal oxide
#

and yes no need for any delay, just remove the pdc entry in the spawn event

cedar flume
#

Sweet, all working.
id also forgotten to set the meta back after removing the pdc entry in itemspawnevent. sorted now 👌 and all working as needed.

thanks all for the suggestions and assistance ❤️

coarse linden
#

how do i get rid of the stupid server 3 second invincibility when the player respawns

tight egret
#

I'm using eclipse and Maven, I wrote a pretty simple plugin last month

#

I made a small change to it but the build now isn't including the .yml file for some reason

#

how do I force maven to include the .yml when I compile the .jar?

worldly ingot
#

As long as it's in the src/main/resources directory, it should go with the jar when you mvn clean package

tight egret
#

I've added it to like every directory now, it still won't add it to the jar : /

#

is there like a command I need in the build config?

#

Or is there up-to-date documentation I can use to remake the project?

#

I gave up and just used winrar to add it manually

#

just going to make a note in my documentation to do that from now on

kind hatch
#

What does your pom look like?

glacial hedge
#

Anyone give me deluxe hub plugin latest plz

torn shuttle
#

progress

torn shuttle
kind hatch
#

^

river oracle
#

bro ain't deluxe hubs free wtf

river oracle
#

its legit free

#

wtf

nova notch
#

fr bruh what is this dude even asking for

river oracle
#

I feel like its either a bot or someone who shouldn't be running a server

glossy laurel
#

imo its both

river oracle
#

interesting proposal

#

I'm sure such inviduals unfortunately exist

cedar saffron
wraith delta
nova notch
#

ok

glossy laurel
#

Guys, I have vault and luckperms installed, and when I do /lp user username info, it shows the prefix and the suffix, however, when I get them through my plugin it doesnt work for some reason. Anyone know why?

eternal oxide
#

?nocode

undone axleBOT
#

It’s hard to answer a programming question without code
Oh no! You ran into a problem. But no worries, people are willing to help, but first they need to see your code. This is because otherwise, they would be providing help based on guesses instead of concrete knowledge. Whether it be a compile error, runtime error, or an unexpected output, I'm sure that if you were to provide code, you'd receive a quick solution.

glossy laurel
#

Vault.getChat().getPlayerPrefix(player)

#

Fr

#

Do I need to get the prefix from getPermission

#

Bcuz vault has no chat setup

#

Without chat plugin

#

For some reason?

eternal oxide
#

prefix comes from permissions not chat

#

um, perhaps I'm wrong

glossy laurel
#

So luckperms doesnt serve as a chat plugin?

eternal oxide
#

I've never used lp+vault

#

I know Vault detects a chat component when using GroupManager

#

it enables both permissions and chat

glossy laurel
#

Imma be honest

#

I ahve no clue what u just said

eternal oxide
#

however there shoudl be no static getter for prefix

#

show actual code. Where did you get the ResourceProvider for chat?

rugged fern
eternal oxide
#

I can't help you anymore if you refuse to show ACTUAL code.

glossy laurel
eternal oxide
#

of course you do or you would not be having errors

glossy laurel
#

Dont have code

eternal oxide
#

don;t get ResourceProvider in onLoad only IN or after onEnable

rough drift
torn shuttle
#

lots of fun little challenges

#

gotta figure out a metatag system

rough drift
#

why so complicated

torn shuttle
#

for not a source and then also a do not mirror or something

#

because if it was easy it'd be called your mom

rough drift
torn shuttle
#

good thing it was hard and I figured it out then

rough drift
torn shuttle
#

man bring back imillusion at least when he makes fun of me it's not completely braindead

rough drift
#

or making fun of someone

#

actually no I can be pretty good at insulting someone, I am just very bad at then continuing it and replying

torn shuttle
#

you're giving me brainrot just reading your replies so I'm just going to block you and try to get some braincells back

nova notch
rough drift
#

what did I do man

torn shuttle
torn shuttle
#

I'm still just prototyping this to see what the full kit requirement will be

nova notch
#

other than the wells being out of place it looks pretty cool

torn shuttle
#

I actually removed the sky walkways for this shot

#

gotta readd it

silent tendon
#

??

hazy parrot
# silent tendon ??
[ERROR] No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?
silent tendon
#

Does it mean exactly what and how do I fix this problem?

eternal oxide
#

JRE = Java Runtime Environment. JDK = Java Development Kit
Guess which you need to do development work?

silent tendon
#

I have installed both

tall dragon
#

well its clearly not using the right one

#

make sure the JDK is selected here

silent tendon
#

Ah Thanks

#

But why did he install 1.21.1 even though I selected 1.21?

eternal oxide
#

there is no 1.21

silent tendon
#

Then why is it in there?

chrome beacon
#

It existed at one point

#

but it was superseded by 1.21.1

#

as there is no reason to use 1.21

glossy laurel
#

Guys can you save a runnable into PDC 🤓

hazy parrot
#

Wtf are you doing

glossy laurel
#

I need a consumer

#

Fr

#

Right clickable items btw