#help-development

1 messages · Page 1253 of 1

sly topaz
#

bitbucket likes to put that information on the url, which is nice for big commits where you want to reference a specific line but generally annoying for a commit with a single line change lol

manic delta
#

okay i will try, thank you

#

i can finally post a update for my plugin lmao

jagged thicket
#

maybe it could persist on online so lmk

#

why are those two different

eternal night
#

one is the committer, the other is the author

jagged thicket
#

no like the pfp

chrome beacon
#

They are the commiter and it doesn't match their pfp

manic delta
chrome beacon
#

Did you commit using the wrong email

jagged thicket
#

maybe wrong username

chrome beacon
#

other than that idk

jagged thicket
eternal night
#

im confused

jagged thicket
#

yeah me too

#

lol

#

i do not know how that happens

eternal night
#

is that not your account?

sly topaz
#

wrong git configuration

jagged thicket
#

that is my pfp yes but it was years ago

sly topaz
#

is it the same email as the one from the stash account?

jagged thicket
#

yeah

blazing ocean
#

boiman123__

#

interesting

jagged thicket
chrome beacon
jagged thicket
#

prolly some windows credentials fuckery

sly topaz
#

ah but the username is different now

blazing ocean
sly topaz
#

yeah, most likely wrong git configuration

blazing ocean
#

my stash account is radstevee

chrome beacon
#

Not you rad

blazing ocean
#

then don't ping reply 😭

jagged thicket
#

idk how i could have two usernames

chrome beacon
#

I forgot to turn it off 😭

sly topaz
jagged thicket
#

nop

chrome beacon
jagged thicket
#

oh how to check

blazing ocean
sly topaz
#

I can't use youtube's angry emoji here but I would if I could

blazing ocean
#

kekw

chrome beacon
#

Should show it

jagged thicket
#

leme see

#

this is interesting

#

git is some dark magic no one can decode

worldly ingot
#

PES3_HmmSip a config?

chrome beacon
eternal night
#

username usually doesn't matter

#

email is the interesting bit

jagged thicket
sly topaz
#

it is most likely the windows credentials

jagged thicket
#

i reseted it

#

b4 commiting

#

and still happend

#

btw context that is my gmail pfp

sly topaz
#

not sure then, maybe your email got linked to that old username at some point and now it is just linked to that

wet breach
#

I am not sure I am understanding the issue here

sly topaz
sly topaz
jagged thicket
#

also username

#

diff username

sly topaz
#

and after we checked, the only difference is that the commit author has a different username for whatever reason

wet breach
sly topaz
jagged thicket
#

this is cursed look

wet breach
#

It is quite possible that you uploaded an avatar and then changed it to use gravatar

sly topaz
#

the user id is different for whatever reason, though

#

you probably triggered some kind of bug in bitbucket lol

jagged thicket
#

yeah

jagged thicket
#

@sly topaz see dm

sly topaz
#

was boiman123__ even your username at any point for that to happen tho

wet breach
#

so they have two stash accounts?

sly topaz
#

they don't, bitbucket just duplicated them

jagged thicket
#

my commit goes through the boiman one

#

i can login through the orang3i one

wet breach
#

ok, so you have 2 accounts?

jagged thicket
#

Nop

#

i didn't create them

#

i only made the orang3i account

sly topaz
#

?support

undone axleBOT
wet breach
#

then what might have happened is at some point you made a commit using the wrong user.name and it was accepted

#

and thus linked to your account

#

a user.name and user.email isn't necessary to upload a commit as that is handled through login credentials. So technically you can author/commit as one user, upload as another. But when you do this depending on the settings of the git hosting it will autolink accounts in this manner

jagged thicket
#

Ok yea i use login cred

wet breach
#

anyways, to get rid of the second auto created account you would need md5 to do that

slim wigeon
#

How?The method getLine(int) from the type Sign is deprecated

#

Anyway I can get the lines on the sign?

eternal oxide
#

signs are multi sided

#

ALL single sided sign methods are deprecated

slim wigeon
#

I just need wireless redstone, that is my goal

sly topaz
#

what does wireless redstone have to do with signs

chrome beacon
#

I wrote the exact same message 💀

sly topaz
#

great minds think alike * hats fedora *

slim wigeon
slim wigeon
blazing ocean
sly topaz
#

that is a 12 year old bukkit video lmao

slim wigeon
sly topaz
sly topaz
blazing ocean
sly topaz
slim wigeon
# sly topaz you can connect it with anything really, not necessarily signs

Like this for a example?``` public ItemStack getItem() {
ItemStack item = new ItemStack(Material.NOTE_BLOCK); ItemMeta meta = item.getItemMeta();
DataContainer container = new DataContainer(meta);

    meta.setDisplayName(ChatColor.AQUA+"Wireless Redstone"); meta.addItemFlags(ItemFlag.HIDE_ENCHANTS, ItemFlag.HIDE_ATTRIBUTES);
    meta.addEnchant(Enchantment.LURE, 1, true);
    
    container.stringSet("itemID","wirelessRedstone");
    item.setItemMeta(meta); return item;
}```
#

It will still work?

chrome beacon
#

That's an item

#

Are you using GPT

sly topaz
#

is DataContainer a class of yours? Does it handle PDC or something?

smoky anchor
sly topaz
#

also, you can have the enchantment glint without an enchantment nowadays

chrome beacon
#

ofc they are 💀

sly topaz
slim wigeon
#

Yes, its a class but someone said that it can be used on anything either than signs. So I just need help as to what that comment meant

blazing ocean
#

being worse than gpt is hard

eternal oxide
#

None of that code has anything to do with signs

wet breach
#

lol

jagged thicket
#

yeah im kinda glad there was no gpt few years ago when i started learing programming fr 💀

#

i would have abused it totally

#

not that i don't abuse it now

slim wigeon
# eternal oxide None of that code has anything to do with signs

But this one does``` @EventHandler
public void onBlockPlace(BlockPlaceEvent event) {
Player player = event.getPlayer(); Block block = event.getBlock();

    if( wrLib.isSign(block) ) {
        Sign sign = ((Sign) block.getBlockData());
        
        player.sendMessage("You wrote : "+sign.getLine(0));
        
        event.setCancelled(true);
    }
    //player.sendMessage("You have placed a block");
}```
wet breach
slim wigeon
#

See the sign.getLine(0)?

rough drift
#

I am abusing it for algorithms, I'm constantly too tired to be able to learn new ones 😭

chrome beacon
sly topaz
#

sign.getLine is deprecated because signs have sides now, you have to get the side and only then the line from it

smoky anchor
#

I love abusing GPT to generate boilerplate or code that I would have to repeat (if that makes sense)
Also seems good for generating code (at least in the one case I tried it :D )

sly topaz
jagged thicket
#

NO ai can make that

wet breach
rough drift
jagged thicket
rough drift
#

what that is, idk

#

maybe unit tests?

wet breach
#

I am not aware of any kind of boilerplate code that couldn't be saved

smoky anchor
rough drift
#

you can't really save that always

jagged thicket
#

yeah i use gpt only for making test plugins

wet breach
wet breach
#

but unit testing is generally its own thing, or so I think it is

sly topaz
#

it is open source so if your goal is to make that in your plugin, you can take it as example

#

that is a lot more code than I'd have expected for a wireless redstone plugin tbh

jagged thicket
#

redstone is deeep

smoky anchor
#

Why does it have a database lmao

sly topaz
#

I imagined it just casting the blockdata to analogue powerable and triggering some circuits

sly topaz
jagged thicket
#

why does it use sql 😭

jagged thicket
smoky anchor
sly topaz
#

I'll add a wireless redstone plugin to my list of pet projects

jagged thicket
#

🧠 he thinks like me

wet breach
# smoky anchor Why does it have a database lmao

it needs to keep track of where the wireless connections are at because if its anything like the old plugin, it has the ability to keep chunks loaded where technically you can use a switch from one side of the world and have it do something on the other side

#

so, not only does it track the connections, but chunks

sly topaz
#

a database is great if you want to access that info offline as well, so PDC is not always a good choice, in this case it would've been fine though

jagged thicket
#

im going to proceed to store my gangs database in pdc /s

wet breach
#

I am not really a fan of pdc

slim wigeon
#

I don't know about signs now. I cannot make them non-editable

chrome beacon
#

Cancel the interact event on it

slim wigeon
smoky anchor
#

show the code

slim wigeon
#
    public void onInteract(PlayerInteractEvent event) {
        Player player = event.getPlayer(); Block block = event.getClickedBlock();
        
        if( block.getBlockData() instanceof Sign ) {
            event.setCancelled(true);
        }
    }```
green spoke
#

Hello
How I can detect furnace around player?
Here's an example of what I was advised, but I want to see if it can be done more easily

import org.bukkit.Material;
import org.bukkit.block.Block;
import org.bukkit.entity.Player;

public boolean isFurnaceNearby(Player player) {
    Block playerBlock = player.getLocation().getBlock();
    for (int x = -1; x <= 1; x++) {
        for (int y = -1; y <= 1; y++) {
            for (int z = -1; z <= 1; z++) {
                Block block = playerBlock.getRelative(x, y, z);
                if (block.getType() == Material.FURNACE) {
                    return true;
                }
            }
        }
    }
    return false;
}
manic delta
#

you could use block faces

#

you are doing a 3x3x3 check right?

smoky anchor
smoky anchor
manic delta
#

something like (convert it to java)


fun isFurnaceNearby(player: Player): Boolean {
    val block = player.location.block
    val faces = arrayOf(
        BlockFace.UP, BlockFace.DOWN,
        BlockFace.NORTH, BlockFace.SOUTH,
        BlockFace.EAST, BlockFace.WEST
    )

    return faces.any { block.getRelative(it).type == Material.FURNACE }
}

worldly ingot
#

tbh what they have is fine with exception to the fact that I would use World#getType() so that you skip the unnecessary Block allocation

slim wigeon
manic delta
#

sure

worldly ingot
#

There’s a tag for signs, isn’t there?

#

Or is it only sign items?

green spoke
smoky anchor
worldly ingot
#

Then there ya go :p

manic delta
#

choco i love you

#

When I grow up I want to be like you

slim wigeon
green spoke
#

O_O

worldly ingot
#

Well is there a reason you want to use instanceof instead of the tags?

#

It looks to me you want to just cancel if it’s a sign

slim wigeon
worldly ingot
#

getBlockData() is going to return you a type to interact with the sign’s block states (e.g. wall face, rotation, glowing, etc.) and getState() is going to return you a type to interact with the block’s NBT data (its text)

#

Both of those types though are a new allocation when you get it, so if you don’t expressly need that type, you’re better to check if the tag contains the material instead which is a much faster lookup with no allocation

slim wigeon
#

I cannot break the sign now

smoky anchor
#

But you should not need anyone to tell you that...

wet breach
rough drift
#

Chat, I'm really bad at maths, imagine I have

  ^
  |
BBBBB

This vector (B is Block)

How can I find a vector that is 90° to this vector?

slender elbow
#

there's Vector#rotateAroundX/Y/Z

rough drift
#

yeah, the issue is it could be on any face of a block

#

so I'm trying to figure out how to just get a vector at 90° from a face basically

eternal night
#

the second you are in 3 dimensions, that doesn't apply

slender elbow
#

i mean yeah, 90° in what axis?

eternal night
#

there is an infinite amount of vectors that are 0.5pi from a vector in 3d

rough drift
#

I should rephrase it

#

give me one second

#

better with a picture

eternal night
rough drift
#

I HAVE NO IDEA

#

I FORGOR ALL VECTOR MATHS

eternal night
#

What is with the top vector

rough drift
#

that is the up vector

#

reference

#

ig

#

(0, 1, 0)

#

and the one pointing to the right is the face I have, and the one pointing down is the rotated vector, am I making sense 😭

slender elbow
#

i mean you still have two axis to rotate around

eternal night
#

Well, you still have the same issue as before yea ^

#

that vector might also point up

rough drift
#

hm

slender elbow
#

90° could be 90° down or to the left

eternal night
#

or towards the camera

#

or away

#

or any other direction where z is 0

rough drift
#

I need to find something that's parallel along the face I'm on (I know which face I'm on)

I have no idea how to explain this 😭

eternal night
#

"something" you can find just

rough drift
#

THERE

#

PARALLEL

eternal night
#

do you really just need something

rough drift
#

I don't need a specific direction, it can be any direction

eternal night
#

"parallel" to a plane makes no sense

slender elbow
#

parallel?

rough drift
#

well

#

yes you have like

#

say the north face

#

oh wait

#

I'm a moron v2

slender elbow
#

isn't that a brand?

rough drift
#

lol

#

okay no look lemme rephrase this

#

for the last time

eternal night
#

if you wanna just find anything, take [1, 1, 1] - [unit vector of your block face direction] and then normalise

#

I doubt that is actually what you want

#

but yknow, dunno if you even know what exactly you want 😅

rough drift
#

I have face A, and I have a vector pointing directly out of the face V, now I need to find a vector which goes in any direction except the primary direction of V, uhhhhh imagine like

A = UP
V = (0, 1, 0)

I need to find any vector which can have and x or z but a y of 0 in this case

eternal night
#

Yea

#

then see my prev statment

rough drift
#

oh

#

thank you

#

I think I'm just dumb sometimes

eternal night
#

(for future reference, V is called the normal vector of plane A if you need to google or something)

rough drift
jagged thicket
#

@manic delta any updates on the bug?

manic delta
#

Bro wants to be banned by Mojang

vivid skiff
#

oooh, for the roulette,

manic delta
#

Yea kekew

blazing ocean
#

Yeah I don't think you're gonna get support for something violating the EULA

vivid skiff
#

There are multiple similar plugins on spigot, like vegas

pliant topaz
#

doesnt change the fact its breaking the eula

sly topaz
#

in which version did spigot drop the version in the package name for nms?

mortal vortex
#

university doesn’t teach you to escape the matrix nor to be a hustler

viscid maple
#

amazing

daring light
#

Hello friends I have a question. I want to remove gold from generating in the nether world. Is there a way to do this with SpigotAPI?

blazing ocean
mortal vortex
sly topaz
sly topaz
#

then yeah, a chunk generator should do

daring light
#

Thank you all

sly topaz
#

either that or do it in the chunk populate event, don't know which one would be more effective

kindred valley
mortal vortex
kindred valley
mortal vortex
kindred valley
#

Thank you bro !

mortal vortex
kindred valley
#

nice one

mortal vortex
#

I guess in a way you help everyone

#

Like Jesus or something

#

you helped me during my parents divorce

kindred valley
#

Yes bro im a son

#

A father

#

A holy spirit 🔥

#

one of the most helpful guy on the server

mortal vortex
#

ongawd

kindred valley
#

I cant stand without helping someone bro

#

Pls give me discord helped role

#

Moderators im waiting

wet breach
kindred valley
#

if thats what you asking 👇👇

wet breach
#

so while sitting you drink water, and before you stand you have to help someone first otherwise you remain seated

kindred valley
#

thats it bro

wet breach
#

makes sense

kindred valley
#

You got the key

tranquil spoke
nova notch
sly topaz
#

I would personally just change the chunks a little on chunk load, using something like chunky to trigger a chunk load

tranquil spoke
# sly topaz that'd be pretty hard considering there's no way to tell which blocks have been ...

I do have a good heuristic for that 🤪
I create another world with the NEW version of Minecraft.
I extract ALL blocks that have been added in the new update.
I copy them in the OLD world, only if there is AIR in their position, and if the bottom block matches. It's really effective for new blocks.

My main issue is how to regenerate entire chunks, since world.regenerateChunk has been deprecated. Any idea? 🫠

sly topaz
#

but what if a player purposefully left air there

#

like if they made a hole, for example

kind hatch
sly topaz
kind hatch
#

Chunk generation is consistent, finding the difference between the original and the new one would just be a simple checks.

sly topaz
#

but does that work cross-version tho

kind hatch
#

It wouldn’t on its own, but if you are just importing stuff from an older version, then it’ll work well enough. Maybe a build is slightly buried or raised, but it shouldn’t cause major problems.

#

Especially since it’s over minor versions

sly topaz
#

there are no minor versions in mc anymore tbh, so I wouldn't be so sure

#

but given the version range here hasn't massively impacted generation, I see what you mean

sly topaz
#

you'd just delete the chunk, then copy over the chunk data

#

the server doesn't even have to be turned on for that as you could edit the region files directly

#

a cheap way to do it might just be using the renegerate chunk enough times that it matches with the surrounding terrain

#

while it is deprecated, that doesn't mean it won't do what it is supposed to be doing

kind hatch
#

It’s also been deprecated since 1.13 and no replacement has been made yet.

sly topaz
#

well, rather, no replacement will ever be made

#

the concept of regenerating chunks just doesn't make a lot of sense

kind hatch
#

Yea, it’s possible the deprecation is just there to warn people about the usage.

#

Similar to what Bukkit#getOfflinePlayer(String name)
is

sly topaz
#

yeah, as long as it isn't marked for removal, it should be fine

young knoll
#

Worldedit //regen uses a copy of the world to do it

eternal night
#

regenerateChunk is a whole mess yea.
I'd stay away from that as far as possible

tranquil spoke
# kind hatch It’s also been deprecated since 1.13 and no replacement has been made yet.

I tried using it and it simply doesn't work! 😅

So right now what I'm doing is teleporting the player in a NEW world to "fill in" the original chunks.

And once I have that, I can export the new blocks added in the new version.

This however doesn't import biomes (i.e.: a pale garden won't count as a pale garden biome), and other features like fallen trees, so I know it's a bit of a hack.

tranquil spoke
young knoll
#

Just generate a copy of the world like worldedit does

#

And copy over the blocks + biomes

tranquil spoke
tranquil spoke
kind hatch
young knoll
#

Yes

kind hatch
#

Well I’ll be

#

How do they make it so fast though? Cause don’t you have to create a world, load the related chunk, copy all the info over, and then remove the temp world?

young knoll
#

¯_(ツ)_/¯

eternal night
#

nms fuckery

#

the world is never loaded into the server list

real spindle
#

Some good developer for 1.7/1.8 servers? Let me know

#

Factions

worldly ingot
#

I’ve never seen so many red flags

umbral ridge
#

black flags

sullen marlin
#

Hypixel 1.7 factions when

young knoll
#

Which can only mean one thing

#

Hypixel factions confirmed

eternal night
#

will it include tnt canon patches

slate siren
#

In the kit system, I create a kit by saying /create (name) and it sets all the items on me as a kit, and the items are given to a player after they die and respawn without any problems. There is no problem with that. The main problem is that when I pick up the lighter in the given item and want to use it, it does not react, there is no animation and I cannot light anything.

#

What could be the problem?

umbral ridge
#

XD

slate siren
#

Don't laugh, tell me the problem 😅

umbral ridge
#

do you use world guard

#

maybe its blocking it

slate siren
umbral ridge
#

then it sounds like nbt issue

#

maybe try to force inventory update after giving a kit

#

player.updateInventory()

#

idk

slate siren
#

I tried, it didn't work

umbral ridge
#

can you post your code

slate siren
#

I think it may be an NBT problem as you said.

umbral ridge
#

?paste

undone axleBOT
umbral ridge
#

yeah

slate siren
#

oh

#

victim.setGameMode(GameMode.ADVENTURE);

#

?

#

thats problem

#

ig

umbral ridge
#

adventure mode doesnt allow players to interact with items like..

#

yeah

slate siren
#

lollll

#

I noticed it at the last moment when I looked carefully.

umbral ridge
#

try to set it to survival

slate siren
#

I've been working on it for 2 whole days.

#

😂

#

0 understand

#

Bruh

#

0 understand i swear

tranquil spoke
# young knoll Yes

Wait, then how do they do it for chunks which have been generated BEFORE WorldEdit was added to the server as a plugin?

young knoll
#

The same way?

#

It just generates a copy of the world with the same seed

tranquil spoke
warm mica
# tranquil spoke Someone on the forum suggested using `World.loadChunk`. My only question is... i...

See https://minecraft.fandom.com/wiki/Chunk_format "PostProcessing"
It contains temporary data for chunks that haven't been generated yet, neighboring generated chunks. That data (most likely) gets wiped once the chunks generates, and since it's gone, it's not easily possible to regenerate it back to it's 100% exact original state.
The #loadChunk method either loads it or generates it if it doesn't exist yet, exactly the same as if a player would move near the chunk

tranquil spoke
#

I wish the documentation had more descriptions about those methods. As always, the devil is in the details. 🫠

warm mica
red bolt
#

any1 have a good script to move (tp) an armorstand in forward backward left right directions? (based on armorstand rotation) (paper java)

remote swallow
#

?whereami

red bolt
# remote swallow ?whereami

😂 I was just mentioning but ik that the code is very similar I may be using paper but I was mentioning it for the heck of it. I doesn't really make a difference in this case (unless someone comes up with some super special paper only solution 😂 )

mortal hare
#

am i the only who finds vscode code lens annoying

#

i always disable it

red bolt
#

didn't know you could disable it. But I use IntelliJ for java. VsCode for anything else

#

it has never really bothered me tho

#

other than the fact it uses up line space in my scripts thats anoying

mortal hare
red bolt
#

oh ye

mortal hare
#

im kinda surprised to find that vscode really works well with c#

#

no one mentions vscode as main editor for c# but with the recent introduction of new LSP server integrated into roslyn

#

man it is uwu

#

i would even say ditch the visual studio and jetbrains rider altogether for it

red bolt
mortal hare
#

as far as i've tested

red bolt
#

ye

mortal hare
#

i believe that its even better

#

especially for web projects

red bolt
#

prob I see VSCode as a lightweight version of VisualStudio

mortal hare
#

yea but VSCode uses Roslyn compiler's internal LSP server which is very good for analysing c# code it seems

red bolt
#

oh really

mortal hare
#

well everything i have in visual studio for c# i have in visual studio code it seems

#

it probs depend on workflow

red bolt
#

well not everything, anyway gtg

mortal hare
#

autocomplete, documentation, snippets, suggestions, code generation all works

red bolt
#

VisualStudio has a ui framework tho I believe or UI builder or smth

#

anyway gtg bye

mortal hare
#

well for winforms yea

young knoll
#

It also has like 5000 other things

#

That don’t get used much but shh

mortal hare
#

debugging stuff ig is still needed for visual studio but afaik there's a way to setup debugging for c# on vscode

#

is there any way to change those three dot suggestions in vs code

#

into something more readable

#

like curly underline in gray?

#

or yellow like a warning

topaz stirrup
#

I am trying to learn how to detect chat messages with plugins but when using AsyncChatEvent it asks me for a component in event.message().contains() but I don't know what that is.

topaz stirrup
manic delta
#

Yes

#

Maybe this example can help

topaz stirrup
#

oh sorry, I didn't know that.

manic delta
manic delta
jagged thicket
#

yeah kotlin 💀

manic delta
red bolt
#

I mean the math behind it

manic delta
#

I'll try the event thing in a bit

manic delta
#

Kotlin is actually good

jagged thicket
#

NO

#

kotlin is weird

manic delta
#

Why

red bolt
#

Imagine you could control it with WASD I want to be able to tell it to move left right forward and backwards based on its direction... I dont need to go in angles just XZ

manic delta
#

@jagged thicket what version of spigot should i use

jagged thicket
manic delta
manic delta
jagged thicket
manic delta
#

Okay

#

One sad thing is that run-task doesn't support spigot servers

red bolt
manic delta
#

I have to manually start a server

sly topaz
thorn isle
#

Or it depends, are you doing your own collisions?

#

Using teleports will cause your armor stand to move through blocks

#

Applying a velocity to it every tick depending on which input buttons are pressed will let the server take care of collisions

#

Jumping becomes a little harder

jagged thicket
#

for jumping tp can be used

thorn isle
#

You'll have to check entity.onGround() and whether space bar is pressed and apply a positive y velocity

#

And then probably apply the x/z inputs differently if the entity is midair

#

Dunno man I'm not gonna design your game engine; fuck with it, use your imagination, try things

jagged thicket
#

spigot april fools prank :

sullen marlin
#

🤣

jagged thicket
sullen marlin
jagged thicket
buoyant viper
#

hello chat

#

which of these looks the least autismo

jagged thicket
#

as long as it works

buoyant viper
#

dont ask why i forced Pattern.CASE_INSENSITIVE param, i just didnt like how it looked in the expression

smoky anchor
jagged thicket
#

Yeah i would just use the shortest and write a 2 page essay on how it works

#

next to it

#

totally

buoyant viper
#

true

torn shuttle
#

?mappings

undone axleBOT
buoyant viper
#

in all honesty i just dont want to use regex but i also dont like my lengthy ass method

smoky anchor
#

Pattern.compile is an expensive operation iirc
should store that btw

buoyant viper
#

i know

#

i wrote the other methods as haste-y examples lol

winter jungle
#

What's the best way to check on the Spigot side if a other server is currently running and connected to bungeecord?

#

I might have thought of Redis to temporarily save the status there, but Bungeecord unfortunately does not offer an event as soon as a subserver starts up

smoky anchor
#

Find it on your keyboard, place your finger over it and apply force

small bay
#

How does MCC implement the high-res, dynamic, non-bobbing map/HUD on the top right?

undone axleBOT
sullen marlin
#

But the plugin channels probably?

winter jungle
thorn isle
#

i'd use the shortest but replace the string::format bits with regular concatenation

#

sure, muh string allocations and whatever but you are already joining it into a string

wet breach
#

systemctl can check on remote host services

#

this is the proper method for checking statuses of servers on remote systems. Just because it is MC doesn't mean proper administrations should be avoided or that everything needs to be handled in the server application

winter jungle
#

Makes sense yes, I'll have a look at it. Thank you :)

wet breach
timber basalt
#

How do I display custom skulls in an inventory? Like a youtube head, tiktok head etc in an inventory

eternal oxide
#

if you want heads which are not in a profile you have to use an external API

chrome beacon
#

(which uploads them so you can use a profile)

timber basalt
#

Thanks

paper viper
#

I’m not entirely sure how minigames these days work, but I currently have a lobby and arena. My arena is a copied schematic and it resets every time and I’m using WE for that operation. I don’t create a new world or anything. Right now, I don’t have a schematic for my lobby either. I just teleport players directly to the location

#

Should I be creating a new world every time a new minigame start? The issue now is that if people start the game with the same lobby or arena, they get teleported to the same place

ivory sleet
#

how meta is it to replace the chunk files with fresh data?

#

obv u need to unload said chunks and load them back

thorn isle
#

there is some sort of an internal region cache iirc so it's hard to make an educated guess on when the data is flushed and it's safe to modify the backing file

#

beyond actually unloading the world

#

for your use case, either world or schematic based instancing, where a new copy of the arena (an "instance") is created each time a game or whatnot is started, and each player is teleported to their instance

pure dagger
#

why does this code copy the item on creative mode? not the item on cursor but the clicked item

public void onInventoryClick(InventoryClickEvent event) {
        player.setItemOnCursor(null);
        event.setCancelled(true);
}

smoky anchor
#

You answered your question yourself.
Because ✨ Creative Mode ✨

blazing ocean
#

gotta love creative mode

slender elbow
#

the cursor is completely client sided in creative mode

lime pulsar
#

Is there anyway to access the built in graphics, the sprites, without making a resource pack?

blazing ocean
#

define "access"

thorn isle
#

i don't think either removes it with a patch

lime pulsar
#

I made a pop up using a TextDisplay I would like to use like an ItemDisplay behind it with the actyual ingame graphics for the pop up background

blazing ocean
#

what ingame graphics

lime pulsar
rocky egret
sly topaz
#

just items and blocks with the respective item and block displays

blazing ocean
#

you can display items - that's what item models are for

sly topaz
lime pulsar
#

was just wondering if there was something I was overlooking

blazing ocean
lime pulsar
#

its in the sprite section

blazing ocean
#

well, is it an item?

lime pulsar
#

no its the graphic the game uses as the background of a tooltip on an item

sly topaz
#

you can display item tooltips with item displays I believe

lime pulsar
#

the only way i can think of accessing it is with a resourcepack

sly topaz
#

I remember someone doing that here

#

let me see if I can find the video lol

lime pulsar
#

what i have now is just a black box with the text colored and formatted

#

it looks good but the rounded corners would look better 😉

sly topaz
#

here it is

lime pulsar
#

and thats without a resourcepack?

sly topaz
#

that's just vanilla I believe

thorn isle
#

i don't recall tooltips being displayable, but that looks like it could be a bunch of black text displays layered together to look like rounded/pixelated corners, and then the item name/lore on top as another text display

lime pulsar
#

ug thats a bunch of entities

thorn isle
#

maybe i'm wrong; i'd like to know if there's a native way to display tooltips in the game world outside of guis

sly topaz
lime pulsar
#

yea I am trying to stay away from nms, with all the fast updates thast a nightmare

sly topaz
#

but I do wonder whether they used a resource pack for the background now that I think about it

thorn isle
#

it's difficult to tell from a lowres video, but that background could be done with text displays as well

lime pulsar
#

yea if i used a resourcepack and slaped the graphic on like a piece of paper i could do it

sly topaz
#

I think it is just the normal text display background

#

I just never noticed it can look like a tooltip background

blazing ocean
#

the colours are just text display backgrounds

thorn isle
#

it does look very faithful to a real tooltip

lime pulsar
#

yea the lil bit of purple around the edges

sly topaz
#

usually one only sees nametag-looking text displays so that's throwing me off lol

thorn isle
#

you can get those edges and rounded corners by overlaying 4 text displays with a solid background; 1 black rectangle slightly taller than the display, 1 slightly wider, then a purple one slightly smaller, and then a fourth black one yet a little smaller, to turn the purple rectangle into a rectangular ribbon

#

and then you shove the text on top of that with a fifth one

sly topaz
#

it looks way too smooth for there to be 5 text display in one

#

my bets are it is just a resource pack

#

then again the video quality could be deceiving me

thorn isle
#

if you're talking about the movement, that can be done with billboarding

#

the billboarding rotation is applied before translation offsets, so if you place the entity on top of the player and then offset it away, it will move wherever you look at; clientside, no latency

sly topaz
lime pulsar
#

this is the custom plugin i made so far

thorn isle
#

the issue is that you have no way of telling how large the player's field of view is so you can't really make an educated decision on where to place it exactly

#

i've seen it used for hover tooltips on blocks, though, since those are in the middle of the screen

sly topaz
#

ah, the purple glow is just Display#setGlowColorOverride

lime pulsar
#

gah wrong video lol

sly topaz
#

I wonderif you modify the transformation matrix of the text display, you can get rounded corners with a single entity

thorn isle
#

affine transformations only, they don't make things round

lime pulsar
#

on the tooltip sprite the lil purple edge is part of the sprite

sly topaz
#

but that doesn't mean you can't replicate that with a text display

thorn isle
#

if you really want to you can read the sprite pixel by pixel and spawn a text display for each one

lime pulsar
#

it would be nice if we could add resourcepack like behavior inside a plugin 😛

thorn isle
#

your players will love it i'm sure

#

and the entity tracker

lime pulsar
#

oh and now people want plugins that work with bedrock too inflatable

#

im on a mac and my thumbs are too big to play minecraft on my phone lol

blazing ocean
#

make a geyser plugin that bans bedrock users immediately

lime pulsar
#

lol

blazing ocean
#

does the client do any sort of validation on the name of an entity?

#

@young knoll i bet you love automatic response selfbots

lime pulsar
#

omg thats a bot!? 🤣

blazing ocean
#

just a selfbot hooked up to an LLM yea

lime pulsar
#

and I thought I had too much free time :p

sly topaz
#

does it answer if I reply to it

wet breach
#

its probably rad's bot

blazing ocean
#

seen a couple of those hanging around in some different servers recently

#

yeah I definitely made that

#

do you like tacos

wet breach
#

what is that something?

sly topaz
#

getting freaky real fast

blazing ocean
#

@ivory sleet hey join us in having fun here

lime pulsar
#

man its like the old thing in lpmuds that talked smack all the time

wet breach
#

guess it couldn't answer me

lime pulsar
#

Whats the meaning of life?

sly topaz
lime pulsar
#

rofl oh this is fun

blazing ocean
#

con wake up

#

jish you too

sly topaz
#

isn't jish canadian

blazing ocean
#

he is

sly topaz
#

probably ain't awake

wet breach
#

what is this something you speak of?

blazing ocean
#

@vagrant stratus hey do you like llm selfbots

remote swallow
lime pulsar
#

I'm old whats llm stand for?

blazing ocean
#

large language model

#

pretty much what people refer to as "AI" nowadays

remote swallow
#

@ancient plank hammer time

blazing ocean
#

where the fuck are the mods

#

smh

lime pulsar
#

bah we made what they call ai now in lpmudfs 20 years ago

#

now the way the program them is easier now, juest expesnsieve :p

orchid trout
#

von bon

sly topaz
#

I forgot how much build tools takes to compile in windows

blazing ocean
#

con wake up

#

wake the fuck up

fickle spindle
#

to what i should check a item.getItemMeta().getItemModel() my itemModel is test1 in the if what i should put? because item.getItemMeta().getItemModel().equals("test1") or "minecraft:test1" doesn't work

blazing ocean
#

it is 8:30pm

lime pulsar
#

build tools is snappy on mac, but then mac runs on a unix kernel

sly topaz
#

git just sucks balls on windows, it is slow and painful process

#

also windows defender trying to scan every file doesn't help either

blazing ocean
#

javier i thought you were a linux user

sly topaz
#

I use multiple PCs thorough the day

lime pulsar
#

item model is just a number that you can then use in your resource pack

blazing ocean
#

not anymore!

paper viper
#

^

blazing ocean
#

they added a component to set the item model on an item stack

paper viper
#

now its like floats, whatever

lime pulsar
#

orl?

sly topaz
#

this desktop has windows 11, my main laptop runs bluefin-dx

sly topaz
blazing ocean
lime pulsar
#

can you set the skin?

blazing ocean
#

what if I have two with the same name

lime pulsar
#

then you get a man with a flys head?

blazing ocean
lime pulsar
#

so what happens you set the model and it uses the same skin?

blazing ocean
#

what skin?

#

item models can have textures

sly topaz
#

still faster than my old laptop kek

blazing ocean
#

that's a lot

sly topaz
#

tbf I am also watching a video while having ij open

blazing ocean
sly topaz
#

what is that

blazing ocean
#

two fake players with the same name (16 space characters)

sly topaz
#

wasn't that always possible

blazing ocean
#

idk, I just didn't know of it

lime pulsar
#

Just ran my nuild tools script: Total Time: 27.190 seconds

blazing ocean
#

there was one that got banned

lime pulsar
#

ok whats the new method for setting a moddle ingame?

paper viper
#

i use ||paperweight|| these days instead

blazing ocean
#

ItemMeta#setItemModel or something

paper viper
#

i remember using BT script

chrome beacon
#

setItemModel or just use the model data component

paper viper
#

i remember piggy sent me a zip of all the server jars lol

blazing ocean
#

using CMD nowadays is pointless for basic situations

lime pulsar
#

so if i made a model that looked like the popup background then i could display it in an itemdisplay

blazing ocean
#

yea, with a resource pack

lime pulsar
#

and a model is just a json file?

blazing ocean
#

yup

#

you make them with blockbench

lime pulsar
#

oh doh i can make a json file in game and pass it huh?

#

terr cant

blazing ocean
#

you put them in a resource pack

sly topaz
#

with specialsource at least there's an unofficial gradle plugin that works, with paperweight you don't even get that anymore lol

lime pulsar
#

yea I wanna use graphics already in the client i shouldnt have to make a resource pack for that :p

sly topaz
lime pulsar
#

i still use ant :p

sly topaz
#

so, it is what it is

sly topaz
paper viper
#

i thought that was a joke

#

no but srsly dont use it lol

lime pulsar
#

ant autobuilds my jar why change it if it aint broke?

paper viper
#

any build system autobuilds jar

lime pulsar
#

so why change if the one i use works?

#

yes i have to manually change the spi location when i update plugins but tahst like 3 clicks

#

terr api

sly topaz
#

there's just no extendability

lime pulsar
#

extend to what?

sly topaz
#

if whatever framework/platform you want to use provides plugins, like Spigot for example provides specialsource maven plugin

paper viper
#

yeah its mainly resources too

#

and also features

sly topaz
#

while one could make something similar for ant, nobody ever does

paper viper
#

(and also nobody would want to)

sly topaz
#

so, you're left with a very basic setup in the end, which works for simpler things but at some point if you want to make things that aren't as simple then it just gets in the way

paper viper
#

you'd probably have to start writing your own scripts or extensions at some point

#

to do things that other plugins could do

lime pulsar
#

i try to keep all my plugins within the api so i dont have to do a tone of stuff each update

sly topaz
#

that's a good mindset to have, but often times one has to delve a little deeper in which it'd be useful if your build system allowed you to as intended

#

though I guess you could also go the other direction and just use reflection with somthing like reflection-remapper and call it a day

lime pulsar
#

when you ask someone teach me how to use maven, they run away

sly topaz
#

I mean, there's really very little to teach when it comes to maven, as it is declarative

paper viper
#

just learn gradually, you should know both maven and gradle

sly topaz
#

gradle also is pretty much the same as far as just listing dependencies and using some plugins go, they even are striving to make a full declarative dsl nowadays

blazing ocean
#

gradle has a lot more capabilities with their buildscripts

sly topaz
#

besides, any component IDE will handle the hard work for you

sly topaz
blazing ocean
blazing ocean
sly topaz
#

I mean, you can vibe-code your way into it, but doing it properly takes sitting down and actually understanding what you're doing, understanding how the different build phases work and where to plug your stuff in your current task-graph

#

I honestly dislike having to go out of my way to make something custom a lot, hence why I use maven

#

if I ultimately need something custom, I need to be sure as hell I need it because it's gonna take time I don't want to spend on my build, but on the project I am currently working on

paper viper
#

I just can’t do xml because my eyes will hurt

sly topaz
lime pulsar
#

lol when xml came out we were all making our own script languages it was fun

blazing ocean
#

woah kotlin

lime pulsar
#

i made a custom telemet client that could display images that used my own xml type language

sly topaz
blazing ocean
#

feels inspired by gradle

sly topaz
#

way more strings there, they could definitely improve that by a ton

blazing ocean
#

yea

lime pulsar
#

ok back to the model topic, so if i make a resource pack with models in it i can apply those to any item now?

sly topaz
#

yes

blazing ocean
#

yep

blazing ocean
lime pulsar
#

and its in the api

sly topaz
#

the slicedlime example was pretty funny, applying dragon head model to a player head

sly topaz
lime pulsar
#

did md_5 do this?

sly topaz
#

there's so much stuff one can do with resource packs nowadays

sly topaz
#

item models? That's a vanilla thing

lime pulsar
#

i mena the api thing is it mojang or is it experimental stuff md_5 added?

#

i need to pay more attention to change logs

sly topaz
#

Spigot is an unofficial modding platform like forge or fabric for minecraft servers

#

md_5 forked Bukkit a long time ago and that is now Spigot

lime pulsar
#

yes i remember

#

wasnt that long ago :p

sly topaz
#

almost ten years now

#

that's a long time

lime pulsar
#

god im old

fickle spindle
#

why the rotation doesn't work?

                ItemFrame itemFrame = (ItemFrame) Objects.requireNonNull(event.getRightClicked());
                itemFrame.setRotation(90, 180);
rocky egret
sullen marlin
#

?whereami

rocky egret
#

so i can't use this server for paper stuff? i thought it was like the same thing

sullen marlin
#

If same thing why different name

rocky egret
#

so should i leave then?

rotund ravine
#

I mean

#

The

#

"I have nothing in the plugin" makes sense since it can't find the basics

lime pulsar
#

is there a way to tell if a player hits escape?

chrome beacon
#

No

lime pulsar
#

ty

lime pulsar
#

how do you get the CommandMap to unregister a command?

#

do I need to unregister commands and listeners when the plugin is disabled or does the server do that?

young knoll
#

The server does it

lime pulsar
#

so I dont need a if(plugin.isEnabled()) in my commands at all

young knoll
#

No

lime pulsar
#

so I have my command executor and my listener, i should just set those to null so they wont have a reference to keep them loaded?

young knoll
#

They shouldn’t have a reference anyway

#

The entire classloader is cleaned up

lime pulsar
#

i have variables so i can acess them

#

just set those to null and im good yes?

young knoll
#

Again, the entire classloader is disposed of, you shouldn’t have to do anything

#

Granted your plugin generally shouldn’t be disabled at runtime anyway

grim hound
#

does right rotation somehow increase the scale?

#

in displays

#

(or left for that matter)

young knoll
#

Right rotation is applied after scale and translation iirc

#

Left is applied before

lime pulsar
grim hound
#

it shouldn't right?

lime pulsar
young knoll
#

Rotations will make it look bigger based on the W value iirc

#

Quaternions are wacky

grim hound
#

wtf even is w in this case

#

"angle"

young knoll
#

Just use one of the rotate methods

grim hound
#

and for what, using a unit/

young knoll
#

And keep in mind it wants values in radians not degrees

grim hound
#

I just set w=2

#

for 0, 0, 0 rotations

flat lark
#

I was planning to be able to create custom advancements at runtime. I was planning to use listenerns for like onCraft, OnMine, onTrade, etc. Would it be easier or better todo that or just create them as achivements with NMS?

sly topaz
sly topaz
#

well, achievements are not a thing anymore

#

but that doesn't answer my second question

flat lark
#

I am wanting to be able to create custom "advancements" in game.

sly topaz
#

you mean an actual advancement tree or just the toast that pops up when you get one

flat lark
#

Honestly, I don't need an advancement tree or a toast popup.

I wanted to create a system like I could create an custom advancement to allow [collect, trade, mine, breed, explore]. I was orginally just going to use multiple listeners for each of these events but thought it may be better to just create an advancement does that for you.

sly topaz
#

you could do that, as long as the criterias in the game fit your needs

#

if there's an advancement you're thinking of that doesn't quite match a criteria, you could go for a mixed approach and just award them manually whenever an event gets triggered or the player completes certain actions

flat lark
#

is there a way I need to push it to minecraft code so it lists it as an advancement

sly topaz
#

you'll have to learn the format for advancements, it's just a json file with a certain format so it shouldn't be too complicated, unfortunately I don't have a good resource to learn the advancement format, I believe the AdvancementRequirement javadoc link to a post explaining it in detail though

flat lark
#

spigot or nms

sly topaz
#

once you do that, you can just load it with UnsafeValues#loadAdvancement, you may also have to call Server#reloadData

#

no NMS necessary for it

jagged thicket
#

you could make your own gui

#

and list advancements

flat lark
sly topaz
#

eh, advancements gui is pretty fancy-looking and you can customize it quite a bit

#

but if you wish to do your own thing, that's up to you

jagged thicket
#

can u add your own page in that ?

flat lark
#

I just transform that data into a new class called 'Challenge' and save it in my database so it loads with custom chalenges i create.

jagged thicket
#

or remove old advancements

sly topaz
#

you can add your own categories, yeah or at least I remember people doing that

flat lark
#

yeah you can

jagged thicket
#

then yeah

#

using that is better

flat lark
#

but not for my purpose

#

because that is not runtime

sly topaz
#

I am not sure what that means

jagged thicket
#

i think they mean adding advancements when server is running

#

without reload

sly topaz
#

you can do that just fine, minecraft:reload (essentially what Server#reloadData does) isn't the same as bukkit's reload

flat lark
#

Ah.

sly topaz
#

that said, I am unsure of why you would have advancements that are created on the go, sounds rather convoluted to me but I don't really know what you're thinking here

#

I'd personally just think about it carefully to form a good advancement graph

jagged thicket
#

yeah i cannot think of any situations where you need to add avancements without restarting urgently

flat lark
#

My plugin is personal so I don't really care for the advancements tab looks or anything just creating custom advancements.

jagged thicket
#

then just make it with a gui library

flat lark
#

I am using a gui library called InvUI makes creating UI easier.

sly topaz
#

I mean, it isn't so much about the advancements tab but rather that the idea of advancements that are registered on the go sounds flawed by design, but then again I don't exactly know what you're thinking of making

#

if it is really necessary for it to be that way, then it is probably for the better to not use minecraft's advancement system as that'd just limit your system for no particular reason, and if you're using a resource pack, you can still make your gui look very fancy

flat lark
#

So I am creating a Advancement / Challenge Editor (Nothing Fancy or special) All I am using it for is to create custom advancements and editing data like rewards. Thats it

flat lark
jagged thicket
#

u can use the minecraft advancements tab for that easily

sly topaz
#

eh, I wouldn't be so sure, dealing with adding or removing advancements on the go might be a pain in the butt

flat lark
jagged thicket
#

Yeah true

sly topaz
#

I mean, you can't edit them in the GUI, but you can definitely make some kind of in-game editor for advancements

#

there's no need to expose the json to the user, you can just generate that yourself

flat lark
sly topaz
#

I am not sure what's stopping you then, I'd just go ahead and try things out, see if there's any blockers when using advancements

flat lark
#

loadAdvancements seems to be deprecated

sly topaz
#

everything in UnsafeValues is deprecated

#

things in UnsafeValues are often methods which no one came up with a good API design yet, so they're not widely recommended for use

#

they're very raw access to minecraft features without much thought into them, for the sake of making them accessible in some way

flat lark
#

It may require json.

sly topaz
#

it does require json, yes

#

you can just output that with Gson

#

there are some advancement apis out there that abstract that out if you wanna try that route instead

#

this is the last one I heard about, idk about any new ones out there

flat lark
#

It may not work with 1.21.5 plus Its fine I can just create json for it.

#

I'll just make a wrapper for it

torn shuttle
#

me revisiting code I wrote 3 years ago

daring light
#

I was looking at ChunkGenerator, but I am still unsure how to I would go about removing gold ore from its generation. I see that you can give the default generator parts that you want it to handle. What would be the best way to achieve my goal of removing gold ore from generating in the Nether?

#

I want vanilla world generation, that is why I'm wondering if there is a way to do this without messing with the entire generation

sullen marlin
#

Difficult. Data pack with custom world gen probably the easiest to truly remove.

Otherwise just generate and remove gold after it's already there

daring light
smoky anchor
#

no, at least I really don't think so

daring light
#

I mean will it continue to generate chunks by the rules of the datapack

daring light
smoky anchor
#

I mean, it's not about the chunks but about the data in the level file
So long you're only removing gold you can keep the chunks probably

buoyant viper
dapper night
#

basicaly
if player exits boats (another one is stil inside boat)
minecraft respawns boat
making it move realy fast
and it kicks pasenger

#

any idea how the hell i fix it

chrome beacon
#

What did you do to cause that

dapper night
#

i exit boat

#

my anticheat just kicks pasenger

#

im trying to prevent this

#

but i ran of ideas

#

acording to my anticheat player moves 35 blocks per second

#

is there way to group these 2 people

#

so when one quits another dont get kicked out?

#

range check?
or any more sense making aproach?

wet breach
#

not using offline mode are you? pretty weird thing

dapper night
#

so it still has all of checks on

#

(anarchy)

wet breach
#

its supposed to allow hacking? Then why is it called an anti-cheat?

#

I suppose the answer to my question is yes then

#

which explains the unusual issue with the boat and its speed out of no where lol

wet breach
dapper night
#

nah

pseudo hazel
#

sounds like your anti cheat is too good? xD

dapper night
# wet breach its supposed to allow hacking? Then why is it called an anti-cheat?

its called anticheat because i named pluging wrong in begining. It was created to prevent flying but then i thought this aint fitting anarchy.
I suposed to change its name since i only focused speed check. Also there is too much code to name it anticheat in single class file.
that would create need to separate speed checks with event manager and so on.

dapper night
pseudo hazel
#

sounds like a bad idea, maybe wurst needs to be improved then to bypass the cheat

dapper night
#

i mean only preventing speed violations

#

since thats how server died

inner mulch
#

does a class object always return the same hash ?

#

MyClass.class <- same hash always?

dapper night
#

uhhh maybe i misnamed that i mean java file

brittle geyser
#

It takes 5 minutes

#

We can't be 100% sure

ivory sleet
inner mulch
ivory sleet
#

It iirc just yields the identity hash code, either if thats invoked natively, or through the System java api

wet breach
#

as long as it is invoked by the same hash code implementation yes

#

that being said, it depends on the hash code implementation being used

inner mulch
#

alright, thank you guys :)=

thorn isle
#

i don't think class implements hashcode

#

so that uses identity hashcode

#

which don't persist from one application lifecycle to another

#

and MyClass.class can and will yield a different class object altogether if it's loaded by a different classloader, in which case the hash will also be different

wet breach
#
public int hashCode()

Returns a hash code value for the object. This method is supported for the benefit of hash tables such as those provided by HashMap.

The general contract of hashCode is:

    Whenever it is invoked on the same object more than once during an execution of a Java application, the hashCode method must consistently return the same integer, provided no information used in equals comparisons on the object is modified. This integer need not remain consistent from one execution of an application to another execution of the same application.
    If two objects are equal according to the equals(Object) method, then calling the hashCode method on each of the two objects must produce the same integer result.
    It is not required that if two objects are unequal according to the equals(java.lang.Object) method, then calling the hashCode method on each of the two objects must produce distinct integer results. However, the programmer should be aware that producing distinct integer results for unequal objects may improve the performance of hash tables. 

As much as is reasonably practical, the hashCode method defined by class Object does return distinct integers for distinct objects. (This is typically implemented by converting the internal address of the object into an integer, but this implementation technique is not required by the JavaTM programming language.)

slender elbow
#

the javadoc has changed since Java 8 and that last part is no longer present

#

in any case, Class not implementing it does mean that two foo.Bar.class from different classloaders will yield a different hash code

wet breach
#

but you are correct on the different classloaders thing

#

for modern java or updated versions this would be the more appropriate method to use

#

especially if the class overrides hashcode

slender elbow
#

wdym? you can't override a method of a class that isn't yours so classloaders are not the ones defining the hashcode of the classes they load

wet breach
#

since object is what implements hashcode. All classes have it implemented

#

therefore, all a class can do is override it

slender elbow
#

yeah, but the classloader is not the one that defines the hash code of a Class

wet breach
#

ok and?

#

not sure on your point

#

the reason changing classloaders can change the hashcode is because an object class that is the same but from two different classloaders are not the same object

thorn isle
#

by not implementing hashcode i mean to say that Class doesn't override (that is, implement it and override the superclass's implementation of) hashcode, and so inherits identity hash code from Object

#

and since identity hash codes are transient they won't "always" be the same; it's tied to the object's lifespan

#

and no object lives beyond the virtual machine's lifespan

wet breach
#

but that is beside the point 😛

thorn isle
#

so the answer depends a lot on the definition of "always"; is the classloader the same? are future application sessions part of the same "always"?

wet breach
#

well hashcode is not guaranteed to be unique, just that its the same during the execution of the application given its loaded the same way

thorn isle
#

e.g. if you have MyClass in a common library shaded into 2 plugins and so loaded by 2 different classloaders, MyClass.class.hashCode() is going to give different numbers for both

#

well, hash collisions notwithstanding

wet breach
#

well, I think I said that just not in that procise way lol

thorn isle
#

was there a way to force the client to close the player inventory? i know it's clientside but i vaguely remember teleportation or something else causing it to close

#

i suppose i could open another inventory and then close it immediately 🤡 but maybe there is a cleaner way

vast ledge
#

Is there not just inventory#close()

kind hatch
thorn isle
#

does that work on the survival inventory? i could tryitandsee but it'll be a few hours before i can get to

#

the survival inventory is a little bit special in how as far as the server knows, it's always "open" and you can't e.g. cancel it being opened, so closing it might not work either

ivory sleet
#

it probably won’t work

ivory sleet
thorn isle
#

i'll see once i can test

#

hopefully the other inventory won't flicker in too noticeably before being closed

chrome beacon
#

It even works on the pause menu iirc

thorn isle
#

nice

ivory sleet
#

very nice

halcyon hemlock
#

good evening humans

#

long time no see

blazing ocean
#

hi sweatty

eternal oxide
#

lol I thought you were being rude, till I looked at his name

wet breach
#

since it is technically always opened

#

well in the modern versions it is, forget which version it was changed in, in that regard

modern crown
#

Is this where I can find Devs?

wet breach
modern crown
halcyon hemlock
wet breach
#

is there some other meaning of this channel?

modern crown
halcyon hemlock
#

for help, sure, for asking them to do shit for you, prolly not

wet breach
#

would be pretty weird to be getting development help from non devs

halcyon hemlock
#

not here

wet breach
#

?Services

#

?services