#help-development

1 messages · Page 604 of 1

young knoll
#

That’s confusing

quaint mantle
#

what

young knoll
#

😩

quaint mantle
#

that wouldnt make sense?

#

Becuase doesnt the packet only expose the section initally and the column exposes the chunks?

young knoll
#

The packet is for the entire chunk

alpine urchin
#

moyoung

#

maybe calling the section chunk is confusing

quaint mantle
#

I now see that casting the chunk to this would expose the block pallete

alpine urchin
#

yeah

young knoll
#

Ah I need to cast it to the 1_18 version

#

Since not every version had a palette

ornate patio
#

how can i get the name of the potion

alpine urchin
#

yeah

ornate patio
#

for some reason the item meta getDisplayName is empty

young knoll
#

It doesn’t have a custom name then

alpine urchin
#

making wrappers can be really annoying and difficult sometimes

#

supporting many versions

ornate patio
quaint mantle
#

and my other issue was that how can I check when given an x, y, z if the chunk contains that?

since the getMethod always returns NotNull

umbral ridge
alpine urchin
#

what is that referring to

young knoll
#

Idk how potion names are determined tbh

#

Since the material is just potion

alpine urchin
#

potion types

#

exist

#

i think bukkit had two classes for it

#

you’ll find it

quaint mantle
#

Give unique plug-in ideas

umbral ridge
alpine urchin
#

make a bedwars plugin and let me sell it

#

add all features i request

#

my idea so

#

ours

umbral ridge
#

I might code it

alpine urchin
#

prayer plugin

#

oh wait i already made it

#

plugin that kicks if you don’t pay every few minutes

#

pray*

#

/pray <message>

umbral ridge
#

XD

alpine urchin
#

Amen

umbral ridge
#

nice xD

alpine urchin
#

i have a whatcolor’syourbuggati plugin

umbral ridge
#

I have an andrew tate plugin

alpine urchin
#

if you say i don’t lie

#

like

umbral ridge
#

randomly every night at 3 am you have to get out of minecraft bed and workout

quaint mantle
umbral ridge
#

kill 10 mobs

alpine urchin
#

it asks you the color of your bugstti

umbral ridge
#

XD

alpine urchin
#

you can start off by checking if the chunk column contains the global position

#

by using bitwise operations

#

int chunkX = x >> 4;

#

int chunkZ = z >> 4;

#

compare column x and z and make sure they are equal

ornate patio
alpine urchin
#

then it’s within that column

alpine urchin
ornate patio
#

no

alpine urchin
#

ok

ornate patio
#

name of the actual potion item

#

like "Potion of Swiftness"

quaint mantle
alpine urchin
#

i don’t get the question. but you now move onto chunk sections if you want to identify in which chunk section it is in

#

chunk sections go vertically

#

chunk columns are an x z region

#

chunk sections go upwards

#

are you following

quaint mantle
#

yes

ornate patio
#

is it possible to do the reverse

quaint mantle
#

is there a way to identify which Y corlates to a chunk section?

#

is it just Y / 16 = the index?

ornate patio
quaint mantle
umbral ridge
#

if they don't they get a slowness potion effect

#

and later on neusea or whatever its called

#

toilet would be a block on which player can sit

alpine urchin
#

let me open up my minecraft rewrite

#
int y = globalY;
y -= minHeight;
int chunkIndex = y >> 4;```
 is what i have
#

then you get the chunk section at that index

#

in the array

quaint mantle
#

ty ❤️

quaint mantle
umbral ridge
quaint mantle
#

Something good bro pelase 😭

umbral ridge
#

XD

quaint mantle
#

yeah im tryna recreate akumamc's private mine system

#

What’s akumamc

#

conceptually

umbral ridge
#

I have many ideas but I don't wanna share them

quaint mantle
#

PLEASE

umbral ridge
#

Ok only 1 idea which is pretty cool

#

WirelessLights

#

let me explain the concept

alpine urchin
quaint mantle
quaint mantle
alpine urchin
#

yeah

#

chunk sections have their own coordinates from 0-15

umbral ridge
#

by placing down a lever you have to also place down redstone lamps which you can turn off/on with that lever

alpine urchin
#

chunk columns are what you know as chunks

#

are x z

quaint mantle
#

fosho

alpine urchin
#

global is the locations

#

and we convert

#

but first confirm the location is in the chunk column

quaint mantle
alpine urchin
#

as i showed earlier

#

if it is, it must be in a chunk section

remote swallow
#

block pdc would be easiest

umbral ridge
quaint mantle
#

That’s not what I meant…

alpine urchin
#

hopefully the code works

quaint mantle
umbral ridge
#

I just haven't had time for it

remote swallow
#

i mean the file

quaint mantle
quaint mantle
umbral ridge
#

I'm working on something bigger

alpine urchin
#

@quaint mantle plus you’re in my discord server

quaint mantle
#

fosho yeah

remote swallow
#

storing it in a file would be painful, just use block pdc

alpine urchin
#

if you needed help why didnyou ask

umbral ridge
quaint mantle
#

I did ask and this guy gave me a really terrible overly complicated solution

#

with like caching chunks

umbral ridge
#

its not meant to be manually changed, its a data file

umbral ridge
#

or you can use JSON if you prefer it

quaint mantle
#

he sent me this

#

Pdc is not good

quaint mantle
umbral ridge
#

block pdc?

#

I think block tags get removed after a reload/restart

quaint mantle
#

It don’t exist on the superior Minecraft version, the version of god, the version of holy

umbral ridge
#

or whatever that is i've never heard of it

trail coral
quaint mantle
trail coral
#

its more annoying to test and shit

#

1.8 boots up in like 1.2 seconds

quaint mantle
#

Shout out to Minecraft 1 dot 7 to 1 dot 8

trail coral
#

i code on 1.12 tho

quaint mantle
quaint mantle
#

Which lever turns on which lamp

quaint mantle
umbral ridge
quaint mantle
trail coral
#

i played 1.0

#

its so shit ngl

#

notch is so ass

#

he has a skill issue

umbral ridge
#

redstone lamp can be turned "OFF" and "ON" by changing the block type

#

TURNED_ON or off

quaint mantle
trail coral
quaint mantle
#

bro my friend made a hack client for alpha minecraft

umbral ridge
quaint mantle
#

its so fdun to code on because u can litterly spawn in items

umbral ridge
#

each lever can have a set of lamps

trail coral
#

realistic electricity is so cool i should prolly make that

#

like a 1/5 chance of a lamp burning

quaint mantle
umbral ridge
trail coral
#

what are you trying to make?

quaint mantle
umbral ridge
#

its wireless

trail coral
quaint mantle
trail coral
#

if the chunks are loaded theres no problem

umbral ridge
quaint mantle
trail coral
#

how do tou make a chunk loader?

quaint mantle
quaint mantle
trail coral
trail coral
#

thank you sainte

#

🙏

umbral ridge
quaint mantle
#

Gotchu gang

quaint mantle
trail coral
#

i have a love and hate relationship with coding on legacy versions

#

sometimes its shit

trail coral
umbral ridge
quaint mantle
trail coral
#

ah thanks

quaint mantle
wary harness
#

so I got this problem
items stacks are same but I am getting total of 0

trail coral
#

and how do i get a chunk by location

trail coral
umbral ridge
trail coral
#

item is either null or isnt similar to the one youre looking at

wary harness
umbral ridge
#

I came up with this idea because I was starting to get pissed off in survival where i had to place torches everywhere

trail coral
umbral ridge
#

so

#

that would simplify it

quaint mantle
#

I think I’m good on allat it should be more useful then wireless lamps I am trying to create an impact

umbral ridge
wary harness
trail coral
#

simple as that

quaint mantle
#

Spexx what are the other ideas put me on 🙏

umbral ridge
trail coral
#

or the item i null

wary harness
umbral ridge
wary harness
#

those are two items which I am comparing

quaint mantle
#

😢

trail coral
#

that would be cool

umbral ridge
#

i though it would be cooler with a lever

#

it would make it look like a real house sort of

trail coral
quaint mantle
#

Anyone else got plug-in ideas

trail coral
#

ypu also are not debugging it at all

#

add a log for when u check whether its similar or not

wary harness
# trail coral do amount = amount+1
        ItemMeta meta1 = itemStack1.getItemMeta();
        ItemMeta meta2 = itemStack2.getItemMeta();

        if (meta1 == null && meta2 == null) {
            System.out.println("Item Meta: Same");
        } else if (meta1 == null || meta2 == null) {
            System.out.println("Item Meta: Different");
        } else {
            // Compare display name
            String displayName1 = meta1.getDisplayName();
            String displayName2 = meta2.getDisplayName();
            if (!displayName1.equals(displayName2)) {
                System.out.println("Display Name: Different");
                System.out.println("ItemStack 1 Display Name: " + displayName1);
                System.out.println("ItemStack 2 Display Name: " + displayName2);
            } else {
                System.out.println("Display Name: Same");
            }

            // Compare lore
            List<String> lore1 = meta1.getLore();
            List<String> lore2 = meta2.getLore();
            if ((lore1 == null && lore2 != null) || (lore1 != null && lore2 == null) || !lore1.equals(lore2)) {
                System.out.println("Lore: Different");
                System.out.println("ItemStack 1 Lore: " + lore1);
                System.out.println("ItemStack 2 Lore: " + lore2);
            } else {
                System.out.println("Lore: Same");
            }

            // Compare enchantments
            Map<Enchantment, Integer> enchants1 = meta1.getEnchants();
            Map<Enchantment, Integer> enchants2 = meta2.getEnchants();
            if (!enchants1.equals(enchants2)) {
                System.out.println("Enchantments: Different");
                System.out.println("ItemStack 1 Enchantments: " + enchants1);
                System.out.println("ItemStack 2 Enchantments: " + enchants2);
            } else {
                System.out.println("Enchantments: Same");
            }

            // Compare custom model data
            if(!meta1.hasCustomModelData()) {
                System.out.println("ItemStack 1 Custom Model Data: " + null);
            }
            if(!meta2.hasCustomModelData()) {
                System.out.println("ItemStack 2 Custom Model Data: " + null);
            }
            if(meta1.hasCustomModelData() && meta2.hasCustomModelData()) {
                int modelData1 = meta1.getCustomModelData();
                int modelData2 = meta2.getCustomModelData();
                if (modelData1 != modelData2) {
                    System.out.println("Custom Model Data: Different");
                    System.out.println("ItemStack 1 Custom Model Data: " + modelData1);
                    System.out.println("ItemStack 2 Custom Model Data: " + modelData2);
                } else {
                    System.out.println("Custom Model Data: Same");
                }

            }
            // Compare other meta attributes as needed
            // ...

            // Compare all other meta attributes
            if (!meta1.equals(meta2)) {
                System.out.println("Other Meta Attributes: Different");
            } else {
                System.out.println("Other Meta Attributes: Same");
            }
        }
    }```
trail coral
#

i aint reading allat

quaint mantle
#

Real wtf

quaint mantle
wary harness
wary harness
trail coral
wary harness
#

in debug

trail coral
quaint mantle
trail coral
#

bro add a log for when the .isSimilar() is ran

#

wtf

wary harness
#

if I do bukkit method isSimilar it returns false

quaint mantle
trail coral
#

its a problem with amount = amount +1

quaint mantle
#

Wait what’s the error let me take a look

#

Send

quaint mantle
#

Oh yeah that’s just a skill issue

wary harness
quaint mantle
#

Paste the code I’ll fix it

wary harness
#

I am counting how many of same items players has in there inventory

quaint mantle
#

Paste the code I’ll fix it

wary harness
#

which match item clicked in shop

#

so they can sell it

quaint mantle
#

Paste the code I’ll fix it

wary harness
#
        int amount = 0;

        for (ItemStack item : inventory) {
            if (item == null) {
                continue;
            }



            if (item.isSimilar(target)) {
                amount += item.getAmount();

                System.out.println(item);
                System.out.println(target);
            }
        }
        return amount;
    }```
quaint mantle
#

Paste its

wary harness
#

this is method which compares items

#

target is clicked itemstack

quaint mantle
#

Ok

hazy parrot
#

what is exactly problem

wary harness
#

well I am comparing two itemstack and they are not similar

quaint mantle
#

Show us how u are calling the method

quaint mantle
#

BUtils is redudant that’s all I can help you with bye

#

Jk can u paste the code I’m on phone I can’t really read it thanks

#

Real wtf

#

Work on ur OOP bud

#

How does it even accept that

#

Or does it implement ItemStack

wary harness
#

because it extands ItemStack

quaint mantle
#

extands isn’t a java keyword

#

He extended it he’s all good ‼️

#

Any unique plugin ideas

twin venture
#

Hi i have a problem and i dont think any one know how to fix it ..

remote swallow
quaint mantle
quaint mantle
wary harness
#

dosn't matter

#

I am only extanding it to be able to access methods from item stack

hazy parrot
#

also you are using paper, not spigot

remote swallow
#

make an item builder

#

you have a .build method which returns ItemStack

hazy parrot
twin venture
#

i have a plugin with load / save method for users data (uuid , kills , etc )

i have 2 servers using the same plugin same server version and same database detail my problem is its not loading the correct data if i use bumgeecord , velocity to connect to server

but if i joined server A

and left (it will save data) , and joined server B it will load the data , but if i use bungeecord , velocity to travel bettwen server it wont load it on 1 of them ..

#

i did add a delay to the load method (playerjoin event ) ..

wary harness
remote swallow
#

no it isnt

#

you shouldnt ever extend ItemStack

twin venture
#

i have been struggling with this for the last 3 days ..

twin venture
#

yes

wary harness
hazy parrot
twin venture
#

hm??

#

oky

hazy parrot
#

let it block on playerquitevent

#

you would need to block anyway in that case

twin venture
#

if i dont use a proxy such bungeecord ..
it will save and load data for both servers correcrly

#

whats the problem?

#

if i use a proxy it will not load the correct data on 1 server .. and the other will load , save data ..

#

using hickaricp

remote swallow
#

do what goski said

quaint mantle
#

Who got da unique plug-in ideas ‼️

umbral ridge
quaint mantle
#

No ‼️

umbral ridge
#

YES

#

It's time for a change

young knoll
#

If you ask it enough

umbral ridge
#

ChatGPT said that PlayerToilets is good idea

twin venture
#

for now iam doing this :

#

can that be the problem?

quaint mantle
#

Repeats himself and doesn’t

#

He’s just a 40iq person

#

Who read a book or some shit

#

Idk

wary harness
#

😅

#

I saw it long time ago in one plugin class was extanding ItemStack
and it was ItemBuilder class for mini game
So I was thinking it woked there it should work here to

#

but looks like that has big time problems with comparing items

quaint mantle
#

BROEKN EMBEBE ‼️‼️‼️

#

Laugh at that user

#

‼️‼️‼️

umbral ridge
#

hey

#

i gave you the plugin idea

#

shut up

#

xD

hazy parrot
quaint mantle
#

Idea was terrible plz give good ideas

#

Pull out the list

young knoll
#

Go make a free seasons plugin

quaint mantle
#

What is free seasons

remote swallow
#

a seasons plugin

#

thats free

ivory sleet
#

Make a plugin that allows load balancing

quaint mantle
#

What is seasons what does that mean

twin venture
remote swallow
#

you kmnow irl

young knoll
#

Seasons

quaint mantle
young knoll
#

Those things that exist on earth

remote swallow
#

spring, summer, autumn, winter

quaint mantle
#

Seasons irl

#

What would that do

young knoll
#

Change colors

quaint mantle
umbral ridge
#

actually one idea that might be good is the more items you have in inventory the slower you move

quaint mantle
young knoll
#

And make it snow in winter

#

And stuff

quaint mantle
#

Ohhhh

young knoll
#

Custom biomes

quaint mantle
#

That’s kinda cool

ivory sleet
#

Sainte maybe make a better model engine plugin

quaint mantle
ivory sleet
#

I mean what I said

quaint mantle
remote swallow
#

you

umbral ridge
quaint mantle
ivory sleet
#

?

quaint mantle
#

Or modes

#

Models

remote swallow
#

i dont fuck with?

young knoll
#

Neither does model engine

#

It’s an engine

quaint mantle
#

Engine for what

ivory sleet
#

You seem to not fw a lot of stuff :(

young knoll
#

Models

quaint mantle
#

Yeah can it just be something good

#

Not engines

young knoll
#

Gives several ideas

remote swallow
#

wants plugin ideas
doesnt fuck with any of them

young knoll
#

“No not those”

quaint mantle
#

They are ass 😭

ivory sleet
#

No lol

remote swallow
#

not to uss

#

just you

young knoll
#

Go uhh

young knoll
#

Make another join message plugin

ivory sleet
#

And load balancing is too hard?

young knoll
ivory sleet
#

model engine is too hard?

umbral ridge
remote swallow
#

i will fight you coll

#

pull up

quaint mantle
young knoll
#

Unique generally means

#

Not easy

quaint mantle
#

lol

#

That was an accident

remote swallow
#

you have 2 options

young knoll
#

If it was easy it would already exist :p

quaint mantle
wary harness
#

who needs plugin ideas

ivory sleet
#

Don’t spam useless threads sainte

wary harness
#

????

kind hatch
quaint mantle
remote swallow
#

fully unique is painful as balls and would be bug full
"unique" would already exist but you make it better and add more features

wary harness
#

😉

quaint mantle
#

I ain’t doing allat

ivory sleet
remote swallow
#

isnt that folia

kind hatch
#

Soooo, folia?

young knoll
#

Folia but not

ivory sleet
#

No

#

That’s just os threads getting mapped to regions

young knoll
#

The downside to a load balancing plugin is that it wouldn’t be seamless

remote swallow
#

multi paper then

ivory sleet
#

Since you probably will have to establish sockets between each node in the network

young knoll
#

Afaik you need to fake a world change to switch to another server

#

So it’ll never be seamless

ivory sleet
#

I mean yeah probably with spigot, was more thinking the traffic goes through the super proxy so for the user its seamless

young knoll
#

Even with bungee you have to do that

#

Or any proxy software

ivory sleet
#

I mean like, the backend servers can communicate how chunks and entities are gonna be ticked w/o telling the players

#

Once the logic is decided and processed, send it to the proxy and it sends it to the player

young knoll
#

I see

ivory sleet
#

It’s probably not easy at all

#

In fact its probably really hard

young knoll
#

Considering I’ve never seen even a big network do it I imagine not

ivory sleet
#

And Java is not the best tool for this either I suppose but yeah

#

Myea

young knoll
#

Well.. maybe I have seen a big network do it but it was seamless so I didn’t notice

#

:p

ivory sleet
#

:,)

torn shuttle
#

man I miss drinking soda

quaint mantle
#

Not this robot again

#

I am going to remove myself

#

Guys I have a plug-in that gives you 4 wood instead a log when u break a log, how do I make this extremely pay to win so I can profit

#

Or should I sell op for 5$ instead

lost schooner
quaint mantle
glossy venture
remote swallow
glossy venture
lost schooner
#

Wouldn't that just be onBreakBlock check if wood if wood drop 4 plank

#

Or whatever

glossy venture
#

yh

remote swallow
#

yeah

quaint mantle
quaint mantle
lost schooner
#

that's a little embarrassing if true

glossy venture
#

bro give me a setup gradle project and 5 min i can write it

quaint mantle
#

You are all just talk lmk when u actually write it

glossy venture
#

k

fresh timber
#

how can I get the player count of other servers on my bungeecord network in one of the servers spigot plugins. I'm using this for the lobby of my server. I'm showing the players in the lobby the player count of the other servers in the network.

river oracle
#

You'll need both a bungee and spigot plugin for this though

fresh timber
#

:/

#

why is this so difficult

river oracle
#

It's not

fresh timber
#

yea it is

#

ive tried that

river oracle
#

It should take like 15 minutes

fresh timber
#

gotta do all this output utcptcupi thingie and i have no idea what any of it means

river oracle
#

It's just a for loop

fresh timber
#

nah

#

its like all this plugin input output stuf

fresh timber
#

then how u do it

#

I tried it last time it was so confusing

river oracle
#

That's why plugin message channels exist

fresh timber
#

yea thats what I tried to use

river oracle
#

You don't have to touch netti

#

You shouldn't need to use packets

fresh timber
#

hm

river oracle
#

Just keep to the plugin message api

fresh timber
#

sense

#

yea

river oracle
#

What doesn't make sense

fresh timber
#

like what does this stuff do

river oracle
fresh timber
#

it says its registering the bukkit/bungee channel or smthin

quaint mantle
#

@glossy venture taking you long huh

#

I told you

river oracle
#

God your obnoxious Sainte

river oracle
turbid ridge
wild basin
#

I have a question

#

how can I edit a resource

#

on spigot

weary prairie
#

Hey I just started making plugins and everything was alright,no errors , the plugin is working in the server but it is not doing anything ( it is supposed to say "Block Broken" when block is broken but it doesnt)

quaint mantle
glossy venture
river oracle
fresh timber
quaint mantle
glossy venture
#

my intellij crashed on me twice

quaint mantle
glossy venture
#

u sure

quaint mantle
#

☹️

river oracle
#

Orby you bored or something

rough ibex
#

can you stop arguing and whining

glossy venture
#

yeah

#

wel actually

quaint mantle
glossy venture
#

i need to learn chemistry

turbid ridge
rough ibex
#

good lord

glossy venture
#

but who cares

#

nah its funny

river oracle
fresh timber
#

alr

young knoll
#

Don’t feed the trolls

turbid ridge
#

Damage entity packet issues

glossy venture
quaint mantle
#

Oh shir

#

Shit

#

What

#

How did you do it so fast

glossy venture
#

yeah ikr

quaint mantle
#

You definitely copied the code from the internet

glossy venture
#

im the fastest coder in the world

#

shit u caught me

#

yeah i copied ur code

#

wouldve taken me months

quaint mantle
#

Exactly don

#

Son*

#

Know your place

glossy venture
#

ima go learn abt covalent bonds and fucking salt now

fresh timber
quaint mantle
quaint mantle
glossy venture
#

you dont have to check

glossy venture
quaint mantle
#

Register the event lil bro

weary prairie
glossy venture
#

as sainte said u prob forgot to register ur events

#

show main clas

weary prairie
rare rover
#

For broadcasts on my server they will be ordered and will broadcast every 5 minutes, should I use a Deque for this?

glossy venture
#

nvm

turbid ridge
#

Ive never seen a lowercase classname low key didnt even know that was possible lmao

turbid ridge
weary prairie
#

tho not doing anything

turbid ridge
#

if you do /plugin does it show up green

kind hatch
glossy venture
#

u got the startup message?

weary prairie
glossy venture
#

did u replace your jar

#

with a new buiod

#

build

turbid ridge
#

Make sure your plugin.yml has the right main class if that isnt the problem

glossy venture
#

it would throw otherwise

#

wouldnt load

weary prairie
turbid ridge
glossy venture
#

so you will have to put that in your pom.xml

#

for now just go to target and copy the jar ig

weary prairie
#

i just watched a yt video and followed it so XD

glossy venture
#

to check if it works

smoky wasp
#

I've got gradle build script to auto copy plugin jar into debug server, saves a lot of hassle

remote swallow
weary prairie
glossy venture
remote swallow
#

look at the log

#

it isnt maven

#

its the ij build system

glossy venture
#

idk ive never used either

weary prairie
#

me = confused

glossy venture
#

try clicking the play icon in the top

remote swallow
#

press the play button here

weary prairie
#

done

#

thats the log

smoky wasp
#

jar looks replaced

remote swallow
#

now thats maven

weary prairie
#

so do i copy the thing that says "original" or the other one

fresh timber
weary prairie
#

eyyy it worked! Thanks!

potent ibex
#

is there any way to throw entity that player hit really high?

#
entity.setVelocity(entity.getVelocity().setY(10));
#

I tried using this, but it doesn't go as high as I wanted

drowsy helm
#

set the value way higher then

potent ibex
#

I did

#

like 100

#

but still the same

smoky wasp
#

maybe try

entity.setVelocity(entity.getVelocity() + 100);
drowsy helm
#

thats not how velocity works

smoky wasp
#

oh it needs to be vector

potent ibex
#

Well I'm trying to throw player or entity that is damaged up really high

drowsy helm
#

you can use multiply aswell

potent ibex
#

either using vector or somethng else

#

but seems like there is limitation to velocity's y-val
can't throw higher than 10

young knoll
#

I believe that’s a server side thing

#

Sadly

torn shuttle
#

is eye level actually eye level

#

or is it nametag height

drowsy helm
#

yeah pretty sure its exact eye level

#

like center of face

torn shuttle
#

hm ok

#

do mobs shoot from eye height?

drowsy helm
#

fuck

#

i dont think so

torn shuttle
#

well... they will when they're using my custom models I guess

umbral ridge
#

they shoot at 1.62 blocks in height

#

eg. skeleton

torn shuttle
#

always?

umbral ridge
#

yes

#

it's a constant

torn shuttle
#

what about ghasts?

drowsy helm
#

1.62 from base of mob im assuming

umbral ridge
#

only the velocity is changed and random

#

yeah

torn shuttle
#

ghasts too?

drowsy helm
#

ghasts start from their box

#

the tentacles arent part of the hitbox i think

umbral ridge
#

ghasts are bigger so its in the front, at the same height, 4 blocks out, 1.62 blocks from the bottom to top

torn shuttle
#

man this game

umbral ridge
#

what are you working on?

torn shuttle
umbral ridge
#

shooting tower?

torn shuttle
#

yeah

umbral ridge
#

Thats nice

#

so you're trying to make it shoot to nearby mobs?

torn shuttle
#

it already does

umbral ridge
#

so whats the issue

quaint mantle
#

How can I convert a spigot location x to a x relative to the chunk (0..15)

torn shuttle
#

I'm deciding how I want the model plugin I made to handle the eye height / hitbox / shooting point things

young knoll
#

Take the x and >> 4

#

Or is it << 4 I never remember

quaint mantle
#

no thats to get the chunk x

torn shuttle
#

I think modelengine is using eye location which is the pivot point (origin) of the hitbox

young knoll
#

Ah

umbral ridge
young knoll
#

Wait can’t you just % 16

umbral ridge
#

F is 15, 0x is a prefix for hexadecimal value

torn shuttle
#

hm

#

I might use meta bones to set shooting points

young knoll
#

Did you remake model engine for this :p

torn shuttle
#

it would be very fun it you could make a model that actually shoots from several points

torn shuttle
young knoll
#

Now make it open source and shadeable

#

:p

smoky wasp
#

eye height is interesting

smoky wasp
#

apparently it's always 85% of the entity height (if standing in normal pose)

torn shuttle
#

hm

young knoll
#

Aww no animations yet

#

Still, nice

#

I shall star

umbral ridge
smoky wasp
#

maybe that's where the pose comes into play

umbral ridge
#

But then also, is the eye location the same as the shooting location?

smoky wasp
#

that would make sense

umbral ridge
#

there are many factors to think about xD

#

I think the pose changes when ghast shoots and then it returns back to normal

#

so it halves the eye location I guess

smoky wasp
#

it looks like they hardcoded the eye height for ghast at 2.6 (standing pose)

umbral ridge
#

interesting

smoky wasp
#

different calculations for each mob, but those who shoot projectiles and are similar sized have similar shooting point

quaint mantle
#

In paper are commands ran on their own thread executor ?

smoky wasp
#

skeleton, witch, drowned

quaint mantle
#

im banned from paper discord

dull schooner
#

why isn't this working?

river oracle
quaint mantle
umbral ridge
#

they do run on their own thread executor separate from the main server thread

river oracle
quaint mantle
#

All the communities im in dont really support those ppl so we all set our pronouns as trolls and just forgot that specific servers see it

young knoll
#

“Those people”

river oracle
#

Lol

quaint mantle
#

and discord pronoun users

#

both!

#

frick discord pronouns

blazing flare
#

just get nitro if u dont want other servers to see

young knoll
#

Yes very edgy

quaint mantle
river oracle
#

News to me

quaint mantle
#

samee thing

young knoll
#

Your gender is being transed

#

Do not resist

river oracle
blazing flare
#

on topic to this channel though, is it possible to get the items "newly brewed" from the BrewEvent? I noticed that the results will also contain potions that were previously brewed but not removed.

river oracle
#

Though let me check

#

?jd-s

undone axleBOT
river oracle
young knoll
#

Brewing stands are awful

river oracle
#

Or since potions don't stack anyways PDC

young knoll
#

Run away from them

river oracle
young knoll
#

Probably a bit of both

#

They don’t support datapack recipes like all other blocks, which sucks

river oracle
#

I'll look when I get home

young knoll
#

They are basically stuck in 2015

river oracle
#

I need to finish one commission then I just wanna pr to spigot

young knoll
#

PRs are slow atm

#

I have 4 open :p

river oracle
#

MD5 no life spigot please 🙏

#

I'll donate 1 dollaw If u do 😢

young knoll
#

1/10th of a name change

quaint mantle
#

how can I get a block id from a nms BlockState?

river oracle
young knoll
#

Like the old legacy crap?

quaint mantle
#

fosho fosho im working with raw packets rn and I need to write the id

young knoll
#

Ah

#

Block.BLOCK_STATE_REGISTRY.getId

#

Iirc

river oracle
young knoll
#

Well

#

At least you won’t be hacked

river oracle
#

Yeah :*)

river oracle
#

My passwords are so secure I'm pretty sure my weak point is 2fa

#

Like I think it's less secure than just not having it

#

Unless you get token grabbed

quaint mantle
#

unless u get ss'd

#

or that

#

sim swapped*

river oracle
#

Oh yes I was reading

#

My very high iq book

#

Read to gain braincells

quaint mantle
#

Is this an expensive operation?

    val chunkX = packet.column.x shr 4
young knoll
#

What is shr

quaint mantle
young knoll
#

No

#

Shifting is fast

quaint mantle
#

kk

lost schooner
#

Why is my plugin reacting to 3 duplicate PrepareAnvilEvents every time I do something with an anvil

dull schooner
worldly ingot
#

Mix of tabs and spaces. Unusable

young knoll
#

no

worldly ingot
#

Egg

young knoll
#

Idk why egg was in my chat box

#

🥚

quaint mantle
#

Guys if im running blocks[player]?.get(Pair(x, z))?.filter { it.first.worldName == world } and the .filter thats its being called on goes through 500k entries will that be really terrible if im doing that every single time a chunk data packet gets sent

worldly ingot
#

I mean yeah probably. That's a lot of elements it will have to sift through

#

And not only that, comparing a string

#

So you have to compare 500,000 strings

torn shuttle
#

quick q

#

so I have this weird issue where my villagers don't seem to be saving their persistent data containers on crash

#

do these containers rely on a world save to be saved long-term?

#

scratch that I can't even find them when the world saves

#

man how is this happening

young knoll
#

Find them?

#

Where are you looking

blazing flare
# river oracle Is there anyway to improve the api or is this mojangs deal

The BrewEvent could just be expanded upon? Right now, it mixes the ingredient into the potion and if it cant, it returns the original potion. All you'd have to do is create a second arraylist, and add the potion to the list if it's different to what is already in that slot. Send both all and new brew results off with the event.

Besides that though, I think you could just rely on the blocks inventory as opposed to creating a cache? I mean, it essentially is it's own cache until the event is done.

lost schooner
torn shuttle
#

it should survive restarts right

#

on a villager

worldly ingot
#

yes but they're not saved to the world. entities are stored in a separate file in modern versions

#

entities.dat iirc

torn shuttle
#

alright any reason why the data wouldn't save if the server crashes?

worldly ingot
#

no idea. they're saved in the exact same way as all other entity NBT is

torn shuttle
#

it's not that tight, it could run for an hour with the entity there

#

and it will not recognize it on boot

#

ok... got it narrowed down to it only not working on startup

echo basalt
#

For starters I'd use the player's UUID instead of the object

#

What I do at work is have the user class as a sort of collection where I can put my own variables

#

Sometihng like

public class User {

  private final UUID playerId;
  private final Map<String, Object> data = new ConcurrentHashMap<>();

  public User(UUID playerId) {
    this.playerId = playerId;
  }

  public <T> T getData(String name, Class<T> clazz) {
    Object data = this.data.get(name);

    if(data == null) {
      return null;
    }

    if(!(clazz.isInstance(data)) {
      throw new IllegalArgumentException("Invalid data \"" + clazz.getSimpleName() + "\" for field " + name);
    }

    return clazz.cast(data);
  }

  public void insert(String name, Object object) {
    // Feel free to do type checks here
    this.data.put(name, object);
  }

  public Player getPlayer() {
    return Bukkit.getPlayer(playerId);
  }
}
#

And usage would go something like

ACUserData userData = user.getData("anticheat", ACUserData.class);
...
#

I'd also make a UserManager with default data values

#
public class UserManager {

  private final Map<String, BiFunction<Player, User, Object>> defaultValues = new ConcurrentHashMap<>();  

  private final Map<UUID, User> loadedUsers = new ConcurrentHashMap<>();

  public User createUser(Player player) {
    UUID playerId = player.getUniqueId();
    User cached = getUser(playerId);

    if(cached != null) { // WTF?
      return cached; // sanity
    }

    User user = new User(playerId);
    
    for(Map.Entry<String, BiFunction<Player, User, Object>> entry : this.defaultValues.entrySet()) {
      String name = entry.getKey();
      BiFunction<Player, User, Object> function = entry.getValue();

      Object result = function.apply(player, user);
      
      if(result != null) {
        user.insert(name, result);
      }
    }

    this.users.put(playerId, user);
  }

  public User getUser(UUID playerId) {
    return users.get(playerId);
  }

  public void registerDefaultData(String key, BiFunction<Player, User, Object> function) {
    this.defaultValues.put(key, function);
    // Feel free to loop over users and re-run the function
  }

  ...
}
#

At least that's how I'd do it

#

Feels a bit more scalable imo

#

But it's also more suitable for unstructured databases like mongo

#

So you'd run something like

registerDefaultData("anticheat", (player, user) -> new ACUserData(0))
#

And it'd create "empty" data for the anticheat

#

So you can skip null checks

#

But it's optional

#

Well your central hashmap would be gimmicky

#

First because it's a map where the value is also a map

#

And second because your time complexity would really suit your goals that often

#

Your structure's more optimized for "I want to get all the Anticheat data" rather than "I want to get all of ImIllusion's data"

#

Not really

#

Because you still have a map and buckets for each user type

#

It's just gimmicky

#

Seems like more cpu usage for less ram consumption

#

Except that ram is cheap and abundant

quaint mantle
#

how would one find out if something is lagging the netty thread

#

since that doesnt show on /tps

round finch
#

ofc because tps is server

wet breach
#

Unless you got something doing some kind of weird reflection in regards to how netty works which i highly doubt

quaint mantle
wet breach
#

Its possible but it really depends on your code. Generally when you intercept you want to just handle it all manually thus you need to do nothing more then remove it from the queue

#

There is only a few things where it may be necessary to let the packet continue

frosty geyser
#

Hi, currently using spigot-api version 1.19.4-R0.1-SNAPSHOT and I'm looking to get a inventory name when InventoryCloseEvent fires, I tried doing e.getView().getTitle() and tried sending it to the player and it only returns a blank line, I tried doing it with text as well and the text shows up, but not the actual title of the inventory. Yes it does have a custom name to it. When I open the block selector gui in creative mode it does return "Crafting" though

#

I have also checked online and they all say to use event.getView().getTitle();

#

Any help would be amazing

vital yacht
quaint mantle
#

well about 3k per packet and it updates for about 10 chunks maybe more

vital yacht
#

Based on your messages in PacketEvents and wanting to do a per-player block system, I would just cancel the original chunk send packet and send your own

quaint mantle
#

I finished it pretty much, I feel like that would the exact same would it not? (Some blocks in the chunk are bukkit's)

vital yacht
#

It wouldn’t because you wouldn’t be doing the looping on the netty thread, you would build the packet on another thread and then send it

quaint mantle
#

could I cancel this packet and then resend it on a dif thread? (Doesn't netty not support sending packets async from it threads)?

vital yacht
#

You’re sending it through PacketEvents aren’t you?

quaint mantle
#

Im not sending anything atm I do this, and in that function I modify the packet

quaint mantle
vital yacht
#

A better way to do what?

wet breach
echo basalt
#

So you'd have a "processing" queue with a thread pool going at it and once the packets have been modified you can send them straight through

wet breach
#

Netty uses thread pooling to queue packets. If you stop the queue no other packets in that queue on that thread can continue until your done doing whatever

quaint mantle
#

So packet events is pausing the item in the queue while I modify it? thus causing it to pause all other packets?

wet breach
#

This is why you would typically just cancel the packet ie remove it from queue do your processing needing to be done then resend packet

echo basalt
#

^ That's my idea

#

Have your own thread pool processing the fake chunks and cancel the original packet

#

Once the processing has gone through, you can add some sort of tag to ignore processing for the finished packet

wet breach
#

Pretty sure it should already have an id

#

Not entirely sure

wet breach
echo basalt
#

TCP should assign them an id but I doubt it's exposed

wet breach
vital yacht
#

You can make a wrapper class for the PacketWrapper and check instanceof

echo basalt
#

mhm that's crunchy I doubt it'll work

vital yacht
#

It will with PacketEvents

wet breach
#

Anyways back to tires for me. Hope the information was helpful uwu

echo basalt
#

See ya frosty

#

I'll be lurkin and helping people

quaint mantle
#

Thank yall so much for the help

alpine urchin
#

if you go with frostalf’s solution

#

we have a sendPacketSilently function

#

so you can process the stuff

#

cancel and send silently

#

avoid a stackoverflow

quaint mantle
#

What manages the queue?

vital yacht
eternal orchid
wet breach
eternal orchid
#

yes, ive updated all of my plugins, as well as removed them one by one to see which one would cause the kick, and it turns out to be my own plugin, which ive also updated to 1.20.1

#

all plugins show up as green, ive also tried both ProtocolLib 5.0.0 and the latest dev build, but the problem still happens

wet breach
#

Seems to be a problem with casting, might help to see code maybe?

eternal orchid
#

The kick stopped happening after i removed the scoreboard functionality from my plugin, but I still havent been able to find exactly where the problem is happening

#
        this.player = player;
        target = null;
        //Util.log("Creating new scoreboard");
        scoreboard = Bukkit.getScoreboardManager().getNewScoreboard();
        //Util.log("Registering LibsDisguises");

        DisguiseUtilities.registerAllExtendedNames(scoreboard);
        DisguiseUtilities.registerColors(scoreboard);
        //Util.log("Registering Colors");
        registerColors();
        //Util.log("Setting scoreboard");
        player.setScoreboard(scoreboard);
        cache = new String[15];
        next = new ArrayList<>();
        taskID = -1;
        //Util.log("Attempting enable scoreboard");
        if(Settings.getConfigBool(player, Settings.PATH_BOOL_SHOW_SCOREBOARD, true)) {
            enableScoreboard();
        }
        tracker = null;
        //Util.log("Starting tracker task");
        trackerTaskID = Bukkit.getScheduler().scheduleSyncRepeatingTask(Derp.inst(), this::tickTask, 0, 1);
    }```
All debug messages would print when a player joins, but then the player would get kicked a split second after they join, just removing the line `scoreboard = Bukkit.getScoreboardManager().getNewScoreboard();` stops the kick
wet breach
#

Its complaining about item being casted to something else. Generally nms stuff changes between versions

eternal orchid
#

I didn't use nms in my plugin at all, but I did depend on ProtocolLib, maybe I should just wait a few days until they have an official release for 1.20.1

wet breach
#

It might be an issue in libdisguises but you also didnt show the full class either

eternal orchid
#

thats an idea, ill try removing libsdisguises and test again

eternal orchid
wet breach
meager lynx
#

guys is it fine to make plugins for 1.8.9?

vague mason
#

as there is still some servers on 1.8 especially PvP servers

meager lynx
#

yea i would like to make a plugin for 1.8.9, cause its related to pvp

#

and 1.8.9 pvp is the most popular

#

can i make a plugin for 1.12 and it would work for 1.8.9?

#

or how do i make it support for 1.8.9

meager lynx
#

so for the pvp to work according to 1.8.9, just the server has to be 1.8.9 right?

remote swallow
#

do note you wont get much support here using 1.8

meager lynx
#

i see

kind hatch
meager lynx
#

but then how do we make plugins for a 1.8.9 pvp server

vague mason
#

If you use for example Spigot API for 1.12 then some APIs won't work on 1.8.9 so you would need to avoid using them if you plan to support 1.8.9

remote swallow
meager lynx
#

i see

remote swallow
#

1.8.8 is the latest server version

meager lynx
#

but shouldnt make much of a difference if i used 1.8.8 right?

echo basalt
#

Yeah usually a server version changes when.. it's anything but a rendering issue

remote swallow
#

but do note like shaddow said, you miss a hell of a lot of api and barely anyone here will help you with it

echo basalt
#

1.8 doesn't even have titles or boss bars lmao

vague mason
echo basalt
#

Like

kind hatch
#

Ah yes, spaghetti.

echo basalt
#

they are features

#

But no API

#

Titles need nms

#

Bossbars use hacky upside down withers

#

That spawn client-sided particles

vague mason
#

just skip them in 1.8

kind hatch
echo basalt
#

It was

vague mason
#

and use them in supported MC server versions

echo basalt
#

just a couple packets

meager lynx
#

but like

echo basalt
meager lynx
#

i mainly just want the pvp to work according to 1.8.9

echo basalt
#

OldCombatMechanics go brr

meager lynx
#

and the plugin to have all api

vague mason
#

or just 1 if statement with return

echo basalt
#

Imagine using if statements all my homies use hashmaps

meager lynx
#

so like what do i do

#

i just want to keep the pvp 1.8.9

#

but the plugin can have all api

kind hatch
#

You have 2 options.

  1. Use 1.8.8
  2. Use a newer version and install OldCombatMechanics
vague mason
meager lynx
#

its an rpg kinda plugin

#

has classes and stuff

#

u can choose one and pvp

#

basically 1.8.9 pvp but with powerups and classes

meager lynx
#

so oldCombatMechanics allows them to pvp like 1.8.9?

#

how do i use it

#

and i think 1.8.8 has limited apis like u mentioned

kind hatch
meager lynx
#

oh ok

#

aight

#

so then i can just use 1.19.2 plugin for the functionality

#

and that plugin for 1.8.9 pvp

vague mason
#

If you don't plan to use any new features than use 1.8.8 for development.

if you plan to use some new features, but only on newer MC server versions than use the latest MC server version for development.

meager lynx
#

the server version will be 1.8.9 tho

#

or should it be 1.19.2

kind hatch
#

If you want new features, you have to run new versions.

remote swallow
meager lynx
#

ah makes sense

vague mason
#

For PvP servers you also don't need new blocks, mechanics or anything else introduced in later MC versions.

And performance on 1.8.8 is blazingly fast in comparison to latest MC server version.

remote swallow
#

your run 1.19.2 server, and use 1.19.2 api and old combat mechincs

kind hatch
#

You can't run new things on older versions.

meager lynx
#

the main things i would need is

#

making gui's using inventories

#

particles

#

and some text on screen like scoreboard or alert

echo basalt
#

guis are much fancier after 1.14

#

Particles are icky in 1.8 iirc

meager lynx
#

i see

vague mason
#

GUIs can also be made in 1.8 with ease

echo basalt
#

They can

#

but they're limited

#

as in

#

No fancy texture packs

meager lynx
#

ill just need to position them ig

echo basalt
#

No custom model data, no pdc

meager lynx
#

for now

#

there wont be any design

#

or stuff

#

just position them at places ig

vague mason
meager lynx
#

yea

#

player heads will be good

echo basalt
#

That's as fancy as it goes

meager lynx
#

so 1.8.8 should be able to cover them right?

#

btw

#

can we make gui using book

#

in 1.8.8

vague mason
rare rover
#

So my plugin is using 0.45% of the cpu because of metadata. Because I'm editing metadata every block

vague mason
#

Never seen that before

rare rover
#

Should I update it every 5 blocks or what?

meager lynx
rare rover
vague mason
#

and probably a better way to do this exists

rare rover
#

Well it's the only major thing with performance in my plugin

#

Ik 0.45% isnt much but that's with 1 person

#

And metadata is using 0.41%

#

Because I'm updating lore every crop I break

sterile breach
#

hello, to make an "avance" gui system I looked https://github.com/Flo0/GUITutorial but I don't really like the system.

So I preferred to do this:
I no longer use button classes (everything is done directly in the menu class itself) the same for click events, everything is defined in the gui class

Is it a good idea ?

rare rover
vague mason
#

you can basically just increase the number in the event and later on like every second update the lore

#

so it won't change instantly

rare rover
#

Its xp and level atm

#

But it doesn't need to change instantly

rigid otter
#

Hello, what is alias parameter in TabCompleter#onTabComplete()? You know, it would take a lot of time to test, so I ask here.

remote swallow
wet breach
pseudo hazel
#

what would be the point though, isnt the goal of an alias to execute the same command but with a different name?

#

I dont get why you would wanna know the alias at the point where you already know what command it is