#help-development

1 messages · Page 1117 of 1

hybrid turret
#

to help each other?

worthy yarrow
#

Maybe I do actually care

hybrid turret
#

not using early returns

worthy yarrow
#

Maybe I actually care about someone learning

#

Perhaps I feel like teaching the man to fish rather than feeding him for a day

hybrid turret
#

it feels good to help. but we can't help with basic java if we don't all wanna be here full-time...

undone axleBOT
#

Spoonfeed a newbie for a day and they'll come back with more questions. Teach them to find their own answers and you'll both be better off: you won't get stuck answering the easy questions and they'll be much more productive than before.

hybrid turret
#

spoonmoment

worthy yarrow
#

Forgot that exists

#

Kek

hybrid trellis
#

Works if the ghost item turned real

hybrid turret
#

wait what?

#

what does that mean?

hybrid trellis
#

I'm assuming I did something wrong

hybrid turret
#

oh

#

i misread

worthy yarrow
#

Is this packet shit we’re dealing with?

#

I never looked at the link

hybrid turret
#

you have your listener with InventoryClickEvent

hybrid turret
hybrid trellis
#

Yes

worthy yarrow
#

Oh

hybrid turret
#

you cancel it

#

do your code stuff

#

and in the listener after player.closeInventory()

#

you run

#

this

#

then the ghostitem will disappear

#

at least that's what the post said

hybrid turret
#

good start

worthy yarrow
#

?jd-s

undone axleBOT
worthy yarrow
#

For spigot documentation ^

glossy laurel
#

ik

hybrid turret
#

you can't even imagine how much you learn just by reading the Java documentation

clear plaza
#

Maven

hybrid turret
#

For me I kinda clinged myself to the api. But eventually i started actually learning java and i could do SO MUCH more

hybrid trellis
worthy yarrow
glossy laurel
#

I can... do that ig?

hybrid turret
worthy yarrow
#

For example in java there’s no “player” object, this is apart of nms code which abstracted to bukkit which abstracted to spigot and so on, that being said in regular java you could do player player = bukkit.getPlayer

#

You’d have to define what a player object is yourself

#

Etc

hybrid turret
echo basalt
#

mfw no effective java

worthy yarrow
#

Def not

glossy laurel
worthy yarrow
hybrid turret
#

my bad!

#

you have to pass the actual function

echo basalt
#

I got the 2nd edition for like 5 bucks

glossy laurel
#

no offense but I didn't learn java yesterday

echo basalt
#

3rd edition is goated and you can find it on ytb

hybrid turret
worthy yarrow
hybrid turret
#

oh

#

didnt

#

i cant read today

#

well

#

noone said that and noone is meaning to insult you.

hybrid trellis
hazy parrot
#

Exactly

#

?learnjava

undone axleBOT
#

For Beginners:

Codecademy - Learn Java: Interactive Java programming course from basics to more advanced concepts. Perfect for absolute beginners.
https://www.codecademy.com/learn/learn-java
JetBrains Academy - Java Developer Track: Learn by doing with projects and challenges. It covers Java fundamentals to advanced topics.
https://www.jetbrains.com/academy/
Udemy - Java Programming Masterclass for Software Developers: Updated courses that cover Java 8 to Java 17 features. Suitable for those who prefer structured learning.
https://www.udemy.com/course/java-the-complete-java-developer-course/

For Intermediate to Advanced Learners:

Oracle Java Tutorials: The official guides by Oracle for Java programming—great for understanding the depth of Java.
https://docs.oracle.com/javase/tutorial/
Baeldung - Learn Java and Spring: Focus on Spring Framework and modern Java technologies. Best for intermediate learners aiming to expand their knowledge.
https://www.baeldung.com/

Practice and Hands-on Learning:

Exercism - Java Track: Solve exercises and get feedback from mentors. Great for practicing coding skills.
https://exercism.io/tracks/java
LeetCode: Practice your coding skills and prepare for technical interviews with Java.
https://leetcode.com/

Free Resources and Documentation:

Java Programming and Documentation: A comprehensive collection of Java programming guides, tutorials, and API documentation.
https://docs.oracle.com/en/java/

Community and Support:

Stack Overflow: A vast community of developers. Great for getting help with specific problems or understanding concepts.
https://stackoverflow.com/questions/tagged/java
r/learnjava on Reddit: Join the community of Java learners and get advice, share resources, and discuss projects.
https://www.reddit.com/r/learnjava/

Remember: Learning to program takes practice and patience. Don't hesitate to experiment with code and participate in community discussions. Happy coding! 🎉

glossy laurel
worthy yarrow
#

Either way it seems clear to me that you’re not knowledgeable enough to use an api, so that’s why I told you to learn java… it wasn’t to be taken offensively but again that wouldn’t be my issue

hybrid turret
echo basalt
#

can y'all shut the fuck up and understand that he knows the basics of java and the worldedit api is only kinda dogshit

hybrid trellis
glossy laurel
echo basalt
#

the docs are also inconclusive

worthy yarrow
#

And I’m pretty sure clipboards are explained in their docs

hybrid turret
echo basalt
#

they're still a wonky concept to explain

worthy yarrow
#

Then play around with them?

glossy laurel
worthy yarrow
#

Go and figure it out yourself man that’s the whole point we’ve been trying to make, he’s one of those people who look at it for 5 seconds then decide they don’t know what the fuck their doing

#

Then come here for spoon feed

echo basalt
#

haven't you also been doing that for the past 2 months

worthy yarrow
#

I’ve been here maybe 4 times for help?

hybrid turret
glossy laurel
worthy yarrow
#

So no that’s not what I’ve been doing

worthy yarrow
echo basalt
#

you can also come up with an explanation that isn't spoon feeding

hybrid turret
#

@orchid tapir is it working now?

worthy yarrow
#

One time for legacy codes and mini message and another time for dependency tree structure

echo basalt
#

A clipboard is basically just "pastable content"

worthy yarrow
#

I don’t think even that would help

echo basalt
#

Worldedit is platform-agnostic which means that they just write a huge core and then make little adapters for each platform

#

Which is slightly ass because you gotta convert everything to their format

worthy yarrow
#

You’d have to explain to him what a clipboard is doing under the hood and how to use it and in which ways you shouldn’t use it etc, but that comes with doing it yourself

#

Ie: teaching the man to fish rather than feeding him for a day

echo basalt
#

no you don't lmao just explain how it's used and if he wants to learn he can look at the code

glossy laurel
#

I just wanna know how to copy a location between 2 coordinates with we, that's all D:

worthy yarrow
#

A clipboard is used to gather contents as you put it, then your can use that clipboard to paste or save a schematic etc, that’s not shit I want to have to explain because it’s already explained in their fucking docs

echo basalt
#

Create a region for those 2 coordinates

#

Ideally a cuboid region

hybrid trellis
#

Works

worthy yarrow
#

10 minutes ago you said you didn’t

glossy laurel
#

I didnt

#

I just don't know how to use the world edit clipboard with their api

worthy yarrow
#

I mean… you essentially did, you said you didn’t know how to use one, sorry I got that wrong. But still my point of the spoon feed stands just go play around and figure it out

worthy yarrow
#

Experience is going to teach you what works and what doesn’t, that being said most people don’t like to explain this because it’s a waste of their time when you could have just followed the same process. It all comes with time and you just have to explore

glossy laurel
#

you could've explained how to use it quicker

#

OR

#

you could've just not started talking

worthy yarrow
#

You’re absolutely correct and yet

#

Here we are

hybrid turret
worthy yarrow
#

Don’t get stuck up on the past either, my intentions were to help. Sorry if I didn’t but I mean I promise you I was just trying to help

glossy laurel
hybrid turret
#

no?

#

if everyone would just "not talk" you'd get no help

glossy laurel
glossy laurel
worthy yarrow
#

You’ve also gotta understand we get plenty of dumb shit people through here with no prior java experience looking for that sort of spoon feed and as an active spigoteer, I can say it gets tiring and a bit frustrating

echo basalt
#

talking shit and then saying it's for your own good

#

hood classic right here

worthy yarrow
#

Talking shit as in providing the information

#

Ah yes hood classic indeed

echo basalt
#

we do have a lot of "hey pls spoonfeed man", please understand that nuclear is still kinda new to the world of helping people without helping people

worthy yarrow
#

That too

hybrid turret
#

beautiful sentence

#

we gotta get used to that shit too lmao

glossy laurel
worthy yarrow
#

It’s not that I mean to come off rude or offensive it’s just hard after so many times trying to explain “simple” stuff to someone and they still don’t get it makes me think they just don’t know anything (.) which is a flaw of mine for sure and should be worked on but at the same time I’d still rather put a little effort in being when I told you to learn more java or read documentation

echo basalt
#

nuclear you don't understand data structures go back to school

#

start over from 1st grade

#

let me know when you master quantum physics

worthy yarrow
#

That’s like the lowest effort help I could provide while still trying to help, and I just get tired of trying to explain that simple stuff all day ya know

azure zealot
#

does someone have a custom checkstyle for the intellij reformatter?

echo basalt
#

uh yeah

worthy yarrow
echo basalt
#

I have one that yeets final into everything

glossy laurel
echo basalt
worthy yarrow
#

Hmm

#

A, b, c, d

#

#ObfuscatedDataStructs

azure zealot
hybrid turret
#

(i use prettier bc i'm cool and now everyone will hate me on this dc)

echo basalt
#

spotless

worthy yarrow
# glossy laurel I know skript, and I know exactly what you mean tbh

Well then all that being said I hope we come to a resolution in that I was only trying to help and you were only trying to learn. Again there’s people here who are dickheads yes and I’m one of them lol, still I’d rather you learn to teach yourself than having to come back here every so often (more so for basic questions)

echo basalt
glossy laurel
echo basalt
#

different projects have different styles

glossy laurel
#

now lemme go poke around a bit, be back in 5 minutes probably 🤣

azure zealot
#

all projects have now the checkstyle

#

i tried everything

echo basalt
worthy yarrow
hybrid turret
#

@alpine urchin Tbh the only thing I kinda muss is proper documentation on how to get the stuff for sending the packets. Like in WrapperPlayerServerRespawn: isFlat, isDebug and in general the Conversion stuff should be mentioned i feel like

azure zealot
#

it does not put spaces only new lines

echo basalt
#

it'll yell at you to put final everywhere

worthy yarrow
#

Illusion is a master yeller

echo basalt
#

I am

#

but only at you

azure zealot
#

i want to use the bungeecord checkstyle

echo basalt
#

because you do a lot of dumb shit

azure zealot
#

in bungeecord

hybrid turret
#

lmao

#

dev beef

worthy yarrow
echo basalt
#

not an excuse to do dumb shit imo

hybrid turret
#

don't all developers come with that?

worthy yarrow
#

Well

glossy laurel
#

"I hit my head a bit and now I'm excused" ||jk||

echo basalt
#

I, too, use kotlin

hybrid turret
#

XD

worthy yarrow
#

Have you ever had a tbi illusion?

#

That shit rocked my whole world view I tell ya

hybrid turret
#

tbi?

worthy yarrow
worthy yarrow
#

Get something working before making it better is more or less what I’ve been told since I started programming

echo basalt
#

Anywans let's stop wasting everyone's time

lilac pond
#

Hi, any ideas about having different tick speeds for different worlds/players? The original vanilla command (/tick rate 20) is global.
There are no useful functions about tick rate in the paper documentation website. Would NMS somehow work? (I have no idea)
Some background you probaly don't care about: This is for a tas pvp server, where players can choose the tick rate to battle in. I have a decent amount of coding experience, but I'm a bit rusty when it comes to minecraft plugins

echo basalt
#

@glossy laurel a solid solution is to just look at how worldedit does it

lilac pond
#

Any directions would be appreciated

glossy laurel
#

I can try though

echo basalt
#

This is kinda what you want

worthy yarrow
#

It’s almost as if that’s what I was implying the whole time o_O

echo basalt
#

Yeah but now we have more context than just "do your research"

worthy yarrow
#

Ok ok I’ll stop arguing

#

Good luck on your project pumpkin sorry for being a dickhead earlier

echo basalt
#
    public static Clipboard copy(World world, Vector min, Vector max) {
        com.sk89q.worldedit.world.World weWorld = BukkitAdapter.adapt(world);
        Region region = new CuboidRegion(weWorld, toBlockVector3(min), toBlockVector3(max));
        Clipboard clipboard = new BlockArrayClipboard(region);
        ForwardExtentCopy copy = new ForwardExtentCopy(clipboard, region, clipboard, region.getMinimumPoint());
        Operations.complete(copy);
        return clipboard;
    }
#

yeet

#

might work

#

try it out

glossy laurel
#

did you make this

echo basalt
worthy yarrow
#

IntelliJ copy/paste thing?

glossy laurel
echo basalt
#

What you want is to intercept the player's tick method and only execute it if the tick % tickRate == 0 or whatever

worthy yarrow
#

Oh I’m dumb

echo basalt
chrome beacon
#

two world classes

glossy laurel
#

XD

worthy yarrow
echo basalt
#

Ideally you fork spigot itself

lilac pond
echo basalt
#

That'll affect it for everyone

#

The server has a central tick method that ticks everything

#

the /tps command affects that

worthy yarrow
#

Illusion you keep me so humble I hate you and love you so much for that 🥲

echo basalt
hybrid turret
#

hit delay?

glossy laurel
echo basalt
#

Nope

drowsy helm
#

No different

lilac pond
echo basalt
#

In this case it's more about physics vectors

echo basalt
hybrid turret
#

physics vectors? i only know vectors from maths

echo basalt
#

maths, physics whatever

lilac pond
echo basalt
#

run a vm

#

setup some kubernetes or something

glossy laurel
drowsy helm
hybrid turret
#

okay

worthy yarrow
#

Does world edit use bukkit’s vectors or do they have their own? (Not b3vectors)

echo basalt
#

In maths / physics / games, a vector is basically just a representation of a translation

lilac pond
echo basalt
#

bet 5 bucks that translates to dinosaur

#

aka pterodactyl

#

rip my wallet

lilac pond
#

bad translation

echo basalt
#

nvm it translates to "panel"

#

congratulations

#

it's probably pterodactyl

lilac pond
#

you can only send command, see log, and use ftp for files

drowsy helm
#

Panel service

hybrid turret
#

chinese jumpscare

lilac pond
echo basalt
#

does it look like this

lilac pond
#

yea kinda

echo basalt
#

congrats it's pterodactyl

glossy laurel
#

yayyyy

worthy yarrow
drowsy helm
#

Who tf hosts a website on ptero

glossy laurel
lilac pond
#

oh

echo basalt
#

Cool

#

Now pterodactyl runs on docker and has a lovely api

hybrid turret
#

nginx and home server 😎

lilac pond
#

some people call it 翼龙面板

echo basalt
#

so you can probably make it run temp servers

hybrid turret
#

or just swag

#

(which is based on nginx tbf)

drowsy helm
#

Portainer ftw

glossy laurel
lilac pond
#

翼龙is a kind of dinosor

drowsy helm
#

Or just raw proxmox

echo basalt
#

what hosts do is just apply a skin

glossy laurel
#

dayum alr

glossy laurel
drowsy helm
#

Thats default ptero

echo basalt
#

If you know a lil bit about pterodactyl and docker you can probably create an "egg" for your server

#

and then just create a million servers with that egg

worthy yarrow
#

Remember mcprohosting?

echo basalt
#

and do a lil networking with a plugin

#

maybe redis who knows

#

so that when the server starts up it knows its own id (env variable perhaps) and can fetch the tickrate

hybrid turret
#

egg

worthy yarrow
#

Does nitrado offer hosting for Minecraft servers too I wonder

echo basalt
#

might make my own bootleg k8s in pterodactyl ngl

lilac pond
#

so specificly, how would I achieve this? I only have access to minecraft server files

#

not all files on the vm

hybrid turret
#

had my first minecraft server on nitrado

#

felt like a god

glossy laurel
worthy yarrow
#

Oh so they do? That’s kinda funny

echo basalt
#

it's just a location but without a world

worthy yarrow
#

I only really know nitrado from my ark days

hybrid turret
#

minecraft is literally the first thing that pops up on their home page

echo basalt
#

might even need to use a lil bytebuddy

glossy laurel
worthy yarrow
lilac pond
#

how long do you think learning that would take?

#

days weeks months?

glossy laurel
echo basalt
#

that's worldedit

hybrid turret
#

tf is Block3Vector

worthy yarrow
#

We object

hybrid turret
#

oh is that a WE thing?

glossy laurel
echo basalt
hybrid turret
#

oops

#

oh

glossy laurel
#

but essentially same thing right?

echo basalt
#

Learning it from scratch.. good luck

worthy yarrow
lilac pond
echo basalt
#

nothing about NMS / limited spigot knowledge

hybrid turret
#

isn't "using nms" literally just remapping the mojang stuff and casting the spigot stuff to the remapped objects?

echo basalt
#

NMS isn't just a different format, it's actual internals

hybrid turret
#

but doesnt spigot also just interact with the internals?

#

or bukkit

#

or paper

#

or any api

echo basalt
#

For example I'm working on a bedrock server. The Geyser API doesn't expose anything about custom entities or packets, so I gotta mess with the internals and inject stuff into the player's connection to then listen to packets and decode them with the same library that geyser does

glossy laurel
hybrid turret
#

couldnt you THEORETICALLY do everything you can do in spigot with nms?

glossy laurel
#

-_-

worthy yarrow
# glossy laurel

Honestly not sure if toBV3 gives you a usable we object, I just take the x,y,z values from the bukkit vector and create a new bv3 object this way

echo basalt
#

And then I cast all the geyser objects to their impls to get the entity tracker and loop through entities

#

etc etc

glossy laurel
worthy yarrow
#

Looks good to me

glossy laurel
#

And as I understand min is the corner with the lowest X, Y, and Z?

#

(and max is the opposite corner)

echo basalt
#

pretty much

slate siren
#

If I put any symbol in .yml, it turns it into an interesting text format in the chat. I don't understand how to fix it. What kind of filter should be made?

hybrid turret
#

i don't quite get your situation, can you describe a bit more?

#

what yml, how are you using it, what does it store?

slate siren
#

Any of these here, for example, in word-settings.yml section,

#

death-messages: If I put "Killed (symbol)" it turns that symbol into an interesting text

drowsy helm
#

Wordpad?

worldly ingot
#

I'm wanting to use this anticheat's API and I decompiled it to look. I don't want to reupload the whole anticheat artifact to my repo but I can't repackage and upload just the API package because it references internal, obfuscated types (crazy). Is it insane of me to just make my own artifact with the same packages and classes, strip out the method implementations and just have the same method signatures, upload that and use it? KEKW

echo basalt
#

Go for it

drowsy helm
#

But if it works, it works

worldly ingot
#
public final class ViolationEvent extends Event implements Cancellable {

    public final CheckType getType() {
        throw new UnsupportedOperationException("you stink");
    }

}
#

But like wtf IT WOULD WORK

slate siren
echo basalt
#

I once replicated android classes down to the method definition in order to make an SDK work in plain java

worldly ingot
#

I mean I'm already hosting Spartan's API because it too isn't hosted anywhere so it's not like I'm not using my repo already

#

May as well add a new artifact lol

drowsy helm
# slate siren yep

Like I said, make sure you’re saving as utf-8 but were gonna need more information

#

How are you loading and sending the config

#

What characters

glossy laurel
worthy yarrow
#

Send the whole error

worthy yarrow
undone axleBOT
glossy laurel
#

okay thats no good

worthy yarrow
#

Kek

#

Uh oh

glossy laurel
#

none of the imports compile

#

[ERROR] /C:/***/ArenaReset.java:[48,9] cannot find symbol
[ERROR] symbol: variable Operations
[ERROR] location: class pumkinhead.lendapvp.ArenaReset
[ERROR] -> [Help 1]

#

its just a bunch of these

glossy laurel
#

and yes, I did include the dependency

drowsy helm
#

What build tool you using?

glossy laurel
drowsy helm
#

Maven or gradle?

glossy laurel
#

maven

drowsy helm
#

Try invalidate caches

glossy laurel
#

which ones do I check

#

all of them?

drowsy helm
#

I usually do all

worthy yarrow
#

Doesn’t hurt to do all

#

I mean

#

Well it can kek

glossy laurel
#

OH RIGHT

#

silly me

#

I forgor to change java version to 21

#

now how do I do that

#

lemme google rq

worthy yarrow
#

Project structure

drowsy helm
#

Project settings

worthy yarrow
#

Can’t you change it in the Pom too

drowsy helm
#

Fir compiler yeah

#

But ide goes by project settings

worthy yarrow
#

Right

glossy laurel
#

works now :)

grizzled fog
#

One message removed from a suspended account.

glossy laurel
#

uhm

#

onDisable()?

#

no?

worthy yarrow
#

When the server stops, your plugins on disable method will be called

hybrid turret
#

What is the UUID in NPC#changeSkin for (PacketEvents)?

worthy yarrow
#

Where’s retro when you need him

blazing ocean
hybrid turret
#

oh

#

right this was on the github

#

i forgot

#

thanks rad

pliant topaz
glossy laurel
glossy laurel
pliant topaz
#

FastAsyncWorldGuard?

glossy laurel
#

yeah

pliant topaz
#

shouldnt it be worldedit?

#

not worldguard

glossy laurel
#

world...guard

#

🤦‍♂️

#

damn

pliant topaz
#

we all love the moment when our brains aint braining right haha, happens all the time to me 🥲

glossy laurel
#

right

#

same thing though

pliant topaz
#

whats the same, worldedit and worldguard?

#

sorry, im probably being stupid

glossy laurel
#

same error

glossy laurel
#

this time it didnt fine "Extent"

pliant topaz
#

do you have your dependencies defined correctly?

glossy laurel
worldly ingot
#

genius tbh

quiet ice
#

Should've used a d v a n c e d reflection instead

worldly ingot
#

I didn't want to use reflection! I'm tired of using reflection!

quiet ice
#

Well, then just use the MH API and pretend it's not reflection

worldly ingot
#

I still use reflection for AntiAura which I'm not happy about

#

Though AA's API is dog shit

#

I've offered on multiple occasions to make him a proper API but he keeps forgetting about me 🥹

young knoll
#

Netty plz stop prepending my data with its length :c

slender elbow
#

netty doesn't do that, what are you doing 💀

young knoll
#

ctx.channel().writeAndFlush was doing it
ctx.writeAndFlush does not

#

my bad

slate siren
#

You were killed by SinHa who still had 10,0 Ô?ñ

❤ --> Ô?ñ

#

Why did he turn it into this?

eternal oxide
#

not utf-8

slate siren
# eternal oxide not utf-8

When opening the file, it opens as utf-8. Notepad ++ is also set,

A message is added with a command and when it is added, it is added with the Unicode code, but I want to add it directly as a symbol.

deft locust
eternal oxide
#

be sure to compile as utf-8 too

slate siren
eternal oxide
#

set encoding to utf-8 for compiling

#

sourceEncoding

young knoll
#

hrmm

#

Firefox can handle the response fine but the minecraft client is ... unhappy

    at ayf.a(SourceFile:137) ~[minecraft-1.21.1-client.jar:?]
    at asl.a(SourceFile:107) ~[minecraft-1.21.1-client.jar:?]
    at java.base/java.util.HashMap.forEach(HashMap.java:1429) ~[?:?]
    at asl.b(SourceFile:103) ~[minecraft-1.21.1-client.jar:?]
    at asl.c(SourceFile:140) ~[minecraft-1.21.1-client.jar:?]
    at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1768) ~[?:?]
    at bpk.h(SourceFile:91) ~[minecraft-1.21.1-client.jar:?]
    at bpk.a(SourceFile:146) ~[minecraft-1.21.1-client.jar:?]
    at bpk.run(SourceFile:102) ~[minecraft-1.21.1-client.jar:?]
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144) ~[?:?]
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642) ~[?:?]
    at java.base/java.lang.Thread.run(Thread.java:1583) [?:?]
Caused by: java.io.IOException: Invalid Http response
    at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1709) ~[?:?]
    at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1599) ~[?:?]
    at ayf.a(SourceFile:85) ~[minecraft-1.21.1-client.jar:?]
    ... 11 more```
torn badge
young knoll
#

oh shite he found my ip

torn badge
#

What are you even trying to download

young knoll
#

It's sending a resource pack request to the server port itself, and I am intercepting it and responding with the data

deft locust
#

nvm already fixed it

young knoll
#

what

torn badge
#

Why

young knoll
#

So plugins can host resource packs without any extra effort

slate siren
#

Waaa

#

Guys

#

I have a question

#

Now I have prepared a few Ranks, all of them have different colors.

#

There is a kill message during pvp

#

It is specified as {Player}, now when this player writes his name, will he also specify which color his name is?

zinc moat
#

?nms

blazing ocean
#

I especially love these bits

zinc moat
#

Can someone help me with nms

#

i need a jar for nms

blazing ocean
#

Show your pom.xml/build.gradle

zinc moat
blazing ocean
#

?whereami

zinc moat
#

oh shit

#

yh i forgot

#

i usally develop on spigot but i got a request for paper

round finch
#

🧻mc

young knoll
#

Aye I got it working

slate siren
young knoll
blazing ocean
slate siren
#

Is there no maven tab plugin?

#

I want to get the name color of the player, for example there are many Ranks and I want to get the name color, but when getting the name color it takes it with the prefix

kindred valley
#

?learnjava

undone axleBOT
#

For Beginners:

Codecademy - Learn Java: Interactive Java programming course from basics to more advanced concepts. Perfect for absolute beginners.
https://www.codecademy.com/learn/learn-java
JetBrains Academy - Java Developer Track: Learn by doing with projects and challenges. It covers Java fundamentals to advanced topics.
https://www.jetbrains.com/academy/
Udemy - Java Programming Masterclass for Software Developers: Updated courses that cover Java 8 to Java 17 features. Suitable for those who prefer structured learning.
https://www.udemy.com/course/java-the-complete-java-developer-course/

For Intermediate to Advanced Learners:

Oracle Java Tutorials: The official guides by Oracle for Java programming—great for understanding the depth of Java.
https://docs.oracle.com/javase/tutorial/
Baeldung - Learn Java and Spring: Focus on Spring Framework and modern Java technologies. Best for intermediate learners aiming to expand their knowledge.
https://www.baeldung.com/

Practice and Hands-on Learning:

Exercism - Java Track: Solve exercises and get feedback from mentors. Great for practicing coding skills.
https://exercism.io/tracks/java
LeetCode: Practice your coding skills and prepare for technical interviews with Java.
https://leetcode.com/

Free Resources and Documentation:

Java Programming and Documentation: A comprehensive collection of Java programming guides, tutorials, and API documentation.
https://docs.oracle.com/en/java/

Community and Support:

Stack Overflow: A vast community of developers. Great for getting help with specific problems or understanding concepts.
https://stackoverflow.com/questions/tagged/java
r/learnjava on Reddit: Join the community of Java learners and get advice, share resources, and discuss projects.
https://www.reddit.com/r/learnjava/

Remember: Learning to program takes practice and patience. Don't hesitate to experiment with code and participate in community discussions. Happy coding! 🎉

slate siren
vague swallow
blazing ocean
#

yw darth

young knoll
#

Ree, why does java not expose parsers for HTTP requests/responses

#

I know it has them smh

low field
#

why does

FillBiomeCommand.fill(
        ((CraftWorld) loc.getWorld()).getHandle(),
        new BlockPos(loc.getBlockX(), loc.getBlockY(), loc.getBlockZ()),
        new BlockPos(end.getBlockX(), end.getBlockY(), end.getBlockZ()),
        Holder.Reference.createStandAlone(biomeRegistry.holderOwner(), preset.biome)
);

error in Trying to access unbound value 'ResourceKey[minecraft:worldgen/biome / sg:labrooms]' from registry net.minecraft.core.RegistryMaterials$1 and how to fix it

carmine mica
#

You can’t just create holders randomly

low field
#

how can i do that

carmine mica
#

Get the holder from the biome registry

low field
#

it returns Biome

carmine mica
#

There are methods that return a Holder<Biome>

low field
#

oh

#

ive done this before and didnt care to check

#

ty

rough drift
#

I should rest 😭

frail willow
#

In which file is the Persistent Data Container (PDC) actually stored?

#

is it stored in the world folder?

pseudo hazel
#

yeah I think either world folder or in the player data

young knoll
#

Depends on what it's on

#

Chunk, Block Entity, (and World?) PDC goes in the region files

#

Entity PDC will be in the entity files

#

Player PDC is in the players data file

ornate mantle
#

any way to increase the attack range of mobs?

glossy laurel
#

Can I somehow avoid writing every single command into the plugin.yml file?

young knoll
#

Use a command framework

tardy delta
#

he wants to tell you to get reflective access to the commandmap

eternal night
frail willow
#

Thanks for the reply, if I put worlds into vanilla Minecraft and then bring them to the server, will the PDC be affected?

eternal night
#

no ™️

tardy delta
#

what

#

yes

eternal night
#

not a version apparently typing

hybrid trellis
#

In theory, could I have a seperate console window for my plugin

eternal oxide
#

why?

young knoll
#

Don't think that'll work well on literally any host service

quiet ice
quaint mantle
blazing ocean
#

they spam ?learnjava randomly here

quaint mantle
quiet ice
#

Nah, I have them blocked so whatever they say has no legal basis whatsoever

quaint mantle
quiet ice
#

@kindred valley

quaint mantle
quiet ice
#

It's @silent - dw

quaint mantle
#

tbh at first you ment that other scum lol

quiet ice
#

That other scum?

quaint mantle
quiet ice
#

They are not blocked, so at least they are not being an idiot

quaint mantle
quiet ice
#

Well I'm not too actively keeping tabs on spigot lately (given that I'm slowly moving over to other discords), so I'm not completely aware of all recent repeat offenders

quaint mantle
quiet ice
#

Also, I'm one of the few people that is actually ready to do at least medium amounts of spoonfeeding (that is, if one catches me on a good day, otherwise I plainly ignore requests or just skirt around them), so it's something I'll complain about the first time I see it

worthy yarrow
#

Perhaps it wasn’t for him but I did send something of the sort and remember that exact question

quiet ice
#

To be fair there was a point in time where I used to reask my questions several days later because I deemed it to be answered insufficently. These days I know that for most of my questions the pool of people that could answer them is near nada so I learned that there is little point in doing that.

worthy yarrow
#

I mean

#

.

#

I feel it's pretty simple for what fourteen said earlier

zinc moat
worthy yarrow
# worthy yarrow .

I even sent example usage (not that it's really hard to figure out but yeh)

grim hound
#

Uhhh I got a small issue

kindred valley
kindred valley
grim hound
#

What would happen if you sent a block update on the chunk the player spawns on but the server hasn't yet sent any chunks to the player?

#

He just told the client the spawning chunk a position

kindred valley
blazing ocean
#

#bot-commands buddy

grim hound
kindred valley
#

are you moderator?

grim hound
kindred valley
grim hound
#

The guy?

kindred valley
#

did i reply him?

grim hound
#

WHO, did you mean?

kindred valley
#

myself?

grim hound
#

Ah

#

Okay

#

xD

blazing ocean
#

#bot-commands

grim hound
tardy delta
#

#spigot

blazing ocean
#

those are the irc rules

#

which apply to discord as well

grim hound
blazing ocean
#

it's related to the topic

kindred valley
#

lol

blazing ocean
#

"why can't i send images?" sends a command that instructs you on how to send images

#

that seems relevant no?

kindred valley
#

i dont know java so i send learnjava

grim hound
#

I guess reading is an issue

blazing ocean
grim hound
blazing ocean
#

they send that all the time

#

randomly

grim hound
#

Yes

kindred valley
grim hound
#

Because it can be used offensively

#

Like you're a dev, you ask a specific question

#

And someone just does ?learnjava

#

I am not the one with an anime pic on my profile

kindred valley
#

yapping spotted

#

!paste

#

?paste

undone axleBOT
grim hound
#

Uh

grim hound
lost matrix
#

Whats with the spam in here

grim hound
#

Or something like that it was called

grim hound
#

Cuz one guy used ?learnjava to get the links

#

But another guy was asking a question

tardy delta
#

💀

grim hound
#

So some people thought they were insulting him

#

xD

tardy delta
#

people weak

blazing ocean
#

LOL

grim hound
#

Wait, how many messages do I have?

#

Can't check on mobile

lost matrix
#

Yes, helping others is truly pathetic. Being upset about others helping is even more.

tardy delta
#

20k

grim hound
#

Oh shit

grim hound
#

More than on my own

#

Wait it was called

blazing ocean
#

cool

tardy delta
#

ill stay quiet

grim hound
#

Sweet Happy Sugar Life

#

I think

eternal oxide
#

I don;t see him helping anyone. just randomly using it

quaint mantle
#

Y’all need to grow up

blazing ocean
#

i think you're the one not understanding it lol

quaint mantle
grim hound
#

Ye

grim hound
#

(I really mean it)

grim hound
kindred valley
#

yes

lost matrix
#

There is no deeper meaning to what you said. You simply tried using the amount of discord messages someone sent as an insult.

blazing ocean
#

mf i am gay

grim hound
#

What? xd

#

It's always the profile pic

#

Like I like anime, but not this much

#

I have a six pack if you wanna know

#

61 kg

rancid mauve
grim hound
#

Also, I've seen a lot of devs here being absolutely ripped

#

xD

#

Wait lemme send a pic then

#

Just will cut out my face

lost matrix
#

Alright guys, carry this to #general please

grim hound
#

Taken just now

#

Hope it doesn't violate any rules

blazing ocean
#

probably for a good reason

grim hound
#

Waiting...

tardy delta
#

dude took off his clothes for making plugins 😳

grim hound
#

It ain't much

tardy delta
#

ig thats how you get premium resources to work

grim hound
#

But it's honest work

sand spire
#

It starts at insults, ends at cuddles

quaint mantle
#

The 🧠 rot

blazing ocean
#

🗿

remote swallow
#

the rad rot

grim hound
tardy delta
grim hound
#

Isn't that

#

a skill issue?

#

There's many other ways to send a picture

undone axleBOT
#

Can't send images? That's because you're not verified! Use !verify to complete verification.
Alternatively, you can upload screenshots to any image hosting site and share the link.

Here's some screenshot utilities that you can use to upload images.
Lightshot: https://prnt.sc
Imgur: https://imgur.com/upload
Flameshot: https://flameshot.org

grim hound
#

hope it isn't some jumpscare

#

that's a watch

tardy delta
#

buddy has a watch and a hairy arm

rancid mauve
#

none of this is development-related

grim hound
#

your arm is skinny tho

nova notch
grim hound
#

was that like, you so skinny insult?

nova notch
#

like I'm no mod but why are we sending shirtless pics in help development

rancid mauve
#

I vote just ban shadow and kobasashi

grim hound
rancid mauve
#

get em out

grim hound
#

bruh

#

what did I do tho? xD

rancid mauve
#

then pretended like you did nothing xD

lost matrix
#

Everyone stop feeding the troll
Convo carries over to general, everyone else will get consequences

grim hound
#

you were just hypnotised

nova notch
#

wait who is the troll

grim hound
nova notch
#

o yeah

grim hound
umbral flint
#

Does anyone here live by dependency injection

grim hound
umbral flint
#

I find myself only using a Singleton if it's from another API

lost matrix
tardy delta
#

😑

lost matrix
umbral flint
#

Both

lost matrix
#

Singletons arent inherently bad. If you get a clean design out of them, and dont have any problems with circular dependencies, then go for it.

umbral flint
#

👍

worthy yarrow
#

it got deleted 😦

blazing ocean
#

dw about it

worthy yarrow
#

I just wanna know

blazing ocean
#

some rude stuff

worthy yarrow
#

breh

grim hound
worthy yarrow
#

He was the he

grave lagoon
#

👋 having trouble finding a way to register the event handler (in the main class) that also passes 2 players to my gui class which also is an event listener

public class Gui implements Listener{
    private final Inventory inv;
    public Gui(Player sender, Player target) {
        inv = Bukkit.createInventory(null, 27, Color.RED + "\uD83D\uDDE1 Duel vs. " + target.getName());
    }

    @EventHandler
    public void onClick(InventoryClickEvent event) {
        if (event.getInventory().equals(inv)) {

        }
    }
}
tardy delta
#

fields?

#

whats thhe problem? just register your gui as a normal listener no?

grave lagoon
tardy delta
#

the listener logic?

lost matrix
#

You should separate your concerns. Your GUIs should def not be Listeners.
Listeners should be registered once on startup and not during runtime. There is almost never a reason for that.

grave lagoon
#

no its registering it

grave lagoon
#

i feel like using the title would be bad practice no?

lost matrix
#

Yes that would be bad

hybrid spoke
#

inventoryholder ftw

#

otherwise go the boring "i save my gui instances" way

lost matrix
#

That has also been a horrible approach in earlier versions because it copied the entire inventory on every single click,

tardy delta
#

cipher woke up and decided on violence

grave lagoon
lost matrix
hybrid spoke
#

but fair to say its api misuse

#

a good api misuse

grave lagoon
#

the voices

#

lemme try something

#

rq

lost matrix
# grave lagoon the voices
public interface GUI {

  void onClick(InventoryClickEvent event);

}
public class GuiManager {

  private final Map<Inventory, GUI> guiMap = new HashMap<>();

  public void handleClick(InventoryClickEvent event) {
    Inventory inv = event.getInventory();
    GUI gui = guiMap.get(inv);
    if (gui != null) {
      gui.onClick(event);
    }
  }

  public void registerGui(Inventory inventory, GUI gui) {
    guiMap.put(inventory, gui);
  }
  
}
public class GuiListener implements Listener {

  private final GuiManager guiManager;

  @EventHandler
  public void onClick(InventoryClickEvent event) {
    this.guiManager.handleClick(event);
  }

}

Here is a minimal example. Missing alot of pieces but it shows the idea.

grave lagoon
#

ohhhh

lost matrix
#

PS: You can use the same tactic to delegate close, open and drag events to your GUIs

radiant atlas
lost matrix
#

And my answer was that he shouldnt register it at all. smileybolb
But im guessing he didnt ask how to pass two params to an object...

grave lagoon
radiant atlas
grave lagoon
worldly ingot
tardy delta
#

:o

#

why

lost matrix
#

I can imagine that if i wanted to register a static GUI which multiple people can click on at any time, then InventoryView would require me to register each view regardless.

slender elbow
#

he just wanted to say that he'd rather use InventoryView instead of Inventory for the map key

#

very nice comment, thank you choco

tardy delta
#

looks like he took the run

#

oh

worldly ingot
#

>:( i never run

slender elbow
#

only jog

worldly ingot
#

I believe InventoryView is referentially comparable whereas Inventory uses a hashCode() and equals() implementation. It may be faster to generate a hash and it's more unique to that viewer

lost matrix
worldly ingot
#

I can imagine you're going to end up overwriting your registration if two players open the same inventory

#

But that won't be a problem if you use the InventoryView

#

Which probably isn't a huge issue if your GUI instance is constant, but if it contains any state, you might end up losing that state and mangling state between two separate players with the same GUI open at the same time

lost matrix
#

Hmm. Ill let that sink in. Thx for input.

#

But i cant see this happening if each GUI is strictly related to a single Inventory instance

worldly ingot
#

We love IdentityHashMap

tardy delta
#

still does a System.identityHashCode 🤷‍♂️

clear plaza
#

How can I add a LibsDisguises dependency in my project? (Maven)

tardy delta
#

get it from jitpack perhaps? doesnt seem to have a repo

slender elbow
#

IHM is entirely reference based

lost matrix
worldly ingot
#

Yeah I care more about the uniqueness between players

#

But the IdentityHashMap offers some nice benefits too 😄

tardy delta
#

is the point of using an identityhashmap vs a normal one avoiding an invokevirtual Object::hashcode/equals?

#

thats what those docs essentially seem to say

worldly ingot
#

I mean when you can guarantee identity uniqueness, why generate a hash code and potentially deal with hash conflicts?

tardy delta
#

i mean if its non overridden it has the same effect as System.identityHashCode \👀

#

i mean ye

worldly ingot
#

Nah the implementation specifically doesn't use hashCode() or equals()

#

It does referential equality checks

#

Unsure how it stores things though. It might still use a hashcode for storage

lost matrix
#

The memory address is used as hash if i understood it correctly

tardy delta
#

thats what System.identityHashCode does 🎉

young knoll
#

What’s it censored

tardy delta
#

ah wtf

young knoll
#

wtf that’s a different comment

tardy delta
#

uh i realized it mightve been more appropriate to use the openjdk21 mirror

lost matrix
#

What

#

Ah

young knoll
#

Wait so which is right

quiet ice
#

-254 seems correct

#

(Since it's (h << 1) - (h << 8) = 2h - 256h = -254h)

tardy delta
#

buddy thought a shl would make it more clear, yet needed a comment to explain it

quiet ice
#

I'd personally prefer -((h << 8) - (h << 1)) but w/e

tardy delta
#

?ask

undone axleBOT
#

If you have a question, please just ask it. Don't look for staff or topic experts. Don't ask to ask or ask if people are awake or available. Just ask the question to the channel straight out, and wait patiently for a reply. Make sure you use the right channel regarding the topic of your question. Create a thread in case the channel is already in use!

quiet ice
#

I evidently don't, so cross me off from the list.

young knoll
#

It’s all about cpu cycles

tardy delta
#

anyways back to work, gotta write a state of the art unit test to fix this mem leak

quiet ice
#

but shouldn't JIT compile that well enough?

#

This seems like 20 year old code

tardy delta
#

what about the jit compiler 😂

#

c2 will probably beat the living hell out of that code

quiet ice
#

I guess better than me waiving a runtime assertion in potentially security-critical code, only to then hinting at the fact that the lack thereof could be sub-trivial:

        private static final long decrementReadCounter(AtomicLongArray array, int index) {
            // We do not need to check for the read access mask as the read access mask is not meant to be unset
            // if the amount of threads waiting for a thread is not 0. As we aren't supposed to decrement the
            // read counter twice, nor decrement it if we do not hold the read lock, we are free to assume that
            // there is at least one thread waiting.
            long value;
            do {
                value = array.get(index);
            } while (!array.compareAndSet(index, value, value - ConcurrentObjectInt32Map.VALUE_MASK_READ_LOCKS_LSB));
            return value;
        }
torn shuttle
tardy delta
#

looks amazing

torn shuttle
#

really whimsical

quiet ice
young knoll
#

wtf is that multi line comment

#

But not actually a multi line comment

quiet ice
#

Multiline comments are reserved for javadocs at my place

young knoll
#

Smh

quiet ice
#

// meanwhile is reserved for "this is stupid, but hear me out"

#

Other types of documentation shall not exist

young knoll
#

Java docs are /** multi line comments are /*

quiet ice
#

shhh

young knoll
#

And small profanity exclamations are //

torn shuttle
quiet ice
#

Anyways,

if (Objects.equals(keys.get(index), key)) {
  return (int) (ConcurrentObjectInt32Map.Bucket.decrementReadCounter(values, index) & ConcurrentObjectInt32Map.VALUE_MASK_VALUE);
} else {
  // Some other value most likely
  ConcurrentObjectInt32Map.Bucket.decrementReadCounter(values, index);
}

or

try {
  if (Objects.equals(keys.get(index), key)) {
    return (int) (values.get(index) & ConcurrentObjectInt32Map.VALUE_MASK_VALUE);
  }
} finally {
  ConcurrentObjectInt32Map.Bucket.decrementReadCounter(values, index);
}

?

#

Or in short: Do you think it's the job of a concurrent datastructure to properly handle faults in Object#equals implementations?

young knoll
#

Do regular data structures do that

quiet ice
#

Wouldn't that be the job of your buildsystem?

quiet ice
lost matrix
#

Do you want to modify the content of an already compiled .jar?

quiet ice
#

Here, the datastructure would lock itself up permanently

young knoll
#

What about other concurrent data structures

quiet ice
#

Generally use synchronized statements, which would relinquish the lock even on exceptional completion

lost matrix
#

That is generally a bad idea. Jars contain compiled code, so nothing you can cleanly edit as is.
You would have to decompile the jar, make sense of the decompiled code, and recompile it again, hoping that you have
all dependencies needed.

#

I mean you can technically modify .class files directly, but its gonna be very messy

blazing ocean
#

that was like 7 years ago lmao

young knoll
#

Did it work

blazing ocean
grim hound
#

I spawn an invisible armor stand with a red custom head

#

I want to detect whether the player has tried to clicked that head

#

so basically, whether he's currently looking at it is what I need

#

I cannot use any InteractAtEntity stuff because they're always seperated by a (barrier) block and also the invisible armor stand doesn't have a bounding box

worldly ingot
#

Two solutions I suppose. (a) Interaction entity at the armour stand's head, which is probably the cleanest way to do this, or (b) Raytrace on click against a would-be BoundingBox

lost matrix
#

Can you mount an Interaction entity on your head?

grim hound
#

so how would you do a?

worldly ingot
#

"would-be"

#

Make your own based on known dimensions

lost matrix
#

We have invisible entities now which are specifically used for recording interactions.

worldly ingot
#

but option a is just spawning an interaction entity, yeah

#

Position and scale it accordingly, listen for interactions

grim hound
#

and by "now", you mean it's a recent feature?

worldly ingot
#

1.20.5

#

Came alongside display entities

grim hound
worldly ingot
#

Oh, sorry, 1.19.4

#

I'm thinking of item components lol

grim hound
#

I'd need it like 1.12+

worldly ingot
#

CRY 6 year old software, sadge

grim hound
#

also, I do it 100% on packets, so no bukkit involved

worldly ingot
#

CRY Unsupported by circumventing API features

#

You hurt my heart!

grim hound
lost matrix
#

Spawn it, mount it, scale it and listen for interactions

grim hound
#

I can do everything, I just need to know when he's looking at it

lost matrix
#

Waiting for a followup

slender elbow
#

thatt might have been the case, like, a million years ago

#

but also, like, the gc is free to move objects around in memory and such so it's just not reliable

#

java 8 javadoc says "This is typically implemented by converting the internal address of the object into an integer", so it's some kind of address to identify the object, but those docs are long outdated anyway

young knoll
#

Who said the GC could move my stuff :O

#

It may look like a mess but I know where everything is!

worldly ingot
#

also the hashCode() is an int but memory addresses are... hopefully, 64 bit

humble tulip
#

😂

clear plaza
#

How can I add a LibsDisguises dependency in my project? (Maven)

young knoll
lost matrix
#

Currently hunting it down. src/java.base/share/native/libjava/System.c

JNIEXPORT jint JNICALL
Java_java_lang_System_identityHashCode(JNIEnv *env, jobject this, jobject x)
{
    return JVM_IHashCode(env, x);
}

Not really insightful...

young knoll
#

That is the most Js I have ever seen together

slender elbow
#

you can configure the runtime to use one of a few implementations

worldly ingot
slender elbow
#

by default it'll just generate a random number

lost matrix
#

Wait dont spoil it, im almost there

slender elbow
#

another setting is to always use 0!

worldly ingot
#

0 factorial!?

grim hound
#

so 1

quiet ice
slender elbow
#

yeah

quiet ice
#

Not sure what happened to it, it's been a year or two since, surely.

young knoll
#

hasherCode

slender elbow
lost matrix
worldly ingot
#

In the meantime we can enjoy our round of nothing but preview features in the upcoming Java release!

slender elbow
worldly ingot
#

Oh that's a lie. Markdown Javadocs too

#

But they're kinda uggo

young knoll
#

Did someone say markdown

worldly ingot
#

-#no

#

wait fuck

#

HOW DO YOU DO THAT ONE

slender elbow
#

space

worldly ingot
#

shit

young knoll
#

-# choco bad

slender elbow
#

do not shit in space

worldly ingot
#

Bested by whitespace again. What is this? Python?

young knoll
slender elbow
#

i'm pretty sure they don't

lost matrix
#
static inline intptr_t get_next_hash(Thread* current, oop obj) {
  intptr_t value = 0;
  if (hashCode == 0) {
    value = os::random();
  } else if (hashCode == 1) {
    intptr_t addr_bits = cast_from_oop<intptr_t>(obj) >> 3;
    value = addr_bits ^ (addr_bits >> 5) ^ GVars.stw_random;
  } else if (hashCode == 2) {
    value = 1;            // for sensitivity testing
  } else if (hashCode == 3) {
    value = ++GVars.hc_sequence;
  } else if (hashCode == 4) {
    value = cast_from_oop<intptr_t>(obj);
  } else {
    unsigned t = current->_hashStateX;
    t ^= (t << 11);
    current->_hashStateX = current->_hashStateY;
    current->_hashStateY = current->_hashStateZ;
    current->_hashStateZ = current->_hashStateW;
    unsigned v = current->_hashStateW;
    v = (v ^ (v >> 19)) ^ (t ^ (t >> 8));
    current->_hashStateW = v;
    value = v;
  }

So it falls back to some... pseudo random number generation. And it looks like that is added to an objects header.

worldly ingot
#

I wonder how codebases are going to look in 2024. Are we going to see a rise in Markdown vs Traditional Javadoc comments in stylesheets? 👀 A mix of both for newly added methods?

quiet ice
worldly ingot
#

I like the Markdown aspect a lot, I just wish they didn't do it with /// lol

worldly ingot
#

C# does the same, no?

tardy delta
#

yes

blazing ocean
#

not sure, i don't use it

lost matrix
#
} else if (hashCode == 2) {
    value = 1;

Lol this is my new favourite jvm flag

#

All hash codes are 1

worldly ingot
slender elbow
#

yeah lol

blazing ocean
#

xml 💀

worldly ingot
#

I don't want my Java code to look MORE like C#!

young knoll
tardy delta
#

arbitrary value

blazing ocean
#

wouldn't that just error with hashmaps since there's multiple of the same hashcode or would it return the first entry

lost matrix
slender elbow
#

no, hashmaps also perform equality checks

lost matrix
slender elbow
#

they take into account hash collisions

lost matrix
#

So they would be O(n) all the time

young knoll
#

Peak efficiency

slender elbow
#

technically not necessarily

#

for a HashMap, if the class implements Comparable on itself, it'll do a tree instead of a list

lost matrix
#

In theory there is an implementation where a hash bucket can be operated as a rb tree with sub-buckets

#

Yeah you sniped me

#

The object doesnt need to implement comparable even. You can use the hashCode int to build a tree.
Collision doesnt mean the hashCodes are identical.

slender elbow
#

until it does :Clueless:

lost matrix
#

Well in that case they are. Which would result in a tree with one bucket, where everything ends up being compared in O(n) again

#

Wait, the jvm doesnt impl trees using the hashCode right now?
Is this the time where i propose a JEP

slender elbow
lost matrix
#

I will probably get backhand slapped for being a doofus bc the idea is somehow atrocious

tardy delta
#

as usually how it goes in software development

wintry dagger
#

is there anyone here who handles reviewing resources submitted? i have a question

chrome beacon
#

?ask

undone axleBOT
#

If you have a question, please just ask it. Don't look for staff or topic experts. Don't ask to ask or ask if people are awake or available. Just ask the question to the channel straight out, and wait patiently for a reply. Make sure you use the right channel regarding the topic of your question. Create a thread in case the channel is already in use!

wintry dagger
#

ah, my resource was denied because "no text description", what exactly does it mean? that i need to have some sort of text in the resource, or that most of the description has to be text? im a bit confused

chrome beacon
#

if you have a bunch of images with text you need to transcribe them

quiet ice
lost matrix
wintry dagger
#

makes sense

quiet ice
#

Aw come on, it's THE funniest X86_64 assembly instruction

wintry dagger
#

my entire description is just an image with all the stuff so i added a spoiler transcribing the whole image aswell as having some text at the bottom, hope that gets accepted 👍

slender elbow
#

until you bring sse into play

#

but also why jni when ffm api exists

quiet ice
#

You can't cast Object to long with FFM :(

slender elbow
#

idk if i'd call a CAS the funniest instruction lol

quiet ice
#

Yeah, it's cursed.

slender elbow
#

why's that

quiet ice
#

Because who the fuck would want to CAS an object and a primitive at the same time?
Geolykt does.

young knoll
quiet ice
#

Aw, ruining the fun

slender elbow
#

it's just a CAS on two numbers

quiet ice
#

Nah, I was referring to the Object -> long "cast"/pointer conversion here

slender elbow
#

right right

quiet ice
#

I mean I ended up being able to use traditional CAS methods, but damn do I need a bunch more locks than actually needed

worthy yarrow
#

So considering I want to map players to roles within the islandImpl, would you guys say it is dumb to also reference an island role in the playerData as well?

#

I already hold their island in playerdata which you could derive the role from

echo basalt
#

tf is that wallpaper

worthy yarrow
#

I found it on wallpaperengine actually kek

echo basalt
#

do you really need the members set if you have the roles map

worthy yarrow
echo basalt
#

IMO you need to break it down into classes. Doubt there's a good reason to store roles on the player data itself

echo basalt
worthy yarrow
#

kek

#

I like it!

echo basalt
#

if you want to touch grass go outside don't stare at a fake tree

worthy yarrow
#

cmon man I went disc golfing yesterday and last sunday

#

and I am going tomorrow as well

young knoll
#

Why touch grass when you can look at fake grass

worthy yarrow
#

Also given I go with playerRoles style, I feel like I would put every person's uuid in every island's playerRoles map as to account for visitors (and it's respective role)

#

I'm not sure how I feel about this but haven't really thought about it too much, so any ideas on how to handle this?

young knoll
#

Uhh

#

No