#help-development

1 messages · Page 1121 of 1

paper viper
#

then the pack url would be [public ip]:25565/resourcepack

young knoll
#

Pretty much

paper viper
#

Ah

young knoll
#

But without netty http

paper viper
#

why tf does mojang not do this

young knoll
#

Because boo dependency

paper viper
#

is it not included

young knoll
#

Nope

blazing ocean
#

i just use mc port - 1

young knoll
#

Mojang doesn’t use it so it isn’t bundled with the game

young knoll
blazing ocean
#

yea

young knoll
#

Lame

#

Cheap shared hosts don’t offer that

blazing ocean
#

i mean

#

when you're making a public server that's not a big deal

young knoll
#

I’m not tho

#

I’m making a public api for others

young knoll
#

They should hire me to do it for them

edgy crystal
#
                                    banner.setType(factionData.getBannerColor());
                                    banner.setPatterns(factionData.getBannerPattern());
                                    banner.update(true);````


how do i change like the location where the banner looks at ?
#

because if i set it to a new material/type it changes its location

unique shuttle
#

Does anyone know why the PlayerInteractEvent is called when I drop an item while looking at the air?

young knoll
#

Because the game is strange

#

And dropping an item makes you swing your arm

unique shuttle
#

There's no way to differentiate it, right?

#

I’ll have to detect when an item is dropped in the same tick or something similar

#

hmm

viscid carbon
#

Is there a easy way to disable this?

       for (String s : task.getRewards()) {
            Bukkit.dispatchCommand(Bukkit.getConsoleSender(), s.replace("[player]", Bukkit.getPlayer(uuid).getName()));
        }

Or do i just need to make my own method?

wraith delta
halcyon hemlock
#

Hi everyone

rough ibex
#

hi

umbral ridge
#

😿

halcyon hemlock
#

hello everyone

echo basalt
#

hi chat

halcyon hemlock
#

who the hell am i racing bro

#

4 usain bolts

blazing ocean
#

💀

glossy laurel
#

How do I make a warden that has a PDC tag with a player's name in it not apply darkness to that specific player?

#

I know there is EntityPotionEffectEvent.Cause WARDEN but how do I check which warden it was?

halcyon hemlock
halcyon hemlock
#

just check the pdc?

remote swallow
halcyon hemlock
echo basalt
#

yeah but you're prob a nerd

#

who tf spends an hour doing typing tests

halcyon hemlock
#

in 2 years

glossy laurel
#

EntityPotionEffectEvent doesn't give an entity, only the one affected

#

I can check the cause to be a warden but I still need to know which warden it was or access it's pdc somehow

halcyon hemlock
#

event?

glossy laurel
#

what else am I supposed to use

halcyon hemlock
#

so you're using the event, and it doesnt show who applied the effect?

#

just check last damager of the player then perhaps

glossy laurel
#

correct

remote swallow
glossy laurel
remote swallow
#

15 seconds sorry

halcyon hemlock
#

gotta maximize it ykwim

remote swallow
#

do a 60 second test

halcyon hemlock
#

i can get 200wpm with 10 words

halcyon hemlock
#

i'll get 120

remote swallow
#

thats the point

halcyon hemlock
#

lemme see one sec

glossy laurel
#

Is there some event for the warden when it tries to apply darkness perhaps

blazing ocean
echo basalt
tardy delta
#

62 💀

#

i typed an s and it said it was no s

#

skill issue

grim ice
#

Hey

#

do you guys have an idea of how I would copy/paste worlds?

#

(without restarting the server)

#

I could use schematics to paste things, but the world would still not be empty, it'd still have some sort of terrain generation

shadow night
#

Using multiverse or somethinz

grim ice
shadow night
#

Idk but I saw people utilize the mv api for doing worlds

sand spire
grim ice
#

right?

sand spire
# grim ice but then you'd need to restart the server

No, if you use worldManager.initializeWorld(new File(getDataFolder(), "maps"), "cheese"); it will get the world named "cheese" in a folder named "maps" and create a new world in your worldfolder (which is usually in your server directory). And any world in the worldfolder is a world you can go use

grim ice
#

and i replace abc

#

with a world from maps

#

what happens then

sand spire
#

would probably go wrong

#

the forum posts I read said to remove all players from a world before doing stuff with it

grim ice
#

oh

#

smart

sand spire
#

Note that it might lag the server when creating or overwriting a world. I haven't tried this while online I only use it onEnable

wet breach
#

same with loaded player files etc

umbral ridge
#

Everything gets replaced except whiskey

tender shard
lost matrix
#

It is back from the dead

umbral ridge
#

it has been revived by the great master

halcyon hemlock
tardy delta
#

O

halcyon hemlock
#

looks way better than before

tardy delta
#

im gonna rate the code instead

halcyon hemlock
#

it didnt have any images

halcyon hemlock
#

its old code ok?

tardy delta
#

ah man

#

no

halcyon hemlock
#

its prolly not even that bad tbh

#

i started it like 1-2 years ago

tardy delta
#

yes it is

halcyon hemlock
#

havent been working on it as much as my minecraft server framework (the rust one)

halcyon hemlock
quiet ice
#

Technically nonsense?

halcyon hemlock
#

is this logging verbose

tardy delta
#

anyone knows how big a packed enum is in c? (typedef enum __attribute__((__packed__))), size and compiler dependent?

#

something else than java

kindred valley
#

?paste

undone axleBOT
grim ice
#

bro

#

maven does NOT want to compile with java 17

#

it keeps compiling with 21

#

I specified java 17 in intellij's project structure

#

and it's still compiling with jdk 17

tardy delta
#

also pom.xml?

quiet ice
#

maven uses whatever JDK you are running it with

#

Unless you use toolchains, but nobody does that ever

tardy delta
#

(those nerds pretend they do)

eternal oxide
#

or set in the pom

quiet ice
tardy delta
#

i think they just do

#

dont know anything about gradle though

quiet ice
#

I'm talking about toolchains in Maven. Toolchains in Gradle do get used though

#

Or well, they might (invalidly) come to the conclusion that the pom.xml is setting the JDK (which is very close to that in the case of --release, but you'll find the one or the other edge case where you can see that there is a difference)

grim ice
grim ice
grim ice
#

I already have that there

quiet ice
#

try a clean install

eternal oxide
#

source/target?

quiet ice
grim ice
#

Ok, I forgot to close my terminal and reopen

#

I'm just stupid

halcyon hemlock
orchid gazelle
#

Oops

river oracle
#

I didn't realize this would take so long 😭 so many item components

#

haven't even started making the builders yet

wraith mason
#

Hello together, I have an question. Does anyone now how to check if an DayLightDetector is inverted ? Spoiler: isInverted() dont work. Im using the version 1.21.
I really going to get an breakdown if i dont give up

river oracle
tardy delta
#

use kotlin and put them all in one file

river oracle
#

before reporting please make a minimally reproducable bug

river oracle
tardy delta
#

buddy prefers bloat

river oracle
#

if putting everything in a single file was so great why do we even use separate files :)

tardy delta
#

i only know one lang that does that

river oracle
#

hell even python separates stuff into other files when needed

#

I really don't want to look through 10,000+ line files though

#

its not my idea of fun

wraith mason
river oracle
#

make sure you're on Java 21 as well

wraith mason
#

okok, i will try

#

thanks^^

#

nvm doesnt work

#

it still dont even exist

sand spire
#

Is it a good idea to create getters for different classes in my main class and just pass down the main class instead of passing everything separately, so I don't need to change a lot of stuff every time I need a new class instance.

humble tulip
#

Guys i was a kotlin hater

#

But i just discovered coroutines

#

AMAZING

echo surge
lost matrix
#

coroutines alone are not convincing enough for me to use a borderline scripting language for development

blazing ocean
#

lol

humble tulip
#

For sooo long

blazing ocean
#

smile will always be the biggest hater

#

just on everything

#

@shadow night dont you fucking dare

echo surge
#

i only use it for the top level variable declaration lol

shadow night
#

you know I will

blazing ocean
#

fuck you

#

both you and smile

humble tulip
#

Lmaoooo

echo surge
#

wtf even is atrocious

humble tulip
#

Is that screenshot just sittion in your clipboard

#

Ready for a paste at all all times

blazing ocean
humble tulip
lost matrix
# humble tulip I hated it initially

I also found it quite nice to write initially. And then i worked on a bigger project with other devs (which where quite experienced as well) using this language.
And that really made me abhor the language.

humble tulip
#

Damn you really don't like using simple words

sand spire
humble tulip
#

Abhor

blazing ocean
#

hi suit i pinged you

#

wake up now

humble tulip
#

Is he someone who lives for r/IncreasonglyVerbose?

blazing ocean
#

no

#

hes a kotlin user as well

#

in fact he got me into kotlin

humble tulip
#

Ah

slender elbow
#

coroutines are just spicy promises

humble tulip
#

So much easier to write tho

lost matrix
#

Might as well use CompletableFuture

shadow night
#

suspend my function please

blazing ocean
humble tulip
#

The syntax is absolutely wack at times tho

#

Most times its easy

echo surge
#
class WorldQuitEvent : Event<WorldQuitListener>(WorldQuitListener::class)

ill js leave this here

#

why do i have to type in the type twice???

lost matrix
#

It gets real fun as soon as you introduce your own syntax via infix functions

blazing ocean
#

tbh that is quite fun

echo surge
#

never used infix before

#

isnt it just an extension function without symbols?

blazing ocean
#

yes

echo surge
#

incredible!

blazing ocean
#
infix fun Int.pow(other: Int) = ...

println(2 pow 2)
assertTrue(2 pow 2 == 2.pow(2))
lost matrix
blazing ocean
#

wait

#

there is no power sign

#

i forgor about that

lost matrix
#

Also ^ is bitwise xor

blazing ocean
#

yea

#

we had it as pow in maths lmfao

#

apparently you have to do this ```kt
fun power(baseVal: Int, exponentVal: Int): Long {
val base = baseVal
var exponent = exponentVal
var result: Long = 1

while (exponent != 0) {
    result *= base.toLong()
    --exponent
}
return result

}

lost matrix
#

You could improve this in some ways, like checking if the base is 0, 1, -1 or 2, but this is essentially what you need to do.

blazing ocean
#

it's just the first baeldung result

lost matrix
#

You could introduce ** like python.
Honestly. Not too horrible. But it completely ruins any coding standard.

echo surge
#

is there any good alternative to kotlin? scala maybe?

lost matrix
#

Java

echo surge
#

boilerplate

lost matrix
#

Writing precise, standardized code requires verbosity

blazing ocean
blazing ocean
echo surge
#

yea ig kotlin is fine

#

java is js too annoying sometimes and my code sucks either way

slender elbow
#

i mean if your code sucks, it's gonna suck in any language

eternal night
#

speaking from experience?

blazing ocean
#

not in kotlin Clueless

slender elbow
#

first-hand

eternal night
#

emison v2 when

slender elbow
#

never

#

it's perfect

lost matrix
#

If you want to snot out code without boilerplate you can also just write python and use GraalVM

blazing ocean
#

just use rust bro

#

trust me bro

quiet ice
#

Groovy is the greatest language

blazing ocean
#

💀

quiet ice
#

Just never try to decompile it lol

glossy laurel
quiet ice
#

And debugging is a pain, too.
But that's just an ecosystem issue. Language-wise groovy is good.

echo surge
lost matrix
#

Saved as screenshot for future riles

blazing ocean
quiet ice
#

I mean, I'm one of those few people who have a /bit/ too much experience with gradle.
So I've also grown accustomed to groovy by extension.

blazing ocean
#

if anyones interested this is how decompiled kotlin looks

lost matrix
#

i prefer kotlin dsl > groovy. Because kotlin at least tries to be a programming language

tardy delta
#

try decompiling it yourself then

blazing ocean
#

i mean i have the src

quiet ice
blazing ocean
#

vineflower

quiet ice
#

Makes sense

#

Although I guess you're on the older version

slender elbow
#

now try to decompile clojure into java :Clueless:

tardy delta
#

i still have to make my brainfuck to java bytecode compiler

#

i think coll challenged me to

lost matrix
#

Shouldnt be too hard. Except that the granularity of pointer shifting in java might need a bit of tinkering.

blazing ocean
#

why does it do this

tardy delta
#

destructuring

#

you can write them yourself and you can also destructure

tardy delta
blazing ocean
#

hmmmmmm ah yes

tardy delta
#

thought it was a bunch of loads/stores

blazing ocean
tardy delta
#

weak

lost matrix
#

lateinit is another keyword i despise. Why not write a proper lazy object.

blazing ocean
#

annoying

tardy delta
#

i got a good example

slender elbow
#

by lazy moment

blazing ocean
#

real

tardy delta
blazing ocean
tardy delta
#

by lazy is synchronized by default though

#

private val apiKey hehe
// FIXME: don't put in sourcecode

#

college projects be like

remote kernel
#

Hello is there anyone here who is interested in protocollib packages and could help me in plugin?

remote kernel
# halcyon hemlock sure

I'm creating a plugin for the tab list on version 1.20.1, but the problem is that when I try to intercept the 'PLAYER_INFO' packet and use 'PlayerInfoData' to set the player's display name on the tab list, it throws an error. Could you tell me what I'm doing wrong? ;p Or what I might be missing to correctly change the player's display name on the tab list?

https://imgur.com/a/ClALHA3

blazing ocean
glossy laurel
#

Can I somehow loop all withers in the world without looping all entities?

blazing ocean
#

no

#

just filter out all others

glossy laurel
#

by looping through all of them?

blazing ocean
#

just add a check if it's not a wither?

glossy laurel
#

right

blazing ocean
#

yeah

lost matrix
#
list.add((T) bukkitEntity);

->

list.add(clazz.cast(bukkitEntity));
#

Same result but still

tardy delta
#

now intellij is gonna complain

#

🤡

lost matrix
#

Is it?

blazing ocean
#

🗿

quiet ice
opal socket
quiet ice
#

I don't think flow obf is that allowed

opal socket
#

I'm going to use proguard but it gives an error 😦

lost matrix
quiet ice
lost matrix
quaint mantle
#

I need to protect my home plug-in

quiet ice
#

Most of the time obfuscation backfires

tardy delta
#

i will laugh if the code is a piece of shit

pseudo hazel
#

your only reason to obfuscate should be optimization of some

#

obfuscation for the purpose of hiding the code is pointless

worthy yarrow
#

At that point just don't release source

slender elbow
#

that's literally what the word means too lol

slender elbow
#

the vm will take care of optimising your code anyway

lost matrix
#

lol

lost matrix
quiet ice
#

Well, you can optimize for size using obfuscation

glossy laurel
#

Can I somehow get if a location is colliding with some player's body and which?

quiet ice
#

But there are a few other ways of optimizing jars for size that don't include obfuscation (most notably using jar-in-jar where as the entries within the inner jar are STORE'd)

lost matrix
glossy laurel
#

I would need to loop all player's though, right?

worthy yarrow
#

You could just check around the area of which the location is

lost matrix
glossy laurel
#

tbh there probably is

#

I didn't really google how to do it and just improvised so perhaps im doing evething wrong :D

remote kernel
lost matrix
# glossy laurel I'm raycasting a projectile and trying to check when it collides with something

This way you can give your projectiles a custom size and use spigots ray tracing to check for collisions with blocks or entities:

public class CustomProjectile {

  private double size;
  private Location location;
  private Vector velocity;

  public void flyForward() {
    World world = location.getWorld();
    boolean ignorePassable = true;
    double maxDistance = velocity.length();
    RayTraceResult result = world.rayTrace(location, velocity, maxDistance, FluidCollisionMode.NEVER, ignorePassable, size, entity -> {
      if (entity instanceof Player) {
        return true;
      }
      return false;
    });
    
    // Add the velocity to the location
    location.add(velocity);

    if(result == null) {
      return;
    }

    Block hitBlock = result.getHitBlock();
    if (hitBlock != null) {
      // Do something with the hit block
    }

    Entity hitEntity = result.getHitEntity();
    if (hitEntity != null) {
      // Do something with the hit entity
    }
  }

}
lost matrix
remote kernel
#
        protocolManager.addPacketListener(new PacketAdapter(this, PacketType.Play.Server.PLAYER_INFO) {
            @Override
            public void onPacketSending(PacketEvent e) {
                if (e.getPacketType() == PacketType.Play.Server.PLAYER_INFO) {
                    PacketContainer packet = e.getPacket();
                    List<PlayerInfoData> playerInfoDataList = packet.getPlayerInfoDataLists().read(0);

                    List<PlayerInfoData> modifiedLists = playerInfoDataList.stream()
                            .filter(data -> data != null)
                            .map(data -> {
                                WrappedGameProfile profile = data.getProfile();
                                Player player = getServer().getPlayer(profile.getUUID());

                                if (player != null && player.getName().equals("oneyz_")) {
                                    WrappedGameProfile newProfile = new WrappedGameProfile(profile.getUUID(), "newName");
                                    return new PlayerInfoData(newProfile, data.getLatency(), data.getGameMode(), data.getDisplayName());
                                }
                                return data;
                            })
                            .collect(Collectors.toList());

                    packet.getPlayerInfoDataLists().write(0, modifiedLists);
                }
            }
        });
glossy laurel
#

but sick code 🔥

lost matrix
remote kernel
#
[20:09:04 ERROR]: [TabOZ] Unhandled exception occurred in onPacketSending(PacketEvent) for TabOZ
java.lang.IllegalStateException: Unable to set value of field private final java.util.EnumSet net.minecraft.network.protocol.game.ClientboundPlayerInfoUpdatePacket.a
lost matrix
#

So thats a different exception now at least

remote kernel
#

yes, but why?

#

i didn't see any errors in code

#

I've been struggling with this for 3 days xD

lost matrix
#

The exception above occurs from PLib not being able to set a field in a packet via reflections.
Make sure that you use the very latest PLib version. 5.2.0 i think.

remote kernel
#

still the same

young knoll
lost matrix
#

Yes, i just wanted to be a bit more verbose for him 🙂

river oracle
#

or with kotli...

lost matrix
river oracle
#

kekw

blazing ocean
#

fr!!

remote kernel
#

@lost matrix added log for:
modifiedLists and playerInfoDataList

and both is empty:
https://imgur.com/a/9HqhYsP

what could be the cause?

gray merlin
#

Alright my head's a mess right now; I'm trying to update my plugin to 1.20.5 but I've completely forgotten how to get the dependency in place

#

I know it maybe had something to do with buildtools or... something, I don't know. Help? skdjd

#

Surely there's an easier way no?

viscid carbon
#

using maven?

gray merlin
#

Oh yeah sorry

#

Maven ^^

viscid carbon
#

Change your dependacy in Pom

 <dependency>
            <groupId>org.spigotmc</groupId>
            <artifactId>spigot-api</artifactId>
            <version>1.21.1-R0.1-SNAPSHOT</version>
            <scope>provided</scope>
        </dependency>```
gray merlin
#

And I also don't know what i should do previously... I thought I had to use buildtools and it'd autofill afterwards but no

lost matrix
winter ibex
#

Hello

gray merlin
#

one sec..

#

There you go

winter ibex
#

By any chance is there the auction plugin, auctionhouse updated to 1.21?

lost matrix
winter ibex
gray merlin
#

I really just don't know where to find the strings for the dependency versions

gray merlin
gray merlin
lost matrix
#

I mean this is literally the repositry you added in your pom ^^
Just opened with a browser

gray merlin
#

Also, remind me slightly: spigot is for nms, spigot-api is for the api only right?

arctic terrace
#

is the crawling in a 1x1x1 block another event than swimming?

gray merlin
#

I really can't get away from development for 3 months

#

this was so stupid lol

#

thank you

lost matrix
#

?nms

gray merlin
#

Oh thank you!

#

I so hope this removes the need for my nms multi-version compatibility thing...

#

Out of curiosity, why do they obfuscate their mappings?

#

If... they're just going to release the mappings afterwards...

eternal oxide
#

legalities

#

They have to make an effort to protect their property

gray merlin
#

Ahhh... I hate that! haha

#

Fair enough

lost matrix
#

Didnt this change in 1.21? I fondly remember reading that mojang just distributes unobfuscated sources now

eternal oxide
#

I guess its possible but I highly doubt it

gray merlin
#

are the methods always named the same since 1.7.10 now?

#

with the mappings

eternal oxide
#

When suing someone for Copyright you have to demonstrate that you actually made an effort to protect your property.

glossy laurel
#

@misty folio im best pumkin

lost matrix
shadow night
#

You can't imagine how much I do NOT care for that shit

eternal oxide
misty folio
#

can anyone know how to make numberless scoreboard? 1.21 nms

shadow night
eternal oxide
#

You can on spigot, with limitations

slate siren
#

I'm creating a gui system for a kit, the kits are visible in the gui according to the permissions the player has, but there is a problem.
I set permissions with luckperms. There are 2 kits and 2 Ranks.

I gave one permission for each, but every time a player dies and revives, the system gets confused about which kit to give to the player. For this reason, I used a method like this; the kit permission for the higher rank is set to permission true and the kits with lower ranks are set to false, which prevents the kits from appearing in the gui. What can I do about this?

arctic terrace
#

is there no way to detect if a player is crawling / cancel it?

slate siren
narrow quest
#

Whats the best way to advertise a free plugin you've made?

wraith delta
rocky pond
peak depot
viscid carbon
#

Question, How do you count how many strings are in a configurationSection with a certain name? eg

    Rewards:
      Item: 'diamond'
      Count: 5
      Item: 'iron_ingot'
      Count: 10```
arctic terrace
#

canceling swimming works crawling no

viscid carbon
viscid carbon
#

I know, cant think of a better way of doing it

gray merlin
#

Hey there peeps

#

Did NMS change at all with the new NBT changes?

pseudo hazel
#

which new nbt changes

gray merlin
#

the 1.20.5 nbt removal

pseudo hazel
#

oh probably

young knoll
#

Yes

#

NMS changes every version

#

That’s kind of its thing

gray merlin
#

mhm...

#

uhh.. alright thanks

young knoll
#

Mojang doesn’t have to avoid breaking changes :p

quaint mantle
#

Mojang employee that makes world converters: 💀

pseudo hazel
#

atleast they have something to do

#

and are prolly getting paid for it

gray merlin
#

Ahh okay I've re-read my own code and reunderstood everything

lean arrow
gray merlin
#

I'm not actually using NMS fully, i'm using reflection to call NMS methods based on the version, and I make new reflector classes for new versions when things change within the scope of what i'm using

#

so I need to read through the code to check for changes

blazing ocean
gray merlin
#

Which, due to the new nbt removal, must be a lot

lean arrow
#

i hate reading because you cant hold a consistent conversation

blazing ocean
#

fuck you

gray merlin
#

I have to download stuff from buildtools to read the code from nms right?

blazing ocean
#

yes

gray merlin
#

alright, thank you!

blazing ocean
#

you need to run buildtools (and you prob want it remapped)

gray merlin
blazing ocean
#

yes

#

?nms

gray merlin
#

oh thanks!

#

Yeah, so I'll need to pop up the remapped source code on one side and match it with the obfuscated one on the other side, and use the obfuscated ones for reflection...

#

alright, i'm caught up with my prior logic

#

tyy

worthy yarrow
#

Eh when mapping a value with a string, if the string key is " ", is that a null key or will it take it as is?

eternal oxide
#

space

worthy yarrow
#

Cool cool

viscid carbon
gray merlin
#

is there any documentation for the new components system...?

young knoll
#

Probably not

gray merlin
#

My entire plugin used to revolve around NBT manipulation with NMS and it's all gone to shit now...

gray merlin
viscid carbon
gray merlin
#

The way I made it only requires me to remake one small part of it, the one that actually handled NBT serialisation and deserialisation into base64 data, but jesus christ nothing works

#

why would they do this

young knoll
#

If you are already making a reflection class for every version

#

Just use actual modules and ditch the reflection

gray merlin
#

modules?

gray merlin
#

I made reflections for every major change in nms where it affected my serialisation use cases

#

so, only when nms screwed items

gray merlin
echo basalt
#

uH

#

migration tool

gray merlin
#

Also I couldn't use PDC because I'm just getting all the info about an item and serialising it so it can be recreated later

#

and not storing stuff in it :p

#

Unless I misunderstood PDC: My current understanding is that PDC is a "container inside an entity or item that allows it to hold extra data"

young knoll
#

Yes

#

But items are already serializable

gray merlin
young knoll
#

Yes

viscid carbon
gray merlin
young knoll
#

They are ConfigurationSerializable

#

And there’s also BukkitObjectOutputStream and BukkitObjectInputStream to convert them to bytes

viscid carbon
#

Nvm on my question.

gray merlin
#

I didn't know about ConfigurationSerializable though

#

I'll read up on it

#

Ahhh, I didn't know they were serialisable by default... Time to rewrite this part and get rid of nms. Yay!

young knoll
#

Why not just go directly to a byte[] and then base64

#

Or just stick with binary

sterile breach
#

are there any examples/tutorials for knowing the right architecture to adopt for your plugin (for example, for packages you put such and such a thing in managers, listener, utils etc....)?

lethal coral
#

How can I prevent a boat from rotating?

gray merlin
# young knoll Why not just go directly to a byte[] and then base64

Sometimes the byte[] tranformation is slightly out of size for a base64 encoder to make it work, (common with mods), so the mag 32 step ensures that it's always within a comfy size for the encoder! I'm essentially translating it into a predictable-sized int that it can always make do with 😄

#

I didn't know I could directly get the byte[] from spigot's api, so i was using nms for that

umbral flint
#

How do I disable the HikariCP logger?

I have already tried:
Logger.getLogger("me.skinnynoonie.nooniemanagement.hikari").setLevel(Level.OFF);
and
Logger.getLogger("me.skinnynoonie.nooniemanagement.hikari.HikariDataSource").setLevel(Level.OFF);
But it does not do anything, I still get these logs:

[17:18:47 INFO]: [me.skinnynoonie.nooniemanagement.hikari.HikariDataSource] HikariPool-5 - Starting...
[17:18:47 INFO]: [me.skinnynoonie.nooniemanagement.hikari.pool.HikariPool] HikariPool-5 - Added connection org.postgresql.jdbc.PgConnection@4fde8f16
[17:18:47 INFO]: [me.skinnynoonie.nooniemanagement.hikari.HikariDataSource] HikariPool-5 - Start completed.
remote swallow
dawn flower
#

Does PotionEffect#apply replace the existing effect?

umbral flint
brittle geyser
#

what difference between spigot mappings and mojang mappings, which is better?

umbral flint
#

It keeps using Bukkit's logger

undone axleBOT
young knoll
#

Spigot mappings are dead

dawn flower
#

How do I reset someone's equipment after sending a fake equipment change to a player

brittle geyser
#

ok, thx

viscid carbon
#

multiple rewards are annoying

maiden thicket
#

for some reason i keep running into a different entity id than the item displays that are being spawned?

        event.getPlayer().getNearbyEntities(2, 3, 2).stream().filter(entity ->
                entity.getPersistentDataContainer().has(this.ctfGame.getTeamKey())).filter(entity -> entity.getType() == EntityType.ITEM_DISPLAY).map(entity -> (ItemDisplay) entity).filter(itemDisplay -> itemDisplay.getItemStack() != null && itemDisplay.getItemStack().getType() != Material.AIR).forEach(entity -> {
                    System.out.println(entity.getEntityId());
                    System.out.println(entity.getType());
                    final String value = entity.getPersistentDataContainer().get(this.ctfGame.getTeamKey(), PersistentDataType.STRING);
                    if (ctfPlayer.ctfTeam() == CTFTeam.BLUE && value.equalsIgnoreCase("red")) {
                        ctfGame.assignFlag(event.getPlayer(), "red");
                    } else if (ctfPlayer.ctfTeam() == CTFTeam.RED && value.equalsIgnoreCase("blue")) {
                        ctfGame.assignFlag(event.getPlayer(), "blue");
                    }
        });```
#
                    redFlag = sign.getWorld().spawn(loc.clone().add(0, 2, 0), ItemDisplay.class);
                    redFlag.setItemStack(new ItemBuilder(Material.DIAMOND_HOE).setCustomModelDate(1).build());
                    redFlag.setItemDisplayTransform(ItemDisplay.ItemDisplayTransform.GROUND);
                    redFlag.setBillboard(Display.Billboard.CENTER);
                    redFlag.getPersistentDataContainer().set(((CTFGame)this.getGame()).getTeamKey(), PersistentDataType.STRING, "red");
                    redFlag.setGlowing(true);
                    System.out.println(redFlag.getEntityId());
                    ((CTFGame)this.getGame()).getRedTeam().addEntities(redFlag);``` i have two of these that print 24 and 30
dawn flower
#
    public void setHidden(boolean hidden) {
        this.hidden = hidden;
        if (hidden) {
            PotionEffect invisibility = new PotionEffect(
                    PotionEffectType.INVISIBILITY,
                    20,
                    0,
                    true,
                    false
            );

            instance.runTimer((task) -> {
                Player player = getPlayer();
                if (!this.hidden) {
                    task.cancel();
                    if (player != null) {
                        Map<EquipmentSlot, ItemStack> equipment = new HashMap<>();
                        for (EquipmentSlot slot : EquipmentSlot.values()) {
                            equipment.put(slot, player.getInventory().getItem(slot));
                        }
                        for (Player p : Bukkit.getOnlinePlayers()) {
                            p.sendEquipmentChange(player, equipment);
                        }
                    }
                    return;
                }

                if (player == null) return;
                invisibility.apply(player);
                for (Player p : Bukkit.getOnlinePlayers()) {
                    p.sendEquipmentChange(player, HIDDEN_EQUIPMENT);
                }
            }, 0L, 1L);
        }
    }```
Why is ``this.hidden`` in the lambda always false?
lethal coral
dawn flower
#

?

lethal coral
lethal coral
#

you were told why

dawn flower
#

If it means anything, it means that this.hidden is supposed to be true, not false

lethal coral
#

not always, but most of the time

dawn flower
#

The if statement passes, and this.hidden is true ouside but false inside

lethal coral
#

yes

#

where are you getting the warning

dawn flower
#

What warning?

lethal coral
#

IntelliJ sometimes tells you if it thinks something will always be true/false, but based on you asking what warning I don't think that's the case

#

so specifically where is it not passing?

dawn flower
#

So basically

#

This prints these:
Hidden value outside: true
Hidden value inside: false

pure dagger
#

is there a way to check if block is replacable? like grass, snow layer, veins - that means if you click on them with a block they get replaced with this block, you dont have to break them

#

i need to replace block if its air or replacable block

dawn flower
#

I believe if it's not solid

pure dagger
#

probably no

#

not

dawn flower
#

I don't think so

pure dagger
#

so if its not solid then what you said is not true

echo surge
dawn flower
#

Yeah I just found out I was calling setHidden(false) in one of the helper methods

echo surge
#

so it works now?

dawn flower
#

👍

echo surge
#

nice

dawn flower
#

Also how do I spawn an ash particle that doesn't fall

echo surge
#

particles are clientside AFAIK

dawn flower
#

There is a server doing it

echo surge
dawn flower
#

Maybe, but what particle looks similar

echo surge
dawn flower
quaint mantle
#

is it bad practice to use records for stuff like services that just take a couple things in

worldly ingot
#

No, that's fine. Records are just immutable data holders, so treat them as such. If it's not an immutable data holder, use a class

quaint mantle
#

That's what I was thinking, but one could also argue that like they are only proper for like user data ect

worldly ingot
#

Basically treat it like a C++ struct :p Shouldn't really have any more methods than what is generated for it

quaint mantle
#
public record DefaultVersionLoginPacketHandler(
        LabyModProtocolService protocolService
) implements PacketHandler<VersionLoginPacket> {
    @Override
    public void handle(@NotNull UUID sender, @NotNull VersionLoginPacket packet) {

    }
}

so this would be bad?

#

as opposed to just having a normal class

young knoll
#

Isn’t there a tag for that

#

Yeah Tag.REPLACEABLE

cinder abyss
#

Hello, which lib should I use to interact easily with NMS ?

lethal coral
blazing ocean
#

i'm in their readme as well

young knoll
#

That’s for packets specifically

dawn flower
cinder abyss
blazing ocean
cinder abyss
blazing ocean
#

(as sane solutions)

young knoll
#

I mean

#

There’s libs for various parts of NMS

#

Like a pathfinder lib

blazing ocean
#

just depends on what

#

like "nms" is not specific

#

nms is the server

cinder abyss
blazing ocean
cinder abyss
#

I need some classes to do that

blazing ocean
#

what do you really want to do

cinder abyss
#

I need inspiration

blazing ocean
#

whar

young knoll
#

Try setting speed to 0

#

It’s the extra double in the spawn method

dawn flower
#

I tried

dawn flower
# dawn flower

I noticed the ash particle has a black variant, which doesn't exist here

dawn flower
echo surge
dawn flower
#

Oof

#

i found it

#

I found it on accident lmao, it was mycellium particle if you're wondering

#

What is the mycellium particle in spigot?

low field
#

where can i find the craftbukkit version codes corresponding to the minecraft version? like v1_20_R3 = 1.20.4

carmine mica
#

they do not line up like that always

torn shuttle
#

ok I'm really tired of my hotswapping being broken, does anyone have an up to date guide on how to do it correctly

low field
#
import sys,zipfile,io

jar = sys.argv[1]
with zipfile.ZipFile(jar, "r") as z:
    jar2 = z.read("META-INF/versions/" + jar.replace(".jar","") + "-R0.1-SNAPSHOT.jar")
    jarf = io.BytesIO(jar2)

    with zipfile.ZipFile(jarf, 'r') as ja:
        a = ja.namelist()
        fl = [f for f in a if f.startswith("org/bukkit/craftbukkit/")]
        print(fl[1])
wet breach
torn shuttle
#

every single time

#

at least right now

wet breach
# torn shuttle

from my limited research it seems its a limitation with intelliJ currently

torn shuttle
#

all I did was change a single character in a string

#

I think it might dislike the build logic I have

#

because I'm shading stuff

#

but it used to work

wet breach
#

well not a limitation with intelliJ, rather the hotswap it uses

torn shuttle
#

I used to have a working setup but then nuked it

lost matrix
#

From doing no research at all, it looks like the hotswap failed

torn shuttle
#

by mistake

wet breach
#

you are not doing clean build right?

torn shuttle
#

it always does it

#

no matter what I am changing

#

damn it I'm having another energy crash this sucks

wet breach
#

lol

torn shuttle
#

can't fall asleep if you are standing and working on your standing desk

#

big brain

lethal coral
lost matrix
# lethal coral bump

Custom entity behavior = nms implementation.
There are some tricks you can try instead:

  • Mount it on an ArmorStand
  • Set its rotation on every tick (ugh)
  • Modify outgoing rotation packets. This will result in the boat rotating only server-side
lethal coral
# lost matrix Custom entity behavior = nms implementation. There are some tricks you can try i...

Tried mounting it on an armor stand and that pretty much fixes it, but then I can't detect the boat going backwards because it can't. I'm already sending a Vehicle Move Packet with the yaw/pitch reset any time they give input, but it seems like the client still rotates the boat...? Not entirely sure, but here's the video:
https://cdn.discordapp.com/attachments/706186227493109860/1274892580844339272/2024-08-18_19-46-08.mp4?ex=66d4627d&is=66d310fd&hm=7429d0e3f2f43f9f51a5663c409a6f83b27a8d6705aa5558892d78cc067bfc36&

lost matrix
torn shuttle
lost matrix
lethal coral
#

unfortunately the client doesn't send the vehicle steer packets when your camera (set via camera packet) isn't your own, which makes my goal of a third person camera impossible

#

however the client still sends boat information (paddles turning & vehicle move packets) if the camera is not its own

#

so I have to resort to boats to detect wasd input

lost matrix
#

Alright, sounds like the server doesnt need a boat at all? You could just send a packet to the client, making it think its on a boat, resulting in
the client sending steering packets, without an actual boat on the server that could rotate as a result.

lethal coral
#

the problem is the client thinking its on a boat will send flawed vehicle move packets which impacts the coordinates sent, making a certain part of the detection not work

#

unless I can get the boat to stop rotating

lethal coral
umbral flint
#

How do I disable the HikariCP logger?

I have already tried:

        Logger.getLogger("me.skinnynoonie.nooniemanagement.hikari.pool.PoolBase").setLevel(Level.OFF);
        Logger.getLogger("me.skinnynoonie.nooniemanagement.hikari.pool.HikariPool").setLevel(Level.OFF);
        Logger.getLogger("me.skinnynoonie.nooniemanagement.hikari.HikariDataSource").setLevel(Level.OFF);
        Logger.getLogger("me.skinnynoonie.nooniemanagement.hikari.HikariConfig").setLevel(Level.OFF);
        Logger.getLogger("me.skinnynoonie.nooniemanagement.hikari.util.DriverDataSource").setLevel(Level.OFF);
        try {
            this.dataSource.setLogWriter(null);
        } catch (SQLException e) {
            throw new RuntimeException(e);
        }

But it does not do anything, I still get these logs:

[17:18:47 INFO]: [me.skinnynoonie.nooniemanagement.hikari.HikariDataSource] HikariPool-5 - Starting...
[17:18:47 INFO]: [me.skinnynoonie.nooniemanagement.hikari.pool.HikariPool] HikariPool-5 - Added connection org.postgresql.jdbc.PgConnection@4fde8f16
[17:18:47 INFO]: [me.skinnynoonie.nooniemanagement.hikari.HikariDataSource] HikariPool-5 - Start completed.
torn shuttle
#

some people ought to think twice about what they're calling their services

torn shuttle
#

I guess I'm more generally talking to hikari and his <redacted> logger

umbral flint
#

It's because I'm shading it

torn shuttle
#

god past me is so good at writing api endpoints for no discernable reason

#

thanks past me

#

real nice of you

torn shuttle
#

I think md5 posted it on andrew tate's youtube accidentally

worthy yarrow
#

Is it possible for a non player to ever click an inventory?

drowsy helm
#

But yeah sounds weird saying around my non programmer friends lmao

umbral flint
#

I still don't understand how I can disable the logging

burnt oriole
#

hello, i had a plugin create dummies that i now cannot delete and here is the Entity data is someone able to help ?
this is the following entitiy data Training Dummy: Damage: 10 has the following entity data:
<"extra":[{"bold":false,"italic":false,"underlined":false,"strikethro
ugh":false,"obfuscated":false,"color":"red","text":"Training
Dummy: "},{"italic":false,"color":"yellow","text":"Damage:
10"],"text":"""')"

echo basalt
#

kill @e time

magic drift
#

Im learning java could anyone possibly send me a straight forward plugin i can look at

#

Like dm it to me

umbral flint
#

I remember when I didn't know OOP and Java, Bukkit's encapsulation was so confusing to me

burnt oriole
echo basalt
#

find the dummy's UUID and just nuke it from the world's entitydata folder

#

ezpz

quaint mantle
#

What particles can I use to outline a block with green effect? without glow

echo basalt
#

any that don't have uh

#

speed

#

so villager_happy for example

worthy yarrow
#

You're helping more than usual illusion 😄

echo basalt
#

I'm always helpful just not to you

worthy yarrow
#

Oh why's that

torn shuttle
echo basalt
#

Ok bro

torn shuttle
#

;-; I thought you were always helpful

blazing ocean
echo basalt
blazing ocean
#

whatd he do to you

echo basalt
#

I just don't like him

torn shuttle
#

illusion is a hater confirmed

#

no wonder chega won in his district

echo basalt
blazing ocean
#

💀

torn shuttle
#

perfect time to pitch my startup, it's an online platform that connects psychiatrists to chicken

#

I'm looking for a 3bil in funding at a 10bil evaluation

#

it's called eggcelent counselours

wet breach
worthy yarrow
blazing ocean
worthy yarrow
echo basalt
worthy yarrow
#

I was hoping for an uno reverse card or something 😦

burnt oriole
#

?pastebin

misty folio
#

Does anyone know how to make numberless scoreboard? 1.21 nms

burnt oriole
halcyon hemlock
#

good morning everyone

#

entity move event perhaps

glossy laurel
#

Guys, why does the warden not call EntityTargetEvent when it hears me??

torn shuttle
#

oh my god

#

I'm so fucking cooked

#

I thought today was monday

glossy laurel
#

oh god

#

rip

#

now ur gonna have to relive monday mornings twice

torn shuttle
#

I was wondering why people weren't showing up to work

glossy laurel
#

okay youre cooked even more

torn shuttle
#

guys I might be working too much

#

when did I even wake up

halcyon hemlock
#

did you go

#

also how does one pull that off bro

acoustic pendant
#

Hey, i'm trying to use adventure (a gradient) but it looks like this

#

Here's the code to deserialize it:

#
    public static String miniMessageParse(Player player, String input) throws NullPointerException {
        String message = getInstance().messages.getConfig().getString(input);
        if (getInstance().getServer().getPluginManager().getPlugin("PlaceholderAPI") != null)
            return miniStringParse(parsePlaceholderAPI(player, input));
        return miniStringParse(message);
    }```
#

<gradient:blue:dark_purple><b>Carbon Bag

#

Does someone know why this happens?

#

And it doesn't act as a gradient

blazing ocean
#

you need to enable hex colours in your legacy serializer

#

provided you use taht

acoustic pendant
#
    public static String miniStringParse(String input) throws NullPointerException {
        if (input == null)
            throw new NullPointerException();
        MiniMessage miniMessage = MiniMessage.miniMessage();
        TextComponent text = (TextComponent) miniMessage.deserialize(input);
        return LegacyComponentSerializer.legacySection().serialize(text);
    }```
#

Yea i do

#

however, how do you enable hex colors there?

blazing ocean
#
private static final LegacyComponentSerializer LEGACY_SERIALIZER = LegacyComponentSerializer
        .builder()
        .character('§')
        .hexCharacter('#')
        .hexColors()
        .useUnusualXRepeatedCharacterHexFormat()
        .build();
acoustic pendant
#

I'll try it, thanks

peak jetty
#

whats the event of when a player looks at the display name of an item in an item frame?

#

or whats the event of when an item frame gets rendered by the player

#

(basically i need to disable the display name of the item)

hybrid turret
#

can i update scoreboards async?

hybrid turret
#

You mean the display name?

#

@peak jetty

peak jetty
hybrid turret
#

set it to "" afaik

peak jetty
hybrid turret
#

try null?

eternal oxide
#

or a negative space

hybrid turret
#

idk if the display name is Nullable but i think so

tall dragon
#

nah iirc the item needs its default name

#

then it shows nothin

halcyon hemlock
#

mojang and spigot are fucking ass

#

holy shit

#

only reason java is gonna fucking plummet to the fucking ground

#

if it hasnt already

tardy delta
#

Try kotlin

pliant topaz
#

especially since 21

young knoll
#

They seem mad about something

halcyon hemlock
#

whether its their code or the protocol

#

unbelievable

young knoll
#

define standard

#

The protocol has a standard

#

Packet ID
Size
Payload

lost matrix
#

Their coding standards have gotten quite a bit better. Especially when it comes to the data-driven parts.

young knoll
#

Yeah

#

Registries are pretty standard now

#

Compared to 10 years ago when everything was magic values

halcyon hemlock
#

sometimes they start from 1 and sometimes from 0

young knoll
#

¯_(ツ)_/¯

#

Idk why int is used tbh

#

It’s only worth using if you expect to regularly have large values

hybrid turret
#

I just switched from a spigot server to a paper server rn just for performance reasons. I loaded my spigot plugin where I register a scoreboard via plugin for playtime using:

  private void registerScoreboardPlaytime() {
    Objective objective =
      this.scoreboard.registerNewObjective(
          "playtime",
          Criteria.statistic(Statistic.PLAY_ONE_MINUTE),
          formatColors("&" + this.getConfig().getString("playtimeTitleColor") + "Playtime")
        );

    objective.setDisplaySlot(DisplaySlot.SIDEBAR);

    List<OfflinePlayer> players = List.of(Bukkit.getOfflinePlayers());
    players.forEach(offlinePlayer -> {
      String offlinePlayerName = offlinePlayer.getName();

      assert offlinePlayerName != null : "Offline player name is null";

      Score score = objective.getScore(offlinePlayerName);
      score.setScore(Math.round((float) offlinePlayer.getStatistic(Statistic.PLAY_ONE_MINUTE) / 20 / 60));
    });

    Bukkit.getScheduler()
      .runTaskTimer(
        this,
        task ->
          Bukkit.getOnlinePlayers()
            .forEach(player -> {
              Score score = objective.getScore(player.getName());
              score.setScore(Math.round((float) player.getStatistic(Statistic.PLAY_ONE_MINUTE) / 20 / 60));
            }),
        0,
        60 * 20
      );
  }

now it updates the playtime each tick and counts it up. Everytime the schedular is called tho it resets to normal, why tf does it do that??

pseudo hazel
#

could it have to do with the fact that getOfflinePlayers probably also uses the online players?

hybrid turret
#

i mean this is only called onEnable

hybrid turret
#

just to display it

#

and updating is supposed to happen every minute

pseudo hazel
#

and this didnt happen on spigot server?

#

maybe ask in paper discord

hybrid turret
#

nope

#

yeah i might

late sonnet
hybrid turret
#

just did :)

late sonnet
#

Oh... Sorry xd

tardy delta
#

did they scold you?

glad prawn
#

Is there any way I can make the lava flow faster without using gamerules?

gentle inlet
#
Location look = player.getLocation();
Vector vec = look.getDirection();
player.setVelocity(vec.multiply(2.5));```

How can I make it so the player doesnt take fall damage from this?
gentle inlet
glad prawn
#

bro

#

im using Spigot

acoustic pendant
#

Hey, is there a way to avoiding players getting slowed down by soul sand?

gentle inlet
acoustic pendant
#

Hmm, i'll try to do that

smoky anchor
acoustic pendant
#

Do you guys know how much does soul sand reduce speed?

smoky anchor
#

info on wiki says "approximately 41.91%"

gentle inlet
smoky anchor
#

My idea for this would be:
Give player some flag using PDC
Schedule clearing of this flag in few seconds

Have event listener listen for player damage, specifically fall damage (I do believe you can differentiate it somehow)
And cancel the event if player has the flag set.

Don't exactly know what you're trying to achieve tho, so can't help more.

remote kernel
low field
#

would be my guess

gentle inlet
low field
#

EntityDamageEvent#getDamageSource

gentle inlet
low field
gentle inlet
low field
#

to check if the player is in water

gentle inlet
low field
#

but that eats performance so idk

remote kernel
# remote kernel Hello, anyone can help with this? :< https://imgur.com/a/GDWBHX3

Nevermind, it's bug (i guess) from PLIB - Writing to index 1 seems to have worked for me specifically for the player info update packet

before:

                    List<PlayerInfoData> playerInfoDataList = packet.getPlayerInfoDataLists().read(0);
                    packet.getPlayerInfoDataLists().write(0, modifiedLists);

after:

            
                    List<PlayerInfoData> playerInfoDataList = packet.getPlayerInfoDataLists().read(1);

        packet.getPlayerInfoDataLists().write(1, modifiedLists);

tardy delta
#

modify(Consumer<T>) when

sacred mountain
#

If i'm using mojang mappings, do my reflection methods etc still need to be obfuscated

#

or will maven do that

#

for instance SomeClass.class.getDeclaredField("a") as supposed to SomeClass.class.getDeclaredField("someReadableValue")

#

In the past i've never really used mojang mappings so the above example was my usual go-to

#

or if it makes more sense, my IDE complains with this:

#

Is there a way to make them compatible

slender elbow
#

your ide doesn't know about reobfuscation

#

you need to use the reobf names, yes

slate siren
#

In a pvp indoor area with world guard, when a player hits another player, LastDamager detects this in the fake death I coded and when the player dies, the kill is counted to the person who hit him.

#

But pvp is off

#

Will I control this by integrating the worldguard API? Or is there another way?

#

Hm

glad prawn
#

Is there any way I can make the lava flow faster without using gamerules?

sacred mountain
slate siren
#

In my plugin, I need to develop a solution that takes into account all situations such as pushing with a rod, hitting with a snowball/egg, dying with lava or fire and processes them in detail in order to determine the correct lastDamager according to the factors that caused the player's death.

For example, when I push a player with a rod, shouldn't the LastDamager be written to me when that player falls from a height and dies? But the system doesn't do this and this applies to everything above, I need to solve this problem

worthy yarrow
#

A what?

peak depot
worthy yarrow
#

Oh so it is a thing

peak depot
#

yeah

worthy yarrow
#

Is it literally called trial vault?

peak depot
#

yes

worthy yarrow
#

Interesting block huh

peak depot
#

key hole lived throu some tough shit

worthy yarrow
#

Anyways yeah probably playerInteractEvent and see if the block interacted with was a "trial vault"

peak depot
#

hey I was gonna write that

worthy yarrow
#

Too slow :p

peak depot
#

and since its an inv you can prob even check for inv open event and then check the type

#

wait is it even an inv?

#

im confused

worthy yarrow
#

It looks like a spawner sorta thing to me kek

river oracle
#

because its not a Menu

#

InventoryOpenEvent is a shittily named MenuOpenEvent

peak depot
river oracle
#

no its a loot table

#

they don't use Container for it internally

peak depot
#

yeah I didnt play that shit yet so I guessed

river oracle
#

not like Container is really indicative of anything anyways its just a fancy list wrapper

peak depot
#

and then I questioned my self

tardy delta
#

wheres the diff?

#

or does he mean that every token ever expires every 30s global time, even though you just created it?

young knoll
#

Appears so

#

“Every token ever” is expired every 30 seconds

hazy parrot
#

tf

rotund ravine
#

I mean

#

Oh well

sacred mountain
#

Creating a new entity with nms, keep getting ...Squid has not defined synched data value 16

#

trying to get SynchedEntityData with getEntityData()

#

Constructor<?> help = Squid.class.getConstructor(EntityType.class, net.minecraft.world.level.Level.class);

#

just for simplicity thats basically what i have

sacred mountain
#

all my problems would go

#

if this damn constructor was public

blazing ocean
#

and make it public

sacred mountain
blazing ocean
sacred mountain
#

effort

blazing ocean
#

considering they have examples and a guide on how to

sacred mountain
#

someone make it public and send me the jar

sacred mountain
blazing ocean
#

in my internal paper fork i made like most of nms public

sacred mountain
#

i should consider that

#

ehhhh okay maybe

#

maybe it's time to do that

#

My genius is insurmountable

#

im so tired

#

why did i even google that

blazing ocean
sacred mountain
#

turns out i have no clue how i did it

blazing ocean
#

anyway for paper support go to their discord

sacred mountain
sacred mountain
#

This is a craftbukkit

#

Change

#

nms whatever

#

not paper code

sacred mountain
#

yes

#

but i am literally changing one word

blazing ocean
#

i know how much you hate paper but it is way easier to patch

rough drift
sacred mountain
#

As in people who download it

#

i'll try find a way without the patch and then resort back to it if i have no luck

blazing ocean
#

you'll need reflection or some asm or bytebuddy fuckery

#

(accesswidener and mixins my beloved)

sacred mountain
#

why isnt it public anyway

#

kinda annoying

blazing ocean
#

in nms text displays every setting method is private

#

mojank devs when their ide says to make it private bc no usages:

sacred mountain
sacred mountain
#

erm

#

ok thanks mojang

blazing ocean
sacred mountain
#

!!!

#

!!!

#

!!!!!!

#

!!!

#

this is revolutionary

blazing ocean
#

kinda annoying

#

but w/e

sacred mountain
#

wgaat

#

i barely ever use private tbh

#

only for redundant things that i don't want clogging up my autocomplete

#

lmao

#

or fields

#

I have a feeling i'm being judged

#

stop judging me

blazing ocean
#

🗿

#

idk man you got four moyai reacts

#

you're getting judged real hard rn

rough drift
blazing ocean
#

you suck

blazing ocean
#

just saying

sacred mountain
#

Unacceptable

#

I won't do anything about it because it's funny

blazing ocean
sacred mountain
#

thats so me

blazing ocean
sacred mountain
#

also so me

#

How do i do i do i um um thingymajibby

#

whatchamacallit

subtle folio
#

help im trying to build a gradle project where does the jar go when I run jar 😭

#

WHERE IS ITTTT

paper viper
#

uhh context?

pseudo hazel
#

build/libs

sacred mountain
#

^^

pseudo hazel
#

I have this totally not nbt related reading logic, IJ cries about the while body being empty, is there a way to make it shut up?

                Node compound = new Node();
                
                while (readNextTag(compound));
                root.setStorage(name, compound);```
pseudo hazel
#

I dont need to

remote swallow
pseudo hazel
#

readNextTag is a class method which updates some offset variable, which is used to determine when its done or not

#

and I want it to continue until its done

sacred mountain
#

well put continue there

#

then

pseudo hazel
#

its like, do this function until it returns false

sacred mountain
#

or do like

#
  if (!variable) break;
}```
subtle folio
pseudo hazel
sacred mountain
#

what's so unclean about it

pseudo hazel
#

if I add a continue the IJ is crying about it being the only statement and therefor useless

sacred mountain
#

if it's your own method

#

look into completablefuture

pseudo hazel
#

why

#

what would that help me

sacred mountain
#

instead of waiting until a value is true you can like

#

use a callback

pure dagger
#

is it possible to store entire itemstacks with their meta in PersistentDataContainer?

sacred mountain
#

or something

pseudo hazel
#

well its not really waiting

#

its like waiting, but the updates are happening inside the function calls

#

like its waiting until x iterations

#

which depends on the data

sacred mountain
#

good place to use it then

pseudo hazel
#

like a byte array