#help-development

1 messages ยท Page 802 of 1

tall dragon
#

well thats the problem i had with it at least

#

i had to always manually add it to the config

#

this part

glossy venture
#

wtf is this

remote swallow
#

the water main is broken

#

go fix it

rotund ravine
#

Worked in 2020

proud badge
#

interesting

#

I legit went on inspect element and couldnt find any link

rotund ravine
lost matrix
remote swallow
glossy venture
rotund ravine
#

@exotic obsidian no dms thx

glossy venture
#

but the NPE isnt logged by my shit

#

im pretty sure

#

packets are fun

#

this is the client error which comes along with the server error

tall dragon
#

would u have a link to such a tool?

#

pretty interested in that

glossy venture
#

it could be protocollib or mojang

#

being funny

#

well its most likely an error by me but theyre not helping with debugging

lost matrix
#

Call getHikariPoolMXBean() on your data source and check the stats

lost matrix
proud badge
#

Chat GPT says something related to NullPointerException

rotund ravine
#

What does ur plugin.yml look like

river oracle
#

Asking chatgpt to read stacktraces literal genius

proud badge
#

oops

#

forgor to add command to plugin.yml

river oracle
#

it's always the plugin.yml

#

This is why command map ftw

rotund ravine
#

ACF/cloud ๐Ÿ˜

quaint mantle
#

Is it Illegal access or illegal state when constructing a util class

proud badge
#

ok everything works thanks

quaint mantle
#

like

#

a static util clas

remote swallow
#

no exception

#

just a private constructor

quaint mantle
#

nah the constructor usually still has an exception

glossy venture
#

if i do it

#

which is like never

scenic onyx
#

@remote swallow i have find problem: this is a "test" word created with Commands. if i do with API dont write in worlds.yml. How i can resolve it?

remote swallow
#

no clue

#

never used swm so its probably a 1.8 bug like @tall dragon said

glossy venture
#

lets fucking gooo packet based flicker free async scoreboard sort of works

#

well

#

almost

#

as cu can see it needs some more work

rotund ravine
#

It does nor seem to know the uptime

glossy venture
#

nah thats a different issue tho

remote swallow
#

what is the uptime then

glossy venture
#

idk what nanoTime() returns

remote swallow
#

is it all of them?

glossy venture
#

i thought it was the uptime

#

of the process

remote swallow
#

nanoTime is probaby either epoch nano or device uptime

glossy venture
#

probably

#

thats 3 and a half months

#

so ig i havent restarted my vps in 3 months

#

anyone know what this 40 character limit refers to?

#

something with the scoreboard im pretty sure

#

length of a score name maybe?

#

ok appereantly it was the max length of a score but idk how that happened because its still longer than 40 chars im pretty sure and it works

torn shuttle
quaint mantle
#

i'm trying to make an anticheat and i need to get every packets not just one

#

and no i'm not using bukkit events to make an anticheat because spartan ๐Ÿ’€

rotund ravine
#

Subscribe to each packet one by one

quaint mantle
#

wtf is this lib ๐Ÿ’€

#

ok

lost matrix
lost matrix
quaint mantle
#

anyway to get their client side id?

#

or do i have to do it myself that 20 is 03 on the client etc?

rotund ravine
#

What id are we talking about

glossy venture
grand flint
grand flint
grand flint
#

who animated these shits

torn shuttle
zealous osprey
#

I wonder who that could have been ๐Ÿค”

torn shuttle
#

don't feel like digging up some dude's name just so some other person can dunk on them

midnight fulcrum
midnight fulcrum
#

Its by @alpine urchin and is already used by anticheats

torn shuttle
#

I'd say if it was, I don't give a shit if you think my models are bad

#

I'm not a modeler

#

hell I think my models aren't great

zealous osprey
# torn shuttle no

I thaught it was you, cause I saw you in the blockbench dc asking for help with rotations

torn shuttle
#

this is one of mine

grand flint
#

bro needs a design couse

torn shuttle
#

I'm not trying to be a modeler

grand flint
#

its like 5 mins

#

it teaches u about coloring

torn shuttle
#

you know what I just don't give enough of a shit to justify myself to you, you think what you want

grand flint
#

these needs more texturing

#

they look too

#

symetrical

#

the dark bricks are very nice though

#

and the green on it looks really nice as well

#

its just the places u put the green

#

and the way u did the edges is the issue

#

everything else looks very nice good job

#

oh and also

#

ur flag is too noisy

#

lots of beginers do that to add like more texture to it

#

but it just makes it look noisy

torn shuttle
#

I can see at the corner of my eye you're typing, I'm not reading any of that

grand flint
#

this about ur flag

alpine urchin
tranquil dome
#

Why is ItemMeta#getLocalizedName() empty? I need to get the name of an item and can't use the material type, since it does not always translate to the english name.

alpine urchin
#

@quaint mantle if you opt for my library, we have a discord with support

grand flint
quaint mantle
#

Anything is probably better than this garbage

#

I'll try it

rotund ravine
#

Lol

grand flint
#

^

alpine urchin
#

cause it will definitely involve some bias

#

but i made my library for a reason, and it's not just a knockoff

grand flint
#

bro

#

i didnt ask u to rate it

#

i asked u if it was a better version of protocolib

#

as in

#

does it do the same thing

#

as protocolib

alpine urchin
#

no it is not a better version of "protocollib"

grand flint
#

ok

alpine urchin
#

it's not a version of protocollib

grand flint
#

so its not protooclib

#

so it doesnt do

#

what protocolib does?

alpine urchin
#

technically it does, and i'd argue more

grand flint
#

ok thats all i need to know

#

blocked

alpine urchin
#

?

rotund ravine
#

Banned

grand flint
#

^

tranquil dome
#

Perhaps a better question is asking the advantages and disadvantags of using packetevens over protocollib

grand flint
#

big plugin owner ego smh

inner mulch
#

can someone explain why using interfaces is useful? why would i want to declare some empty methods?

glossy venture
#

bruh ive just spent like 3 hours making a protocollib scoreboard

#

possibly more

alpine urchin
grand flint
#

im jk chill

alpine urchin
#

i'm glad you think i have a big plugin

#

cause i do

#

jk

#

XD

grand flint
#

best spigot plugin owner

alpine urchin
#

yeah

#

cause i don't think protocollib is bad

#

i used to use it in the past

#

then i decided to make my own library whilst developing my first anticheat

#

then i decided to dedicate the rest of my time to the library alone

#

so i was in most of your shoes

grand flint
#

blud calling us poor and stupid

alpine urchin
#

?

quaint mantle
#

Protocollib is so bad that i excuse verus

grand flint
#

took it too far ๐Ÿ˜ญ

zealous osprey
# inner mulch can someone explain why using interfaces is useful? why would i want to declare ...

You use interfaces if you only care that certain methods are implemented. However, when using interfaces, the specifics of how they are implemented doesn't matter to you.
So lets say you want to create a method with which you equip an item to an entity. You don't care what entity it is, as long as there is an "equip" function. So you could define an interface called "EquipableEntity", which has a function called "equip(ItemStack item, EquipmentSlot slot)".
Then you OR other developers can implement their own ways of equipping an item to an entity.

grand flint
#

but ok

alpine urchin
#

you can have an Entity interface, which defines a method called walk(direction)

#

you can have two different entity types for example, player and pig, and these subclasses can define movement differently

#

forexample a player could walk 2 blocks instead of 1

#

so you avoid many unnecessary if statements

alpine urchin
#

the principle/walk feature is a general feature of that entity, but how it is implemented differs

#

@inner mulch

glossy venture
alpine urchin
#

please use interfaces

inner mulch
#

okay

alpine urchin
#

you get the examples right

inner mulch
#

yeah i need to implement it every time

rotund ravine
#

This guy is much better than Dusk thank god ๐Ÿ’ช๐Ÿป

zealous osprey
#

I find interfaces, personally, only really useful when you want to show intend/force someone to do something in a certain way. Very useful and neccessary for APIs. But in my personal code, I mostly only use it for design patterns.

alpine urchin
#

"force someone to do something in a certain way"

zealous osprey
#

As in the methods a certain class has to have.
So they HAVE to have this method, otherwise my functions won't accept them

alpine urchin
#

but yeah it's really useful for API's, especially when you're dealing with a multi-module project, you can't avoid it.
you can have an interface of something, and need to implement how that operation runs on different platforms.

alpine urchin
#

and the more you use interfaces, the easier it is for people to modify the implementation of your library.

#

really useful for real

zealous osprey
# alpine urchin i see

That's why my main point was "intend", cause the dev who is implementing the code has to work with the data I provide. If I don't provide it, well... then they can't do much.

alpine urchin
#

yea

#

i recently dealt with ajar which had no source, many parts obfuscated

#

luckily the implementation i wanted to change used interfaces

#

using reflection you can modify how interfaces are implemented

#

real handy java feature

zealous osprey
#

reflections are sick. I often just use it with static code analyses or annotation helper features.

alpine urchin
#

yeah

#

sometimes people urgently wanna use unmaintained software

#

and ask you to fix it

#

๐Ÿคทโ€โ™‚๏ธ

#

gotta do what you gotta do

zealous osprey
#

Or decline; Except if it's for work... well you gotta suffer through that then

alpine urchin
#

was a commission

#

so yeah i could decline it

#

but im not complaning, just justifying use of reflection

#

hard obfuscation messes with recaf recompilation of jars

#

so i had limited options

zealous osprey
#

Good chat, Ima head out. Gn

alpine urchin
#

good night

glossy venture
torn shuttle
#

right quick, player fps can be affected by packet volume received right

sacred mountain
#

i mean

#

depends what kind of packet

#

but they should all probably eventually lag the player

storm crystal
#

๐Ÿ’€

sacred mountain
#

who's gonna stop people realistically

#

on another note my chess project finally works,

#

as a standalone jar

river oracle
serene sigil
#

hi guys I need to keep a chunk loaded always, how do i do that?

river oracle
#

No one at mojang is gonna stop you from texturing kelp weird

storm crystal
fast spade
#

Hello,
I am trying to write a ban command and I am using SQLite to store data. The data stores perfectly fine but when it comes to retreiving the data it seems to just wak out.
Here is the error I'm receiving.

[22:01:21 WARN]: java.sql.SQLException: Database connection is null or closed.
[22:01:21 WARN]:        at plugin-1.0-beta.jar//xyz.jellyfishhosting.plugin.events.JoinEvent.getBanInfo(JoinEvent.java:82)
[22:01:21 WARN]:        at plugin-1.0-beta.jar//xyz.jellyfishhosting.plugin.events.JoinEvent.onPlayerJoin(JoinEvent.java:35)
[22:01:21 WARN]:        at com.destroystokyo.paper.event.executor.asm.generated.GeneratedEventExecutor81.execute(Unknown Source)
[22:01:21 WARN]:        at org.bukkit.plugin.EventExecutor$2.execute(EventExecutor.java:77)
[22:01:21 WARN]:        at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:81)
[22:01:21 WARN]:        at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70)
[22:01:21 WARN]:        at io.papermc.paper.plugin.manager.PaperEventManager.callEvent(PaperEventManager.java:54)
[22:01:21 WARN]:        at io.papermc.paper.plugin.manager.PaperPluginManagerImpl.callEvent(PaperPluginManagerImpl.java:126)
[22:01:21 WARN]:        at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:615)
[22:01:21 WARN]:        at net.minecraft.server.players.PlayerList.a(PlayerList.java:346)
[22:01:21 WARN]:        at net.minecraft.server.network.ServerConfigurationPacketListenerImpl.a(ServerConfigurationPacketListenerImpl.java:130)
...

The line that it is throwing the error at is

            statement = connection.prepareStatement("SELECT * FROM bans WHERE player_name = ?");

The full code is

   private BanInfo getBanInfo(String playerName) {
        Connection connection = SQLiteConnector.getConnection();
        PreparedStatement statement = null;
        ResultSet resultSet = null;

        try {
            if (connection == null || connection.isClosed()) {
                throw new SQLException("Database connection is null or closed.");
            }

            statement = connection.prepareStatement("SELECT * FROM bans WHERE player_name = ?");
            statement.setString(1, playerName);

            resultSet = statement.executeQuery();

            if (resultSet.next()) {
                String staffMember = resultSet.getString("staff_member");
                String reason = resultSet.getString("reason");

                return new BanInfo(playerName, staffMember, reason);
            }
        } catch (SQLException e) {
            e.printStackTrace();
        } finally {
            try {
                if (resultSet != null) {
                    resultSet.close();
                }
                if (statement != null) {
                    statement.close();
                }
                // Note: Do not close the connection here to keep it open for later use
            } catch (SQLException e) {
                e.printStackTrace();
            }
        }
        return null;
    }

Here is the SQLConnector code:

    private static Connection connection;

    public static Connection getConnection() {
        if(connection == null) {
            try {
                Class.forName("org.sqlite.JDBC");
                connection = DriverManager.getConnection("jdbc:sqlite:plugins/Jellyfish-Hosting-Plugin/punishments.db");
            } catch (ClassNotFoundException | SQLException e) {
                e.printStackTrace();
            }
        }
        return connection;
    }

    public static void closeConnection() {
        try {
            if (connection != null && !connection.isClosed()) {
                connection.close();
            }
        } catch (SQLException e) {
            e.printStackTrace();
        }
    }

Any help will be appreicated.

torn shuttle
#

ayo what's the latest guidelines on creating entities with custom hitboxes?

#

still has to be custom entities using nms code for that right

grand flint
#

he is

#

using a minecraft textureback

#

and the models he make doesnt fit everything else

#

i sent him a guide to help him fit his models into minecraft

#

if he had like one of those hd rpg texturepacks

#

then thats different

quaint mantle
#

is it ok if a Repository class loads files

#

its just that i feel like that's what a DAO class is for

torn shuttle
#

wait, what

#

hold on

#

doesn't this set a bounding box?

minor junco
#

it should

#

but it depends when you modify the bounding box, since an entity move also modifies the underlying bounding box

torn shuttle
#

ah

#

so it would do it, for a single tick

#

hrm

minor junco
#

again, depends on when you call it. If you call it before an entity move is done, then your bounding box will disappear at the same tick

torn shuttle
#

I guess it's not too hard to just modify the underlying dimensions field

minor junco
#

I mean what you can do is constantly change the bounding box, but I do not recommend it if it's not needed

#

what do you need that for exactly?

torn shuttle
#

custom bounding box

#

for custom models

minor junco
#

ah I see

torn shuttle
#

I'll just modify the dimensions

minor junco
#

and the issue at hand is that this method is not changing to your desired hitbox?

torn shuttle
#

I've not attempted it yet, I'm exploring the ways I could do it

minor junco
#

I mean you could try to set the bounding box, I do not know how it behaves with custom models

#

I guess it's worth a try

final wharf
#

is Eclipse better than Intelljij

torn shuttle
#

aw man what

minor junco
#

erm

#

nope

torn shuttle
#

there's a method in here that refreshes dimensions

#

come on mojang

#

just play nice

minor junco
#

if you want to go crazy, go Vim

torn shuttle
#

hm should be fine I think for my use

final wharf
#

already had Inlellij just wanted to make sure

torn shuttle
#

alright let's try modifying this private field, what could go wrong

minor junco
# torn shuttle hm should be fine I think for my use

yeah I mean if you find a work around that does not involve having to use reflections / method handles to get to what you want it's probably much better. Reflections are kinda slow too, but that doesn't really matter in an environment where you have 50ms between server ticks

torn shuttle
#

if it becomes an issue I'll investigate an alternative but right now I'm just in a prototyping phase, and ultimately this should really not be running that often

minor junco
# fast spade is anyone able to help??

I mean you literally have the issue in your code. You throw an exception when the connection is closed. Did you ensure that your connection is not null and got established in the first place?

torn shuttle
#

fundamentally there's only so many custom models servers can handle in the first place

#

and it's not quite so many

#

last time I did the math, unoptimized it was about 14k armor stands I think

#

and that was on a minimalistic setup

fast spade
minor junco
#

yeah im not into the custom model stuff if im honest, I was really active in minecraft development back in legacy versions and now I am back at it since I have a big and quite sensitive project going on

#

so don't take my full word on it, I am not soo familiar with the new apis

minor junco
torn shuttle
#

now that's a specific field

#

I wonder why that's needed

#

drowning maybe

minor junco
#

I assume so, going over it in spigot's source it's also for some effects

#

I assume in the client it is also for animations but dont take my word for it

#

i mean bukkit is basically a 95% copy (structurally) of minecraft's actual source code

river oracle
#

sometimes I wish it was a better copy ๐Ÿฅฒ and sometimes I wish it was a worse copy

minor junco
#

Is what it is, I am thankful for it to be similar makes my job for the project I am doing right now much easier

#

So I don't have to debug Minecraft's source which takes ages to compile

final wharf
minor junco
#

Yeah I mean I begun with eclipse too. Go for what you feel most comfortable with as a beginner doesn't really matter too much at the end

#

Most modern tutorials will be written or recorded with/about IntelliJ tho so care for that

#

@final wharf

final wharf
#

tyhe 14 minute one

torn shuttle
#

iirc if I'm using remapped mojang values I need to access the field without using the remapped name right

#

I need the obfuscated name?

minor junco
#

yup exactly

#

That's where protocollib comes in handy

final wharf
torn shuttle
#

I'm sure, but I just need the one value

final wharf
#

protocollib is amazing

minor junco
#

It contains reflection matchers that make it easy to find your target

#

Also it contains a strong base, but by far not everything

minor junco
# final wharf some people say that protocollib is bad

I mean surely you could gain more performance with using more low level stuff like method handles instead of a general introspector kinda thing what reflections represent but honestly it doesn't matter too much in the end

#

Premature optimization is the root of all evil

A wise man said

minor junco
torn shuttle
#

I rarely use reflections, if I'm setting a field that is an object it asks for Object obj and Object value, is that first object the original object?

minor junco
#

First object is the accessor, i.e. the instance that owns the target attribute

#

Second is the actual value

torn shuttle
#

so in this instance since I'm modifying entityDimension in entity that first one would be entity?

minor junco
#

If you want to set a field for an instance called object, then you want to pass object as the first argument

#

yup correct

torn shuttle
#

alright yeah that makes sense

#

thanks

minor junco
#

nws

#

The object is basically the virtual pointer to where the fields lay in the memory, the field is basically the offset upon it but don't take my words for too granted been some time since I used java

torn shuttle
#

what do the cool kids use to check remappings, I remember I saw a link posted for it a few days ago but I seem to have lost it

#

I know I can get the official mojang ones but they're not great to follow along

#

oh it might've been mini's mapping viewer

#

no wait that's for spigot

minor junco
#

What do you need exactly

torn shuttle
#

something that will show me how they're getting remapped so I can check what field I need for each version

tranquil dome
#

So I am currently using the following method to get the name of an item stack.

TranslatableComponent(item.type.translationKey)

This works quite nicely, because it successfully translates for example COAL_BLOCK to Block of Coal, but in case of TIPPED_ARROW, it does not get the type of arrow. I'm assuming this is the same case for potions. Is there any way to get the full translation for this? Example of what I mean:

minor junco
#

Mhn good question I basically just decompiled every version and checked it manually, didn't know there was mappings public for Bukkit ๐Ÿ’€

echo basalt
#

?mappings

undone axleBOT
torn shuttle
#

there she is

#

thanks

minor junco
#

Damn all that work could've been saved

deep herald
#

why does my command error?

#

ik its the target or smthg

#

but idk how to check with it

torn shuttle
minor junco
minor junco
#

Wasn't a thing back in legacy time I think ๐Ÿ˜ญ

torn shuttle
#

yeah it's relatively recent

#

depends on what you'd call legacy though

minor junco
#

< 1.13

river oracle
#

mappings were added in around 1.16 iirc and spigot added support in 1.17.1

torn shuttle
#

yeah I've been around since infdev and never really stopped, though not always as a dev

minor junco
#

That's when Minecraft introduced a lot of new things at least by the looks of the sources

torn shuttle
#

so I wouldn't call 1.13 legacy by any stretch

#

I'd call pre-alpha that

minor junco
#

Xd

river oracle
tranquil dome
#

What would that make 1.8--

minor junco
#

Honestly so many servers still run 1.8

river oracle
#

if you look at bstats

torn shuttle
#

they've fallen off

#

quite hard

#

the meme is dead

minor junco
#

I mean surely they just use Via version nah?

river oracle
#

hopefully that version eventually burns into the ground

torn shuttle
#

via doesn't spoof that

minor junco
#

Ah okay

river oracle
torn shuttle
#

that viabackwards exists at all is already insane

minor junco
#

yeah, it's pain in the arse to make systems that heavily rely on the clients input for all versions

#

It differs from version to version

torn shuttle
#

I don't think there's any other game out there that has been modded so thoroughly the community has made patches to allow past and future versions to run on the same server

valid burrow
#

ayone knoiw how to make custom creatures like completly custom including ai, being able to fly, swim or walk (or multible) and everything else a creature needs

minor junco
#

Yeah it's quite nice

minor junco
torn shuttle
#

then again I'm throwing my hat into the ring by making a FOSS way to add custom models to the game

young knoll
#

Make sure entity classes that extend NMS ones

valid burrow
#

ik

young knoll
#

And then override all the various methods

#

And then hack them into the registry so they persist restarts

minor junco
tranquil dome
torn shuttle
#

man if 1.13 is legacy what does that make me

minor junco
#

It is officially called legacy in spigot forums

torn shuttle
#

that doesn't make it right

minor junco
#

That's why I call it that, I've been around since 1.8 beta

torn shuttle
#

if it makes me feel old then it's wrong

minor junco
#

Haha

#

How old are you?

torn shuttle
#

I'm not old, I'm a spry young lad

minor junco
#

well how you define young is the question

torn shuttle
#

me

#

I'm the definition of young

#

hence I will always be young

minor junco
#

Alright sir ๐Ÿ˜‚

torn shuttle
#

please, sir was my father, call me Mr. Sir

minor junco
#

Alright mr sir

#

I got you ๐Ÿ™ƒ๐Ÿซก

torn shuttle
#

thanks, that was very on fleek of you

minor junco
#

No worries my little bri'ish lad

#

Now you are asking yourself how I knew you were British, well do you know these geoguessr pros? Yes, I am not one of them!

torn shuttle
#

I've always wanted to meet someone who's not a geoguessr pro

#

we have so much in common

minor junco
#

For real man let's hook up and become best friends

#

Like in spongebob

torn shuttle
#

geoguesser isn't streamlined anyway

#

I have a far more streamlined version of geopolitics where we go back to having a big pangea and just the one country and I get to be the king

#

it will make things much easier

minor junco
#

Yes my mr sir ๐Ÿซก

torn shuttle
#

actually let's update that to Mr. Sire, I'm feeling regal

minor junco
#

My Lord I would do anything for you can you please assign me work to finish for my great king of spigot

#

Btw we should not use this channel for this shit chat feels odd ๐Ÿ’€

torn shuttle
#

see why can't everyone be polite like boned

#

@echo basalt

tranquil dome
#

So I am currently using the following method to get the name of an item stack.

TranslatableComponent(item.type.translationKey)

This works quite nicely, because it successfully translates for example COAL_BLOCK to Block of Coal, but in case of TIPPED_ARROW, it does not get the type of arrow. I'm assuming this is the same case for potions. Is there any way to get the full translation for this? Example of what I mean:

final wharf
#

its just a simple print

#

wtf

#

oh

#

im stupid

#

didnt add string thingy to it

torn shuttle
#

well

#

this is very weird

#

my reflections are saying that hte be field does not exist

#

but I am pretty sure it does exist

#

so https://piston-data.mojang.com/v1/objects/73c8bb982e420b33aad9632b482608c5c33e2d13/server.txt that's the official mojang mappings net.minecraft.world.entity.EntityDimensions dimensions -> be is what I am trying to access with

    public static boolean setCustomHitbox(Entity entity, float width, float height, boolean fixed) {
        EntityDimensions entityDimensions = new EntityDimensions(width, height, fixed);
        Class<?> entityClass = entity.getClass();
        try {
            Field field = entityClass.getField("be");
            field.setAccessible(true);
            field.set(entity, entityDimensions);
        } catch (NoSuchFieldException e) {
            e.printStackTrace();
            return false;
        } catch (IllegalAccessException e) {
            e.printStackTrace();
            return false;
        }
        entity.setBoundingBox(entityDimensions.makeBoundingBox(entity.position()));
        return true;
    }

thoughts?

#

and I am certain it's 1.19.R3

final wharf
#

How can i pring 2 lines?

#

it gives me errors

#

oh nvm

#

im just stupid

#

wanted to send a string

#

but didnt put it in ""

quaint mantle
#

should I throw exceptions like this?

young knoll
#

Generally you should make some kind of specific exception

#

Or just let it throw the original one

quaint mantle
#

yeah but this is like a

#

one error fails everything

#

like it cannot physically recover from it

torn badge
quaint mantle
torn badge
#

And you never catch the base Exception class

#

No you donโ€™t do that

quaint mantle
#

luckperms does that im pretty sure

torn badge
#

Thatโ€™s not really good practice

quaint mantle
#

well im dealing with like a abstract database

#

and so I have

method() throws Exception

torn badge
#

Create a DatabaseException then

#

When you catch that Exception you catch all other possible ones with it

#

Or depending on context use something like IllegalState

quaint mantle
#

why didnt luckperms do that

#

@torn badgedo yk if a repository class should handle database stuff

#

or should it be more of cache

torn badge
#

Where do they do that? Let's see the link

torn badge
quaint mantle
quaint mantle
#

if its a DAO

#

then I use a proxy for it to cache stuff

#

the reason I used a repository is u register and get stuff from it

#

and it has a cache at the same time

molten hearth
#

am i missing something with ACF here? ```java
// onload
BukkitCommandManager manager = new BukkitCommandManager(this);
manager.registerCommand(new ToggleBuild());

// ToggleBuild.java
@CommandAlias("cbreak")
@Description("Toggle custom break logic")
public class ToggleBuild extends BaseCommand {
/* Main Command */
@Subcommand("toggle")
@Description("Toggle custom break logic")
public void onToggle(Player player) {
player.sendMessage("test");
}
}

#

because /cbreak aint registering

wet breach
molten hearth
#

i thought it just took an alias for that

#

since there's no actual @Command

wet breach
#

Idk how exactly acf works. Just know alias is not the command itself

molten hearth
#

alex sent this example earlier and it doesnt seem like it

#

oh wait

#

its erroring lmfaooo

#

my bsad

wet breach
#

Well then

#

Probably should have looked at that lol

molten hearth
#

๐Ÿ˜‚

#

well im not sure how to fix that actually

#

the error is related to shading

#

im getting java.lang.NoClassDefFoundError: co/aikar/commands/BaseCommand right

#

but my shadowJar config is gradle shadowJar { relocate 'co.aikar.commands', 'net.craft2.seggswhen.acf' relocate 'co.aikar.locales', 'net.craft2.seggswhen.locales' }

#

and i added build.dependsOn shadowJar

#

but the build isnt shaded still

#

and im a bit confused because im also using NMS

#

so im not sure if the nms plugin can even remap the shaded jar

#

well actually no it doesnt

#

how would i be able to make it remap the shaded jar?

young knoll
#

It should take the output of shadowJar by default

#

Provided you are using userdev

grand flint
#

ask chat gpt 5 instead

molten hearth
#

LMFAO

grand flint
#

4*

molten hearth
#

go back to eating ur sandwich

grand flint
#

stfu

#

bro cant even add a toggle ๐Ÿ˜‚

#

why are u doing it on seggswhen

#

is it different

molten hearth
#

WHAT AM I SUPPOSED TO DO WHEN THEPLUGIN ASSUMES THE DEFAULT BUILD IS THE RIGHT ONE

grand flint
#

also u broke the noteblocks

molten hearth
#

yeah i broke the plugin

grand flint
#

tp to me

#

nono

#

its half broken just tp me

wet breach
#

Not sure if gradle can do it. I know maven can

molten hearth
#

๐Ÿ’€

grand flint
#

what are u even tryna do

#

@molten hearth

molten hearth
#

fucking

#

get acf to work

#

with nms

grand flint
#

whats acf

molten hearth
wet breach
#

Aikairs command framework

grand flint
#

bro doin allat

#

for a single command

wet breach
#

I think they were just trying to get the hang of it first

grand flint
#

no

#

he is only adding a single command

molten hearth
#

yes but im gonna use acf anyway

wet breach
#

Right now yes

grand flint
#

no

#

its my plugin

molten hearth
#

i tried doing uh

#
build.dependsOn {
    shadowJar
    remap
}```
wet breach
#

Can you have two remaps?

molten hearth
#

but it still doesnt know to remap the shadowed jar

grand flint
#

๐Ÿคก: use maven

wet breach
#

Anyways got to drive to work

grand flint
#

drive safe

wet breach
#

Driving unsafe tends to be more fun

grand flint
#

ong

#

lmk when u crash

wet breach
#

Probably wont, people drive to slow to allow me to do such things

molten hearth
#

fixed it with groovy tasks { remap { version.set("1.20.1") inputTask.set(shadowJar) } }

grand flint
molten hearth
grand flint
molten hearth
#

im not sure if thats supposed to be a sweet message or a slavery message

molten hearth
#

dms

slender elbow
#

lol

grand flint
#

ok daddy ๐Ÿฅฐ

grand flint
#

L

slender elbow
#

you seem to be mistaken

grand flint
#

you seem to be hoeless

slender elbow
#

so, if i were to get you, does that mean you're a hoe? ๐Ÿค”

grand flint
#

id gladly be a hoe

torn shuttle
#

I sense a disturbance in the force, like mods not being around to moderate chat

slender elbow
#

mood

grand flint
#

my bad @torn shuttle :(

torn shuttle
#

@worldly ingot I pinged you, it's your problem now

grand flint
#

why yall in offline mode as if u important

#

๐Ÿ˜‚

slender elbow
#

oh no that's not the reason

grand flint
#

are u hiding from me :(

slender elbow
#

it's because then i have people i don't want to DM me thinking i'm available ๐Ÿ’€

grand flint
#

then ignore them

slender elbow
#

that's what i do

grand flint
#

i have like 70k friend requests

slender elbow
#

cha cha real smooth

grand flint
#

i dont get that many dms

slender elbow
#

can i be 70001?

torn shuttle
grand flint
#

so u can be 75225

slender elbow
#

yay

#

๐Ÿฅฐ

grand flint
#

only if u treat me like a bad hoe

#

accident Choco no ban please :(

slender elbow
#

i can be whoever you want me to be

grand flint
slender elbow
#

WHY isn't choco in my friends list

#

wtf

grand flint
#

md_5 should be on my friend list but ye

worldly ingot
#

I'm a bad stan

grand flint
#

choco

#

me too

#

but wait

#

max friends i have to remove someone :(

slender elbow
#

what even is the max lol

grand flint
#

okok accept

grand flint
slender elbow
#

interesting, i'll make sure to forget that fact by next week

grand flint
#

ill remind u just to feel good about my self

slender elbow
#

๐Ÿซถ

torn shuttle
#

it should just be a private field

young knoll
#

Print out the field names

worldly ingot
#

If it's mapped by CraftBukkit then the mapping will stay

#

Unsure if CraftBukkit maps that field but it's something to be aware of

#

Best to just open up the compiled Spigot server and see what that field is called

carmine mica
#

pretty sure everything except the several class names is reobfuscated now on the server

buoyant viper
#

u gotta put that in a method

#

the sysout that is, the String declaration can stay where it is

plain plaza
#

Is there an actual way to determine if a player actually damages an entity?

#

For example, if I swing my hand (left click) to attack an entity, that's actually an attack

#

But if I do <LivingEntity>.damage(0.01, <Player>); then the game thinks I actually attacked that entity

summer scroll
#

What do you want to do?

plain plaza
#

Just to detect if a player damages an entity by left clicking it

quaint mantle
#

And cast to player

plain plaza
#

?

#

This doesn't fix the problem?

wet breach
plain plaza
#

Technically yeah, is there a way to tell if it came from a plugin if the damager was set to a player?

wet breach
#

Not really. So how you need to do this is make a global list that holds entity uuid. Add the entity to said list when your plugin does damage. And you would check from that list and what not. The better version would be to extend upon that and create a custom event that extends the entity damage event which would make it easier in a way.

#

Hope that helps you come up with something uwu

odd adder
#

Is there any library for getting player's input from chat or sign?

quaint mantle
#

the line changes well, thank you!

#

is there a way to set the textdisplay to be seen from all directions?

valid burrow
#

wtf is a panic goal how does a creature panic

placid moss
#

when you hit an animal

#

it starts spinning and running away

valid burrow
#

oh that makes sense

#

how would i make an entity defend it self like a wold

#

wolf or lama

#

cant find a goal for that

young knoll
#

Well, what goals does wolf have

valid burrow
#

not sure where to check

#

this whole file structure is confusing me

#

many it seems

#

this.targetSelector.addGoal(4, new NearestAttackableTargetGoal(this, Player.class, 10, true, false, this::isAngryAt)); this maybe?

worldly ingot
#

That makes a wolf attack a player if it's angry at it (i.e. a non-owner player hitting the wolf)

valid burrow
#

yh thats kinda what i mean

#

thats what i meant with "defend" it self

#

like a wold

worldly ingot
#

So you want it passive unless you hit it?

valid burrow
#

wolf

#

yes

worldly ingot
#

That would be it then

valid burrow
#

got the other two alread<y

worldly ingot
#

Polar bears should have a similar goal

valid burrow
#

they also get agressive when u hit their kids

young knoll
#

HurtByTarget goal is what it uses to take revenge

valid burrow
#

thx coll

#

not really sure what to pass in xd

#

doesnt let me look at it

#

nvm

#

now it does

#

still no clue what it wants

young knoll
#

Itโ€™s a vararg of classes that should ignore the alert

#

Vanilla just passes nothing

valid burrow
#

do i need to add other goals too

#

or does this work by itself

ivory sleet
#

it should work by itself

valid burrow
#

oki dokiu

#

random question in nms what does the s stand for

ivory sleet
#

most goals work that way I reckon, they work independently but like, target goals set the target entity, and then some other goal will read the target entity and do sth with it

valid burrow
#

nm is net minecraft i know that

ivory sleet
#

server or source iirc

valid burrow
#

or

#

oh okay

ivory sleet
#

net/native minecraft/mojang server/source

#

all the variants I know ppl refer to lol

valid burrow
#

๐Ÿซ˜

river oracle
#

i just call it net minecraft server ๐Ÿคทโ€โ™‚๏ธ

#

even though most of the packages aren't in nms anymore xD

valid burrow
#

yh thats why i was confused xd

young knoll
#

They used to all be!

valid burrow
#

just started using nms now and enver saw the old file structure

river oracle
#

minecraft does like combined server and client for many things

young knoll
#

Nah spigot used to relocate everything into net.minecraft.server

#

Hence the name

river oracle
#

spigot at their naughty relocations!

valid burrow
#

my brain is exploding rn

river oracle
#

NMS IS SO FUN

valid burrow
#

i have a bucn of random creaures

river oracle
#

are you enjoying yourself

valid burrow
#

all of them have custom models

#

so my first plan was to use the same entity type for all

#

cause easier

#

because i want to be able to add more entitys in the config

#

but

#

now

#

i need entities that fly, entities that swim entities that walk

#

AND ENTITIES THAT DO MULTIPLE???

#

how would i achive that

river oracle
#

sounds like you need a little data oriented* development in your life <3

ivory sleet
#

it can be nice to extend ur own entity class

#

and then translate that into an existing entity type at packet level or sth

#

and then u'd basically define ur own move control etc

valid burrow
#

that sounds like a lot of work..

river oracle
#

I mean your goals are a lot of work

#

so

#

idk what you expect

ivory sleet
#

guess what

#

mojang has written code for it

#

that works relatively nice

#

so just merge it essentially

valid burrow
#

can i just make a normal entity

#

be able to fly

#

and walk

#

like

#

can i take a wold

#

wolg

#

wolf

#

and give it the ability to fly

river oracle
#

I mean at the end of the day its AI is just a bunch of goals

valid burrow
#

yh but what happens when i have a fly and a walk goal

#

there is no such entity yet

ivory sleet
#

yeah or well the more modern entity behavior api consideres memory (basically a hashmap of states) and activities (basically just runnables and predicates)

#

well sensor types also (trigger points basically)

ivory sleet
#

I think u'd prob wna write a custom goal for it tho

valid burrow
#

im gonna cry myself to sleep tonight

ivory sleet
#

I would hand u the code I wrote for my dragon

#

but its still so buggy KEK

valid burrow
#

this is too much custom for my brain

#

custom this custom that

#

i might as well just remake minecraft

ivory sleet
#

true lol

river oracle
#

its basically a game engine if you abuse it enough

ivory sleet
#

"abuse it enough"

#

lmao

valid burrow
#

i think we have been abusing it for quite some time

#

what difference between target selector and goal selector

#

if both pass in the same shit

river oracle
#

for example you can do custom blocks really nicely with display entities and then register it to the minecraft registry

ivory sleet
#

its like having 2 threads

#

one that actively tries to determine the target entity

#

one that actively tries to determine what the entity itself should behave like

valid burrow
#

which one do i use where here

ivory sleet
#

if u wanna set the target

#

that is lets say the owner

#

or what entity to attack

#

then use target selector

#

else dont

quaint mantle
#

Do spigot has entity goal api or just nms?

ivory sleet
#

unsur

#

@river oracle

#

do u know?

valid burrow
river oracle
ivory sleet
#

thats for the better

river oracle
#

mostly because it'd be something thats hard to implement into spigot

ivory sleet
#

since mojang is migrating anyway

#

the new api is gonna be easier

quaint mantle
#

Eh

river oracle
valid burrow
#

as far as i understood the main reason spigot never got is it that it was obfuscated
until recently

ivory sleet
#

anyway drvoss, the target and goal selector system is gonna be removed in the conceivable future as its design lack sophistication regarding more complex entity behavior

ivory sleet
#

well its alr fully released

#

just hasn't been fully migrated

river oracle
#

worlds first conclube PR incoming?????

ivory sleet
#

a lot of entities still use the goal and target selectors, many goals havent been ported to activities

#

lmao

#

mayhaps

#

i wouldnt mind

river oracle
#

I need to make better tooling for my spigot fuckery still, but I have a comission to finish first

valid burrow
#

why does it looks so fanxy for u ;(

#

mines so ugly

ivory sleet
#

lol does it?

river oracle
#

for example allow making snapshot releases

ivory sleet
#

ugh I just changed it I think lol

#

i have it so u cant see the file, since many commissions dont want that

valid burrow
#

understandable

ivory sleet
#

tho this is more of a labrat project :>

#

but yeah drvosss, gl

#

id advice u to look at modded entities

#

since there are a lot of mods that have entities that both walk and fly

ivory sleet
young knoll
#

The brain system is wack

#

Goals are simple :(

ivory sleet
#

well I think the goal system had a lot of issues that the brain system addresses acceptably

#

needless to say it isnt perfect

young knoll
#

Itโ€™s also only on like 10 entities

river oracle
ivory sleet
#

well i wouldnt b surprised if its gonna be ported in near versions

young knoll
#

I mean they havenโ€™t done it yet

river oracle
#

coll we can express you with goals API, but some of us need brain API to function

young knoll
#

And itโ€™s been several years :p

ivory sleet
#

yeah, but its not unreasonable for them to commit to such a change

ivory sleet
#

i think the biggest caveat with the goal system boils down to why a target and goal selector specifically, like a target to attack is not the only type of data u'd want to calculate in parallel, other targets such as look target, owner, follow target etc. then other data that is just brain/goal/behavior related

valid burrow
#

who eats blocks

#

well ill go to sleep now

#

maybe someone can help me with custom goals tomorrow

#

uwu

ivory sleet
#

it takes a mob

#

and it needs the mob so it can announce that the grass eat thingy happened

worldly ingot
weak adder
#

How can i silently execute console commands? I have a list of commands that i want to execute from a list.

        for (int i = 0; i < rewards; i++) {
            if(commandList != null) {
                for (String command : commandList) {
                    Bukkit.dispatchCommand(Bukkit.getConsoleSender(),
                            utils.s(player,
                                    //Replace Plugin Placeholders
                                    command.replace("{player}", player.getName())
                                            .replace("{times_rewarded}", String.format("%d", rewards))
                                            .replace("{minutes}", String.format("%b", duration))
                            )
                    );
                }
            }
        }
#

So far i've got it to execute commands but they are outputted in the console

summer scroll
quaint mantle
#

Method itself does not log

#

dispatch does

upper hazel
#

equals of the Inventory class takes into account the location where it is located, right? Will 2 inventories opened in different locations be equal?

summer scroll
quaint mantle
#

Performance overhead

upper hazel
#

what to do? Why does a click on player inventory have its own location despite the fact that another inventory is open?

#

I have a system for getting the inventory need based on the location where the click occurs

drowsy helm
#

your implementation is inherently flawed then

#

sounds like that system could be spoofed pretty easily

upper hazel
#

this will be very bad for someone who tries to put an item via shift into that inventory where it cannot be put

drowsy helm
#

oh wait by location you mean slot

upper hazel
#

slot has location? i use inventory location

drowsy helm
#

what do you mean by location

quiet ice
#

Inventory location is not a thing

#

We use inventory slots generally

#

?jd-s though...

undone axleBOT
quiet ice
drowsy helm
#

thats what i initially thought they meant

quiet ice
#

?stash

undone axleBOT
drowsy helm
#

if that is the case using location to discriminate inventory is a bad idea

quiet ice
#

Well in that case it all depends on how Mojang implemented IInventory

#

Chances are it does take in account of the location, but I cannot say for sure

upper hazel
#

I tried to make the resulting chest inventory unique when clicked, but I didnโ€™t know what to use as an Id, so I took the location

#

This is why this bug occurred

#

Are 2 inventories opened in different places but belonging to the same chest block the same?

drowsy helm
#

just store the inventory in a map

#

or use inventoryHolder

upper hazel
#

but what use for key

#

yes

#

i was do

#

but

quiet ice
#

IdentityHashMap?

upper hazel
#

I register inventory during opening

quiet ice
#

But no, do not.

#

Use virtual invs instead

#

Which are about as unrealiable, but that should work without breaking in the most unnoticeable way

upper hazel
#

The listener system was created based on a post from bukkit about the topic โ€œmodern inventoryโ€
but the problem is how to make the open inventory of the chest unique when opened

#

this is why i was use location

#

cuse how i undestand inventory not can be unique for the same block even if they are opened in different places

quiet ice
#

And that is why I recommend closing the inv and opening a virtual one instead

upper hazel
#

and how to get inventory where the player wants to put the item and inventory where he gets the item from

#

oh wait

#

I solved the problem

#

It turns out that the event has "2 types of events"

quiet ice
#

Oh I guess you could also differ by the inventory holder

upper hazel
#

I initially get the inventory where the click occurred, not the one that's open.

#

this is why i not can detect click

twilit roost
#

what are the advantages of using toml instead of yaml?
and is there something like BoostedYaml but for toml?

chrome beacon
#

Configurate uwu

#

Toml doesn't care about indentation

tall dragon
#

toml readability with multiple nested levels is also better imo

subtle folio
#

time to store data in toml

shadow night
#

Will we get a bukkit config rewrite from yaml to toml with automatical conversion?

remote swallow
#

doesnt need a rewrite

#

just make a TomlConfiguration that extends FIleConfiguration

eternal oxide
#

no chance

shadow night
#

Bukkit is crazyy

twilit roost
wet breach
slate tinsel
#

What data is saved when a player is whitelisted? Is it possible to make up time in some way?

sleek estuary
#

why not work?

#

bungeecord plugin

hazy parrot
#

What does your connection url looks like

quaint mantle
#
display.setItemStack(CraftItemStack.asNMSCopy(new org.bukkit.inventory.ItemStack(Material.GLASS)));
display.setPos(loc.getX(), loc.getY(), loc.getZ());
display.setCustomName(CraftChatMessage.fromStringOrNull("a"));
display.setCustomNameVisible(true);

ItemDisplay display2 = ~~~

send addentity packet ...
send meta packet ...

nmsPlayer.getBukkitEntity().addPassenger(display.getBukkitEntity());
nmsPlayer.getBukkitEntity().addPassenger(display2.getBukkitEntity());```

I made it as above, two itemdisplay overlap and board on top of the player's head.
Even if you put a slime with a negative size between the two displays, three overlap and go up above your head.
How can I fix this?
young knoll
#

Just use the translation on the displays

#

Rather than negative size slimes

quaint mantle
#

Is there anything i can refer to?

young knoll
slender elbow
#

plugin devs when math is required โšฐ๏ธ

wet breach
river oracle
#

Makes me want to cry

#

Geometry suck

slender elbow
#

geometry is poggers

river oracle
#

I can do fucking calculus but I couldn't tell you the area of a circle

#

My life as a geometry hater

drowsy helm
#

Pi r ^2

#

Ez

slender elbow
quaint mantle
quaint mantle
#

Geometry is css but in real life

river oracle
echo basalt
#

9/10 of us prob failed math

river oracle
#

I'm doing just fine I just happen to be particularly terrible at geometry

#

So like I can do all the useless algebraic shit too :*)

river oracle
#

It scares me

quaint mantle
#

Geometry in schools is boring imo

#

So we skip it

rough drift
tribal quarry
dusky prawn
#

How do i make that thingy?

#

it looks cute, but i need it.

remote swallow
#

enable ligatures and use !=

dusky prawn
#

Thanks

quaint mantle
#

๐Ÿค” ๐Ÿค”

#

But isn't it right to go higher if I board with an addpassenger?

#
player.addPassenger(display2);```
Even if you board it like this, it all overlaps with the player's head position.
young knoll
#

Display entities have a size of zero

#

So they don't add any offset on their own

#

And I assure you transformation does work

slow light
#

yo

#

woops wrong channel

halcyon hemlock
#

Hi (Sorry for bad english)

kindred sentinel
#

What difference between List and Set?

glad prawn
#

why u not google it

kindred sentinel
#

\_/๐Ÿ˜ง\_/

rotund ravine
ivory sleet
ivory sleet
#

Maybe its called NavigableSet idr

rotund ravine
#

Itโ€™s just a List at that point ๐Ÿ‘Œ๐Ÿป

ivory sleet
#

idr the name of the interface TreeSet implements :> ยฏ_(ใƒ„)_/ยฏ

#

I think it can make sense since tree set is basically a partially ordered set to some degree, where you can talk about order in a more relative matter (i suppose?)

storm crystal
#

interfaces suck either way

ivory sleet
#

Youโ€™re right

#

But its the best thing we have in java I believe

kindred sentinel
#

how to remove field from configuration section ?

slender elbow
#

set to null

kindred sentinel
#

oh thanks

upper hazel
#

how i can check when commandBlock is will activated?

#

event exists?

#

or this is like PlayerCommandPreprocessEvent

rotund ravine
upper hazel
#

oh this

river oracle
ivory sleet
#

List and Set says nothing about time complexity nor space complexity

#

Their impls do tho

river oracle
#

Well the HashSet is the generaly most used impl ig but your right

ivory sleet
#

Yeah I mean its fair since HS is the most commonly used one

river oracle
#

Similarly with ArrayList

#

Though LinkedList is also quite used

upper hazel
#

and the command block takes into account whether the person who activated it has permission?

storm crystal
#

so when I want to take a function or code in general as a parameter I just make lambda expression?

ivory sleet
#

Yeah

river oracle
#

java.util.function ๐Ÿคค

ivory sleet
#

๐Ÿ™

upper hazel
slate tinsel
#

Can you retrieve the time when a player was whitelisted with spigot or coreprotect api?

river oracle
ivory sleet
rotund ravine
hollow oxide
#

hello, i need help with clicks listeners

    @EventHandler
    public void onPlayerClick(PlayerInteractEvent event) {
        Player player = event.getPlayer();
        if (event.getAction() == org.bukkit.event.block.Action.RIGHT_CLICK_AIR || event.getAction() == org.bukkit.event.block.Action.RIGHT_CLICK_BLOCK) {
            if (player.getInventory().getItemInMainHand().getType() == Material.WARPED_FUNGUS_ON_A_STICK) {
                Lclicks.Lclick(player);
                Bukkit.broadcastMessage("1");
                event.setCancelled(true);
            }
        } else if (event.getAction() == org.bukkit.event.block.Action.LEFT_CLICK_AIR || event.getAction() == org.bukkit.event.block.Action.LEFT_CLICK_BLOCK) {
            if (player.getInventory().getItemInMainHand().getType() == Material.WARPED_FUNGUS_ON_A_STICK) {
                Bukkit.broadcastMessage("str "+event.getAction());
                Rclicks.Rclick(player);
                event.setCancelled(true);
            }
        }
    }```

here is the code and down there is a video of what i'm doing (just spaming right click but detecting Left ones)
rotund ravine
#

You

#

LClicks.LClick is run on right clicks and RClicks.RClick is run on left clicks.

glad prawn
#

how could he not realize that

hollow oxide
grim hound
#

How can I

#

Remove the console player log join?

rotund ravine
#

? Why

grim hound
#

I wanna replace it with my own

#

I already have the intercepting filter

#

But each log starts with the player's nickname

#

And it would also block players who just said "joined with the id"

#

If I were to set it the regex

kindred sentinel
#

if i do something like config.set("players.foo",true) and after that config.set("players.bar",false)
bar replaces foo, how to make it just add field?

eternal oxide
#

bar will not replace foo

#

you likely are not saving

#

or you are loading and wiping your settings

#

after any change you need to save

kindred sentinel
#

then something wrong is going on

mortal hare
#

man this is such a good idea

#

hope that someday spigot devs would implement it

#

but im not sure if that complies with TOS

kindred sentinel
#

oh i found out

#

i solved problem but idk how

river oracle
#

I mean all you're doing is running stacktraces through a deobfuscator

#

If such a thing was against TOS by the same logic so would moj maps

torn shuttle
#

bumping a problem from yesterday:

so https://piston-data.mojang.com/v1/objects/73c8bb982e420b33aad9632b482608c5c33e2d13/server.txt that's the official mojang mappings net.minecraft.world.entity.EntityDimensions dimensions -> be is what I am trying to access with

    public static boolean setCustomHitbox(Entity entity, float width, float height, boolean fixed) {
        EntityDimensions entityDimensions = new EntityDimensions(width, height, fixed);
        Class<?> entityClass = entity.getClass();
        try {
            Field field = entityClass.getDeclaredField("be");
            field.setAccessible(true);
            field.set(entity, entityDimensions);
        } catch (NoSuchFieldException e) {
            e.printStackTrace();
            return false;
        } catch (IllegalAccessException e) {
            e.printStackTrace();
            return false;
        }
        entity.setBoundingBox(entityDimensions.makeBoundingBox(entity.position()));
        return true;
    }

thoughts?

#

it's telling me nosuchfield

river oracle
#

1.20.2 magma?

torn shuttle
#

the adapter should be running 1_19_R3 just fine

#

I have a 1.20 version of this code but I'm debugging 1.19.4 rn

#

"be" shouuld be right, right?

torn shuttle
#

hrm

river oracle
#

decompile your server

#

and check

#

would be my advise

rotund ravine
#

@torn shuttle What class is your entity variable?

torn shuttle
#

return Hitbox.setCustomHitbox(((CraftEntity) entity).getHandle(), width, height, fixed);

#

import net.minecraft.world.entity.Entity;

rotund ravine
#

What does handle return

torn shuttle
#

hm, craftenitty