#help-development

1 messages · Page 965 of 1

young knoll
#

It will

glad prawn
#

will

lost matrix
twilit wharf
#

How do I have multiple version support with the remapped NMS? I am currently doing this in my build.gradle to get the remapped NMS, however this only supports 1 version, and since it is remapped on any other version it doesnt work. Is there out of the box support, or am I out of luck?:

compileOnly 'org.spigotmc:spigot:1.20.4-R0.1-SNAPSHOT:remapped-mojang'
quiet ice
#

Most of the time people opt for multi-module projects when supporting multiple NMS versions

lost matrix
#

You need to build every single version using BuildTools, then create a multi-module project, create one module for every version,
in your core you shade all modules in, detect the server version, and load the implementation for that version or throw an exception
if there is none.

twilit wharf
#

Would that look like this?

├── versions
|   ├── V1_20_4
|   |  ├── src
|   |  └── build.gradle
|   └── V1_20_3
|    ├── src
|    └── build.gradle
├── common
|  ├── src
|  └── build.gradle
├── build.gradle
└── settings.gradle
lost matrix
#

Sure, if you have the proper gradle knowledge for this

river oracle
#

You'd need a build gradle in the versions sub folder though if you wanted to maximize gradle

slim kernel
#

so this alone should already create the folder right?

#

because I tried it and it didnt

young knoll
#

No

twilit wharf
young knoll
#

You need to call mkdir/mkdirs

lost matrix
#

A File is an in-memory facade for IO methods.
If you dont call methods on this, then there is nothing happening on your storage medium.

river oracle
young knoll
#

But what’s the memory overhead of a Path vs a File!!!!111

river oracle
#

Path is slightly more iirc

glad prawn
#

I use File, because Spigot uses it 😄

slim kernel
river oracle
#

I always convert file to path xD

slim kernel
#

its still doesnt work 😦

lost matrix
#

Code + stacktrace plox

#

I bet you havent checked if listFiles() returns null

slim kernel
slim kernel
# lost matrix Code + stacktrace plox
public PlotHandler() {
        File directory = new File(Main.getPlugin().getDataFolder(), "plots");
         if (!directory.exists()) {
             directory.mkdir();
        }
    }

thats the whole code rn

glad prawn
#

is your parent dir exists?

slim kernel
#

okayy so this works: if (!Main.getPlugin().getDataFolder().exists()) Main.getPlugin().getDataFolder().mkdir();
but this doesnt, why?

        if (!Main.getPlugin().getDataFolder().exists()) directory.mkdir();
glad prawn
#

dont need to check for your parent dir, just call .mkdirs

slim kernel
vast ledge
#

When you wanna ask why your shit is breaking, but you wrote it

tardy delta
#

people still using notepad++

vast ledge
#

I just found the stupidest shit

#

ever

#

like holy shit

#

Woops

#

And im wondering, why its only assigning using the same location for both of em

tardy delta
#

extract common code

worldly ingot
#

tbh, only real improvement you can make there is using an elseif

vast ledge
#

tahts true

worldly ingot
#
if (p1 == null) {
    forcePoint(location, Point.ONE);
} else if (p2 == null) {
    forcePoint(location, Point.TWO);
}

return this;
#

That's about it ¯_(ツ)_/¯

vast ledge
#

I have so many questions

#

Why is it only getting called once?

#

and why is it re-using the coordinate

glad prawn
vast ledge
#

Quite litteraly, the function generatePoint is only being called once

inner mulch
#

how do i calc a 2d circle or 3d ball with blocks?

stiff sonnet
inner mulch
#

i wasnt paying attention when sin and cos was a topic class 😔

inner mulch
#

nooo

stiff sonnet
#

it only really started making sense to me when I saw that image haha

inner mulch
#

ooh

#

it will be hollow tho?

stiff sonnet
#

but you can just do it multiple times with decreasing radii

inner mulch
#

so can you show me a simple impl, i get was sin and cos does but im not sure what number is responsible to this point left or right

stiff sonnet
#

nothing in the console eitehr

inner mulch
#

method needs to be public

#

and i hope you have registered your listener

stiff sonnet
#

look at the constructor

#

still nothing, even with the methods public

sand spire
#

Hey, so I have this method to get a random object from a collection, but the method is flawed because when the total chances exceed 100 the first methods in the collection have a higher chance, and when the chances don't up to 100 there is a chance the method returns null (which I don't want).

I think the solution is to do math to increase or decrease the numbers so the total still adds up to 100, but idk how I would even do this or if there isn't a better way to do this. Can someone help me with this?

public Object chooseRandomObject() {
        double random = Math.random() * 101;

        for (Object object : myObjects) {
            if (random <= object.getChance) { //chance = int 0-100
                return object;
            }
        }
        return null;
    }```
slender elbow
#
    @EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
    void inventoryClose(InventoryCloseEvent e) {
        HandlerList.unregisterAll(this);
    }

peepostare

stiff sonnet
#

I think it's pretty sleek, when it works of course

#

bruh, the close event is called when I open the inventory

#

what the hell

slender elbow
#

yeah well that's preventing it from working due to how inventories work

stiff sonnet
#

ugh, I guess I'll have to catch the first inventory close manually

sharp heart
#

Hello, how to disable the movement of an Entity ?

upper hazel
#

bungeeCord has similar logic to bukkit api?

inner mulch
upper hazel
#

i can listen events

sharp heart
hasty nexus
sharp heart
#

I just want them to be static

sharp heart
lost matrix
# stiff sonnet https://hastebin.skyra.pw/acutagocen.ts does anyone have an idea why my eventhan...

Make your pv field private and final and use a more descriptive name for it.
Define your constructor as public

Increase the visibility of your EventHandler methods to public as well.
Spigots event system uses reflections to invoke those methods and there are tests
suggesting that lower method visibility decreases performance before JIT optimizes them.

Dont let a Listener self-register. Constructors should exclusively used to initialize the fields of an object
without any side effects.

Dont use underscores as prefixes for fields.
Define your fields as private (eg the _items field), and use getters/setters for the appropriate visibility.
Dont use abbreviations for variables like e or m. Importance of choosing descriptive variable names is often underestimated.

You should prevent (un)registering Listeners during runtime. Rebaking the handler list can get quite expensive.

echo basalt
lost matrix
#

AH that still exists

proper cosmos
sand spire
dawn flower
#

how do i lower heart particles when you deal alot of damage

proper cosmos
vast ledge
#

You mean from the texture pack

#

or?

#

THe crit particles

dawn flower
#

when u deal like 1000 damage

#

it spawns abunch of heart particles

vast ledge
#

It never shows hearts?

dawn flower
#

dms

vast ledge
#

Texture pack or A plugin making them

dawn flower
#

idk, it's vanilla

icy beacon
vast ledge
dawn flower
#

same thing

vast ledge
#

Ver?

dawn flower
#

1.20.4

sand spire
# proper cosmos I don't get what's your problem here

lets say I have a list of objects with chances. Object: Chance

A: 25
B: 25
C: 50

This would work fine, because my method generates a random number from 0-100 and if the number is less than the chance it chooses that (I just realized this gives priority to objects early in the list so its even more flawed than I thought...)```

A: 100
B: 100

This would always choose A, while it should be a 50/50 between A and B```

A: 10
B: 40

This would give a 50% chance for the method to return null while I need it to always return something.```
#

so I need to normalize the chances so it adds up to 100, and stop giving priority to numbers early in the list

#

but idk how

icy beacon
#

I'd say the total weight should not always be 100 but rather the sum of all individual weights

#

Other than that I have nothing to add, I haven't done weighted random in a while

vast ledge
dawn flower
#

use a sword

vast ledge
#

Theres only like 5

#

Im not getting anywhere close to the 5k you sent me

dawn flower
vast ledge
#

"Theoretical" dmg

#

or

dawn flower
#

i want to lower the heart particles

dawn flower
vast ledge
#

Probably client side

twin venture
#

hi , how does Annonation work?
lets say can it work like this ?
i have a main user class :
with sub classes in it :
public class User ..
@LoadUser // this will execute a method from another class to load the user
privite UserStats stats;

is this possible?

sand spire
vast ledge
#

Or if its server side you're gna have to cancle a packet

twin venture
#

Java

vast ledge
#

Look at ms ss soemthing like this?

#

Dont work much with annotations, gonna have to get somebody else to answer xD

chrome beacon
#

yes it's possible

vast ledge
#

But basically you want an annotation to load the userdata?

twin venture
#

public class User{
here is an annonation :
@LoadUser(UserStats.class)
privite UserStats userstats

}

chrome beacon
#

that's how the EventHandler annotation works for example

twin venture
#

so this way i can load the data directly from the user when he join , or he needs it can i ?

chrome beacon
#

Annotations are quite powerful

#

I wish it was easier to work with them at compile time though

twin venture
#

i never never made Annonations

#

or worked with them

vast ledge
twin venture
#

or docs on how to do it?

chrome beacon
vast ledge
#

I litteraly just pulled that up and was abt to send

#

Digital Ocean usually has decent explanations + tutorials aswell

icy beacon
#

Annotation-based anything is fun to create because you get to use reflection

sand spire
# icy beacon Other than that I have nothing to add, I haven't done weighted random in a while

I created this method with the help of ChatGPT, and this would probably work but I'm not sure if it will be a problem if I end up creating thousands of new objects to put in the list

public Object chooseRandomObject() {
        List<Object> list = new ArrayList<>();
        for (Object object : myObjects) {
            for (int i = 0; i < object.getChance; i++) {
                list.add(object.clone);
            }
        }
        return list.get(new Random().nextInt(list.size() - 1));
    }```
icy beacon
#

1 sec I'll take a look at how I do weighted

sand spire
#

thanks

vast ledge
#

Most likely an array of Objects

sand spire
lost matrix
#

?

icy beacon
#

Nvm I don't seem to do weighted random at all in this project lol, thought I did

dawn flower
#

is there a gui builder app or whatever that turns your gui into spigot code

#

that'd be really cool

lost matrix
#

Weighted randoms can be achieved with a NavigableMap or a RangeMap from guava

sand spire
stiff sonnet
# lost matrix Make your ``pv`` field ``private`` and ``final`` and use a more descriptive name...

eh, it's fine. I know about those underscores but I wanted to mark it as obviously different. I have a class with a static list of instances of itself, so yeah I just wanted to make that clear.
The self-registering part isn't too wrong imo. The class only works when registered, so I think that should be part of the constructor (also it's very compact)
The private and whatnot stuff could be added of course, but I don't really care about any access modifiers here and I think they just clutter up the code a bunch

lost matrix
sand spire
vast ledge
#

Then you need weighted

lost matrix
#

Yep, let me try to explain the idea of a weighted random.

echo basalt
#

Isn't it just like

#

Add entries at a given weight, roll a number between 0-weight and get the top entry

trail lintel
#

Hey guys, I am a bit puzzled by my custom item behavior and wonder if anybody can help me out. Here is the handler code.

https://paste.md-5.net/vayosiyehe.cs

Where I check if the item is an interactable block and return early if that is the case, seems to work fine for chests and crafting tables, but other things like jukeboxes, cauldrons, etc still "use" the item. Am I missing something here?

undone axleBOT
lost matrix
#

In essence you have a range of numbers as a key, and a total value which is the sum of all keys.
Eg you have 3 objects:
X -> Weight = 5
Y -> Weight = 10
Z -> Weight = 10

Then your keys will have the following distribution:

| 0-4 |   5-14   |  15-24   |

Meaning your top is 5 + 10 + 10 = 25 and your bottom is 0

You now roll a random number between 0 inclusive and 25 exclusive.
This Will land anywhere in the distribution:
Eg you rolled an 11:

           ↓
| 0-4 |   5-14   |  15-24   |

Which is in the second range. Meaning you select Y in this case.

vast ledge
#
    if (action != Action.RIGHT_CLICK_AIR && action != Action.RIGHT_CLICK_BLOCK)
        return;
#

Oh

#

hm

#

yea

#

wait

sand spire
trail lintel
#

So in this context, its a custom item where the base item being used is an ender pearl

#

When I right click the cauldron or the jukebox, the ender pearl just gets thrown as normal

#

rather than using the custom logic

vast ledge
#

Great idea

lost matrix
vast ledge
#

just cancel it when the player is holding it

#

dont care if the block is interactable

trail lintel
#

the problem there is

#

I want to be able to interact with chests and stuff like normal when the item is being held

trail lintel
#

which chests and stuff DO work, but something seems to be different about jukeboxes and cauldrons

lost matrix
vast ledge
#

So the pearl gets thrown when you rightclick a Jukebox?

trail lintel
#

yup, thats right. But when right clicking a chest it opens the custom inventory as expected

lost matrix
#

?paste

undone axleBOT
vast ledge
#

I dont think im quite understading the final Goal?
You want an enderpearl, to not be thrown at all, but when you click a chest withit, it still opens the chest normally?

trail lintel
#

I want an ender pearl that will open the custom inventory in all cases except when a player is looking at an interactable block, in which case it will NOT throw the pearl but interact with the block

#

I'm not sure if its even possible

vast ledge
#

Sure its possible

#

But a Cauldron counts as interactible

trail lintel
#

I do notice other "interactable" items in the base game do not trigger when right clicking the jukebox

lost matrix
vast ledge
#

since you can remove water etc

trail lintel
#

or cauldron, so it must be possible

vast ledge
#

just add a check

#

if its cauldron, or something that doesnt open an ivnetory, but is iteractable, cancel it

trail lintel
#

Hmm see originally that is how I was handling it, I was checking for individual block ids

#

But then people keep finding new ones, cauldron, fence posts, etc

#

and the list is getting BIG lol

sand spire
#

Do I need to order it from lowest to highest or will the weightedMap do that for me?

lost matrix
#

Just throw them in with your weight. Order is irrelevant

vast ledge
#
@EventHandler
private void onRightClick(PlayerInteractEvent event) {
    Player player = event.getPlayer();
    Action action = event.getAction();
    ItemStack item = event.getItem();
    if (action != Action.RIGHT_CLICK_AIR && action != Action.RIGHT_CLICK_BLOCK)
        return;
    if (item == null || !itemManager.isEnderBag(item))
        return;

    if (player.hasPermission("enderbag.use")) {
        Block clickedBlock = event.getClickedBlock();
        if (clickedBlock != null) {
            Material mat = clickedBlock.getType();
            if(!allowedBlocks.contains(mat)) return;
        }
        event.setCancelled(true);
        itemManager.openInventory(player);
    } else {
        player.sendMessage(String.format("§cYou do not have permission to use the %s", config.itemName));
    }
}
vast ledge
#

Then make an Arraylist, with the blocks that do open inventories

trail lintel
#

Yeah thats not a bad idea, just maintain a big ol list of allowed blocks

vast ledge
#

which should be alot less

trail lintel
#

That might just be the solution ill go with =]

icy beacon
lost matrix
#

What am i reading squint

vast ledge
#

dw

sand spire
glad prawn
#

that's custom class

sand spire
#

or should I use one of these

lost matrix
sand spire
#

Oh I thought the link was the same as the code you sent in here 🤦

lost matrix
#

Yes. I always post codeblocks, links to paste and then i do a twitter post of the code for good measure.

icy beacon
#

Smile you're almost at 50k messages

vast ledge
#

I mean a function like

#.getAttachedInventory()
or
#.hasAttachedInventory()

would be pretty useful

lost matrix
sand spire
lost matrix
trail lintel
#

For sure =]

#

as the matter of fact, would a github link be better?

#

for the whole code

lost matrix
#

Whatever works for you

trail lintel
lilac dagger
#

is there a reason why i can't load jars at runtime?

#

am i doing something wrong?

lost matrix
# trail lintel https://github.com/mries92/EnderBag/blob/main/EnderBag/src/main/java/org/mries/e...

Alright looks fine. PDC is a good choice.
Btw i would probably make this a bit more expandable.
Your value in the PDC currently has no actual meaning besides 'existing'.
Its probably a good idea to give it some meaning. For example you could create an enum for your custom items:

public enum CustomItemType {
  ENDER_BAG,
  FIRE_WAND,
  WHATEVER,
  NONE
}

And then rewrite your
public boolean isEnderBag(ItemStack stack)
method to
public CustomItemType getCustomItemType(ItemStack stack)
which then returns either one of your types or CustomItemType.NONE if its none of your custom items.

Then store your CustomItemType in a pdc key like itemtype : "ENDER_BAG"

This lets you be a bit more dynamic. Otherwise you would have to create a new isXYZ() method for every custom item.

trail lintel
#

Hmm, testing it with just a base ender eye I notice the behavior is to open chests and craftin tables, then to use the item when you try to interact with cauldrons etc

#

I think maybe this might not just be possible with using the ender eye as the base item, I can cancel the event but that prevents interaction with proper blocks as well

shadow night
trail lintel
#

I suppose I could do that yeah, it seems weird to have to manually maintian a list of blocks that should or should not work though

#

But maybe when you doing something like this a little bit of jenk is inevitable

icy beacon
#

raydan

#

i need the current time

vast ledge
#

wdym current time?

#

Your local time?

icy beacon
#

no

#

time

vast ledge
#

?

shadow night
icy beacon
trail lintel
#

Sometimes simple answer is probably best, I think I will just switch it to use a base item that doesn't have an interact event =]

#

An emerald seems like a good compromise for people without the texture pack

stiff sonnet
#

what's the path for plugin.getConfig() or saveDefaultConfig is it just plugins/<pluginname>/config.yml?

twin venture
river oracle
#

server owners can actually change the plugin folder iirc so that could deviate from plugins

lilac dagger
#

did spigot disable loading jars at runtime?

stiff sonnet
stiff sonnet
river oracle
stiff sonnet
#

java shouldn't care about that

#

and even if it did, I don't care if it doesn't run on windows haha

#

if you're running a server on windows you're not allowed near a computer

river oracle
#

wow what a savage

remote swallow
#

i run windows 7 home pro on all my servers

stiff sonnet
remote swallow
#

i was joking

#

i use ubuntu for servers

#

would you prefer i use arch

stiff sonnet
#

I love how they put ads into the terminal

stiff sonnet
remote swallow
#

ubuntu server, how crazy do you think i am

lilac dagger
stiff sonnet
#

ugh do I need to add anything to my maven config to make it include the config.yml into the jar? I created the file and it's not adding it

remote swallow
#

where is it

stiff sonnet
#

right next to plugin.yml

remote swallow
#

run a clean package

stiff sonnet
#

still nothing

#

huh now it worked

#

had to clean it again

#

oh well, thanks a bunch

twin venture
twin venture
#

idk if what iam trying to do is even possible

stiff sonnet
#

I haven't worked with annotations yet, just hoped it'd help you. I might need to work on some though because manually configuring config files is ugly and annoying

twin venture
#

i can help you with that if you need help 🙂

river oracle
twin venture
#

it support any primitive type

twin venture
#

if i can make a annonation then use them in the way i asked

river oracle
twin venture
river oracle
#

yes you can do anything with annotations if your processor is good enough

twin venture
#

oh so it take some cpu usage?

#

should i be good with my current system or use annonation to load the other data of the user?

river oracle
#

well yeah annotations are just metadata

#

that aside any computation takes CPU usage

#

you can't compute without a CPU

twin venture
#

my current system :
it load the data when a user join

#

my idea was to have a annonation above this 2 classes

#

so i can load the user data :p

stiff sonnet
#

real coders load configs on the main thread

river oracle
twin venture
#

so just load them when a user join ?

river oracle
river oracle
#

seems like a hack in part to something that could just be designed better

twin venture
river oracle
# twin venture my idea was to have a annonation above this 2 classes

you can actually do this though, you'd have to consider if you'd want a preprocessor, this writes bytecode at compile time to transform those annotations into code or on startup a reflective scan all fields of every class in your class loader which then has some of registration process

#

what you have to consider is, is it even worth it or is it an over-engineered mess in my opinion it will become the latter

twin venture
twilit wharf
#

I am trying to implement a multi module gradle system, and currently I am running the build script, and then in my gradle.settings I include each of the modules, which each have a shadow jar task which is tasks.build.dependsOn(shadowJar). The finished jar is 1 kb and has nothing in it, and it compiles a bunch of individual jars for each of the modules. How do I make one that is all of them combined?

kind hatch
#

If it's similar to the maven multi module system, then you need to create a module that has all of the other modules.

echo basalt
#

compileOnly != implementation

#

You need to make a dependencies block in your root module with all the modules as sub projects

river oracle
echo basalt
#
dependencies {
  implementation project(":api")
  ...
}
#

So shadowjar can go over and shade everything

twilit wharf
#

Ah, that makes sense

echo basalt
#

I also wouldn't shade lombok

stiff sonnet
#

does anyone know if you can just get a list of all items in a specific category with the yaml config handler? Currently I have to maintain two lists, which I can get with "getStringList", because I can't figure out how to just get all keys in a category, and that's ugly

#

e.g.

foo:
  bar: a
  baz: b
  cruz: c

and then get everything inside foo

echo basalt
#

foo is a section with 3 strings

stiff sonnet
#

so I just getStringList?

kind hatch
#

That's not a string list

echo basalt
#
ConfigurationSection fooSection = config.getConfigurationSection("foo");

for(String key : fooSection.getKeys(false)) {
  String value = fooSection.getString(key);
}
twilit wharf
kind hatch
#

You'd have to iterate over the section using #getConfigurationSection.getKeys(false)

stiff sonnet
echo basalt
kind hatch
#

A string list in yaml is as follows.

section: "String"
section2:
  - "This is a list"
  - "of strings that"
  - "can be grabbed using"
  - "#getStringList()"
stiff sonnet
#

yes

twin venture
#

am i doing it correctly?

#

it does not seem to work

robust pebble
#
 @Override
    public void onEnable() {


        PluginManager pm = getServer().getPluginManager();
        this.pdfFile = getDescription();
        basicUtils.setSuffix("[Minecraft.COM] ");
        // init command
        this.getCommand("say").setExecutor(new Say());
        // init listeners
        this.getServer().getPluginManager().registerEvents(new PlayerJoin(), this);
        this.getServer().getPluginManager().registerEvents(new PlayerLeave(), this);
        this.getLogger()
                .info(this.pdfFile.getName() + " - Version " + this.pdfFile.getVersion() + " - has been enabled!");
        try {
            runServer();
            this.getLogger().info(basicUtils.getSuffix()+"WEBSITE RUNNING");
        } catch (Exception e) {
            this.getLogger().info(basicUtils.getSuffix()+"WEBSITE FAILED THROWING ERROR NOW : \n "+e);
        }

        new BukkitRunnable() {
            @Override
            public void run() {
                msg.addFields("Online",players+"");
                try {
                    setMessage(msg.getMessage());
                    System.out.println(msg.getMessage());
                } catch (InterruptedException e) {
                    throw new RuntimeException(e);
                } catch (Exception e) {
                    throw new RuntimeException(e);
                }
            }
        }.runTaskTimer(this, 20L * 10L /*<-- the initial delay */, 20L * 5L /*<-- the interval */);
    }```
when my server starts completly my server logging stops
echo basalt
echo basalt
robust pebble
#

ye

#

where should I do it instead?

echo basalt
#

Make a new thread or use an executor

robust pebble
#

?executor

echo basalt
#

There's no guide for that, this is core java

robust pebble
#

my b

#

Executor executor = anExecutor;
executor.execute(new RunnableTask1()); so id put this instead?

#

nvm this exists.runTaskAsynchronously

sand spire
#

Is there a simple way to delay execution of the next line(s) until after a void method returns or ends without changing the parameters?

I can do it by returning a boolean and just putting the method in an ifstatement and execute the code for true and false, or put a Runnable in the parameters but I kinda don't want to change the parameters or the return type, is this possible?

method() -> {

        });```
#

or does java already go through the entire method until it goes to the next line unless it's async

#

i'm tripping

young knoll
#

Sounds like futures

sand spire
#

I was confused cause sometimes it didn't wait for the method above to complete but that was just when creating threads 💀

acoustic pendant
#

those are the id and ids printed
why is giving error when trying to remove id from ids?

echo basalt
#

Show error

acoustic pendant
#

yea mb

young knoll
#

Isn't that going to try and remove index 2

#

Which is out of bounds for a list with size 2

acoustic pendant
#

oh

#

Is it only possible to use remove for its index?

#

if the object is a number

#

or could i parse it to string?

young knoll
#

No idea how it works in that case tbh

acoustic pendant
#

I tried using set but i need to grab a value from it so didn't work

young knoll
#

You probably need to pass it as the wrapper type

sand spire
acoustic pendant
pseudo hazel
#

some languages or frameworks have an erase method that takes in an object and removes the first occurrence from the list

sand spire
#

or is id not an index but a key that should stay the same

acoustic pendant
pseudo hazel
#

oh wait i see the issue

pseudo hazel
#

classic java uses overloads

young knoll
#

mhm

#

Hence why I said you probably need the wrapper type

pseudo hazel
#

which messes with arrays filled with ints xD

#

thats stupid lmao

acoustic pendant
pseudo hazel
#

you can probably try to parse it to string like you said

sand spire
#

this is the problem

pseudo hazel
#

which is effectively a wrapper of sorts

sand spire
#

your object is an integer

acoustic pendant
#

yes

sand spire
#

so you can't control which one it uses

acoustic pendant
#

i think i could parse it to string as I said

#

and hope it works

pseudo hazel
#

yeah java didnt think this far ahead I guess..

#

even though a list of ints is the like the most basic programmer example for learning arrays haha

acoustic pendant
#

I mean, that would work

sand spire
#

yeah

acoustic pendant
#

let me try

#

Yeah, think it did

#

but had other error so let me fix it xd

proven musk
#

what are the ways to make a gui

#

theres actionbar

#

the sidebar??

#

the bossbar?

#

are there other options

#

/ways to render items

sand spire
proven musk
#

oh right

#

Ig I mean during gameplay

#

and i assume u can't show that while the player is in control

kind hatch
#

Scoreboard
Toast notifications
Titles

#

Display Entities if you want to get fancy

sand spire
#

or which one

proven musk
#

im pretty sure its not super possible but yeah

proven musk
#

it doesn't move with the camera bob

kind hatch
#

Camera bob is unfortunately a client side thing.

proven musk
#

yeah

#

im just trying to understand all my options

#

basically I want the player to be able to see the last 3 foods they've eaten

young knoll
#

Resource pack allowed?

sand spire
#

🥩

kind hatch
proven musk
young knoll
#

I was just thinking action bar and fonts

proven musk
#

idk much about shaders

sand spire
proven musk
#

yep

kind hatch
#

They are really just an improved armorstand.

proven musk
#

im totally down to do shaders i just dk how it works

#

ive done it before in hlsl

worthy yarrow
#

Tbf I think it's either a pack or display entities @proven musk

proven musk
#

a pack?

kind hatch
#

resourcepack

worthy yarrow
#

I think you could achieve that with a resource pack if I'm not mistaken

proven musk
#

how

young knoll
#

Display entities would also be an option

worthy yarrow
#

And a fun one at that

proven musk
#

they aren't unless u can fix display bob

#

and lighting

#

what are the capabilities of shaders

kind hatch
#

Isn't lightning handled automatically for those things?

young knoll
#

Yes

kind hatch
proven musk
#

how do they work

young knoll
#

You can get text displays to work resonably well, idk about the other ones

proven musk
#

and what would the best way to do it for this method

blazing ocean
proven musk
#

can I have a shader that renders a specific item display but makes sure the verteices are locked to the camera view?

kind hatch
proven musk
#

if its anything like hlsl I could probably handle it

proven musk
#

ive written shaders before for games

kind hatch
proven musk
#

thats how it works

young knoll
#

Text display on the player with a super high Z offset

kind hatch
young knoll
#

mhm

kind hatch
#

So it is passengers?

young knoll
#

But view bobbing does make it look a bit weird

young knoll
proven musk
#

ok wait

#

ur so right

kind hatch
#

Hmm, I wonder why we couldn't remove them for that one person who had a similar issue a while back.

proven musk
#

if I can get it to render on top of everything else it work work...

kind hatch
worthy yarrow
#

Is bobbing a packet that can be manipulated?

young knoll
kind hatch
#

I need to mess around with them some more.
So much potential with them.

proven musk
#

we got it

sand spire
#

damn that looks cool

young knoll
#

text displays have a thing for that

#

idk if item ones do

proven musk
#

item displays dont on their own I dont think

#

but again shaders might do it

#

idk anything about them tho

#

does anybody have knowledge or resources

orchid trout
#

is it teleported every tick?

proven musk
#

its really far away

#

and a passaenger

young knoll
#

It's a passenger

proven musk
#

thats how im doing it

orchid trout
#

ok

proven musk
#

I get u could make it smoother with core shaders tho

young knoll
#

Fonts in the action bar would be smoother

#

But, you have to take over the action bar

proven musk
#

yeah but then id have to manually add each item

#

right

young knoll
#

yes

proven musk
#

also yeah I want to use the action bar for other things

sand spire
proven musk
#

mhm

#

it would look worse on land

#

since text displays dont looks the same even if they show through blocks

kind hatch
#

Yea, text has that property, but I don't know about display entities.

young knoll
#

sadly only text display has the see through option

sand spire
#

What issue does placing it that far solve? cause now you get the layering issues

kind hatch
#

Now, you could maybe do some shader stuff with the gui elements.

#

Like, render a character that translates to an image sprite of the item you want

young knoll
#

Makes it follow the camera better

kind hatch
#

Oooo

sand spire
#

ah

kind hatch
#

You could maybe send a title packet and offset it to the right value

young knoll
#

If you place it closer it shifts around the screen

#

Yes but now you've taken up the title slot

sand spire
#

thanks i'll remember it if I ever need to use this

proven musk
#

ok so

kind hatch
#

Titles can be manipulated easily though

proven musk
#

does anybody here actually know how to use shaders

kind hatch
#

If needed by something else, let it, then return to the normal state.

#

Another weird possibility is manipulating the subtitle gui box

young knoll
#

But then your icons disapear

kind hatch
proven musk
#

because im confused

kind hatch
#

Hmmm, another out of the box idea.

#

What about manipulating the elder guardian effect?

proven musk
#

I think we are going off the rails ere

#

all I need to do now is figure out how to modify the rendering of the item display

tawdry echo
#

its good to use TreeSet to create list of top players?

proven musk
#

but idk enough about mc shaders to know where to even start

#

idk how id write a shader that changes JUST the item display

#

i cant even figure out what shader renders them

lost matrix
proven musk
#

ohhh

#

is there a way to know whether im rendering an itemdisplay

#

or am i kinda screwed

young knoll
#

no idea

#

There is very little documentation on core shaders

worthy yarrow
#

I've heard that manipulation of shaders can be a messy process so have fun!

proven musk
#

there must be somebody who knows about this stuff

lost matrix
#

If you have GLSL knowledge then its not too bad. Otherwise it takes quite a while to learn.

proven musk
#

I do

worthy yarrow
proven musk
#

just not minecraft resource packs

worthy yarrow
#

I just kinda realized what you were doing

worthy yarrow
#

I thought you were hard coding manipulations to the shaders kek

lost matrix
#

This repo helps

worthy yarrow
#

I think you'll have fun with this project, it already looks pretty cool

proven musk
proven musk
#

ok

#

so I made every entity pitch black except the one I wanted to change

#

which actually might be good news

worthy yarrow
proven musk
#

no its like

#

im recreating a mod which is recreating the valheim food system

#

where u have food slots

#

and each different food fills up a slot and gives you bonuses

worthy yarrow
#

so like when you eat "hearty bread" it gives you health and food or something of the sort

#

I've never played valheim so I wouldn't really know haha

lost matrix
#

I would probably wait for 1.20.5 with that. Custom food will be much easier then.

worthy yarrow
lost matrix
# worthy yarrow What's going to make it easier?

You can set any ItemStack to have any nutritional value, and you can make them consumable even when you are full.
Any ItemStack can have a custom stack size up to 99. Can have custom durability up to 2 billion, and much more.
All ItemStacks will be composed of components.

proven musk
lost matrix
lost matrix
#

Well unless you fix the hunger bar to a certain value.

proven musk
#

sounds pretty easy to do that ngl

lost matrix
#

You cant consume food if you are full otherwise.

worthy yarrow
sand spire
#

Hey @lost matrix, I needed a remove method in the WeightedMap (so i can use it for rewards without giving the same reward twice)
I modified the class, does this look good? https://pastes.dev/8eNrFPho6U

lost matrix
#

Sure, if you are willing to just throw away the hunger bar and system, then its easy.

proven musk
#

thats exactly what im doing

#

im doing a new system

#

but even if I wasn't it would be easy right

#

just manually edit the food bar

worthy yarrow
#

imo smile is right to wait for 1.20.5, in case you might want to rewrite optimizations... plus it seems 1.20.5 is gonna have a lotta cool stuff for itemstacks

lost matrix
proven musk
#

but plugins u can already do most of the stuff

#

I already did custom durability

lost matrix
#

True custom durability is currently impossible

proven musk
#

wdym

worthy yarrow
#

I mean you don't have to, but it just becomes a lot easier next update

sand spire
lost matrix
# proven musk wdym

You have to smack a durability system on the ItemStack and hope that the player doesnt look too close at the vanilla value.

proven musk
#

thats true

#

alot of things break if the player turns on advanced tooltips

lost matrix
twilit wharf
#

What am I missing?

sand spire
acoustic pendant
#

is there any way to detect right click without an item in hand? (in the air) I believe it doesn't send packets so it's impossible but i don't know
do someone know?

twilit wharf
#

Cause if a person has an empty hand and right clicks a chest

acoustic pendant
twilit wharf
#

it would still open the chest

lost matrix
acoustic pendant
sand spire
acoustic pendant
#

like just spawn it at the same loc the player is?

river oracle
acoustic pendant
#

ig

river oracle
#

The client doesn't send a packet

acoustic pendant
#

so is it just not possible?

#

I mean, i wouldn't make an armor stand follow the player

river oracle
#

You just can't do what you want basically and there isn't much you can do about it without it being hacky

sand spire
acoustic pendant
dire osprey
#

I think it works with Left

acoustic pendant
#

it does, but that wasn't the point xd

vast ledge
#

At what number does a collection size start?

twilit wharf
#

0

#

when there is nothing in it

vast ledge
#

Okay

charred blaze
#

}, 60L, 20L * 60 * plugin.getConfig().getLong("koth-timer"));

#

why is this runtasktimer spamming?

#

koth-timer is 0.2

vast ledge
#

20 x 60 = 1200 x 0.2 = 240

#

== Sending message every 1.04 seconds

#

or smth like that

#

smth with 1second

#

That answer your question?

#

oh shit

#

i just failed basic math

#

Then its every 10.4 seconds

slender elbow
#

0.2 as long is just 0

vast ledge
#

Doesnt long have floating ends?

slender elbow
#

no

#

it's just an integer value

vast ledge
slender elbow
#

source?

vast ledge
#

google

slender elbow
#

that is not a source

#

where is Google taking it from

#

and does it refer to java?

#

because I'm sure it doesn't

#

(I know it doesn't)

#

you'd have to get the value as a double/float, multiply, and then cast the result to a long

vast ledge
#

I specifically searched for java

#

if not, google has failed me once again

slender elbow
#

open up the website it's taking it from and read the article

vast ledge
#

And

#

google has failed me

slender elbow
#

I'm sure it'll say

vast ledge
#

he could also just take a float afaik?

#

but 0.2 is still like 10.4s delay

#

Which i dont think is what he wants to achieve

slender elbow
#

I mean it'll be a fifth of a minute, but that isn't spamming

#

using a period of 0 will use a period of 1 (tick), and that will be spamming lmao

vast ledge
#

True

#

But i think he dissolved into air in the past few minutes

slender elbow
#

true

proven musk
#

im still so confused what shader renders itemdisplays

orchid trout
#

this is in a class that extends Command. the usage message doesnt print even though it exists and the method returns false

twin venture
#

So i decided to use nms , and refliction to spawn entites , and it does work kind of .. my problem now :

  • it does not remove the old ones , so this case it keep spawning on top of each other for the player ..
  • how would i rotate it? using packets and nms
    it keep spawning ..
#

now its super dark

lost matrix
twin venture
#

oky 🙂

#

this seems to fix it :
i add the entity id , after i spawn it

#

not sure if its the best way , but it works for now

lost matrix
#

You are spawning the entity to every single player on the server. No matter if they are near the entity, near the chunk, or even in the same world.
Is that wanted?

twin venture
#

no ofc ..

#

now its only for testing ..

lost matrix
#

If you have a temporary setup, then program against an interface you can easily swap out later on without having to write a bunch of
internal changes. "Its just for now" mentality will always lead to patchy code with a bunch of temporary pieces that turn out to be quite permanent later on.
Unless this is a completely clean testing plugin. In which case "just for testing" is fine.

twin venture
#

good point ..

glacial moth
#

Hey, I'm trying to create something, I want to summon a boat with an armour stand riding it, which is fine. But is there anyway to lock the rotation of the armour stand so it is always facing the same direction as the boat. I know I can set rot when summoning, but I'd like it to stay.

lost matrix
twin venture
#

is this what do you mean?

#

or is there a better way to check it?

lost matrix
twin venture
#

oh i see , so what i need to do then?

lost matrix
glacial moth
#

ohhh didn't think of that

lost matrix
# twin venture oh i see , so what i need to do then?

Track which chunk is sent to which player using a packet listener.
Then when the entity spawns, send the packet to all players which can currently see this chunk.
When a player gets send this chunk, send your custom entity as well.
When a player gets sent a chunk unload packet, unload the entity for this player as well.

glacial moth
#

I don't think the armour stand has a no ai option, but will try a different entity

twin venture
#

so the entity will be on diffrent islands , its not a whole world , its 12 island or less big island , its only 1 world [small one] ..

#

do i still need to implement this?

lost matrix
#

Yes

twin venture
#

for example :

lost matrix
#

Unless all players see all islands at all times

twin venture
#

idk do they?

lost matrix
#

Which would be a weird server concept

twin venture
#

idk really ..

#

i need to use plib for the packetListener correct?

lost matrix
#

You can also inject your own listener into the netty pipeline. Thats up to you.

proven musk
#

if anybody knows anything about core shaders, how would you isolate a specific itemdisplay? or an item in the inventory?

sand spire
#

When creating a new instance of an object, does it save the entire class to memory, or only the relevant parts (aka the instance + constructor).

The reason I'm asking is cause I want to know if I'll have worse performance if I put methods inside an object class (of which multiple instances are created) instead of in a manager class (which only has one instance)

proven musk
#

also how do I get the depth

proven musk
#

since then youd be able to change them per object

tall dragon
#

so you don't have to write / save the same code twice

sand spire
#

Alright thanks 👍

twilit wharf
echo basalt
#

Great question

#

Pretty sure you do that on the submodules

ivory sleet
#

u have a virtual lookup table

#

cuz like polymorphism

#

which is why object oriented languages generally tend to be slower when it comes to method invocation

#

but thats for instance methods

#

static methods are fast since they compile down to invokestatic

#

and then u have functional interfaces which are fast also since they compile down to invokedynamic, altho they technically are just (abstract) instance methods

worldly ingot
#

Don't micromanage your memory to this degree

sand spire
#

oh

ivory sleet
#

unless u have some insane functional requirements to abide by, listen to Choco

sand spire
#

yeah I'm just asking cause I don't know what has micro or meso impact

ivory sleet
#

yeah java has it figured out

worldly ingot
#

If you're not noticing any performance issues, you probably don't have anything to fix

sand spire
#

I'm probably not even optimizing in the things that have major impact on performance cause I simply don't know

ivory sleet
#

thats fair

#

I mean if you're new to this entire programming thingy, the first thing that you will likely come across as less performant is gonna be database calls and reading and writing files

#

that is, noticeable performance impact sources

sand spire
#

yeah I was told to do those async so that's what I do

slender elbow
#

generally speaking, don't bother or care with that stuff, write code that works first, then if you notice a performance hit, profile, and optimise based on your profile results

sand spire
#

👍

slender elbow
#

unless it's a blatantly obvious thing, like, idk, reading a 2gb file on the server thread and calculating the checksum for whatever god forsaken reason

sand spire
#

xd

worldly ingot
#

Weird you mention that, Emily. I just finished implementing that into Hypixel today PandaThink

#

I was like "Hmmm, we could optimize the ban list by just reading in the whole database on server load"

#

And then of course I linearly iterate through the list of player names to ensure that the person joining isn't banned

#

but I'm not stupid. I don't want to have a memory leak. That would be disasterous

#

So I hashed and salted the usernames

slender elbow
#

100x developer right here

young knoll
#

Can’t believe he’s leaking hypixel’s system

worldly ingot
#

Oh well it's still a work in progress so

sand spire
#

sounds like something I would do 💀

worldly ingot
#

Once I PR it, then it's NDA

#

So shhh don't tell anybody

#

I don't want to have a memory leak ... So I hashed and salted the usernames
Also come on, I thought this was hilarious D:

slender elbow
#

i can give you a pat on the back

worldly ingot
#

ty

#

I appreciate it

sand spire
worldly ingot
#

Eh it'll be fine. That's for someone else to figure out

young knoll
#

Just store it in redis

worldly ingot
#

Smart

proven musk
#

god

#

if I was smarter I could totally make a custom gui but I cannot wrap my head around shaders

#

its just so hard with so little information

worldly ingot
#

No shaders required. Just some hacky abuse of inventory titles and custom textures

young knoll
#

ShaderLabs discord server might be able to help

sand spire
proven musk
#

I tried so hard to look

proven musk
young knoll
#

Much easier to learn at least

young knoll
#

You add custom characters to the inventory title to change the texture of the inventory

sand spire
proven musk
#

fair

#

hud

#

is what I mean

young knoll
#

It does make me tempted to make a new version of spout

#

But keep it nice and simple

vague oracle
#

Anyone know why i could be getting a "cannot access net.minecraft.EnumChatFormat" when using net.minecraft.ChatFormatting

proven musk
#

ok this is way easier to do with the action bar

#

ill just have to copy every food item into a custom character

young knoll
#

And then 1.20.5 comes out and any item can be food

#

Kek

flint coyote
#

I love eating diamonds

#

very crunchy

glad prawn
muted otter
#

How do I add multiple scores to an objective at once?

proven musk
#

why do you need to do it at once

#

like on the same tick?

#

just use multiple lines of code right

young knoll
proven musk
#

how would I add libraries in intellj

#

specifically this one

proven musk
#

thanks!

#

I missed that lol

proven musk
#

I tried 1.20.4 but thats not it

tranquil badger
proven musk
#

idk wh

#

yes

#

duh

#

idk what that is

#

ive never used maven before

#

like 24.2?

#

nope

tranquil badger
#

yes

proven musk
#

doesn't work

tranquil badger
#

means you did smth else wrong

proven musk
#

I probably did

tranquil badger
#

where are you putting this

proven musk
#

in my pom.xml

tranquil badger
#

you already added the repo?

#

and access it properly

proven musk
#

I added the repo section

#

wdtym access it properly

tranquil badger
#

looks fine to me

proven musk
#

:/

muted otter
#

what does a team do in a scoreboard?

proven musk
#

teams are kinda seperate to scoreboards ngl

muted otter
#

oh ok

#
Score score = objective.getScore("" + i);

if i have this line of code, will i have to replicate it 15 times to have 15 custom lines on the scoreboard? that doesn't seem like a good solution. is there any method to add multiple?

lament tree
#
for (int i = 0; i < 15; i++) {
    Score score = objective.getScore("" + i);

simple for loop

muted otter
#

what if i wanted to have different text though?

lament tree
#

hmm

tranquil badger
#

Although you'd need to have different lines regardless

#

Well kinda

muted otter
#

so there's no good way to do it?

proven musk
#

i mean

#

ur lookin at the good ways to do it

muted otter
#

alr lol

proven musk
#

but yeah if you want to do 15 different lines of code then ur gonna have to have 15 different lines of code

#

if u told us more about what ur trying to do with 15 different lines that would help

#

ur trying to get the score of... what?

muted otter
#

I am trying to create a scoreboard builder, and a scoreboard can render a maximum of 15 lines on the client
But I am not sure on how I can set each line of the scoreboard provided when building it to the content

proven musk
#

youd want a list of lines then

#

and a for loop

#

how familiar with programming are you

muted otter
#
            List<Score> scores = new ArrayList<>();
            for (int i = 0; i < 15; i++) {
                scores.add(objective.getScore(""));
            }

like this?

proven musk
#

yep

#

why are you getting the scores tho

muted otter
#

don't you have to get the scores to put the text underneath the objective title thing?

#

like you could do

Score score = objective.getScore(ChatColor.WHITE + "asdasd");
proven musk
#

i would assume u set the score

#

but honestly ive never messed around with scoreboards

vast raven
#

In terms of efficiency, checking a 2 blocks pattern based where player is between in a playermoveevent would be lighter to implement using just a first check on the player if it has moved on a new block and then checking the pattern, or adding a middle condition to check for a per player cooldown and then checking the pattern

#

I mean overhead a 2 blocks pattern check isn't that bad

sullen marlin
#

What's the cool down?

#

I think the first check is a good optimisation

ionic thicket
#

creating an empty EntityEquipment?

ionic thicket
#

EntityEquipment e = null; ?

drowsy helm
#

what are you trying to achieve i believe its not meant to be instantiated

ionic thicket
#

i am trying to create an empty equipment that gets filled by random stuff inside a method

drowsy helm
#

?xy

undone axleBOT
drowsy helm
#

what are you trying to achieve overall

#

like why do you want an empty one

ionic thicket
#

because i am creating an entity creating a class. before creating that class i do not have any entity from which i can access the inventory

#

so i want to assign that entity's equipment in the entity's class constructor

drowsy helm
#

Theres no way to set EntityEquipment anyway, you can only get it

#

through LivingEntity

#

can you not explicity define the equipment items

ionic thicket
#

what do you mean?

#

i have first to create the entity, then i need to get it and then i need to give him the equipment?

#

all in the class constructor?

drowsy helm
#

Like even if you did have an empty EntityEquipment class, you can't apply it to the entity.
In your constructor can you not just pass the Items explicity for each slot

#

or a wrapper for it

dawn flower
#

sup

#

just came here to ask abt something in scoreboards and found someone having a problem with scoreboards

inner mulch
#

is there a way to implement noclip, with the api?

dawn flower
#

ANYWAYS, how tf do i set a below name objective without the number

inner mulch
#

you cant

dawn flower
#

you can

#

everyone makes it

inner mulch
#

ok then show me

dawn flower
#

i cant send images

inner mulch
#

they most likely create their own nametags

inner mulch
#

oh

#

i thought you said "can"

dawn flower
#

check dms

undone axleBOT
#

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

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

dawn flower
#

i verified

#

i didnt get the role

inner mulch
vast raven
inner mulch
#

scoreboards are not the way

dawn flower
#

how do i make a nametag system

inner mulch
#

armorstands on the players head

dawn flower
#

what if u have like 23482438 ping

#

it'll look off

vast raven
#

I mean just checking if a player stepped on a new block is nice but I'm trying to get further since the server feels it

inner mulch
dawn flower
#

yes

inner mulch
#

bro you never did this so why are you telling me whats possible?

dawn flower
#

wait im dumb, i want it to show only if ur afk

inner mulch
#

player.addpassenger = NO Lag

#

add the armorstands as passenger

dawn flower
#

i want it BELOW the name

#

not ABOVE

inner mulch
#

i will not spoonfeed

#

this is what neede to create everything you want

#

i did it too

dawn flower
#

i aint asking for u to spoonfeed me, im just asking if theres a way to do it without passengers cuz passengers are above name

inner mulch
#

have you thought about just disabling the nametag and replacing it with armorstands?

dawn flower
#

armorstands cant have 2 line names

inner mulch
#

btw textdisplays can be used too unless you want to support bedrock

inner mulch
#

then use 2?

dawn flower
#

bro

#

passengers cant be below, once again

inner mulch
#

you know what if you dont want to listen or try i will not help you anymore i can send you a screenshot of my nametags if you want

dawn flower
#

please do

#

(they will look off)

inner mulch
#

ok

#

gimme a second

smoky anchor
#

@dawn flower what version do you support
is it 1.20.3+ ?

inner mulch
#

why tf cant i tab out with lightshot

dawn flower
#

1.20.4

smoky anchor
smoky anchor
inner mulch
smoky anchor
#

Read the changelog

#

what

inner mulch
#

so change player name?

#

or what was changed

smoky anchor
#

ok, for the lazy

inner mulch
#

but where is the part with below name nametag stuff

smoky anchor
#

Number format

#

it can disable the number

dawn flower
#

/scoreboard objectives setdisplay belowName afk-tag

for whatever reason 'belowName' isn't a valid display slot even tho i used minecraft's official tab completion for belowName

smoky anchor
#

minecraft's official tab completion
sounds funny

inner mulch
dawn flower
smoky anchor
#

Don't over-engineer something when you don't have to

inner mulch
#

like add more to it

molten hearth
#
        Timeline timeline = new Timeline(new KeyFrame(Duration.millis(60), event -> {
            if (currentTime <= END_TIME) {
                double[] point = LinePoint.getUpdatedPoint(currentTime);
                XYChart.Data<Number, Number> dataPoint = new XYChart.Data<>(point[0], point[1]);
                series.getData().add(dataPoint);

                // Set the color of the data point
                String color = "#ff0000";
                if(dataPoint.getNode() != null) {
                    dataPoint.getNode().setStyle("-fx-background-color: " + color + "; -fx-background-radius: 5px;");
                } else {
                    System.out.println("null"); // why is this shi always null
                }

                currentTime += DELTA_T;
            }
        }));```
#

do you guys know why the node is always null? 😭 im using a LineChart with javafx

dawn flower
#

how do i use numberformat

#

/scoreboard objectives modify afk-tag numberformat blank doesnt work

smoky anchor
#

?notworking

undone axleBOT
#

"Does not working" is a useless statement. Please describe what exactly is not working, what you expect it to do, and what actually happens. If you get any console errors, also ?paste the entire stacktrace.

dawn flower
#

it just doesnt work

#

it doesnt remove the zero

#

no errors

smoky anchor
#

gimme a sec

dawn flower
#

can i use packets

smoky anchor
#

Don't jump to packets bru

dawn flower
#

oka

smoky anchor
#

/scoreboard objectives add test dummy
/scoreboard objectives modify test numberformat blank
/scoreboard objectives setdisplay below_name test
/scoreboard objectives modify test displayname {"text":"Hello World"}

#

try this on spigot server
if it doesn't work, try it on a fresh spigot server
if it still doesn't work, make a bug report

dawn flower
#

doesnt work

#

i'm on paper

#

(paper support sucks so im here)

eternal oxide
#

We are not paper

dawn flower
#

their support sucks doe

eternal oxide
#

?fork

undone axleBOT
#

SpigotMC maintains the Spigot server. If you are using a fork of Spigot (such as Paper, Airplane, Purpur, or other derivative works), you should seek support in the appropriate Discord servers.

smoky anchor
#

If you want good support here, use spigot :)

dawn flower
#

paper is faster doe

eternal oxide
#

in some situations it is

smoky anchor
#

Just gonna confirm one thing, you did do the exact same commands and used second account to look at a player, right ?
You can't see the nametag thing if you use F5.

smoky anchor
#

Try spigot, if it doesn't work there, make a bug report at the appropriate place

torn shuttle
#

anyone know if there's a hack for making several resource pack textures for armor without only using the helmet trick?

#

maybe with leather armor or something?

smoky anchor
#
  1. what is the helmet trick
  2. Fancy Pants (gimme a sec for link)
torn shuttle
#

so someone figured out how to do it with shaders then

#

hm

#

I might just have to use optifine

smoky anchor
#

If you don't care about supporting vanilla, you could probably just make custom trims

#

and make one armor completely transparent and change it with trims

lost matrix
torn shuttle
#

I really don't know if I would rather use shaders or optifine here

smoky anchor
#

it's between a resourcepack which server can automatically apply
or a mod the player has to manually download
I would go with RP

lost matrix
#

optifine requires the player to have it installed, core shaders always work

torn shuttle
#

yeah but core shaders might interfere with other shaders and they come with a client-side overhead

lost matrix
smoky anchor
#

I already sent fancypants here :(
why u ignoring me smile 😢

torn shuttle
#

there's also the other thing which is long-term support, sure hope mc didn't change how these work for 1.20+...

rigid shoal
#

hello how do i added yaml comments inline like this in code:

Settings
  AllowTP: true #set to true of you allow players to teleport to their death position
lost matrix
torn shuttle
#

oh wait

#

so core shaders actually specifically don't work with optifine?

torn shuttle
#

says so on the page you linked

#

so I have to pick either something that works on optifine or something that works on everything else as well on top of the rest

smoky anchor
#

since optifine breaks all sorts of things, I am not surprised

torn shuttle
#

never looked at trims, does that require losing one of the base game armors?

smoky anchor
#

it adds texture on top of existing armor

torn shuttle
#

so you lose layer2

#

what is it capped by, how many armor trims there are or something?

smoky anchor
#

you can create your own trims