#help-development

1 messages ยท Page 1072 of 1

torn shuttle
#

literally, I have to go, my preworkout is gonna fade at this pace

eternal night
torn shuttle
#

finished doing the support ticket anyway

river oracle
#

I really need to do stretches / yoga before worrying about lifting

river oracle
tardy delta
#

orbitmc?

river oracle
shadow night
#

OrbitMC by Ananas or something

river oracle
#

RaydanOMGShushMC

remote swallow
#

miles you cant even do a push up

river oracle
#

Ik it's not much harder but I can do clapping push-ups

#

I think I can manage with a regular one

remote swallow
#

can you do a pull up

river oracle
#

Yes my triceps are probably the strongest muscle in my arm

gilded granite
#

how do I set a Attribute.GENERIC_MAX_HEALTH(10);

zenith anchor
#
fun setMaxHealth(attributable: Attributable, v: Double) {
  attributable.getAttribute(Attribute.GENERIC_MAX_HEALTH)?.baseValue = 1.0.coerceAtLeast(v)
}
#

In kotlin code

#

Is there any event that catches trident break pointed dripstone event? BlockBreakEvent not called though.

gilded granite
#

how to do in java?

river oracle
zenith anchor
#

same, use getAttribute() to get an instance and setBaseValue() to modify

tardy delta
#

max(1, v)

river oracle
#
public void setMaxHealth(Attribute attribute, double v) {
  attribute.getAttribute(Attribute.GENERIC_MAX_HEALTH).setBaseValue(Math.max(1, v)))
}```
grim hound
#

@quiet ice I love you

#

this look-up time is just amazing

#

it's like 8x faster compared to a ConcurrentHashMap

grim hound
dawn flower
#

how do i stop an event from continuing to go through listeners

sonic cosmos
#

you need to cancel

grim hound
dawn flower
#

something like this

listener1
listener2
stop listener
listener3
listener4
listener5

it should fire listener1, listener2, and stop listener

grim hound
grim hound
#

you need to modify the listeners

#

themselves

dawn flower
#

oof

#

no other way?

grim hound
#

hold on lemme send you how I did it

grim hound
dawn flower
#

oh

grim hound
#

pretty easy tbh

dawn flower
#

i thought you mean to modify each listener class

grim hound
#

nah

zenith anchor
#

Maybe u can't stop it from passing the event to other listeners

#

if ur using built in events

grim hound
#

I'd send my github with it

#

but github isn't responding

#

wtf

dawn flower
#

bruh

#

if i cancel the packet itself, would it still fire the event

grim hound
dawn flower
#

ic

dawn flower
#

i sitll dont understand tbh

grim hound
#

is invoked with this

#

HandlerList

dawn flower
#

yeah i know

#

but like

#

how do you just

grim hound
dawn flower
#

override handlerlist

#

oh

grim hound
#

and replace it with your own implementation

grim hound
#

;]

dawn flower
#

cant u just do it with reflect

grim hound
#

it's static final

#

I mean you can try

#

but I think last time I tested it wasn't possible

dawn flower
#

private static ArrayList<HandlerList> allLists = new ArrayList();

#

is it that

grim hound
dawn flower
#

actually ima just listen for the packets

#

prob safer either way

grim hound
grim hound
grim hound
#

nice

dawn flower
#

at a certain point, it's useless to be faster

grim hound
#

pretty crucial here

dawn flower
#

in some cases even a 0.01 ms makes a difference

dawn flower
#

but for an anti crash, most of the stuff is async anyways

grim hound
#

all connections are async

dawn flower
#

i know

#

but like

grim hound
#

but it still needs to be stupidly fast

dawn flower
#

doing the checks non async would be hella laggy

#

like imagine for each packet sent by any player you hold the server like 0.01 ms

#

more like a way to crash the server

grim hound
dawn flower
#

players send tens of packets a second

#

if not a tick by moving

grim hound
#

20 moving + 10 if you're doing a lot of other stuff

dawn flower
#

if each check is 0.0015 ms, which is almost impossible to be that fast

#

actually its not that bad

#

ms is still tiny

grim hound
#

for ::get

dawn flower
#

which is almost impossible to be that fast

grim hound
dawn flower
#

almost

#

it depends on the server specs

#

and the code

grim hound
#

an array index is 0.0001ms

#

so pretty fast

dawn flower
#

arrays r pretty fast

grim hound
#

ye

#

even with volatile memory effects

dawn flower
#

i believe they can be stored directly in memory

#

i could be wrong tho

grim hound
#

all things are

dawn flower
#

no like

grim hound
#

xD

dawn flower
#

idk if each index is stored in its own place

grim hound
dawn flower
#

or if all of it is stored in the same place

grim hound
dawn flower
#

how can they both be right

grim hound
#

so imagine a byte in memory

#

that's the equivalent of a byte array's 0th index

dawn flower
#

ah

grim hound
#

the next byte, whose memory address is just different by 1 (since it's a byte array)

#

will be the 1st index

dawn flower
#

computers r just fascinating

grim hound
#

they're black magic

#

made by aliens

#

simple

dawn flower
#

it can do stuff blazingly fast, yet we still bully them for running "slow"

grim hound
#

yet still gets bullied for being slow

dawn flower
#

java is mostly bullied cuz of the syntax

grim hound
grim hound
dawn flower
#

same

#

cpp syntax gives me a headache

grim hound
#

same

dawn flower
#

c syntax makes me question programming

#

alot of memory stuff

dawn flower
#

idk if it is

grim hound
hybrid spoke
dawn flower
#

that's captcha?

#

oh

grim hound
#

a player joins and to captcha verify he just needs to select the red blob

dawn flower
#

i'm blind

hybrid spoke
#

i mean the hotbar says that

grim hound
#

yeah it is

hybrid spoke
#

but why would a minecraft server need a captcha

dawn flower
grim hound
hybrid spoke
#

or is it some kind of anti bot thing

grim hound
dawn flower
#

and bots

hybrid spoke
dawn flower
#

bots arent a big threat to me ngl

grim hound
dawn flower
#

like imagine spending hundreds of dollars on minecraft accounts to bot servers

hybrid spoke
#

you dont stop a ddos by accepting them onto your server to solve a captcha lmao

dawn flower
#

you can forward them to the captcha server

grim hound
hybrid spoke
#

ew

grim hound
dawn flower
#

idk why cracked servers even exist

#

they are never unique and filled with cheaters

grim hound
grim hound
dawn flower
#

i never found a single cheater since i bought minecraft

grim hound
#

๐Ÿ‘

hybrid spoke
dawn flower
#

alot

grim hound
#

he didn't mean singleplayer

hybrid spoke
#

singleplayer?

#

lmao

dawn flower
#

i never played sp

#

i played it once like 5 years ago and got bored of it ever since

grim hound
dawn flower
#

i mean, i'm not trying to be rude to cracked players. i'm just saying my opinions about cracked servers not the players
i was a cracked minecraft player myself for 3 years

hybrid spoke
#

im always on crack

dawn flower
grim hound
dawn flower
#

mb

#

how did we even go from anti crash to cracked minecraft

hybrid spoke
#

not that hard to retrace

dawn flower
#

we got here from the captcha not the anti crash

#

how many packets does someone need to send in 1 second for it to be considered crashing?

grim hound
#

switch case

dawn flower
#

i dont know how many packets a normal client sends a second

quartz spruce
#

I have a question.

dawn flower
#

and i have an answer

#

go ahead and ask

grim hound
#

legit clients can send a lot of packets per second

#

for example because of lag

dawn flower
#

lag triggers pretty much everything

#

anticheat or anticrash

grim hound
dawn flower
#

true

quartz spruce
#

How can send a message with my plugin and cut it into pages so that it isn't too long ?

dawn flower
#

cut it yourself

#

at each . add a new line

#

good way

#

every 10 lines add a new page button

quartz spruce
#

would that work for a baltop command for exemple ?

dawn flower
#

yeah

#

but instead of new line at every ., it's a new line at every player

quartz spruce
#

can you give me an exemple because I don't really understand how I could do it ?

quartz spruce
#

Thank you for helping me ๐Ÿ™‚

torn shuttle
#

leg day = completed

#

common magmaguy W

#

now time to lift this codebase

quiet ice
torn shuttle
#

without looking let me guess enum map or something

hybrid spoke
grim hound
hybrid spoke
#

concurrenthashmap is

grim hound
#

or Node, if you will

quiet ice
#

CHM is much better compared to other methods of "concurrent" implementations of datastructures

hybrid spoke
#

si, yet thats where the performance downfall comes from lol

quiet ice
#

And ConcurrentHashMap is like only 20% slower than HashMap from my benchmarks so an 8x difference is a bit large as that would still surpass HashMap by like 6 times at least

river oracle
#

i wonder if they actually tested it with JMH

#

or did the good ol System.currentMillis

quiet ice
#

I benchmark with in-field testing using async-profiler these days. Is it biased? Probably. But it's easy.

hybrid spoke
#

just dont benchmark and let the user figure it out

river oracle
#

real

torn shuttle
#

what's a benchmark, precious?

quiet ice
#

That's what I did with ConcurrentInt62Set tbh

river oracle
#

wtf is a ConcurrentInt62Set

#

that seems very specific

torn shuttle
#

stupid developerses, ruining server performance

blazing ocean
#

goofy ass name

hybrid spoke
torn shuttle
grim hound
quiet ice
grim hound
#

unsigned

inner mulch
#

how can i create fake signs?

#

(i just wnat to open the sign menu)

chrome beacon
inner mulch
#

so no api?

#

packet only?

chrome beacon
#

yes

hybrid spoke
river oracle
quiet ice
#

It's the largest size with the smallest footprint while still having all the concurrency guarantees

#

You can also use it to store a packed medium pair, which is what this structure was written for

river oracle
#

hmhm sure yep

#

huhuh

quiet ice
#

1 bit is the read protection bit and another bit is the write protection bit

#

They both act together to prevent duplicate values within a bucket (as #add first needs to scan if a value already exists, then will set a value with the write prot bit set to true but read prot to false, and then look again for duplicates - if it found a duplicate, the value will be erased again otherwise it will set read prot to true)

ivory sleet
#

how does it compare to ConcurrentHashMaps set view thingy?

quiet ice
#

Apparently 8x faster. Truth be told that is plausible if you have a high amount of buckets preallocated as it will rarely do iterations on the bucket's internal arrays. Further CHM will try to redistribute the hashcode to be even, ConcurrentInt62Set already assumes that all values have equal chance of occurrence (from a security standpoint it's a dangerous assumption, but it's great for performance)

ivory sleet
#

Interesting

#

Did you write a map data structure as well 62int?

dawn flower
#

can someone give me a brief idea on how a dark auction system would work (similar to hypickle)

#

i cant wrap my head around alot of things, like what happens if someone just bids something and somehow loses their money

humble tulip
#

Wdym?

#

How will they lose money?

quiet ice
eternal oxide
#

a good MC auction system would reserve the funds that a player bids

#

or have some sort of completion system

quiet ice
#

Just give back the funds to the bidder on overbid? Both are values already tracked anyways, no?

quiet ice
#

Though uh, Java also lacks the means of converting between Objects and Integers so that isn't an all too feasible approach anyways unless one wishes to enter the realms of FFI/FFM or JNI

coarse terrace
#

how do i make sure that my plugin messages are not sent to the player?

#

cancelling the PluginMessageEvent? BungeeCord

gilded granite
#

'org.bukkit.ChatColor' is deprecated what should I use?

eternal oxide
#

no its not

lost matrix
#

Its only deprecated if you use Paper because they have a different formatting system called Adventure.
Otherwise ChatColor is perfectly fine.

gilded granite
#

also 'setCustomName(java.lang.@org.jetbrains.annotations.Nullable String)' is deprecated

lost matrix
#

Again: Its not. Only if you use Paper

gilded granite
#

ok

#

also I have nothing to code rn what should I code to learn more?

sterile breach
gilded granite
#

just setInvulnarable and mobs wont see you

#

what event gets called when a play get any item in their inventory?

vast ledge
lost matrix
slender elbow
vast ledge
#

Its deprecated

slender elbow
#

disgusting

vast ledge
#

Why so?

slender elbow
#

I refuse to elaborate

gilded granite
#

Is there and inventory change event?

vast ledge
#

Theres an event inventory change

#

but it doesnt provide much data

gilded granite
#

ok

#

should I use persistent metadata for custom items?

vast ledge
#

yes

#

?pdc

vast ledge
gilded granite
#

is it a good way for item with abilities etc?

vast ledge
#

wdym?

#

You can add a tag to the pdc to identify it

#

then on click, check if the item has the tag

#

then do your abilities

lost matrix
gilded granite
#

yeah I just store the abilitie name?

vast ledge
#

Yes

gilded granite
#

I plan to also add a raritie system should I also apply them on the items

vast ledge
#

just add a rarity tag

gilded granite
#

ok

torn shuttle
#

crisis averted, for a second there I might actually hit 100k lines of code for my main plugin

#

now I'm just shading the core of it

gilded granite
#

what is your plugin abt?

sterile breach
eternal oxide
#

all in a Main class of course

torn shuttle
#

smoking dank weed

alpine urchin
#

do you need help

torn shuttle
#

up and up it goes

#

where will it stop, nobody knows

worthy yarrow
#
[14:50:54] [Server thread/INFO]: [PreBuiltStructures] Confirm placement - Target: Location{world=CraftWorld{name=world},x=-47.0,y=131.0,z=-152.0,pitch=10.184632,yaw=3.9626145}, Opposite Corner: Location{world=CraftWorld{name=world},x=-43.0,y=133.0,z=-148.0,pitch=10.184632,yaw=3.9626145}
[14:50:54] [Server thread/INFO]: [PreBuiltStructures] Overlay dimensions: 4x2x4
[14:50:54] [Server thread/INFO]: [PreBuiltStructures] Schematic dimensions: 5x3x5
[14:50:54] [Server thread/INFO]: [PreBuiltStructures] Calculated paste location: -47, 131, -152
[14:50:54] [Server thread/INFO]: [PreBuiltStructures] Pasting structure at: (-47, 131, -152)

Good thing my logging fkcing helps

shadow night
#

Are you competing with rad

worthy yarrow
#

(the overlay / schem dimension discrepancy are unrelated, this is because I hardcoded the schematic used in that function)

worthy yarrow
hybrid spoke
gilded granite
worthy yarrow
#

I love math so much

#

Keep in mind, at this point I've pretty much removed all manipulations of the blockvector3 object used for pasting / overlay display

#

Well between them I mean

#

Ie: vectors are the same for both overlay / pasting functions

grim hound
#

@quiet ice

#

could you write me a non-concurrent version of the Int62Set?

#

I'm honestly not confident in my own abilities to remake your class

quiet ice
#

I suppose I could, although quite a lot of things could then easily be nuked

grim hound
#

ah, removed?

quiet ice
#

Are you sure that Fastutil's LongSet doesn't win out here?

grim hound
#

there's fastutils

#

IntLongSet, is that a thing?

quiet ice
#

IntLongSet?

grim hound
#

well I guess

#

wait no

#

intset

tardy delta
#

whats the meaning of the 62? bits?

grim hound
#

I guess IntOpenHashSet

grim hound
#

pretty sick

#

and I still don't get how the control bits work

grim hound
grim hound
#

but what did you even use it for?

quiet ice
#

Try to abbreviate it ;)

#

Then you know what it means

grim hound
#

triangle of stars

quiet ice
#

FAST

compact haven
#

Can you link Int62Set

#

I'm curious

grim hound
#

triangle maker

#

of stars

grim hound
candid axle
#

When a player join to the server, it writes Invalid Player Data. New players are not let in at all and old players once in a while

[23:17:36 INFO]: UUID of player FanatRegionUa is 99d151af-3997-305a-9e68-f7d38c5ee9e8
[23:17:36 INFO]: FanatRegionUA lost connection: Invalid player data

quiet ice
#

It has no meaning lol - I began with FA as a reference to FAWE and once I appended "Star" to it and saw FAS I instantly knew I had to append a word beginning with T to make it FAST

grim hound
#

nice

#

Fast Alix System Tetrator

#

FAST

quiet ice
#

It's still a bit slower than I'd like though, it spends too much time blocking in the spin wait loops

quiet ice
#

Also gotta love how this is like the 10th time people are confused about the properties of ConcurrentInt62Set even though it's exactly what's written on the tin

quiet ice
#

I should probably publish it to maven central soon-ish, though I think the ConcurrentInt62Set has a rather rare (and thus hard to reproduce) race condition related to the control bits. I'll need to look into that before publishing.

grim hound
quiet ice
#

At least it's not a map. Having something like Int312Int31Map would be hyper cursed

hybrid spoke
grim hound
#

Int30Int30ConcurrentOpenHashMap

quiet ice
#

Yeah I suppose dropping the 2 makes more sense

#

Also, fastutil versus fastutil-core as a dependency for a library?

#

Technically only fastutil-core is needed, but I'm afraid it'll brick the dependency graph

grim hound
quiet ice
#

As of now it depends on fastutil already, though it should only depend on fastutil-core

#

That being said, I don't think all too many will be aware of the fact that fastutil is a superset of fastutil-core and shade in the full thing twice by accident (or rather negligence)

grim hound
#

does anyone know what I could do for this to not be considered "dynamic"?

#

doing ByteBuddyAgent.install()

grim hound
#

for geol's set the look-up time was 0.0035 ms

shadow night
#

Is geol a professional developer

grim hound
#

for the fastutil it's 0.005ms

grim hound
tardy delta
#

same for unsafe and jni, for some stupid reason

grim hound
shadow night
grim hound
tardy delta
#

forgot the exact details

grim hound
tardy delta
#

integrity by design โ„ข๏ธ

grim hound
molten hearth
#

First I had to stick to java 8 for years now I gotta stick to java 21? ๐Ÿ˜ญ ๐Ÿ™

grim hound
quiet ice
grim hound
#

override System.err

shadow night
quiet ice
#

Blame autism probably :p

shadow night
#

Understandable

quiet ice
#

It's such a great thing when it doesn't fuck up your life

shadow night
#

Sometimes I'm thinking that it would be great to have autism

#

But I think it's always a tradeoff, one thing for another

quiet ice
#

I'm kinda left off lucky on that front since I have almost none of the downsides of autism (even compared to other people with Asperger's), but the few downsides I do have I really hate. Being unable to proper communicate with most people is just jarring. Especially when it comes to people you love since communicating affection is one other world

shadow night
#

ow

grim hound
quiet ice
#

What does Spark even use Bytebuddy for?

blazing ocean
#

all i know is that it segfaults the jvm when using JBR

quiet ice
#

could be a bug with async-profiler, who knows?

blazing ocean
#

ยฏ_(ใƒ„)_/ยฏ

#

that's why I reported it

#

since paper ships with it now i can't use JBR until this is fixed :p

#

(it segfaults on init or on profiler start, pretty random)

shadow night
#

Lmao

blazing ocean
#

yup, sucks

quiet ice
# shadow night ow

It's particularly bad if you have a crush on a girl that probably is autistic too (although in that case it was undiagnosed, but later on I figured out that she likely was on the spectrum), so you'll end up in a deadlock. On the other hand, I can't quite imagine me being together with "normal" people, mostly because interests diverge too much, but we shall see.

shadow night
lilac dagger
#

having a girlfriend must be pretty nice

#

i should go out more

torn shuttle
#

relationships are temporary the grindset is forever

lilac dagger
#

grind all your life to what end?

#

sure, grind is nice, but a balance is even better

torn shuttle
#

what do you mean end

#

the grind is the goal in of itself

lilac dagger
#

as in the end of your road

#

are you gonna grind all your life?

shadow night
#

What about kids

torn shuttle
#

buddy I'll be grinding in my afterlife if it turns out there is one

lilac dagger
#

oh, i thought you were talking about work

torn shuttle
#

I am

lilac dagger
#

grinding work

shadow night
quiet ice
#

I don't have a GF, but I almost could have gotten one. Though it would have been incredibly awkward for both of us if that happened, so I'm not entirely sure what my definition of almost is.

torn shuttle
#

you think you get to not have a job in the afterlife?

#

fucking hippies I swear

quiet ice
#

You don't have a job if your occupation is a hobby

torn shuttle
#

no, but you can have a grind

quiet ice
#

However, don't let your hobby become work - incredibly important distinction here but I don't think anyone (not even me) knows what that distinction even is

torn shuttle
#

or, you know, do, like I did

lilac dagger
torn shuttle
#

it's a lot of fun

lilac dagger
quiet ice
#

Programming lol

lilac dagger
#

why would programming be a hobby?

#

i like programming more than a hobby for example

#

i don't know what i can say about it being a hobby for me

quiet ice
#

Then your priorities are a bit misset

torn shuttle
#

what a wild thing to say

lilac dagger
#

so what do you think my priorities should be then?

quiet ice
lilac dagger
tardy delta
#

was kiddin

lilac dagger
#

rather burry myself alive instead

quiet ice
torn shuttle
#

rookie numbers

#

I woke up nearly 24h ago and only took a break to hit the gym

#

wait actually no I forgot when I woke up, it's not that bad yet but I'm not done yet

tardy delta
#

hmm only 8 hours a day

lilac dagger
#

24 hours of coding? that's nice

torn shuttle
#

I'm having fun

#

I'm actually really happy

#

this shaded core library is actually really cool

lilac dagger
#

only thing is sleep is non negociable

torn shuttle
#

it's going good

lilac dagger
#

so you're gonna do worse in the long run

torn shuttle
#

nah I stop when I'm tired

#

actually that's why I'm here

#

about done for today

lilac dagger
#

yeah well, sitting in front of blue light isn't really a good way to tell when you're tired

tardy delta
#

im probably wasting my sleep in the long term

lilac dagger
#

yeah, you do mess up your sleep/mental in the long run

#

you'll see

torn shuttle
#

if I don't feel tired and I'm performing well then it doesn't matter if I'm tired or not

#

also I've been doing this for nearing 11 years now

#

so

tardy delta
#

i always say sleep is for the weak, guess il find out in a few months

lilac dagger
#

the body keeps the score

#

i know it for myself

torn shuttle
#

that's why you go to the gym and lift the big boy weights

lilac dagger
#

nobody beats physics

torn shuttle
#

did some nice calf raises today

lilac dagger
#

i really should join a gym and get some muscle

#

i bet the girls will be all over me after that

#

surely

lyric hearth
chrome beacon
lilac dagger
#

you need to use buildtools with remapped flag

torn shuttle
#

I think I might end up creating 100 new classes tomorrow

#

this is going to be kinda whacky

lilac dagger
#

new project?

torn shuttle
#

no

#

converting commands

lilac dagger
#

what for then

#

oh, commands

torn shuttle
#

yeah they were in just megaclasses

#

now it's one per class

#

and uh there's a bunch

lilac dagger
#

oh that's nice

#

spreading the classes is always better than having it all in a few

lyric hearth
lilac dagger
#

reason why i am not really a fan of annotation commands

tardy delta
#

gui user hehe

torn shuttle
#

oh boy

#

is this even right

lilac dagger
#

i saw some horror things regarding that

chrome beacon
torn shuttle
#

intellij says my project has 1208 java classes

lyric hearth
#

thanks!

torn shuttle
#

I didn't know I crossed the 1k threshold

lilac dagger
#

i don't think my game engine has that many

#

are those mostly commands?

torn shuttle
#

no right now there's like 8 classes for commands

#

guess it's going up to 1300

lilac dagger
#

so what takes the lead then, if you don't mind me asking?

#

1000 still sounds like a lot

torn shuttle
#

probably defaults initialization for plugin content, the way I have it set up it starts up from classes

#

a custom boss is a class, a custom item is a class, so on

#

and they get initialized via reflections

#

just for the defaults

lilac dagger
#

oh i see

torn shuttle
#

then there's at this point tens of thousands that get initialized from config files if people install everything

lilac dagger
#

oh boy

#

that's a nice project you got there

#

good work

torn shuttle
#

yeah it's getting to be a problem

lilac dagger
#

i can tell

#

1000 classes seems like too many for the projects i currently own

#

i have like 15 classes for my config system

#

and that's because each data type has a class for deserialization / serialization logic

torn shuttle
#

yeah I have quite the config system

shadow night
lilac dagger
#

i really like what i did with this

#

i don't see myself ever using something different

#

the end result is something like what configurate has

#

with annotations for each field in a class

torn shuttle
#

yknow

#

I bet chatgpt could write a lot of these

#

it's pretty repetitive

#

and pretty simple

#

yeah... definitely worth a try tomorrow

lilac dagger
#

chat gpt can get me so far before it's useless to me

#

at first i liked the output it gived, i was learning

torn shuttle
#

it's a tool, not a replacement for a programmer

lilac dagger
#

but it succumbed to streamyfing everything and calling that a simplification

torn shuttle
#

I'm sure it can do this because it's literally taking from one template to put it in a differently formatted template

lilac dagger
torn shuttle
#

alright this day's been plenty productive, time to call it quits

lilac dagger
#

i like for example how easy is to extract some data from a thing without me having to write code for it

lilac dagger
torn shuttle
#

@blazing ocean btw great call with reposilite, I'm actually really liking it and it's so much easier than sonatype, thanks

blazing ocean
#

yea it's great

#

and written in kotlin :D

torn shuttle
#

yeah I don't know how online services managed to make it more laborious to use them than self-host

#

that is a thing of wonder

lilac dagger
#

i have yet to make an online repository for myself

#

all my projects are private, i don't see the point yet

remote swallow
#

rad uses reposilite?!?1

blazing ocean
#

packed promo!?!???1eleven

remote swallow
#

orbit mc mention1?!?!/1 aka @river oracleMC aka lynxplayMC aka cabernet mc aka kryptidemc aka minecraftmc

blazing ocean
remote swallow
#

no javadocs?!

#

OR SOURCES?!?!

blazing ocean
lilac dagger
#

don't mind me if i look at packed source

remote swallow
#

oh theres sources on latest

blazing ocean
remote swallow
#

where is javadocs

#

right

blazing ocean
remote swallow
#

convert gfm to javadoc jar smh

blazing ocean
#

go ahead

lilac dagger
#

that simplifies it

#

thanks

blazing ocean
#

lol

#

check out the other branch

remote swallow
#

i think its gfm anyway

#

i dont remember tbh

blazing ocean
#

master is outdated

#

what is gfm

lilac dagger
#

uh kotlin, i regret looking at this

remote swallow
blazing ocean
#

skill issue

#

you're not worthy

remote swallow
#

or a dokka javadoc format

blazing ocean
#

dokka default is pretty good

remote swallow
#

oh i remember

#

gfm is a markdown version

blazing ocean
#

maybe i'll try it

remote swallow
#

gfm is shite

lilac dagger
#

what does packed even do? i see keys, i see blocks i see items

blazing ocean
#

RTFM

remote swallow
#

ill rtfm ur mom

lilac dagger
#

that doesn't give me anything to go on, i'm not familiar with the abreviation

blazing ocean
#

read the fucking manual

lilac dagger
#

you can modify a resource pack on the go?

#

does the client allow this? i didn't know

blazing ocean
#

well no

#

it's meant for generating resource packs on server load or when you're changing it

lilac dagger
#

oh

blazing ocean
#

should probably change the description a bit

lilac dagger
#

yeah, it's a bit missleading

blazing ocean
#

i cannot write docs

#

at all

lilac dagger
#

ask chat gpt

#

it does a good enough job

#

altho i don't like the 1900 style of writing

viral shell
#

So, i was making a config and i notices that all the comments i put onto the cfg were removed when i start the plugin

#

How can i fix this

#

pre-build

#

and after

tender shard
#

dont save it

eternal oxide
#

are the comments in teh config.yml you put in teh jar?

tender shard
#

only write the default config using saveDefaultConfig() and then don't save it again

eternal oxide
#

or you are using an old spigot that does not support comments

viral shell
#

What do u mean for dont save it

viral shell
#

It was also not working on 1.18.1

#

Only the comments in the top are keeped

tender shard
viral shell
eternal oxide
#

you do

tender shard
#

show your onEnable method

#

?paste

undone axleBOT
viral shell
#

i need to remove saveconfig?

tender shard
#

yes

eternal oxide
#

replace BOTH those lines with saveDefaultConfig();

hard radish
#

if player logs out will bukkit task scheduler still work?

slender elbow
#

the scheduler has nothing to do with players existing

#

the server will still tick, and the scheduler will run queued tasks

inner mulch
#

is there a way to detect a headshot with an arrow?

eternal oxide
#

not without diving to nms

inner mulch
#

how would that be done with nms?

eternal oxide
#

in teh ProjectileHitEvent (Paper) exposes teh hit location

#

not available in Spigot though

inner mulch
#

ok

young knoll
#

No but you can compare the location of the projectile in said event to the entities eye location

eternal oxide
#

Seems I'm also wrong about it being in Paper

inner mulch
#

ok

eternal oxide
#

I could have swore there was a HitAt or something

inner mulch
#

thank you guys

#

im gonna try it out

wet breach
# inner mulch thank you guys

there is an easy way to do this depending on what you are making. If this is for some kind of game event then the ideal solution would be to create a bounding box around your players heads. This way you are not having to calculate distance from the eyes to various parts of the head. Also to increase accuracy if you want to be sure it did in fact hit them there is another event that lets you know if an arrow stuck into an entity called ArrowBodyCountChangeEvent

inner mulch
#

okay thanks

meager hill
#

Anyone have an understanding of how chunks are packed and sent to a client. I cant figure out how to send chunk data so my server is empty. The client can connect but is stuck in an empty world. From what I have seen, Gzip is the compression algorithm used but I cant seem to get it working (attempting to decompress the byte array for chunk data to have a way to test back and forth).

Everything else seems to be working (players can join correctly) and now i just need to generate chunks. The current way im getting around this is by sending already compressed data intercepted by a working server and Wireshark.

For the Gzip examples i have found, all of them include all the logic then just call it. Since I'm writing my server in C, most of the examples are only useful for pseudocode but are useless when they abstract away the actual logic.

meager hill
#

16x16x16 right then the stack is sent

wet breach
#

I only remember the old way, it was something like 4x256x4 or something like that

#

as I said columns

#

we understand chunks as they are stored, but sending them is done differently

#

there is a wiki page that describes how chunks are sent, in fact I think wiki.vg does as well

meager hill
#

I have been following the wiki but am stuck on the byte array of compressed chunk data

#

I dont actualy know how to compress the data i have. I have tried Gzip but it just breaks everytime

wet breach
#

from looking at the wiki.vg, the bytearray is sections that contains biomes

#

that tells you how the data is formated for the sections

meager hill
wet breach
#

1.7?

meager hill
#

yea

wet breach
#

you should use 1.7.10 then

#

but no matter

#

so yeah the old way is columns then

meager hill
#

let me try Zlib compression of my world data and see if that + the headers i have will work

wet breach
#

so accordingly its 16x256x16 for the chunk columns from what wiki.vg says

meager hill
#

I must have missed that the last time

#

So i have to send the entire vertical all at once

meager hill
#

is Gzip for newer versions. I realise i wasted 6 hours trying to get Gzip working

wet breach
#

if I recall gzip has its own implementation of zlib that is not quite the same as it has minor changes

#

therefore you should use the zlib that comes from the mc jar

#

this way you are using the same version as the game uses

meager hill
#

alright, let me go try that

wet breach
#

a chunk section is 16x16x16, and a chunk column is 16x256x16. so that means there is 16 sections in a chunk column. and not all sections need to be sent

#

which most of the air blocks above a certain point for example don't get sent usually

#

air blocks are also not sent as well, only if there is a block in a certain location is sent, which reduces overall size

#

also note that the amount of chunks sent at a given time in 1.7 is different from the updated versions as well

meager hill
#

would i be able to get around this by using the multiblock change instead of sending the chunk, Will the client crash if it recives block data in a chunk it has not been sent?

#

it would be horrendously slow but then i dont have to compress

wet breach
#

client won't crash, but if the chunk is not loaded and it recieves data for blocks in an unloaded chunk I believe it just ignores it

#

but multiblock change should cause the chunks to get loaded though if you use that method

#

however it may cause some lag on the client if you send a large amount of data in regards to block changes

floral drum
wet breach
floral drum
#

yea

warped thistle
#

Wait

#

No external emojis

meager hill
#

That's fine, Im doing this as a project in C, it dosent need to be "Playable" right now this is all i have

warped thistle
#

I'm going to kms

wet breach
wet breach
warped thistle
#

oh

wet breach
#

!verify

undone axleBOT
#

Usage: !verify <forums username>

warped thistle
#

alr thanks

#

your pfp and accessory combo might be the silliest one ive seen yet

wet breach
young knoll
#

You need to boost for external emotes

wet breach
young knoll
#

I believe us staff can use them too, but I donโ€™t have nitro lul

drowsy helm
late sonnet
#

@young knoll you can suggest md5 give nitro to staff DoggoHehe

shadow night
#

Do you guys ever feel like it and change the DPI on your phone?

lime wave
#

is there a way to convert an ItemStack to String and then back to ItemStack?

#

what values would be lost (if so)?

drowsy helm
#

base64, binary, pretty sure yamlconfig has a toString

wet breach
#

of you could go with something custom

drowsy helm
#

does toString include nbt?

eternal oxide
#

No clue, but I remember Choco talking about toString() and the ItemFactory a while back

lime wave
#

Will try

eternal oxide
#

test it by sysout

#

see if it contains nbt/enchants

drowsy helm
#

if not, i use this

#

BukkitObjectOutputStream

lime wave
#

it saves UNSPECIFIC_META

alpine cairn
#

How do I package a jar with Gradle?

echo basalt
#

./gradlew build usually does the trick

#

Other alternatives are ./gradlew shadowJar and ./gradlew reobfJar if you're running paperweight

hollow cliff
#

Hi!

https://lunr.pics/JWmQ4BDq.png

I am trying to find the location of the end of the 4 cannons in the photo above. I am doing this cuz I want to shoot lasers from them. I would appreciate if someone could tell me the logic needed to fix this.

The problem I am facing is that as the player changes pitch, their perception of the vehicle changes. (ie it might look closer or further)

My vehicles are also set up kind of sketchy.
I have a slime that moves on awsd,space, and shift,
a zombie that repeatedly teleports to the slimes location (the model is an item with custommodeldata on its head),
and then the player is riding the slime

My explanation is definetly confusing so please ask questions.

drowsy helm
#

you can do it all with vectors pretty easily

#

Vector has the rotatearound method

summer scroll
#

Is there an event that's get called if player's heart value change?

#

For instance, if player got damaged or got healed by regeneration potion, etc.

drowsy helm
summer scroll
hollow cliff
drowsy helm
#

do you have a visualisation

eternal oxide
#

zero the Y axis, then .normalize()

echo basalt
#

hm

#

cursed idea

#

Java but you have to import every method you call

eternal oxide
#

no imports, full path every time

echo basalt
#

perfect

#

also you need to import methods declared in the same class

#

including recursive methods

sterile breach
#

How I can get nms player channel in recent version?

I'hv done that

    Player p = Bukkit.getPlayer(pname);
    CraftPlayer craftPlayer = (CraftPlayer) p;
    ServerGamePacketListenerImpl connection = craftPlayer.getHandle().connection;

but Idk what get after that

sullen marlin
#

?xy

undone axleBOT
sterile breach
#

I am just trying to get player netty channel

#

with nms

blazing ocean
#

for what

sterile breach
#

just to understand how work nms

echo basalt
#

PRetty sure that .pipeline cones next

#

Might be a geyser thing tho

sterile breach
viral shell
sterile breach
#

channel

#

then channel pipeline

drowsy helm
#

is there any magic value util to get these speeds from material?

pliant topaz
#

u can get the digspeed of an itemstack

#

but idk if its these values

drowsy helm
#

i think thats with block data

#

ig i can't get it without using the block

pliant topaz
#

item.getItemMeta().getTool().getDefaultMiningSpeed()
item being ur itemstack

hard radish
#

is it possible to adjust actionbar position?

blazing ocean
#

are you talking left/right or up/down

hard radish
#

up/down

#

well kinda both

blazing ocean
#

you're gonna need custom fonts and negative spaces for htat

hard radish
#

hummm ok i guess ill google for some

rough drift
#

is there a way to use a debugger in spigot?

blazing ocean
#

remote debugging

rough drift
#

?

blazing ocean
grizzled ledge
#

Does anyone know an API to create inventories in a much faster way?

sullen marlin
#

Wdym

brittle geyser
summer scroll
ivory sleet
#

Simplicity is nice, sadly it usually compromises on scalability and often hinders complex behavior

hollow cliff
warm mica
brittle geyser
warm mica
#

Fair. Just saying that there's possibly better solutions, if efficiency is a factor

pseudo hazel
#

its fast to a developer to use

#

doesnt mean its fast for the server

keen charm
#

Hey

#

In newer version ClientboundAddEntityPacket is sent in ClientboundBundlePacket

#

But in older versions like 1.18.2 bundle packet doesn't exist and add entity packet isn't sent individually. How is it sent?

lilac dagger
#

Is it actually?

keen charm
#

Yes, I'm listening to ClientboundAddEntityPacket individually and it doesn't work

#

I believe I'm not doing something wrong

#

(it was my bad, it's sent individually)

#

Does changing a player's GameProfile in PlayerLoginEvent change the player's skin on join?

#

Or do we have to send a respawn packet for it to apply

warm mica
#

Especially since it's very limited and you have to code basically every UI component yourself

runic pine
#

my gradle not find the dependence

#

what can i do

hazy parrot
#

Debug why Gradle can't find it

runic pine
#

how i debug

hazy parrot
#

Maybe you are not adding an appropriate repo

runic pine
#

is local

hazy parrot
#

Show your build file

#

Have you added maven local()

runic pine
#

compileOnly(fileTree(mapOf("dir" to "libs", "include" to listOf("*.jar"))))

#

repositories {
mavenCentral()
mavenLocal()

maven("https://jitpack.io")
maven("https://oss.sonatype.org/content/repositories/snapshots")
maven("https://repo.codemc.io/repository/maven-releases/")
maven("https://repo.aikar.co/content/groups/aikar/")

}

dependencies {
compileOnly("org.spigotmcspigot1.8.8-R0.1-SNAPSHOT")
compileOnly("org.projectlombok:lombok:1.18.32")
compileOnly(fileTree(mapOf("dir" to "libs", "include" to listOf("*.jar"))))
implementation("com.github.DevNatan:inventory-framework:2.5.4-rc.1")
implementation("me.devnatan:inventory-framework-platform-bukkit:3.0.8")
implementation("co.aikar:acf-bukkit:0.5.1-SNAPSHOT")
compileOnly("com.nickuc.chat:nchat-api:5.6")

annotationProcessor("org.projectlombok:lombok:1.18.32")

}

#

works on other dependencies on lib folder

#

but this specific .jar no works

midnight shore
#

Why are you adding the dependency outside the dependencies scope?

#

Oh it was just to point out.. mh interesting

runic pine
midnight shore
#

Have you tried reloading everything?

runic pine
runic pine
#

close the intellij too

#

and open again

midnight shore
#

Have you tried refreshing dependencies?

runic pine
#

yes

midnight shore
#

Double click the jar file from intellij and see if it is the right package you are trying to import

runic pine
#

yes

#

its right

misty oak
#

Heyy guys
I selected a head with the (Kulls - The Ultimate Head Database) plugin and equipped it on a piece of armor. I want this head to contain specific items. I am looking for a plugin that will allow the head to break and drop the items inside when right-clicked. Which plugin can I use?

midnight shore
misty oak
#

oh yea sorry

midnight shore
# runic pine its right

Weird, maybe itโ€™s some kind of broken cache.. try refreshing dependencies again, I mean right click on the project on the gradle side bar and select โ€œRefresh Gradle Dependenciesโ€

hard radish
#

is it possible to just do setMaxHealth(0) to erase the health bar?

#

im just wondering what will happen if i do that... lol

midnight shore
#

Try and see

hard radish
#

it only puts you at half a heart

#

prob need a resourcepack to get rid of healthbar :/

blazing ocean
#

you can set some shit like wither hearts to an empty texture

hard radish
#

humm ok ill check that out..

#

kinda wanna make something like hordes.io but in minecraft lol this is ganna be one long journey

vital sandal
#

Can you change the protection level of an armor piece ?

#

Like the bar displaying the armor toughness

sterile breach
#

if client send place block packet but for the server the client is in spectator, events will be called?

eternal oxide
#

you can't place blocks in spectator made.

#

if you are expecting the spectator to be placing

sterile breach
#

yes I know but if client sent place block packets

eternal oxide
#

If the server thinks the client is in spectator but the client still sends a block place its unexpected behavior. Outcome is uncertain

sterile breach
#

ah yes I have test and yes

hard radish
#

https://paste.md-5.net/osexekijob.java
just started messing around with packets. need someone to help me out here.. trying to make it so when a player opens advancement tab, it would cancel the event and force player to do command. The code just stops at line 27

#

and also the code only works when player is closing the advancement instead of opening... idk why

drowsy helm
#

Protocol lib ๐Ÿ˜ฆ

hard radish
#

yup using protocol lib

viral shell
#

retrooper/packetevents on github

#

Its more fast and simpler

hard radish
#
#

.-. my brain cant handle all these api

hard radish
viral shell
#

Make a new class and implement PacketListener

#

Then make a onPacketReceive function with PacketReceiveEvent as event

#

now create a statement where if event.getPacketType equals PacketType.Play.Client.ADVANCAMENT_TAB initializes the Wrapper for that packet

#

and then do your things

blazing ocean
torn shuttle
#

man my brain is not activating today

#

where's alex jones to sell me brain pills

silent wave
#

i need help
for some reason when i run my start.sh on my vps in just 15-30 seconds my server shuts down
and in the console dont send any message from an error
like if u press CTRL + C
its bungeecord

river oracle
upbeat hawk
#

I cant use the spigotmc website, it's saying that I got banned temporarily from accessing the website.
Error 1015: You are being rate limited
Is this just a bug?

kind hatch
#

Wait like 2 minutes and try again.

hard radish
viral shell
#

Did you follow Packetevents' guide?

hard radish
#

this was the sample

viral shell
#

example*

#

the attack detector example

viral shell
river oracle
#

I have a question regarding class loaders. Atm I'm making a classloader for plugin loading. However, I am giving plugins the option to not add other depended plugins into their classloader

#

I'm not sure where to really start doing this tbh

wet breach
river oracle
#

I've not really worked extensively with them and the resources seem fairly stark

tardy delta
#

havent understood the sentence

#

disallowing dependencies from obtaining access to your plugin class?

river oracle
wet breach
#

There is a hierarchy to the class loading chain. Ideally each plugin has their own classloaders which is extended from the server, the server has its own classloader which is extended from the JVM

river oracle
wet breach
#

you wouldn't really be able to disallow access to another dependencies classes as its simply just finding the classloader responsible for it and accessing from there

sterile breach
#

how work event canceling with packet? server send a packet who cancel the action? (for example if I take an item in a slot, server send a packet who place this item in the slot?)

river oracle
#

the question is though if 2 plugins depend on eachother how would I go about joining their loader perse so they can ensure the plugin classloader can find the correct classes

wet breach
#

thought you wanted them separate?

river oracle
#

only if specified

#

otherwise I want them joined

wet breach
#

by default pretty sure if a lower classloader loads classes, the higher up loaders have automatic visibility of that

river oracle
#

so If I wanted to do this I'd need to override the URLClassloader and do some shenanigans

wet breach
#

not necessarily, if you wanted them to be separate you can, just that you wouldn't prevent complete separation. So you could make it to where a plugins classes are not automatically visible to another plugin, but you would need to run like 2 class loaders for your plugins.

river oracle
#

whats the reason for the 2nd class loader when doing that

wet breach
#

well the default setup is that the plugins classloader is going to register classes to the loader of the server or the one thatt is managing the plugins overall

#

this is how other plugins can see classes

#

the second loader would simply not register those classes higher up

#

but, plugins loaded with the second loader though wouldn't be accessible via classpath

#

instead they would still be accessible if they are in the same directory

#

since the classloader of the plugins can still load a jar

sullen belfry
river oracle
#

especially in the case of overlapping dependencies of different versions

wet breach
#

you will probably need to override the classloader and make your own then

hybrid spoke
sullen belfry
#

that is true lol sorry 1 second

#

?paste

undone axleBOT
river oracle
wet breach
#

fortunately making your own classloader isn't super difficult

river oracle
#

yeah I know little to nothing about class loading currently

wet breach
#

its basically glorified file loading

#

except you don't need to read the files yourself

river oracle
#

I'll prob just extend from URLClassLoader

#

that is what I was using before

wet breach
#

that is the ideal way

#

and just add from there

hybrid spoke
#

rather reuse it

sullen belfry
#

thanks

river oracle
wet breach
#

lol

river oracle
#

figuring out where to start uses a lot of brain power

wet breach
#

this is why copying was invented

river oracle
#

see this project is already yielding me great knowledge

#

I get to learn about ClassLoading

river oracle
wet breach
#

probably a good start

sullen belfry
tardy delta
#

looks like a plugin i made lol

#

made skill xp requirements follow a mathematical formula defined in config

hybrid spoke
restive mango
#
SynchedEntityData data = ((CraftPlayer) player).getHandle().getEntityData();
            data.set(new EntityDataAccessor<>(6, EntityDataSerializers.POSE), Pose.SLEEPING);
            data.set(new EntityDataAccessor<>(14, EntityDataSerializers.OPTIONAL_BLOCK_POS), Optional.of(BlockPos.ZERO.offset(player.getLocation().getBlockX(), player.getLocation().getBlockY(), player.getLocation().getBlockZ())));

           ((CraftPlayer) player).getHandle().connection.send(new ClientboundSetEntityDataPacket(pInt, data.packDirty()));```
#

what's wrong with this?

brittle geyser
#

wdym

restive mango
#

[11:51:44 ERROR]: Error sending packet clientbound/minecraft:set_entity_data (skippable? false)
io.netty.handler.codec.EncoderException: Failed to encode packet 'clientbound/minecraft:set_entity_data'

#

throws this error

#

player is the player, pInt is the .getinteger for them

#

on the client i very briefly go sleeping and then it promptly kicks me

desert root
#

Hi, I'm trying to create a plugin, but when simply using ItemStack stack = new ItemStack(Material.STICK);, the legacy material support turns on with this message:
[org.bukkit.craftbukkit.v1_16_R3.legacy.CraftLegacy:<clinit>:257]: Initializing Legacy Material Support. Unless you have legacy plugins and/or data this is a bug!.
Can I do something to prevent that?
I have my api-version set to 1.16.

green kraken
#

Does anyone here have itemsadder plugin purchased?

desert root
#

Hi, I'm trying to create a plugin, but

languid briar
#

This banned

#

Grom2018 what is bro typing ๐Ÿ˜ญ

amber ferry
#

Hello can someone help me with this, its my first time trying to set up a minecraft server:

amber ferry
languid briar
#

Whats the issue

amber ferry
languid briar
amber ferry
blazing ocean
#

don't send a screenshot, send it as text

#

?paste it here i meant

undone axleBOT
amber ferry
hybrid spoke
#

thats what ?paste is for

#

otherwise

languid briar
#

Yes

hybrid spoke
#

?verify

#

!verify

undone axleBOT
#

Usage: !verify <forums username>

languid briar
#

Yeeee

#

I have perm