#help-development

1 messages ¡ Page 580 of 1

chrome beacon
#

I don't want yet another chrome install on my pc

#

So I don't use gd

noble lantern
#

doesnt essential allow offline alts

#

nope

#

sadge

quaint mantle
#

👍

#

ive never tested with alts before

#

i just send it

#

never had a problem w that

chrome beacon
#

Test in prod 😎

quaint mantle
#

i dont think running as admin is the way to go

#

woah

#

okay so prism you say

#

css

glad prawn
#

Try set version to 3.17.30 xd

noble lantern
#

are these repos even up anymore

#

i wonder lemme check

young knoll
#

The Mojang repos?

#

Yes

noble lantern
#

seems good to be unless this build task fails

#

update: it didnt

#

try invalidating your intellij caches possibly

young knoll
#

If Mojang repos weren’t still up everything would break

#

Lul

noble lantern
#

file -> invalidate caches

noble lantern
#

on modern versions *

#

or i mean PlayerProfile which is essentially same thing just the non mojang version of it

orchid gazelle
#

Hello^^ Does anybody have an idea why im getting [ERROR] Failed to execute goal on project LoopCityScript: Could not resolve dependencies for project de.dafeist.loopcityscript:LoopCityScript:jar:1.0.0: org.spigotmc:spigot:jar:remapped-mojang:1.20.1-R0.1-SNAPSHOT was not found in https://hub.spigotmc.org/nexus/content/repositories/snapshots/ during a previous attempt. This failure was cached in the local repository and resolution is not reattempted until the update interval of spigot-repo has elapsed or updates are forced since I tried to update to 1.20.1

young knoll
noble lantern
young knoll
#

Doesn’t mean mojang repos are gone

orchid gazelle
young knoll
#

What do ya think craftbukkit depends on :p

chrome beacon
orchid gazelle
orchid gazelle
chrome beacon
#

-U iirc

orchid gazelle
#

just pressing on "Update Project" gave me the error already

orchid gazelle
# chrome beacon -U iirc

[ERROR] Failed to execute goal on project LoopCityScript: Could not resolve dependencies for project de.dafeist.loopcityscript:LoopCityScript:jar:1.0.0: Could not find artifact org.spigotmc:spigot:jar:remapped-mojang:1.20.1-R0.1-SNAPSHOT in spigot-repo (https://hub.spigotmc.org/nexus/content/repositories/snapshots/)

chrome beacon
#

Did you use the remap flag when running BuildTools

orchid gazelle
#

I ran java -jar BuildTools.jar --rev 1.20.1

#

so no, no remap flag

#

is it necessary?

young knoll
#

Ur gonna need the remap flag for remapped

orchid gazelle
#

thats weird

#

it always worked without lol

young knoll
#

X

orchid gazelle
#

damn

#

it just took me 10 minutes to build spigot

#

more like 15

young knoll
#

Well now it will be faster

#

:D

orchid gazelle
#

why? lol

chrome beacon
#

No need to redownload things

#

A bunch of stuff will be cached

orchid gazelle
#

its running

#

oh indeed

#

its way faster

summer scroll
#

I'm trying to spawn a client-side armor stand on 1.20.1 but I got this error https://paste.md-5.net/ikewafozaw.cs, the code works fine on 1.19.4, anyone know why?

this.sendPacket(new ClientboundAddEntityPacket(stand), data.player());

private void sendPacket(Packet<?> packet, Player player) {
  ((CraftPlayer) player).getHandle().connection.send(packet);
}
young knoll
#

Did you remap to the wrong version

chrome beacon
#

^^

#

You need to remap for 1.20.1

summer scroll
#

I believe I did.

#

Oh nevermind

orchid gazelle
#

great thanks, my build is working now

summer scroll
#

LOL this is so embarassing

#

Sorry, it's 5:33 AM, haven't had any sleep yet.

quaint mantle
summer scroll
alpine swan
#

hey, i need to store very temporary data for a lot of entites, but I dont really know how to go about doing this efficiently

i could use a hashmap, but the entries wont be removed when the entity dies and so will eventually cause a memory leak (there is A LOT of entities in this case)

what could I use like a hashmap but that removes the key as soon as the entity disappears, or storing data directly on the entitiy (persistentdatacontainers are not an option in my spesific case)

chrome beacon
#

Use a Weak map

#

You can create a WeakHashMap

eternal oxide
#

what kind of Entities?

alpine swan
# chrome beacon Use a Weak map

will a weakhashmap instantly remove the key when the entity dies or will it wait to garbage collect stuff in the hashmap or what (idk how this works)

chrome beacon
#

Wait for GC

quaint mantle
alpine swan
young knoll
#

When it needs to

alpine swan
chrome beacon
#

Use pdc

quaint mantle
echo basalt
#

So yeah that's a Map<UUID, UUID>

#

where the key is the crystal id

quaint mantle
#

or nms thingies

echo basalt
#

And the value is the player id

eternal oxide
#

add NBT-API and store on the Entity (as you can;t use PDC)

ivory sleet
#

but like a weak hash map wont hold strong references to the entries, thus not preventing gc from marking the objects and sweeping them

quaint mantle
#

where the hell is the remove packet

echo basalt
#

ClientboundRemoveEntities

ivory sleet
#

You can also use a soft hash map

#

(with guava)

quaint mantle
#

ohh its an entity id list alr

chrome beacon
#

Weak references is what you want in this case, no?

ivory sleet
#

yeah id assume so

alpine swan
ivory sleet
#

then weak myea

#

or I mean, u monitor the map explicitly

young knoll
#

You could use the death event

ivory sleet
#

and yeet them when they die

chrome beacon
#

So why can't you use pdc or nbt directly

alpine swan
alpine swan
#

i dont really know how NBT works

ivory sleet
#

yeah why not pdc, nbt or even metadata (if persistence is not needed)

#

u dont have to touch nbt

young knoll
#

Metadata will still leak

ivory sleet
#

spigot has api for it

#

:)

eternal oxide
#

a Crystal is a TileEntity so has PDC

alpine swan
#

ive heard people say that metadata has leak issues

young knoll
#

It’s a normal entity

#

(It does still have pdc tho)

ivory sleet
chrome beacon
ivory sleet
#

^

young knoll
#

You need to remove it

#

But there’s no death event so… yeah

#

EntityExplodeEvent probably triggers tho

eternal oxide
#

ok not a tileentity, still an Entity though, ALL have PDC

young knoll
#

Assuming you aren’t on legacy

#

🙃

alpine swan
#

i might just use a hashmap and manually check it

ivory sleet
#

prob what I would do tbh also

chrome beacon
#

You still haven't explained why you can't use pdc

#

Are you on 1.12.2 or smth

alpine swan
#

should the hashmap point to the crystal object, or its UUID, or what

eternal oxide
#

Theres many things to consder when using a Map

#

eg, a server crash/restart/reload

#

in all cases your Map will be empty but your crystals persist

chrome beacon
eternal oxide
#

I'd just use PDC and support back to 1.14

#

its a new plugin so you decide who can use it

#

make people update

flint coyote
noble lantern
flint coyote
#

no I wanna hear some of those sounds to figure out which one fits the best

#

Like a webpage with some mini-mp3-players

#

Thought there might be one

noble lantern
#

ohhh i see

#

ngl good plugin idea

#

i can prolly spin it up in a day if you want to

#

make it a gui

eternal oxide
noble lantern
#

damnit

flint coyote
#

Yes. But those aren't all sounds :(

eternal oxide
#

google?

flint coyote
#

I think a plugin like that would be quite helpful for development @noble lantern . You could aswell add some settings to change the pitch (or even the volume)

noble lantern
#

i can likely modify musepluse quickly to put & play the sounds in a gui and release it as a side fork

#

similar to this where each disc is a Sound enum

flint coyote
#

I do like the pitch feature though

noble lantern
#

ill make the middle button a pitch up /down feature

#

left click up right click down

flint coyote
#

could use F for a toggle for finer adjustments - like I do in a GUI for chances

quaint mantle
#

thats not the particle i want

#

is there any particle thats good as like a one point indicator

#

that stays in one place

#

doesnt fall down either

flint coyote
#

redstone_dust

#

can also be colored

young knoll
#

Redstone dust is great ^

quaint mantle
flint coyote
#

might have been renamed

quaint mantle
#

what data does it need

young knoll
#

DustOptions

flint coyote
#

alright so before Burchard is done with the sound test - any suggestions for a "you failed" sound? Like a higher pitched level up is for success

#

What's for failure?

quaint mantle
#

u could like

#

have the wither block break sound for failure

#

idk

chrome beacon
#

Anvil is usually used

flint coyote
#

there's a specific sound for wither block break?

chrome beacon
#

For menus

quaint mantle
quaint mantle
#

same as zombie door break thing i think

flint coyote
#

might use a high pitched tool break

quaint mantle
#

all i do is increment the y value on pos by 0.1 until its 1

flint coyote
#

you probably have a wrong function and therefore it's put in a line

quaint mantle
#

i mean the line is what i want

#

the spacing is weird

flint coyote
#

well it looks like you increase it by more each time

#

recheck your function

quaint mantle
#

yea thats weird

flint coyote
#

or post it here if you want me to take a look

quaint mantle
#
 public void tick() {
        if(highlightedBlock != null) {
            Location loc = getHighlightedBlock().clone();
            loc.add(0.5, 0, 0); // Center Bottom

            Particle.DustOptions dustOptions = new Particle.DustOptions(Color.fromARGB(0, 255, 0, 0), 1.f);

            for(float y = 0; y < 1; y += 0.1f) {
                getHighlightedBlock().getBlock().getWorld().spawnParticle(
                        Particle.REDSTONE, loc, 1, 0, 0, 0,
                        dustOptions
                );
                loc.add(0, y, 0);
            }
        }
    }
flint coyote
#

yeah you keep adding Y to the location but you use the Location from the previous loop run

quaint mantle
#

oh yea

#

smart

flint coyote
#

just loop ten times and always add 0.1

quaint mantle
flint coyote
#

or clone the location each time but that'll be worse in performance

#

yeah that's the easy way which is more work for the CPU^^

quaint mantle
#

fair enough

#

thats better

#

now what am i doing with this? no idea

flint coyote
#

Well you could still cache the world. That'll be mostly cosmetic but still^^

quaint mantle
#

imma calculate where the corners of a block are

flint coyote
quaint mantle
flint coyote
#

:)

#

what even is the name of the tool break sound? There's 300 "break" sounds x.x

quaint mantle
#

i do this here tho

public void tick() {
        if(highlightedBlock != null) {
            Particle.DustOptions dustOptions = new Particle.DustOptions(Color.fromARGB(0, 255, 0, 0), 1.f);
            Location loc = getHighlightedBlock().clone();

            for(int x = 0; x < 2; x++) {
                for(int y = 0; y < 2; y++) {
                    for(int z = 0; z < 2; z++) {
                        getHighlightedBlock().getBlock().getWorld().spawnParticle(
                                Particle.REDSTONE, loc.clone().add(x,y,z), 1, 0, 0, 0,
                                dustOptions
                        );
                    }
                }
            }
        }
    }
#

is there a better way than to clone it every time?

#

i mean there is but that would be alot more of code no?

flint coyote
#

shorter ain't always better

quaint mantle
#

well i get that but making it without cloning would mean i have to subtract everything again

flint coyote
#

Also it would not be a lot. Just create x,y,z and add it accordingly (can be done before you are in the most inner loop)

#

well no. You can start with
double x = loc.getX();
double y = loc.getY();
double z = loc.getZ();

and then inside your loops you just reset it by calling
y = loc.getY();

#

and do the adding obviously

#

or actually even simpler:
for(int x = loc.getX(); x < loc.getX()+2; x++) {
do that for all the loops and set x,y,z one by one right after the corresponding loop

#

for some micro optimization you can also cache the loc.getX()+2 part but JIT would optimize that for long loops anway

quaint mantle
#

that works

#

yea thats smart

#

thanks

flint coyote
#

now you don't even have to clone above since you don't change it

quaint mantle
#

oh wait oops

#

nooo my intellij crashed again

flint coyote
#

lol

tender shard
#

?

#

run mvn package to compile instead of build artifacts

fervent gate
#

I do that

jagged sky
#

I took a really big haitus off development; is this an okay Maven dependency config?

    <dependencies>
        <dependency>
            <groupId>org.spigotmc</groupId>
            <artifactId>spigot-api</artifactId>
            <version>1.20.1-R0.1-SNAPSHOT</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.mysql</groupId>
            <artifactId>mysql-connector-j</artifactId>
            <version>8.0.33</version>
        </dependency>
        <dependency>
            <groupId>org.xerial</groupId>
            <artifactId>sqlite-jdbc</artifactId>
            <version>3.42.0.0</version>
            <scope>compile</scope>
        </dependency>
    </dependencies>
#

Idk when does it shade, is the mysql connector shaded there?

#

This is my maven output:

sullen marlin
#

Spigot has the SQL drivers, they're not needed as dependencies

jagged sky
#

Oh? Does it support PostgreSQL as well?

sullen marlin
#

No

#

Just those two

jagged sky
#

Huh, well that's interesting, was that added within the past 2-3 years or was I just a dumb-dumb during my plugin dev time?

sullen marlin
#

No it's been that way forever

jagged sky
#

dumb-dumb during my plugin dev time
So it seems...

quaint mantle
#

2 am, if i code anything now it will be madness

jagged sky
#

woops

quaint mantle
#

writing the same code over and over again

#

forgetting loops exist

#

go to sleep

young knoll
#

What’s a loop

flint coyote
#

don't you know fruit loops?

quaint mantle
#

fruit loops are only good with marshmallows

flint coyote
#

you put marshmallows in milk?!

quaint mantle
#

fruit loops with marshmallows

flint coyote
#

never heard of that

#

not a marshmallow fan though

quaint mantle
#

they're not normal marshmallows

quaint mantle
young knoll
#

Peak satire is not being able to tell if real

noble lantern
quaint mantle
noble lantern
#

likely ill add some search feature as well to make it easier to naviate

#

cause its like 14+ pages of songs (and make it so mouse doesnt jump)

flint coyote
#

you should also display the current pitch somewehere and maybe make it adjustable how much you wanna step

#

besides that it looks cool already

noble lantern
#

yeah itll be displayed too dw

#

its has everything ready just didnt display it cause i need food :p

young knoll
#

I wish mc let you slow and speed them up too

#

That could be cool

flint coyote
#

pitch does increase speed

noble lantern
#

i wish mc let us play Sound's halfway through

#

would be big for musepluse

flint coyote
#

or decrease

young knoll
noble lantern
#

nah

young knoll
#

0/10

noble lantern
#

impossible to do that sadly

young knoll
#

With the api maybe

#

:p

noble lantern
#

it can hook into musepluse and play those :p

#

xD

flint coyote
#

I'm not sure what the lowest and highest pitch is though.
Also I feel like the pitch has steps. 0.7=1.0

noble lantern
#

yeah tbh idk max pitch either

#

its set to 1 as default for that plugin

young knoll
#

Actually no

#

There’s Registry.SOUNDS

flint coyote
#

I just tested a few values and 0.7 sounded exactly like 1.0. 0.5 was the same as 0.1

#

so ye idk the "steps"

noble lantern
#

hmm ill do some googling or source code diving once im back

young knoll
#

Although the registry contains enum values so probably not

noble lantern
#

when you play custom sounds its just a string

young knoll
#

Smh I blame @worldly ingot

noble lantern
#

fr

#

chocos fault

#

this should of been a thing long time ago

#

xD

noble lantern
young knoll
#

I mean I’m sure I could write the NMS code to get all sounds

#

But NMS :(

flint coyote
#

Feel free to polish it, take your time :)

#

Thanks for the quick response :p Makes looking for sounds a lot easier

young knoll
#

Play the ghast scream one on max volume

#

Trust me it’s good

noble lantern
#

it was only so quick cause i had like 85% of the code written out from musepluse, kinda just worked right out once i cut all the unused code out

And yeah i always found sound searching annoying too

#

ide have to find it again haha

young knoll
#

Filter button when

flint coyote
carmine mica
young knoll
#

Ah true they are only registered client side

noble lantern
#

okay fr this time bye bye

young knoll
#

I figured they were server side because they show up in /playSound tab complete

#

I forgot tab complete for vanilla commands is client side

#

Alright so we use log4jshell to read the clients resource packs

vestal sinew
#

Good night, I would like to ask for help from you. I started making a server on version 1.20, made a lobby, installed Velocity and an additional "test" server.
I've tried several plugins on NPCs to teleport to the "test" server from the lobby, but not one of them works, even Citizens.
How can I use the bukkit api to redirect it to the "test" server when the player clicks the pcm?
the Velocity dependency I imported into pom.xml

public class ServersTeleport implements Listener {

    @EventHandler
    public void onPlayerInteract(PlayerInteractEntityEvent event) {
        Player player = event.getPlayer();
        Entity entity = event.getRightClicked();
        if (!entity.getName().equals("Vanilla+")) return;
        
    }
}
young knoll
#

Afaik citizens NPCs don’t exist on the server

#

So that event won’t detect them

#

Doesn’t citizens have support for running commands now

#

So you can just have them run /server

vestal sinew
vestal sinew
young knoll
#

?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.

vestal sinew
young knoll
#

What command did you add

vestal sinew
young knoll
#

Try making it run /send <p> test

vestal sinew
#

or add a command to NPC

young knoll
#

To the NPC

#

Granted that’s a bungee command idk if velocity also has it

vestal sinew
#

The NPC works for other commands

young knoll
#

/server sends the person using it to that server

#

Obviously the NPC cannot be sent to the server

#

According to the citizens docs you can use /server if you use the -p flag

vestal sinew
young knoll
#

/npc command add -p server MyServerName

vestal sinew
#

😠

young knoll
#

that’s what the docs say ¯_(ツ)_/¯

#

Otherwise you’ll need a plugin that adds a /send of some sort to Velocity

vestal sinew
#

🤔

young knoll
#

Like I said

#

/server runs for the person executing it

#

It doesn’t allow you to target a specific player

#

/send does but velocity doesn’t seem to have that by default

vestal sinew
torn shuttle
#

getting custom models to display in-game is not fun

echo basalt
#

make your own model rendering engine

torn shuttle
#

at least I could use whatever models I'd want

small holly
#

Hey so I am wanting to send a packet to all players saying that player x has a different helmet on but still function on the server end as the armor that it is

public static void setHelmet(Player player, ItemStack helmetItem) {
    EntityPlayer entityPlayer = ((CraftPlayer) player).getHandle();
    // Create the packet
    PacketPlayOutEntityEquipment packet = new PacketPlayOutEntityEquipment(
            entityPlayer.getId(),
            3,
            CraftItemStack.asNMSCopy(helmetItem)
    );
    // Send the packet to the player
    for (Player playerLoop : Bukkit.getServer().getOnlinePlayers())
        ((CraftPlayer) playerLoop).getHandle().playerConnection.sendPacket(packet);
}

Currently have that but it keeps bugging out and sometimes wont show any of the armor and other times it just doesn't replace the helmet. any ideas why and how I can get it to work?

#

(1.8)

split gull
#

does PDC have some sort of file variant?

river oracle
#

no

#

NBT I suppose

#

if you use the JNBT library you can read and write with NBT which is what PDC is based off of

small holly
#

It has to be only visible i don't want it to be physically charged

vast ledge
#

there should be smth like setStage If im not mistaken

small holly
#

Could you please elaborate? Also it's 1.8 so might not be there

vast ledge
#

oh 1.8 gimme sec I'll read on the nms wiki

small holly
#

Open to using protocollib if needed

vast ledge
#

So here's what a quick search returned

        Entity entity = ((CraftEntity) npc.getEntity()).getHandle();

        DataWatcher data = new DataWatcher(entity);
        data.register(new DataWatcherObject<>(5, DataWatcherRegistry.a), (byte)1);
        CraftPlayer cp = (CraftPlayer) player;
        cp.getHandle().playerConnection.sendPacket(new PacketPlayOutEntityMetadata(entity.getId(), data, true));

then look at table 2 here, value 5
https://wiki.vg/Protocol#Player_Digging

small holly
#

And that'll allow me to set the item how exactly? Sorry on mobile currently so I might have missed something

vast ledge
#

I'm on mobile to xD

#

take a look at the spigot link

#

hes trying to do the same thing

small holly
#

But that's for updating the item in hand? I want to update the helmet to a virtual itsm

#

Hang on lemme get an example similar to what I'm doing

#

kinda like that

#

I am doing a similar thing

vast ledge
#

ohh

#

I miss understood the

#

then*

small holly
#

EnumWrappers.ItemSlot is 1.9

sullen marlin
#

?1.8

undone axleBOT
small holly
#

dw I wont be stuck here for long the dev for our cannon Jar is making a 1.20 version

torn shuttle
#

progress

#

man there is some weird stuff happening in the resource packs

#

it looks like I have to check for the file resolution manually? I think?

#

either that or the uv is always 1/4 of what blockbench outputs

#

still looking into that one

#

now we're cooking with kerosene

#

what a beautiful new "block", mojang if you're reading this it can be one of the 3 new blocks you add the next update for only $100k

shadow night
#

Mc education edition chemical element blocks be like lmao

torn shuttle
#

you wouldn't understand, it's deeply personal

glad prawn
#

Lol i also see it

torn shuttle
#

noooooo my art

#

this sucks

shadow night
#

Lmao

torn shuttle
#

no

shadow night
#

Tell me how you've done it and I'm remaking ic2

torn shuttle
#

it's going to be open source, free and have an api

#

custom models in mc

#

through spigot

#

yes

shadow night
#

Do it quicker, I need to make ic2

torn shuttle
#

closed alpha this weekend, open before the end of the month

#

no animations for now though

#

don't need them right now, it's coming later

shadow night
#

Is it atleast possible to dynamically change textures?

torn shuttle
#

you can do what I do and just replace the entity

shadow night
#

Sounds ok ig

torn shuttle
#

oh this isn't good

#

I think I need to read how large textures are to resize the minecraft uv

storm scaffold
#

Is there a way to simulate a player placing a block so all of the blockdata is correct? Stuff like what way the block is facing relative to what surface was clicked/direction the fake player was facing, and getting things like walls to be attached correctly?

obsidian plinth
#

would anyone know why a cuistom pack would only work in 1.19,2 for the custom items in it

#

but the rest of the pack works just the modles show as purple and black

vast ledge
#

A missing texture

#

just go intot the resourcepack and remove all other texture then the one ur using

obsidian plinth
#

but how owuld that make any sence if it works perfect in 1.192.2

#

but not .3 or .4

vast ledge
#

oh

#

yea

#

no

#

the protocols change between

obsidian plinth
#

(didnt mean to be rude)

vast ledge
#

those

obsidian plinth
#

so im just out of luck lol

#

this is what i get for trying to make my life easier

vast ledge
#

xD

#

you can see the changes that were made

obsidian plinth
#

ye imma just pay someone for that ngl

green plaza
#

How to shade dependencies into remapped jar?

chrome beacon
#

With the Maven shade plugin, just like you normally would

green plaza
quaint mantle
#

uhhh that doesnt seem like agood error

green plaza
quaint mantle
#

what dependency?

green plaza
#

org.joe.testplugin.core.item.CustomItem

quaint mantle
#

uhhh this isnt good either

green plaza
#

You also trying to use remapped

quaint mantle
#

yea i am

green plaza
#

What you trying to do?

quaint mantle
#

with remapped?

#

just tryna learn some stuff

#

?paste

undone axleBOT
quaint mantle
#

this is the full error

green plaza
#

Your plugin is trying to use class that it can not reach

quaint mantle
#

i fixed it?

#

some packages have the same name as an already existing package so i capitalized them and now it works ig

#

also my intellij keeps using 70% of my cpu and just crashing at random times, any1 know how i can fix?

green plaza
eternal oxide
#

Meanwhile zero issues with Eclipse and one of the lowest memory footprints of any IDE 🙂

quaint mantle
noble lantern
#

https://spark.lucko.me/wlGCuw3hbE

Is it me or do i not know how to use spark? (trying see what specific method call is causing a spike, but i dont see anything in the view)
Just says 93% of thread is Unsafe.park() calls (Even if its just running on its own)

eternal oxide
#

I prefer IDEs where nothing is behind a paywall

quaint mantle
#

same

#

thats why github student comes in clutch

eternal oxide
#

what the heck does "clutch" mean?

#

I'm old

quaint mantle
#

If something or someone comes in clutch it means they saved the thing they clutched

green plaza
#
Caused by: java.lang.ClassNotFoundException: bbn

After remapped it returns me this error dont know why

quaint mantle
#

It was first going wrong but he came in clutch

eternal oxide
#

um explaining a word using the same word doesn;t work 😦

green plaza
quaint mantle
eternal oxide
#

so clutch means good?

green plaza
#

y

eternal oxide
#

ok

chrome beacon
green plaza
#

<build>
<plugins>
<plugin>
<groupId>net.md-5</groupId>
<artifactId>specialsource-maven-plugin</artifactId>
<version>1.2.4</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>remap</goal>
</goals>
<id>remap-obf</id>
<configuration>
<srgIn>org.spigotmc:minecraft-server:1.19.2-R0.1-SNAPSHOT:txt:maps-mojang</srgIn>
<reverse>true</reverse>
<remappedDependencies>org.spigotmcspigot1.19.2-R0.1-SNAPSHOT🫙remapped-mojang</remappedDependencies>
<remappedArtifactAttached>true</remappedArtifactAttached>
<remappedClassifierName>remapped-obf</remappedClassifierName>
</configuration>
</execution>
<execution>
<phase>package</phase>
<goals>
<goal>remap</goal>
</goals>
<id>remap-spigot</id>
<configuration>
<inputFile>C:\Users\Michael\Desktop\ProfilSerwera\HypeProjectBukkit\plugins\hype-guilds.jar</inputFile>
<srgIn>org.spigotmc:minecraft-server:1.19.2-R0.1-SNAPSHOT:csrg:maps-spigot</srgIn>
<remappedDependencies>org.spigotmcspigot1.19.2-R0.1-SNAPSHOT🫙remapped-obf</remappedDependencies>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<configuration>
<source>16</source>
<target>16</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.2.4</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<createDependencyReducedPom>false</createDependencyReducedPom>
<outputFile>C:\Users\Michael\Desktop\ProfilSerwera\HypeProjectBukkit\plugins\hype-guilds.jar</outputFile>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
<resources>
<resource>
<directory>src/main/resources</directory>
<filtering>true</filtering>
</resource>
</resources>
</build>

<repositories>

//repos
</repositories>

<dependencies>
    <dependency>
        <groupId>com.comphenix.protocol</groupId>
        <artifactId>ProtocolLib</artifactId>
        <version>5.0.0-SNAPSHOT</version>
        <scope>provided</scope>
    </dependency>

    <dependency>
        <groupId>org.spigotmc</groupId>
        <artifactId>spigot</artifactId>
        <version>1.19.2-R0.1-SNAPSHOT</version>
        <scope>provided</scope>
        <classifier>remapped-mojang</classifier>
    </dependency>
    <dependency>
        <groupId>com.google.protobuf</groupId>
        <artifactId>protobuf-java</artifactId>
        <version>3.21.9</version>
    </dependency>
</dependencies>
#

<build>
<plugins>
<plugin>
<groupId>net.md-5</groupId>
<artifactId>specialsource-maven-plugin</artifactId>
<version>1.2.4</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>remap</goal>
</goals>
<id>remap-obf</id>
<configuration>
<srgIn>org.spigotmc:minecraft-server:1.19.2-R0.1-SNAPSHOT:txt:maps-mojang</srgIn>
<reverse>true</reverse>
<remappedDependencies>org.spigotmcspigot1.19.2-R0.1-SNAPSHOT🫙remapped-mojang</remappedDependencies>
<remappedArtifactAttached>true</remappedArtifactAttached>
<remappedClassifierName>remapped-obf</remappedClassifierName>
</configuration>
</execution>
<execution>
<phase>package</phase>
<goals>
<goal>remap</goal>
</goals>
<id>remap-spigot</id>
<configuration>
<inputFile>C:\Users\Michael\Desktop\ProfilSerwera\HypeProjectBukkit\plugins\hype-guilds.jar</inputFile>
<srgIn>org.spigotmc:minecraft-server:1.19.2-R0.1-SNAPSHOT:csrg:maps-spigot</srgIn>
<remappedDependencies>org.spigotmcspigot1.19.2-R0.1-SNAPSHOT🫙remapped-obf</remappedDependencies>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<configuration>
<source>16</source>
<target>16</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.2.4</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<createDependencyReducedPom>false</createDependencyReducedPom>
<outputFile>C:\Users\Michael\Desktop\ProfilSerwera\HypeProjectBukkit\plugins\hype-guilds.jar</outputFile>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
<resources>
<resource>
<directory>src/main/resources</directory>
<filtering>true</filtering>
</resource>
</resources>
</build>

<repositories>

//repos
</repositories>

<dependencies>
    <dependency>
        <groupId>com.comphenix.protocol</groupId>
        <artifactId>ProtocolLib</artifactId>
        <version>5.0.0-SNAPSHOT</version>
        <scope>provided</scope>
    </dependency>

    <dependency>
        <groupId>org.spigotmc</groupId>
        <artifactId>spigot</artifactId>
        <version>1.19.2-R0.1-SNAPSHOT</version>
        <scope>provided</scope>
        <classifier>remapped-mojang</classifier>
    </dependency>
    <dependency>
        <groupId>com.google.protobuf</groupId>
        <artifactId>protobuf-java</artifactId>
        <version>3.21.9</version>
    </dependency>
</dependencies>
#

I dont think so its wrong

#

every version match

#

Same server version is also 1.19.2

#
[11:53:14] [Server thread/INFO]: Starting minecraft server version 1.19.2
[11:53:14] [Server thread/INFO]: Loading properties
[11:53:15] [Server thread/INFO]: This server is running CraftBukkit version 3610-Spigot-6198b5a-19df23a (MC: 1.19.2) (Implementing API version 1.19.2-R0.1-SNAPSHOT)
eternal oxide
#

why .2 and not .4?

#

also use paste. No one is goign to read that spam

#

?paste

undone axleBOT
green plaza
eternal oxide
#

why have you added an inputFile to the confiuration of speciasource?

#

?nms

eternal oxide
#

change it back to what it shoudl be]

#

<inputFile>${project.build.directory}/${project.artifactId}-${project.version}-remapped-obf.jar</inputFile>

green plaza
#

Okay boss, done

eternal oxide
#

are you suppoed to be shading core?

green plaza
eternal oxide
#

ok

#

then so long as you are using the same 1.19.,4 in every place in yrou pom it looks ok to me

green plaza
#

I'll try with .4 instead of .2

eternal oxide
#

one oddity, why are you using parent? is this a multi module project?

dawn plover
#

hey, a question about the best way to code something
Because plugins dont really have a gameloop but more of Tasks that need to be run/scheduled

I want to make a random player generator, but instead of just returning a player instantly, i want it to have an animation
(by first generating an x amount of false players, and then eventually generating the random player that has to be returned/is the real selected one)

this animation between the false random players is always the same (just a particle going from player A to player B)
anyway, i was wondering what is the best way to implement this
Should i make a gameloop by doing a scheduleAsyncRepeatingTask(.. , .. , 0 ,1)
Or should i recursively call the scheduleAsyncDelayedTask() (every task will be one random new player, the last one would be the real one)
also, is it posible to return a task like this with any type, (so in this case a player)
Or should i save these values inside a object thats accasable from outside this task aswell

eternal oxide
#

open it as a zip and see what you shaded by mistake

green plaza
#

Oh wait i fucked up now cuz engine still .2

eternal oxide
#

each module that uses nms needs it's own specialsource

green plaza
eternal oxide
#

and it must use the correct inputFile

#

don;t make any changes to the default inputFile

green plaza
#

to 1.19.4

tacit drift
eternal oxide
#

but you did fix the inputFile back to what it shoudl be?

eternal oxide
#

then no other module shoudl have a specialsource, they shoudl use spigot-api not spigot

mellow pebble
#

?paste

undone axleBOT
dawn plover
mellow pebble
#

it is because of background

green prism
#

Are player's attributes permanent?

green plaza
eternal oxide
#

server has to be teh same version you are building for

icy beacon
#

thanks illusion, as I mentioned I'm just starting with futures haha, now I get it

#

ty

noble lantern
#

So, according to the author of the FFMPEG Wrapper for Java this call is supposed to be a blocking call. So I throw it into the CompletableFuture (This thread pool is a newFixedThreadPool with runtimeCores * 2 as the size). Logs are indicating the calls are happening off the main thread, however, I'm just getting horrible tick drops when this method is called without any major CPU usage (That I can see in task manager at least)

Would this possibly just be FFMPEG Wrapper doing something funky in the background with the binaries, or am I not supposed to hold blocking calls in CompletableFutures? (Ik I should probably ask the author of that lib but thought ide see if anyone had any ideas first) and err ignore that command its leftover

silent steeple
#

p.sendMessage(main.getConfig().getString(ChatColor.translateAlternateColorCodes('&', main.getConfig().getConfigurationSection("faction-locale").getString("provideFactionName"))));

how come it just sends a blank space in the chat, my config

faction-locale:
provideFactionName: "&cYou must provide a faction name."
playerAlreadyInFaction: "&cYou cannot create a faction while in another faction."

eternal oxide
glad prawn
young knoll
#

You should only be translating the returned string

#

Not the string you pass as a key

noble lantern
mellow pebble
#

first time working on 1.20 before i only worked on legacy

tacit drift
eternal oxide
eternal oxide
#

mine was mostly to convert to WebM

dawn plover
mellow pebble
tacit drift
#

store the task in an object

glad prawn
silent steeple
noble lantern
silent steeple
#

ur solution did the same thing

glad prawn
#

But u did stupid way

mellow pebble
silent steeple
#

does it correspond to ur game version

mellow pebble
#

yup

silent steeple
mellow pebble
#

<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>spigot-api</artifactId>
<version>1.20-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>

eternal oxide
silent steeple
#

thats weird

#

ur problem is that

#

org.bukkit.scoreboard.Criteria can not be found

mellow pebble
#

yeah i see

silent steeple
#

try this

#

val objective: Objective = scoreboard?.registerNewObjective("scoreboard", "dummy", "scoreboard objective") ?: return

green plaza
mellow pebble
silent steeple
#

the way ur doing it doesnt even exist

eternal oxide
#

you can;t be including your modules correctly then

mellow pebble
silent steeple
#

what is your server jar

green prism
#

How can I double hearts using :

victim.getAttribute(Attribute.GENERIC_MAX_HEALTH)
mellow pebble
silent steeple
#

try using the exact same version as ur pom.xml

#

use build tools

young knoll
#

Your server jar is definitely not 1.20

mellow pebble
#

1.20.1

young knoll
#

net.minecraft.server.v1_8_R3.PlayerList

silent steeple
#

yeah hes using 1.8 lol

young knoll
#

1_8_R3 is definitely not 1.20.1

mellow pebble
mellow pebble
silent steeple
#

no not ur version. the server

#

version

#

use build tools man

#

i know where u got it from charon

mellow pebble
#

i know im not running on 1.8

#

that is not my server version

#

100%

silent steeple
#

the server doesnt lie

green plaza
#

?paste

undone axleBOT
mellow pebble
young knoll
#

The logs do not tell a lie

mellow pebble
#

yes

#

Starting minecraft server version 1.20.1

silent steeple
#

?paste the error again

undone axleBOT
glad prawn
mellow pebble
#

now i dont have that error now i have error on start of the server

#

give me a second

silent steeple
#

how do new errors appear

#

like what

mellow pebble
silent steeple
#

surround 1.20 in ""

mellow pebble
#

it is on top of the cmd just when server starts

silent steeple
#

in the plugin.yml

mellow pebble
#

done

green plaza
silent steeple
#

ok and how did u not get this error before charon

mellow pebble
#

new error

mellow pebble
young knoll
#

You are doing new MainClass() somewhere

silent steeple
#

yeah

#

what he said

young knoll
#

You can’t do that, use DI

#

?di

undone axleBOT
eternal oxide
mellow pebble
green plaza
glad prawn
#

Show yo code

eternal oxide
#

I'm betting on you have a specialsource incorrectly configured in a module it shoudl not be in

green plaza
#

Should i put it as in the whole project?

eternal oxide
#

what?

green plaza
eternal oxide
#

specialsource shoudl ONLY be in the module which is using nms. nowhere else

green plaza
#

And its here, module core is using

        <dependency>
            <groupId>org.spigotmc</groupId>
            <artifactId>spigot-api</artifactId>
            <version>1.19.4-R0.1-SNAPSHOT</version>
            <scope>provided</scope>
        </dependency>
eternal oxide
#

no thats api

#

thats not using nms

silent steeple
#

you must use spigot

#

remapped

eternal oxide
#

the module using spigot is the one using nms

green plaza
silent steeple
#

what

eternal oxide
#

specialsource should only be in the module pom thats using remapped

zealous osprey
eternal oxide
#

?paste all your poms

undone axleBOT
green plaza
eternal oxide
#

remove outputfile entry from shade configuration in module core

green plaza
#

done

#

Anything else?

eternal oxide
#

checking

#

so core operates as it's own plugin?

green plaza
eternal oxide
#

do you have a depend in your plugin.yml for core?

green plaza
#

Yes

eternal oxide
#

ok try with just the outputFile entry removed

#

the rest looks fine

green plaza
#

big test

#

I have bad info for u

eternal oxide
#

?paste GuildHeart.java

undone axleBOT
green plaza
#
        this.heart = new PersonalNPC(npcManager, guild.getOwner().getPlayer(), guild.getTag(), heartLocation);

This is 26 line

eternal oxide
#

?paste PersonalNPC

undone axleBOT
chrome beacon
#

Which jar are you using

green plaza
eternal oxide
#

oh

chrome beacon
#

Yeah that's not the one you want

green plaza
#

XDD

#

Which one?

chrome beacon
#

Use the one with the regular name

green plaza
chrome beacon
#

Top one

green plaza
#

If it'll work i will paypal you 5$

eternal oxide
#

I didn;t even consider he was using the wrong jar 🙂

#

Fixes we did needed to be done anyway 😉

shadow night
#

What even is the difference between all those jars

green plaza
#

omfg

#

It works

#

Olivo if u want your 5$ give me paypal

eternal oxide
#

for use in testing servers

chrome beacon
chrome beacon
shadow night
eternal oxide
#

ie, before reobfuscating, before shading etc

shadow night
#

I never used any jars besides the normal one

green plaza
#

I thought is remapped-obf because when i decompiled it it looked completly fine

eternal oxide
#

(normal) is the only one you should use

shadow night
#

Makes sense

eternal oxide
#

unless you are running a deobf test server

shadow night
#

You wouldn't want to use a half-way assembled jar lol

green plaza
#

Now because i dont want to mess this up can i move this normal .jar into plugins? Because i am running server in IntelliJ so i prefer to not move this file everytime to plugins folder

chrome beacon
eternal oxide
#

there is a proper way to distribute teh jar

chrome beacon
#

?nms

eternal oxide
#

alex has a link to show you how to do it properly ^

noble lantern
#

actually hitting myself over the head rn + thank you :))

shadow night
chrome beacon
#

Hm I thought that guide showed how to change output dir

chrome beacon
shadow night
green plaza
#

okay thanks

#

FInally now i can eat dinner

hybrid spoke
green plaza
#

THanks ❤️

noble lantern
quiet ice
#

Yeah, I'd get rid of that onComplete CF

echo basalt
#

I'd return the future

quiet ice
#

Just return your CF#runAsync CF and the consumer can then call CF#thenRun

echo basalt
#

I don't understand your join either

quiet ice
#

Waits for the process to exit

#

Though I'd use waitFor instead

echo basalt
#

I'd return the process future

quiet ice
#

onExit would be J9 so if that is possible yeah, better call there

green prism
#

How can I add a bar of red hearts?

#
            player.getAttribute(Attribute.GENERIC_MAX_HEALTH).setBaseValue(40D);
            player.setHealth(40D);

Doesn't work at all

storm scaffold
#

Is there a way to simulate a player placing a block so all of the blockdata is correct? Stuff like what way the block is facing relative to what surface was clicked/direction the fake player was facing, and getting things like walls to be attached correctly?

ivory sleet
#

cuz that just sets the data

#

doesnt update visuals

#

which is why I think pppl still prefer setMaxHealth

worldly ingot
#

wot

#

setMaxHealth() just does player.getAttribute(Attribute.GENERIC_MAX_HEALTH).setBaseValue(40D); lol

#

That code should work fine

glad prawn
#
att.setBaseValue(att.getBaseValue() * 2);```
This will x2 default healths right?
ivory sleet
#

it may set normal health also

#

but ye shouldnt matter anyway since they're calling setHealth()

worldly ingot
#
    @Override
    public void setMaxHealth(double amount) {
        Preconditions.checkArgument(amount > 0, "Max health amount (%s) must be greater than 0", amount);

        getHandle().getAttribute(GenericAttributes.MAX_HEALTH).setBaseValue(amount);

        if (getHealth() > amount) {
            setHealth(amount);
        }
    }```
ivory sleet
#

na

worldly ingot
#

The difference being that Player does override this. Calls super and sends an update packet

#

WHAT DO YOU MEAN NAH?

ivory sleet
#

yea

worldly ingot
#

I just sent you the implementation KEKW

ivory sleet
#

exactly

#

it sends a packet also

ivory sleet
worldly ingot
#

Someone should expose the sendHealthUpdate() method

ivory sleet
#

true dat

worldly ingot
#

It's gonna have to be me isn't it?

ivory sleet
#

🥲

final monolith
#

how to add a install a dependency without pom.xml to maven?

worldly ingot
#

You can install it to your local Maven repository via CLI command

green plaza
#
java.lang.ClassCastException: class net.minecraft.network.syncher.DataWatcher$Item cannot be cast to class net.minecraft.network.syncher.DataWatcher$b (net.minecraft.network.syncher.DataWatcher$Item and net.minecraft.network.syncher.DataWatcher$b are in unnamed module of loader java.net.URLClassLoader @1cf4f579)

Anyone have clue how using REMAPPED, get this field? No getter for it, when i try relection it return error above

#
    public static Int2ObjectMap<SynchedEntityData.DataItem<?>> getField(SynchedEntityData dataWatcher) throws NoSuchFieldException, IllegalAccessException {
        Field fField = SynchedEntityData.class.getDeclaredField("e");
        fField.setAccessible(true);
        return (Int2ObjectMap<SynchedEntityData.DataItem<?>>) fField.get(dataWatcher);
    }

e is the representation in the NMS

echo basalt
#

Why you need that?

#

There's a getAll method which returns a copy of it all

green plaza
green plaza
echo basalt
#

then just packDirty and move on

rough drift
dawn plover
#

is it posible to create a npc without adding all kinds of extra librarys or api's or someting

#

os just in vanilla spigot

eternal oxide
#

not without nms

dawn plover
#

ow :(

rough drift
#

I mean @dawn plover there is another solution... if you want but it's a complicated one lmao

First off, the server must be in offline mode, and you need to do the online mode check yourself
Second off, create and maintain a connection to the server using like localhost:25565 so that a player is created
Third off, you can now control that client

This is one way to make NPCs lmfao

green plaza
#
[15:09:08] [Netty Server IO #1/ERROR]: Error receiving packet 82

What is the packet 82 in 1.19.4?

green prism
eternal oxide
dawn plover
green plaza
rough drift
#

and check

green plaza
rough drift
rough drift
green plaza
dawn plover
eternal oxide
#

Display Objective?

green plaza
eternal oxide
#

sec

#

in 1.20 it sthat, but 1.19.4 may be different

green prism
green plaza
#

Has this site any history or something?

#

EntityMetaData its probably this

eternal oxide
rough drift
green prism
rough drift
#

Player#damage(double)

green prism
#

wa

#

ty

green prism
rough drift
#

@green prism send the full method please and thank you

green prism
# rough drift <@350160924310634516> send the full method please and thank you
    public void onJoin(PlayerJoinEvent event) {
        String playerName = event.getPlayer().getName();
        Player player = event.getPlayer();

        if(Objects.equals(KingUtil.getKing(), playerName)) {

            player.getAttribute(Attribute.GENERIC_MAX_HEALTH).setBaseValue(40D);
            player.setHealth(40D);
            player.damage(0.00000001);


            if(!KingUtil.hasCrownBeenGiven()) {
                KingUtil.giveCrown();
            }


        }

        if(KingUtil.getFormerKings().contains(playerName)) {
            player.getAttribute(Attribute.GENERIC_MAX_HEALTH).setBaseValue(20D);
            KingUtil.removeCrownFromFormerKings();
        }

    }
rough drift
#

pause

#

don't

#

use player uuids

#

that way you can also just ==

green prism
#

I am using playerNames, Server is going to be offline mode

rough drift
#

Well we can't help people using offline mode, best of luck figuring it out! :D

green prism
#

lajnsdagina

#

Please lmao

green prism
#

It's not for me

rough drift
# green plaza what?

Yeah, at least from what I've heard/seen nobody really helps cracked server owners here.

#

I may be wrong.

green plaza
#

Why tho

green prism
rough drift
rough drift
green prism
#

I don't know if he's going to use an Offline or an Online Server

rough drift
#

Ask him

#

If he won't use online mode, don't bother.

green prism
#

Wow. Thank you

rough drift
#

Hey no problem, always happy to help! :>

green prism
green plaza
#

If i am using in my first module remapped version of spigot
Can i create diffrent module and use normal spigot with nms here?

chrome beacon
#

Yeah

#

Just don't load the wrong classes during runtime

#

I might have missunderstood what you tried to say but I assume you want multiversion support

#

Or do you want another module that you write unmapped nms in?

green plaza
chrome beacon
#

I don't see why people keep reimplementing npcs

#

Just hook Citizens? Many servers already have it installed

#

And the api is great

green plaza
#

I belive mine is better then citizin

#

Cuz u can apply day night tasks for npc

#

Create groups

#

And make them work like you eneter some RPG city

chrome beacon
#

I mean the actually npc itself not the behaviour

green plaza
#

Yea but the npc is the part of its behaviour

#

So its all in one

chrome beacon
#

?

green plaza
#

Just nevermind, can i do that?

chrome beacon
#

You don't need to design it like that though

green plaza
#

why

chrome beacon
#

And ensure they build in the correct order

green plaza
#

Okay thanks

fringe yew
#

how do i remove a specific value in a string list

e.g.
remove 'example_2' from this

example:
- "hi"
- "example"
- "example_1"
- "example_2"
chrome beacon
#

It's just a list so there are many way to do it

#

This is just basic Java?

green plaza
chrome beacon
#

Easier to just use removeIf

vital sandal
#

Minecraft chunks has around 65k blocks :l but when I try to get the number of block in a chunk is sent to player it is only about half of it

#

and it it not even stablize :l

#

may be I was wrong about how minecraft chunk work?

chrome beacon
#

Read on wiki vg

vital sandal
chrome beacon
#

It should tell you format

vital sandal
#

that is a packet for world gen^

vital sandal
hazy parrot
quiet ice
#

Chunks are no longer 256 blocks high starting from newer versions

vital sandal
quiet ice
#

or is the file just far too large?

vital sandal
wet breach
# vital sandal Minecraft chunks has around 65k blocks :l but when I try to get the number of bl...

I believe you read that wrong, it can contain at max 65,536 blocks, not that a chunk that is saved, generated or loaded actually contains that. Technicality wise it does contain that if you wanted to count the air blocks. Air blocks take up the majority of space in the world and chunks but the game and even the api typically doesn't count those by default unless you specifically look for air blocks.

vital sandal
#

there are lots of 0 0 0 values and 255

#

I don't know what that refer to

#

but I'm pretty sure that is not block id

wet breach
#

0 values are air

#

chunks are stored by columns

quiet ice
#

Also beware that the packet itself is paletted but I highly doubt you are reading the data raw

vital sandal
#

yeh it is the data raw

wet breach
#

so, we know a chunk is 16x16 right? well the chunk the way it is stored, is by columns in the chunk

#

so it will go from 0-255

#

in each section of the chunk

#

so there is 16 columns in a chunk

subtle folio
vital sandal
quiet ice
subtle folio
#

oh mb sorry

wet breach
vital sandal
#

16*16 isn't it?

quiet ice
#

There are 16 16x16x16 cubes in a chunk

chrome beacon
subtle folio
#

chunks are 8x8?

vital sandal
#

so it should be 256 col to be sure

wet breach
#

my bad my math was off, 64 columns

subtle folio
#

no that can’t be right

quiet ice
vital sandal
#

oh wait chunk is 8x8? or 16 by 16?

subtle folio
#

16

vital sandal
#

yeh so there should be 256 cols

subtle folio
wet breach
#

or 256, just woke up not long ago lmao, anyways point is

quiet ice
wet breach
#

chunks are not stored by layers using y as the height

#

this is inefficient, and instead its just a bunch of columns because this is also how MC sends chunks to the client

#

as columns as well

#

but this explains why you are using 0-255 a bunch of times

quiet ice
wet breach
#

this number refers to the block in the column

#

but anywhere there is a 0, its air

quiet ice
#

Note that blocks aren't stored with a size of 8 bytes

wet breach
#

but yeah chunks typically are not filled completely to the max with blocks it can handle

#

unless you purposely generated it as such

#

as I said, air blocks typically don't count but they do if you are looking for them

quiet ice
#

Additionally empty sections (the 16x16x16 cubes in a chunk) are skipped as frostalf alluded to before

vital sandal
#

that are packets the server send in a few seconds

#

there {"x":4,"z":5....} which refered to the chunk I believed

cinder abyss
#

Hello, how can I get the shaded version of spigot in my build.gradle ?

repositories {
    mavenCentral()
    maven { url 'https://hub.spigotmc.org/nexus/content/repositories/snapshots/' }
    maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
}

dependencies {
    ...
    compileOnly 'org.spigotmc:spigot-api:1.20.1-R0.1-SNAPSHOT'
}```The exact link is https://hub.spigotmc.org/nexus/content/repositories/snapshots/org/spigotmc/spigot-api/1.20.1-R0.1-SNAPSHOT/spigot-api-1.20.1-R0.1-20230624.072431-15-shaded.jar
wet breach
quiet ice
cinder abyss
cinder abyss
quiet ice
#

But why the hell do you want the shaded one when using gradle?

quiet ice
chrome beacon
vital sandal
cinder abyss
#

oh, how can I have nms (with gradle, I'll never go to maven)

wet breach
undone axleBOT
wet breach
#

so if you count the first occurrence of the number

vital sandal
#

the wiki said that the blocks is stored in the palette but found nothing

cinder abyss
chrome beacon
quiet ice
#

Though with gradle you are better off using paperweight

vital sandal
#

the only thing I got is this {"x":14,"z":25,"groundUp":true,"bitMap":31,"chunkData":{"type":"Buffer","data":[

chrome beacon
#

As for mappings you'll need to find an unofficial plugin or Paperweight

cinder abyss
eternal oxide
quiet ice
#

org.spigotmc:spigot:version

chrome beacon
cinder abyss
#

let google that

chrome beacon
#

No one said you need to include a file

quiet ice
#

Depend on org.spigotmc:spigot:1.20.1-R0.1-SNAPSHOT after using BT

#

Also you need the mavenLocal() repository configured

cinder abyss
#

well...

#

I'd better not use nms LUL

quiet ice
#

ideally you shouldn't, yes.

wet breach
#

basically it maps the blocks in a chunk to a number

#

so, starting at 1, it will see its stone, and anywhere it places a 1 should be stone

#

for example

#

and the bitmap is the block assignments to such numbers

vital sandal
#

still really confusing :l the wiki explain about global palette while I'm using chunkData

quiet ice
#

Where do you get your values from?

green prism
#

Hello there, how can I prevent an item from being dragged in another inventory?
This is my code so far:

    @EventHandler
    public void onInventoryDrag(InventoryDragEvent event) {
        Inventory draggedInventory = event.getInventory();
        if (draggedInventory.getType() == InventoryType.PLAYER) {
            Set<Integer> draggedSlots = event.getRawSlots();
            for (int slot : draggedSlots) {
                ItemStack draggedItem = event.getCursor();
                if (draggedItem != null && KingUtil.isCrown(draggedItem)) {
                    event.setResult(Event.Result.DENY);
                    break;
                }
            }
        }
    }
quiet ice
wet breach
livid dove
wet breach
#

have you ever had a coloring book where you colored by the numbers?

#

the pallete is the blocks and their associated numbers, and then you have an index with a bunch of those numbers like you see

#

and basically the pallette is how the server or client knows what blocks should be where in the chunk

livid dove
livid dove
#

xD

livid dove
wet breach
#

you are like the third person to state its been changed and you are not wrong 😛

livid dove
#

I'll be the first to be blunt then. Dont use the old version. Get away from those cursed runes and pull the band aid off now lmao

wet breach
#

lol

livid dove
#

I dont know if its a cancelable event

#

xD

quiet ice
livid dove
#

Trust me we had about half a month of pain before we got our version working lol

quiet ice
#

They seem to suffice

vital sandal
livid dove
wet breach
vital sandal
#

any better idea for that?

livid dove
quiet ice
livid dove
quiet ice
livid dove
vital sandal
livid dove
#

*These edge cases is one of the main reasons they switched to local palletes

wet breach
# livid dove Aye true. Tbh ive started dabbling with using the chunk format as a good archive...

combine this with memory mapping and you can load and save large swaths of data in seconds. I helped someone make a custom block loggin plugin for monitoring blocks placed by those in creative. Anyways, by using binary saving and a custom way to identify the sections of data like anywhere there is a - its new data for example combined with memory mapping, they were able to load I think it was 10-20mil blocks of information in 3 seconds and saved it in 6 seconds

livid dove
#

You'd be a damn hero

wet breach
livid dove
#

Even if they arnt

#

The general principle of it would be a nice step in the right direction

quiet ice
livid dove
quiet ice
#

Ah. I was talking about copy & pasting the wiki.vg impl

#

Sure, it's written in C#, but anyone with a brain can translate it to language X