#help-development

1 messages · Page 1166 of 1

wary oyster
#

given a position and a vector in a chunk, i need to find the immediate chunk that vector would intersect.

im currently trying to implement it geometrically but im wondering if anyone else knows a better way

grand flint
#

Anything I can do guys?

#

I get an error shading my jar

#

Connection code

upper hazel
#

Door this block yea?

#

I can get mode material using plugin and block data as string

#

?

#

I know somehow protection private plugin can protect mode blocks

#

But I think he not check material

#

He just protect range

chrome beacon
#

Outdated maven plugins, Not relocating jconnector and why are you using the ant plugin...

#

If you’re using maven for your Spigot plugins (which you should do), it’s easy to make maven automatically save your plugin’s .jar in your plugins folder. There’s two ways of doing this: 1. The lazy way (not recommended) If you only work alone on one computer, you can just directly declare the output location in...

chrome beacon
#

?

grand flint
#

I didn't use ant it's off github

#

I'll replace that with apache

blazing ocean
#

ant is crazy

chrome beacon
#

It's using the antrun plugin to move the jar to the plugins folder

grand flint
#

Yeah I know

chrome beacon
#

Which is a bad idea

grand flint
#

I'll change it to apache

mellow edge
#

I used jar plugin for a while. Then I needed to do relocations and it turns out the maven shade plugin can as well put a jar into the plugins folder.

grand flint
#

Anything else? Or you think that is the issue?

chrome beacon
#

that's the issue most likely

grand flint
#

Okay let me have a look tysm Olivo

chrome beacon
#

Not relocating will conflict with the old bundled version
and antrun might move non-shaded jar

grand flint
#

If it fixes you are a life saver

chrome beacon
#

as for the outdated plugins it's generally a good practice to keep them up to date

grand flint
#

Could be the issue because I have the mysql driver as a dependancy

chrome beacon
#

That's fine as long as you relocate it

grand flint
#

Yeah this is a year old let me just upgrade verything and replace it with apache

#

🤞

chrome beacon
#

"apache" isn't really specific enough but I assume you're following the guide I linked

mellow edge
#

Hmm just wondering why you want to shade mysql connector into your plugin? Doesnt spigot include it already? (Except if you are on an older version)

chrome beacon
#

It does

#

but it's quite old and they're on 1.8

mellow edge
#

but iirc mysql-connector has a GPL license so shading it and using it has some limitations

shadow night
#

so, not that much change

mellow edge
#

lol nice

#

so basically if you break their terms of service your break spigot's as well

grand flint
#

I am using a modified version of the server anyways so I might just add the sql connector to that instead

#

Instead of adding it to every plugin

cinder abyss
#

Hello, how can I download spigot to obf mappings for 1.7.10 ?
I already tried spigot-mappings-downloader by @shadow night, but well, it doesn't want this version

spiral light
#

its just to old

cinder abyss
cinder abyss
#

or maybe I can generate spigot mappings by myself ?

shadow night
#

lemme check

cinder abyss
shadow night
#

ah

#

makes sense

#

give me a minute

cinder abyss
#

but the spigot jar will have spigot mappings, and the obfuscated jar will be the minecraft default server jar, which is obfuscated

chrome beacon
#

Why do you need the mappings?

cinder abyss
#

because my modified client use mcp mappings

shadow night
cinder abyss
shadow night
chrome beacon
cinder abyss
#

I'll not distribute it

chrome beacon
#

That includes the compiled jar so you'd need to get a patch system working

cinder abyss
#

for sure

shadow night
#

I wonder if I can build b1.7.3 with the correct build number

cinder abyss
#

idk

#

I'm searching the good jenkins build number but well

#

pretty difficult, idk how to use jenkins really much

chrome beacon
#

253 (from 2015) appears to be the oldest version still available

#

You can go through the git history manually and find the versions you want though

cinder abyss
#

humm

#

nothing in jenkins for 253

cinder abyss
#

I've found bukkit for 1.7.9 anyway

#

LMAO CRAFTBUKKIT

shadow night
#

@cinder abyss can you send me that spigot jar in dms?

cinder abyss
#

for sure

chrome beacon
#

?stash

undone axleBOT
grand flint
#

This is latest xml with obviously different file location

cinder abyss
chrome beacon
#

Everything is still there

cinder abyss
#

perfect then thanks

chrome beacon
grand flint
cinder abyss
#

I'm cooked

#

where tf are spigot versions before 1.8

chrome beacon
cinder abyss
#

md5 got some crazy dark sides

grand flint
#

Hm okay

shadow night
inland hemlock
#

hey, does anyone know if it is possible to make mobs climb like spiders naturally? I tried implementing everything Climbing related into a custom mob class, but everytime the Mob goes to a wall, everyone in the world gets kicked..Network Protocol Error, but no visible errors in the console.

https://pastes.dev/6l3w9cbjYM

chrome beacon
#

That's not going to work since the client doesn't know how to handle that

inland hemlock
#

Aight.. ty, there a workaround or BukkitRunnable 🫠 ?

chrome beacon
#

Just removing the data from the data watcher is fine

#

(don't add it there)

lofty plank
#

When placing concrete powder in water it places as concrete block (immediately changes before placing) and doesn't give off the BlockFormEvent. How can I prevent this?

inland hemlock
chrome beacon
#

yes

inland hemlock
#

meant error not crash, sry

inland hemlock
chrome beacon
#

The server can know

#

The client should not

inland hemlock
# chrome beacon The server can know

Aight, but tbh I dont even get where the spider or mob is "climbing". Is it happening somewhere else when the specific flag is set? Couldn't find it... But I just checked, I thought the spiders somehow know they can climb and have a different pathfinding, but turns out they just do it when they face a wall..

cinder abyss
distant basin
#

Does anyone know if it's possible to remove the sound that plays when you break a block, and then replace it with something else?

young knoll
#

Resource pack

#

It’ll be multiple sounds though, different block types have different sounds

vivid skiff
#

How can i change a player skin and update it for every online player, because when i change a player skin the player who changed it can see it but every other player still see the old skin, or if they die or rejoin, they see the default skin

young knoll
#

I believe you need to send a remove player packet and then add player packet with the modified gameprofile

vivid skiff
#

I tried, doesn't seem to work, even because from what i noticded so far is that once i change the gameprofile it stays like that so shouldn't it already get the updated skin when a player joins and loads the player with the updated gameprofile?

wraith imp
young knoll
#

PacketEvents or ProtocolLib

blazing ocean
young knoll
#

Shh

blazing ocean
#

no u

#

:)

young knoll
#

I want to make a packet system that requires only a bit of reflection

#

It should be doable

blazing ocean
#

I mean

#

inject should be able to do it no?

young knoll
#

Idk, doesn’t it require doing it 100% manually

#

Ie encoding the packet id and length yourself

blazing ocean
#

well yeah you only get a ByteBuf

#

yeah

young knoll
#

Yeah not ideal

#

Especially since the ids change often

blazing ocean
#

I mean honestly

#

just use Packetevents

young knoll
#

Nah

#

Dependency :(

proud badge
#

is it possible to do packet stuff without an external library or NMS

spiral light
#

yes

proud badge
#

just the spigot API

spiral light
#

no

proud badge
#

whyd you say yes first

#

what were you gonna say

spiral light
#

because it is possible without external library .... you would need some NMS or Reflection stuff true

young knoll
#

Reflection is not an external library or NMS

#

So technically

spiral light
#

yes but you would need to know where which nms stuff is ...

blazing ocean
#

Linkie?

#

But yeah Reflection would be the only way

blazing ocean
young knoll
#

?mappings

undone axleBOT
blazing ocean
#

Linkie > mappings.dev

#

ngl

spiral light
#

yeah i know that stuff, but for him its not obvious maybe and also it could change at any time

young knoll
#

Generally the names don't change

#

Thanfully

blazing ocean
#

You can on Linkie :p

young knoll
#

Nerd

blazing ocean
#

You're the nerd

young knoll
#

You should be able to use reflection to get the bytebuf constructor for a packet

#

And then go from there

blazing ocean
#

Just do this with inject:
have a list of all constructors, run through all of them with the bytebuf in a try/catch and reset the reader, and in the one that doesn't throw, take the output

🧠

#

performance stonks

shadow night
blazing ocean
#

do it

#

raymap

shadow night
#

Hmm

#

I like the name

#

Are you good at frontend? I can do most of the work, just can't css lmao

young knoll
#

kek

shadow night
#

Understandable

dry hazel
waxen acorn
blazing ocean
# dry hazel I'd love to hear some feedback

tbh I'm not a big fan of having all the packages be the center of everything, and only having such a small search bar at the top, since the main use case is to translate mappings or search for something

#

but yeah, method/field searching as they said above

#

Linkie also has a stacktrace translator

low marlin
#

What pathfinding goal can I use that if I hurt custom mob1, custom mob2 will get agro on me

#

if that's possible

spiral light
#

take a look at irongolems

#

if you hit a villager the irongolem gets agro at you

low marlin
#
this.goalSelector.addGoal(1, new MeleeAttackGoal(this, 1.0, true));
        this.goalSelector.addGoal(2, new MoveTowardsTargetGoal(this, 0.9, 32.0F));
        this.goalSelector.addGoal(2, new MoveBackToVillageGoal(this, 0.6, false));
        this.goalSelector.addGoal(4, new GolemRandomStrollInVillageGoal(this, 0.6));
        this.goalSelector.addGoal(5, new OfferFlowerGoal(this));
        this.goalSelector.addGoal(7, new LookAtPlayerGoal(this, Player.class, 6.0F));
        this.goalSelector.addGoal(8, new RandomLookAroundGoal(this));
        this.targetSelector.addGoal(1, new DefendVillageTargetGoal(this));
        this.targetSelector.addGoal(2, new HurtByTargetGoal(this, new Class[0]));
        this.targetSelector.addGoal(3, new NearestAttackableTargetGoal(this, Player.class, 10, true, false, this::isAngryAt));
        this.targetSelector.addGoal(3, new NearestAttackableTargetGoal(this, Mob.class, 5, false, false, (entityliving) -> {
            return entityliving instanceof Enemy && !(entityliving instanceof Creeper);
        }));
        this.targetSelector.addGoal(4, new ResetUniversalAngerTargetGoal(this, false));
#

These are the iron golems

spiral light
#

maybe its:
this.targetSelector.addGoal(3, new NearestAttackableTargetGoal(this, Player.class, 10, true, false, this::isAngryAt));
in the isAngryAt Method ?

trail dock
#

how do i change the current version of my spigot plugin to 1.21.3 in the pom.xml?

spiral light
#

change the current version to the 1.21.3 version ?

trail dock
#

yeah

spiral light
#

for example i use this: 1.21.3-R0.1-SNAPSHOT as version

trail dock
#

change from my old version to 1.21.3

trail dock
dry hazel
#

it's a statically generated site which ties my hands a bit

pliant topaz
spiral light
#

oh yes i didnt see that

harsh ruin
#

I'm using vaultapi to make use of economy, however. Is there a way for me to creaate a custom user account with the name "Tax"? Where all of the tax money goes to

#

I've not been able to succeed due to deprecation warnings

chrome beacon
#

That would probably be the safest way

wet breach
limber flax
#

silkspawners-v1_20_R1-8.1.1-SNAPSHOT.jar
is this supposed to mean that this is for 1.20.1?

kind hatch
#

Supports up to 1.20.1, yes.

1.20_R1 = 1.20, 1.20.1
1.20_R2 = 1.20.2, 1.20.3
1.20_R3 = 1.20.4
1.20_R4 = 1.20.5, 1.20.6

limber flax
#

what would be the name for 1.20 only

#

silkspawners-v1_20 only?

kind hatch
#

It would also be R1

limber flax
#

ok

river oracle
#

1.20 shouldn't be on a server

#

So don't worry about 1.20

shadow night
#

Doesn't this the revision number only change when the protocol changes or some shit

river oracle
#

If you do have 1.0 please don't obtain spigot from illegal sources

tidal kettle
#

can

#

someone

#

help me in

shadow night
#

no

shadow night
tidal kettle
#

i fixed it..

river oracle
#

Stop being rudely annoying

#

People won't want to help you

#

It's advice for life kid

shadow night
#

When an update gets released but the revision number doesn't change, that means that the previous version will get overriden by the newer one in buildtools, right?

river oracle
#

Iirc the revision number has to do with protocol changes so that'd seem to hold as logical

spiral light
#

is it reasonable to add something to the API that needs to play around with Registrys that are normally frozen after all datapack stuff is done ?

river oracle
#

So you'd want to work in add some bootstrap api to spigot

#

It'd be best to have a completely separate loading interface this would be a different load step with a different main class

spiral light
#

i dont want that xD i know it works to play around with the frozen registry

river oracle
#

Unfreezing registries at time for plugin load should not be in the bukkit api

deep veldt
spiral light
#

would be: load: STARTUP/POSTWORLD/BOOT

river oracle
#

You want a different entry point all together

#

The server doesn't exist at bootstrap afaik

spiral light
#

sure ?

#

because datapacks also modify those registrys at reloads or not ?

river oracle
#

Very sure if it does exist at all nothing would work putting it under JavaPlugin would be beyond dumb

#

A bootstrap API should be very separate from JavaPlugin

#

It should be extremely discouraged to exchange any info between your bootstrap and runtime plugin outside of some constants

kind hatch
#

Ah, if only I knew what the registries were and how they work with the game. :p

spiral light
#

what do you want ?

river oracle
#

They're frozen in the main method iirc if not it's very early in server declaration

#

I remember looking because I setup bootstrap for my toy implementation of an api

spiral light
#

problem with a fully new boot api is the complexity to add/change stuff then

river oracle
deep veldt
#

can someone help me build this plugin to use on my server. I have no experience building plugins and keep running into errors in intellij:
https://github.com/PitSim-Network/PitSim/
I have been trying to build it my self for the past 2 hours and i keep hitting errors.

kind hatch
#

Gradle plugin. :cries:

paper viper
deep veldt
#

i really just want to run the plugin on my server lol

#

it is the only one i can find that actually works

kind hatch
river oracle
#

It's the non bootstrap main

#

Iirc it occurs right after bootstrap and the cli is parsed

kind hatch
#

It does

deep veldt
#

does anyone know how to build the plugin lol

#

or is it too outdated to build

kind hatch
deep veldt
#

i am so confused rn

river oracle
grand flint
#

I created the profile

#

Stlil says main artifact does't exist

chrome beacon
#

?

deep veldt
#

does anyone know how to build a gradle plugin

chrome beacon
chrome beacon
grand flint
chrome beacon
#

Send the exact error

grand flint
kind hatch
#

What are the point of these registries?
Just to initialize stuff?

grand flint
#

Which ones

river oracle
#

Some registries are data driven e.g. enchantment or biome

#

Meaning they can be modified by the server and synced to the client

grand flint
chrome beacon
deep veldt
#

as i said, i keep running into errors

grand flint
#

maven:shade

kind hatch
chrome beacon
#

It's even telling you in the message :kekw:

river oracle
grand flint
#

Isn't that the shade plugin

river oracle
#

Especially as stuff gets more data driven

grand flint
#

What am I supposed to use

chrome beacon
#

Read the error message

kind hatch
river oracle
#

I'm assuming this could be potentially useful down the road where you could remove or modify existing registry entries

chrome beacon
grand flint
# chrome beacon Read the error message

I'm really confused on which part you are reffering to, I didn't run it from command line, I don't think I bounded anything to the lifecycle phase and I'm not sure what config it refers to at the end

#

I didn't run it on command line, I used the maven panel on the side

chrome beacon
#

which runs it from the command line

grand flint
#

oh lol

chrome beacon
#

As the message says use the package lifecycle

kind hatch
#

Me when I comment out this line. :kek:

grand flint
river oracle
grand flint
#

Ok I just mvn packaged it's fine

spiral light
river oracle
#

It's safest and smartest to just create a separate bootstrap load

#

To manage this

#

Not to mention we don't want plugin developers being naughty during the regular lifecycle of the server too

spiral light
#

would be smooth af but wouldnt allow reloads

river oracle
#

Remember that please

kind hatch
#

Would be nice if they were :/

spiral light
#

if reloads are not supported behavior we just can unfreeze and modify :9

river oracle
#

Designing around an already stupid "feature" is quite silly

#

We should be striving to improve the api not hinder it by adhering to already very known and possibly destructive behavior

kind hatch
#

Ah yes, like adding those AdvancementRequirements I've been hearing about.

limber whale
#

is anyone able to compile remapped jar using buildtools? i tried via both gui and cli, for both i cannot compile 1.21.1+ versions

deep veldt
undone axleBOT
kind hatch
#

29.99 cashapp

remote swallow
#

30.99 paypal

grand flint
#

40.99 deliveroo

echo basalt
#

10 bucks paypal legit

kind hatch
#

Oof, I hope these integers are arbitrary values.

echo basalt
#

pretty sure they're data versions

#

or global pallette ids

young knoll
#

I think it's data versions

outer river
#

hello, i have a question, when i create a world and i tp the player in, it takes like 5-10 sec before the player get tped, can i avoid that and make the tp instantly?

chrome beacon
#

get better hardware

#

It takes some time for the chunks to generate

lilac dagger
#

unfortunately chunks aren't gpu accelerated 🥲

mellow edge
#

minecraft uses DDA raytrace algorithm, no?

lilac dagger
#

what's dda?

#

ray trace is just ray trace

#

i don't know what dda changes in this

#

ray trace blocks, ray trace models of the blocks/collisions

deep veldt
echo basalt
#

sure

deep veldt
#

only problem is now i’m worried that it’s not even possible but im probably wrong

mellow edge
#

my custom raycast I implemented didn't work in corners for example, now I want to learn the one mc is using

echo basalt
lilac dagger
#

I forgot how they're callled

mellow edge
lilac dagger
#

The block is made out of pieces that act as collision

mellow edge
#

that is basically explaining this algorithm

echo basalt
#

Every block has a collision shape

lilac dagger
#

Yup

echo basalt
#

A collision shape can be empty, simple (1 cuboid) or complex (multiple cuboids)

lilac dagger
#

It's not really cheap, I even have a method that uses their detection if you're interested

mellow edge
#

could you just explain what AABB is and how does it relate to bounding box?

echo basalt
#

An AABB is just an axis-aligned bounding box

#

It's still a regular bounding box but 2 of the axis (x and z) are the same

mellow edge
#

oooh

lilac dagger
#
    @Override
    public boolean hasHitBoxAt(Block block, double x, double y, double z) {
        CraftBlock craftBlock = (CraftBlock) block;

        VoxelShape shape = craftBlock.getNMS().getShape(craftBlock.getCraftWorld().getHandle(), craftBlock.getPosition());

        if (shape.isEmpty()) {
            return false;
        }

        double deltaX = x - block.getX();
        double deltaY = y - block.getY();
        double deltaZ = z - block.getZ();

        AtomicBoolean hasHitBox = new AtomicBoolean(false);

        shape.forAllBoxes((minX, minY, minZ, maxX, maxY, maxZ) -> {
            if (deltaX >= minX && deltaX <= maxX && deltaY >= minY && deltaY <= maxY && deltaZ >= minZ && deltaZ <= maxZ) {
                hasHitBox.set(true);
            }
        });

        return hasHitBox.get();
    }
mellow edge
#

I mean I know I can simply use World#raytrace... stuff but I am planning to do opengl anyway might as well implement it myself

echo basalt
#

nvm my interpretation of axis-aligned is dogshit

#

still makes sense but wtev

lilac dagger
#

i'm not sure what i use is the fasted

#

this is pretty much what i do

echo basalt
#

I have a cuboid class that also does edge detection with no included corners

#

. B
AXA
B

type shit

lilac dagger
#

i'm unhappy that mojang doesn't have a collides method

#

and i have to use this method that keeps going even after collision

mellow edge
lilac dagger
#

this is a check to see if it's inside min max points

#

growing is probably to extend search

mellow edge
#

ok

echo basalt
#

👀 oh shit it actually worked

lilac dagger
#

takes too long

#

25s in the speedy era?

echo basalt
#

90k LOC on a 6-thread ryzen while running call of duty?

lilac dagger
#

still slow

echo basalt
#

ur mum

lilac dagger
#

uno reverso

#

beat this nerd

tiny night
#

can someone help in genral

tiny night
echo basalt
#

?ask

undone axleBOT
#

If you have a question, please just ask it. Don't look for staff or topic experts. Don't ask to ask or ask if people are awake or available. Just ask the question to the channel straight out, and wait patiently for a reply. Make sure you use the right channel regarding the topic of your question. Create a thread in case the channel is already in use!

lilac dagger
#

jk aside, this is what takes me to build

#

😦

echo basalt
#

why is chrome pulling more ram than call of duty

deep veldt
echo basalt
#

it has like 19 dependencies that's not on me

lilac dagger
#

i don't know how many tabs of chrome you guys have but i never considered browsers to consume too much

deep veldt
echo basalt
#

mostly regular plugins and a .jar I got from the original dev

lilac dagger
#

hmm, 1.5gb

echo basalt
chrome beacon
lilac dagger
#

6 gb

nova notch
#

how tf do you have 6GB used by chrome???

lilac dagger
#

what in the

echo basalt
deep veldt
#

oh

#

but aren’t all of the dependencies in the build.gradle file

lilac dagger
chrome beacon
#

32GB

echo basalt
#

There's some stuff that's outdated

#

And some other stuff that's just not there

chrome beacon
#

It's taking 4GB

deep veldt
echo basalt
#

Nah I found it

blazing ocean
chrome beacon
#

That's quite normal

#

It will allocate some even when it's not being used

deep veldt
echo basalt
#

You need a firebase account, mariadb/mysql and pterodactyl

blazing ocean
#

firebase is crazy

echo basalt
#

yeah

lilac dagger
#

i don't know if it saves that much power tho

#

it's a laptop

#

but it's good nonetheless

#

if i play a game, it uses the nvidia gpu

#

all the others graphical tasks are on the igpu

#

of the cpu

mellow edge
#

ok so if I get it now AABB is basically a bounding box that is always aligned in the same direction and because that I can just check the intersaction area with the function above?

chrome beacon
#

I'm on Desktop

#

but yes Optimus is nice when on laptop

lilac dagger
#

wait, but if you don't have a monitor connected to the igpu, how is it using memory?

chrome beacon
#

It's still allocating memory for it

#

Not sure why

sly topaz
#

an iGPU will allocate 1gb at most, but that's when it is actually being used

chrome beacon
#

It's hardware reserved

sly topaz
#

who touched bro's bios settings

#

there's just no way that's the default lol

mellow edge
#

actually I'll make my own bounding box for the entity, because I don't want to rely on nms at all

sly topaz
#

why

lilac dagger
#

just make 4 small spheres

#

unless you want it precise

#

but without nms you don't have access to body rotation

mellow edge
#

doesn't really metter, I am using a fireball that afaik is just a square or a really squary rectangle

young knoll
#

You don’t need NMS for bounding boxes?

lilac dagger
#

oh wait

#

there's the bounding box

#

the entity has it

mellow edge
#

well it has it but if I know the size of the fireball and its location I can calculate the bounding box?

lilac dagger
#

it's not on ancient versions of minecraft tho

#

just get the nearby players

#

or entities

mellow edge
#

players? I already get them, I need a custom block collision because the whole code is custom

young knoll
undone axleBOT
lilac dagger
#

i'm not sure it's easy to do without nms in that case

#

you'd need to get the rotation of blocks and compute all the voxes shapes of all the possible blocks

mellow edge
#

waiiit that's true actually, not all blocks are full cubes lol

#

well I'll use nms then as I originally intended

young knoll
#

Modern versions have api for that too inflatable

lilac dagger
#

there's api for blocks voxel shapes?

mellow edge
#

right

#

thanks guys

lilac dagger
#

oh wait

#

there is

#

you can get all the bounding boxes and check if it interesects with any of them

mellow edge
#

yes that is perfect

lilac dagger
#

not really happy with the api

#

it most likely having wraps of wraps

#

but i'm pretty sure the gc knows what it's doing

mellow edge
#

previously I didn't even consider that the e.g. stairs would have multiple shapes

lilac dagger
#

i actually had something for stairs and fences

#

that was for 1.8.8

#

thank god i don't use it anymore

#

let me see if i find it

deep veldt
echo basalt
#

go for it

lilac dagger
#

this was my first ever project

#

there was no voxel shapes in 1.8.8

#

so i had to use the api to somehow fix this issue

#

fences and stairs would've ruined the gameplay

mellow edge
#

how old is this

#

code

lilac dagger
#

like 2016

#

i started programming in like 2015

mellow edge
#

well I am thinking of just not considering the bounding boxes because the projectile is moving so fast that I see 0 difference if there is a different bounding box also because of the size

#

doing it prentending they are all solid blocks means I don't need bounding boxes right?

lilac dagger
#

players will definitely notice

lilac dagger
mellow edge
#

I can make the projectile go to the middle before destroying it if it is not solid/full

#

would this at least a little solve this (but yeah I know what would happen if the stairs would be positioned to the opposite side of the intersaction)

lilac dagger
#

why not just java Block block; Location location; for (BoundingBox boundingBox : block.getCollisionShape().getBoundingBoxes()) { if (boundingBox.contains(location.getX(), location.getY(), location.getZ())) { //It collided break; } }?

#

i assume the bounding boxes are block shifted

#

i also assume by ray tracing you go in ~4 steps per block

mellow edge
#

I raytrace by 0.3

lilac dagger
#

close enough

#

make it 0.25

mellow edge
#

yeah I get it why that would be the problem...

small trail
#

so i bought the sourcecode of the plugin parkourrun. can someone help me to fix the plugin so it works again and that it works on 1.21.1

lilac dagger
#

are you gonna pay the one who works on it too?

small trail
#

depends how much

mellow edge
#

lol

lilac dagger
#

you can use the services on spigot forum in that case

#

i don't think anyone will fix it for free tho

small trail
mellow edge
#

you considered this badly, if you really wanted to get a plugin made why didn't you just pay one to make it from scratch?

#

you would have more chances

small trail
#

sure but where can i find someone for it?

river oracle
#

?services

undone axleBOT
lilac dagger
#

the services thread

#

anyway, i wanted to fix some of the horibble code in the the past, which one do you prefer

#

probably i'd probably even separate shorten this even further

pliant topaz
#

definitely new

wise mesa
#

hey I was looking into the mapview and maprenderer functions and I was wondering if there's a way to do a vanilla render on a map at a certain position

#

like if I just want to load a circle into a map?

pliant topaz
# pliant topaz definitely new

but even your old code looks nice compared to my 1-year old code, i mean, back then i didnt even know what enums were and when i knew i used them but now i do it properly with classes instead of enum hell ;-;

mellow edge
#

lol ofc it's better

lilac dagger
#

i assume you can render 2 maps and copy the vanilla render onto a your custom map?

#

i assume you can get the pixels from such a map?

sly topaz
lilac dagger
#

there's a lot of ways to improve the code

#

i think a named local variable would be better than a separate method

sly topaz
#

that works too

#

otherwise, a way to make it unreadable is: (y > 5) ^ !inverted kek

echo basalt
#

inverted == y<5

#

type shit

#

but then == starts passing

lilac dagger
#

there's no check for the other side

fiery iron
#

So on a minecraft mod it's indexing out from a change that was made, and it's happening randomly when someone joins the server

#

It's one of two pieces of code, and I can't post it here because it's too long
If you could help that'd be great

#

I'm very much on my wits end and don't know where to turn too for this kind of support, and spigotmc is known for their good support

lilac dagger
#

paste bin the code

young knoll
#

?paste

undone axleBOT
fiery iron
river oracle
#

this is some pretty decompiled code

fiery iron
#

Yeah I know it's not the best

#

The original mod author gave me permission but not the original file

river oracle
#

I'd ask for the files

#

the fact its not open source already is quite insane

young knoll
#

It’s McCreator

#

So the original source will be… something

river oracle
#

McCreator oh lord

fiery iron
#

yeah..

#

I'm doing the best I can with what I have

#

I basically jst need a mixin to patch this

river oracle
#

I feel like this looks ugly

        setTitle(TranslationKeys.TITLE.get());
#

Idk how else I'd do the .get() tho

worldly ingot
#

.g()

river oracle
#

😂

worldly ingot
#

Even better

#

public final field

#

.g

river oracle
#

🙏

#

TranslationKeys.TITLE._()

worldly ingot
#

Now we're thinking

#

Hell, make TITLE a method

#

TranslationKeys.TITLE()

river oracle
fiery iron
#

Anyway so like, more on how I'm able to consistently able to replicate the indexing bug. When using the attack function in the mod, and someone tries to join. That's when it indexes

river oracle
#

or do I stick with Translations.getInstance().getTranslation(TranslationKeys.TITLE)

worldly ingot
#

And do you really need any of those superfluous consonants and vowels? Why not just TK.T

slender elbow
#

TK.TIT

worldly ingot
#

YEAHHHH

worldly ingot
#

This is readable enterprise code

river oracle
#

Man maybe I should go back and work on my greeting service

fiery iron
river oracle
#

too bad this app is going to be a real project or I might just take your suggestion

sly topaz
#

so you just hide the ugliness with abstractions

river oracle
#

I don't believe it does

#

I couldn't find it on JFrame atleast

#

oh wait you thought haha Minecraft Title probably

sly topaz
#

I thought it was a method you had created

river oracle
#

nope unfortunately I'm using Java Swing

    private Frame() {
        setTitle(TranslationKeys.TITLE.get());
        setSize(800, 600);
        setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
    }

    public static void start() {
        SwingUtilities.invokeLater(() -> {
            final Frame frame = new Frame();
            frame.setVisible(true);
        });
    }
sly topaz
#

TranslationKeys.TITLE.apply(jframe)

river oracle
#

🤢

#

I'll just leave it as is lol

#

I need to get the actual project contents first I suppose

fiery iron
river oracle
#

if its with MC Creator you're pretty much stuck looking at horrific shit anyways

young knoll
#

^

#

It’s code generated by code so it’ll never look nice

river oracle
#

jspecify is so nice to use

#

Not having to put @NotNull on everything is great

warped mauve
#

I am trying to make a plugin with nms of different versions using the 1.21 currently on server but I can't get the nms version from the server it gives me error.

Enabling Plugintest v1.0.0
[21:49:02 WARN]: [Plugintest] Versions1
[21:49:02 WARN]: [Plugintest] 1.21.1-R0.1-SNAPSHOT
[21:49:02 WARN]: [Plugintest] 1.21.1-2329-803bf62 (MC: 1.21.1)
[21:49:02 WARN]: [Plugintest] craftbukkit
[21:49:02 INFO]: [Plugintest] Package parts length: 3
[21:49:02 INFO]: [Plugintest] Part 0: org
[21:49:02 INFO]: [Plugintest] Part 1: bukkit
[21:49:02 INFO]: [Plugintest] Part 2: craftbukkit
[21:49:02 INFO]: [Plugintest] Failed to determine NMS version!
eternal night
#

Are you running paper

river oracle
#

don't use the package name

#

that's just dumb

#

also you're using paper

young knoll
#

You’re meant to just use the package name and append what you want for reflection

young knoll
#

If you want the actual server version use Bukkit.getVersion or whatever it is

#

Tis what I used apparently

wise mesa
#

I can't even find out how to render a vanilla map with no custom renderers at a location

#

is there a way to get a list of all vanilla maps in the server

#

or an event when a player creates/activates a new map

#

i guess worst case I could check for right click while holding an empty map

wise mesa
#

I think I'm just going to reimplement vanilla rendering for what I'm doing, it'll be easier that way

#

how can I reload my custom maprenderer to a map when the item is re-loaded

sly topaz
#

https://github.com/JavierFlores09/block-display-test/blob/master/src/main/java/me/javierflores/blockdisplaytest/TestCommand.java#L40
can someone figure out why this doesn't work consistently. With or without delay, it doesn't matter, it is very inconsistent; I tried with vanilla commands, like this:

/summon ~1 ~ ~1 minecraft:block_display {Tags:["test"],block_state:{Name:"minecraft:sand"}}
/data merge entity @e[tag=test,limit=1] {start_interpolation:-1,interpolation_duration:40,transformation:{scale:[3f,3f,3f]}}

and it works consistently, so I'm unsure why the above wouldn't

young knoll
#

Did you try a longer delay

sly topaz
#

I'm in the process

#

still, kinda sucks if that's the case lol

#

yep, it is consistent with 2 ticks

#

kinda annoying

still jacinth
#
final List<Player> playerListBad = this.getGame().getTeams().stream().collect(ArrayList::new, (accumulatorList, currentGameTeam) -> {
    somethin2.addAll(currentGameTeam.getPlayers().stream().map(GamePlayer::getPlayer).toList())
}, ArrayList::addAll);
still jacinth
#

and google dosent really help

river oracle
#

I believe it means the person who wrote this code didn't know the map method existed on stream

#

if I'm seeing this correctly this could probably be rewritten as

final List<Player> playerListBad = getGame().getTeams().stream().map(team -> team.getPlayers()).flatMap(GamePlayer::getPlayer()).toList();
#

wrote this code in discord so it probably won't run but this is my best guess at whatever this is

young knoll
#

This is why you don’t do streams kids

river oracle
#

streams are fucking awesome

#

being without them would just suck

still jacinth
#

okay right

#

so this is my decoding of whatever the hell that was

#

(sent a ss instead of discord code block because id have to reformat the code again)

river oracle
#

just change it to use map instead

#

using collectors only is just silly

still jacinth
river oracle
#

fair

rough ibex
#

that's so much more understandable

buoyant viper
#

Methods were not meant to be CHAINED! Let them roam FREE!

sly topaz
#

it is just unfortunately formatted

river oracle
sly topaz
#
var playerListBad = getGame().getTeams().stream()
                    .flatMap(team -> team.getPlayers().stream())
                    .map(GamePlayer::getPlayer)
                    .toList();
sly topaz
river oracle
#

oh I thought you were saying the streams weren't readable vs the collectors only

sly topaz
#

I was trying to say that the stream approach was just as readable as the for loop

river oracle
#

ohhh

#

yeah No I agree, but I feel like for loop prob requires a lot less knowledge of what the stream methods I do 🤷‍♂️

#

so probably more "readable" in that aspect

sly topaz
#

I guess one could argue it is less readable considering you got to have some inkling of compsci knowledge to understand what a map function does, however anyone who's done programming for more than 5 seconds knows what it does anyway

#

was just typing the exact same thing, stop reading my mind smh

#

the way the guy originally did it was crazy tho, it was a collector which was essentially a reduce to imitate a flatMap lol

river oracle
#

like why even use streams at that point

sly topaz
#

probably chatgpt gone wrong, by looking at the amount of comments there

river oracle
#

pretty sure he's looking at someone elses code

sly topaz
#

well, whoever wrote it used a LLM

river oracle
#

hmmm I'd say its likely, but that guy also wrote the comments I think

#

but that is very LLM code

#

I wonder what chatgpt would do If I gave it this

sly topaz
#

nowadays llms don't blunder that bad with code so idk what the input would have to be tbh

river oracle
#

lets see what ChatGPT 4o mini does

sly topaz
#

claude

#

4o-mini

#

it used the old way to collect into a list, outdated dataset smh

river oracle
#

chatgpt

sly topaz
#

white mode

river oracle
#

I don't have an account or anything

#

so I don't think I can do dark mode

#

I don't actually use AI in any capacity outside of optimizing search terms if I need to search a library database

still jacinth
still jacinth
fading drift
#

any way to make my logger have a colored plugin name

rough ibex
#

why

violet blade
fading drift
#

I kinda just wanted my getLogger().info to stand out from all the other spam

rough ibex
#

and annoy your user even more

#

logs are logs, not advertising billboards

#

be concise and plain

fading drift
#

im the only user

rough ibex
#

ctrl + F in the logs then

remote swallow
#

i love having purple warnings in my console

fading drift
#

okay

#

anyone familiar with reflections library

#

I have a CorePlugin abstract class for my listener and command loading:

#
public abstract class CorePlugin extends JavaPlugin {
    protected Set<Class<? extends Listener>> listenerClasses;

    protected CommandLoader commandLoader;

    public CorePlugin(String packageName) {
        Reflections reflections = new Reflections(packageName);

        this.listenerClasses = reflections.getSubTypesOf(Listener.class);
        getLogger().info("Found " + listenerClasses.size() + " listeners");

        this.commandLoader = new CommandLoader(reflections);
        getLogger().info("Found " + commandLoader.size() + " commands");
    }```
#

which is present in my core plugin

#

and then it extends it:

#
public class XinCraftCore extends CorePlugin {
    public XinCraftCore() {
        super(XinCraftCore.class.getPackage().getName());
    }
#

but cant find any listeners or commands

sly topaz
sly topaz
sly topaz
#

but they aren't isolated so it should find them, weird issue

fading drift
#

yeah its annoying me because I have absolutely no idea

sly topaz
fading drift
#
        ConfigurationBuilder config = new ConfigurationBuilder()
                .setUrls(ClasspathHelper.forPackage(getClass().getPackage().getName()))
                .addClassLoader(getClassLoader())
                .setScanners(new SubTypesScanner(), new TypeAnnotationsScanner());

        Reflections reflections = new Reflections(config);

        System.out.println(reflections.getSubTypesOf(Listener.class).size());```
#

found 0

#

this is directly in my lobby plugin btw

#

instead of in my abstract class

#

just for testing

sly topaz
#

I was thinking more like

public CorePlugin(String packageName, ClassLoader... classloaders) {
  var reflections = new Reflections(new ConfigurationBuilder().forPackage(packageName, classloader));
  ...
}

// inside XinCraftCore
public XinCraftCore() {
  super(XinCraftCore.class.getPackage().getName(), getClassloder())
}
fading drift
#

I only have forPackages

#

and its just a list of strings

sly topaz
#

the method definitely exists

#

what version of Reflections are you using?

fading drift
#

8

#

sorry should of specified

#

I've never had an issue with it before tho

sly topaz
#

this is the og one

fading drift
#

I need java 8

sly topaz
#

why

#

pandaspigot should support java 11 at least

#

does it not?

fading drift
#

actually not sure

#

I build my plugins with java 8

#

and I use spigot as the dependency

#

however I use pandaspigot when actually running the server

sly topaz
#

well, og reflections does support java 8 tho

fading drift
#

interesting

fading drift
#

ok testing now

#

yeah didnt fix it

#

but I'm glad I'm using this lib now

#

this is what I used to test

#
        Reflections reflections = new Reflections(new ConfigurationBuilder().forPackage("net.xincraft.lobby", getClassLoader()));

        for (Class<?> clazz : reflections.getSubTypesOf(Listener.class)) {
            System.out.println(clazz.getName());
        }```
#

somehow it found this:

#
[14:33:28 INFO]: Reflections took 309 ms to scan 1 urls, producing 998 keys and 4499 values
[14:33:28 INFO]: fr.minuskube.inv.InventoryManager$InvListener

sly topaz
#

hm

#

maybe the package name is just wrong? Lol

fading drift
sly topaz
#

I meant the one passed to the constructor

#

what does XinCraftCore.class.getPackage().getName() return

fading drift
#
        System.out.println(XinCraftLobby.class.getPackage().getName());
        System.out.println(XinCraftCore.class.getPackage().getName());
        System.out.println(CorePlugin.class.getPackage().getName());

        Reflections reflections = new Reflections(new ConfigurationBuilder().forPackage("net.xincraft.lobby.listener", getClassLoader()));

        for (Class<?> clazz : reflections.getSubTypesOf(Listener.class)) {
            System.out.println(clazz.getName());
        }```
#

this code is inside XinCraftLobby btw

#

far out I'm so lost

sly topaz
#

what if you use the expandSubTypes option in the config builder

#

maybe it isn't recursively scanning sub packages

fading drift
#

ConfigurationBuilder configurationBuilder = new ConfigurationBuilder().setExpandSuperTypes(true);?

sly topaz
#

yes

#

well, with the forPackage as well of course

fading drift
#
[14:50:22 INFO]: Loading classes...
[14:50:22 INFO]: Reflections took 0 ms to scan 0 urls, producing 0 keys and 0 values
#
        System.out.println("Loading classes...");
        Reflections reflections = new Reflections(
                new ConfigurationBuilder()
                        .setExpandSuperTypes(true)
                        .forPackage("net.xincraft.lobby"));

        for (Class<?> clazz : reflections.getSubTypesOf(Listener.class)) {
            System.out.println(clazz.getName());
        }```
#

tried with "net.xincraft.lobby.listener" too

river oracle
#

reflections is so weird lol

sly topaz
#

I am trying to get a hotswap agent setup to work without an IDE but I can't get the damn thing to work lol

#

it doesn't detect the changes on the classes of the plugin

fading drift
#

im writing my own fucking scanner

#

perfect

#

fucking finally

#

I had to write my own shit

paper viper
#

Wait why do you use Reflections

#

Guava has ClassPath for this

#

And guava is shaded into server jar

orchid brook
#

hi can someone help me,

@EventHandler(priority = EventPriority.MONITOR)
public void onCropPlayerBreak(BlockBreakEvent event) {
    CreatureSpawner spawner = (CreatureSpawner) Bukkit.createBlockData(Material.SPAWNER).createBlockState();
    spawner.setSpawnedType(EntityType.ALLAY);
    event.getPlayer().sendBlockUpdate(event.getBlock().getLocation(), spawner);

    event.setCancelled(true);
}

I don't understand why this is not working

#

the sendBlockUpdate method is not replacing the crop by the spawner

#

This is working perfectly if i add 1 to the y of the getLocation vector (so above the crop)

quaint mantle
#

maybe cancel it first then send update?

orchid brook
#

also try, but same

quaint mantle
#

ouch

orchid brook
#

that weird right ?

quaint mantle
#

yes

orchid brook
#

i have also try with packet and more but this is not rly related to spigot, but even with packet that wasn't working XD

#

i don't understand

#

I've been disappointed for 1 hour but I can't find the solution, and I would really like to understand the problem

#

also try this:

@EventHandler(priority = EventPriority.MONITOR)
public void onCropPlayerBreak(BlockBreakEvent event) {
    event.getPlayer().sendBlockChange(event.getBlock().getLocation(), Material.AIR.createBlockData());
    event.setCancelled(true);
}
``` but not working too
orchid brook
# quaint mantle ouch

Do the sendBlockChange inside a bukkit Schedule run task later with atleast 1L delay work lol

fading drift
upper hazel
#

i need analog

#

how get blockData from block in 1.12.2

#

asString

worthy yarrow
#

it runs on the next tick so basically 1 tick delay

plain meteor
#

Please help me I can't join to my server

proud badge
#

Unless its a plugin development related issue

upper hazel
#

i find this unknown for me parent for plugins in pom - "MassiveSuper" who know what this?

upper hazel
#

how name is bukkit dependency for 1.7

magic beacon
#

Ik this isn’t spigot kit anything, but is there a command that I can use with itemtag (unless it was itemedit) that clears the nearest person close to you inventory? Cause when I do @p it does it to me obv

smoky anchor
#

@a[distance=0.001..,limit=1,sort=nearest]
Should choose one player that is close to you but not you I think ?
No clue what you're talking in the rest of your message

sly topaz
#

@p[rm=0.1]

smoky anchor
sly topaz
#

ah mb that was the bedrock distance thing

smoky anchor
#

it is

sly topaz
#

should still use @p tho, as you save the sorting and limiting

fading drift
#

is there a command to send a player to another server

#

with like velocity running

smoky anchor
sly topaz
#

but you can just download a plugin to do that

fading drift
#

I'm just trying to get the whole theory down pat but like

#

I'm splitting my plugin into 4 plugins

#

core, lobby, matches, bridge

#

in my lobby plugin I would have the gui and the command that runs when you try to queue a match

#

and that would send you to the match server

#

but then how would I determine stuff like map

#

like how can I for example send a player to another server but with data

sly topaz
#

player cookies

#

or just plugin messages

fading drift
#

can you explain what both of those optiosn are

sly topaz
#

there is in fact a command btw, however I am unsure of how these proxies implement the sending of players, as if in they do it using the built-in packets or the way it was always done before these packets existed

fading drift
#

storeCookie unavailable as 1.8

sly topaz
#

ah right, you're in 1.8

#

just use plugin messages

fading drift
#

so basically

#

player.sendPluginMessage

#

and then

#

send the player to the matches server

sly topaz
#

no, you send the player first, the sending itself can be a plugin message too (the Connect channel)

#

then you use the Forward channel to send your custom data, by sending another plugin message

#

then you just receive it on the other end

#

the other option is to just make a plugin in the proxy to handle the data-passing, because plugin messaging depends on players being there

fading drift
#

I see I see

#

this is interesting

sly topaz
#

well, in your scenario I assume it won't be

fading drift
#
out.writeUTF("Connect");
out.writeUTF("match1");

out.writeUTF("Forward"); // So BungeeCord knows to forward it
out.writeUTF("ALL");
out.writeUTF("matches-channel"); // The channel name to check if this your data

ByteArrayOutputStream msgbytes = new ByteArrayOutputStream();
DataOutputStream msgout = new DataOutputStream(msgbytes);
try {
// write data like map name and stuff
} catch (IOException exception){
exception.printStackTrace();

}```
#

like this r ight

#

I fucking hate this

sly topaz
#

I am unsure of whether you can send two messages in a row like that

#

but you can try it I guess

#

but use a try-with-resources

sly topaz
fading drift
#

is it possible to have my matches server have no world?

sly topaz
#

you can have a minimalist world, by not keeping spawn chunks in memory

#

that or use a specialized server platform like minestom or whatever, don't know if there are any for 1.8 though

#

you may also consider looking into slime worlds

fading drift
#

I saw that it looks promising

fading drift
#

I'm confused why this doesn't work

lilac dagger
# fading drift I fucking hate this

you could use dataoutputstreams

try (ByteArrayOutputStream data = new ByteArrayOutputStream(); DataOutputStream out = new DataOutputStream(data)) {
            out.writeUTF("Connect");
            out.writeUTF(server);
            player.sendPluginMessage(engine.getPlugin(), "BungeeCord", data.toByteArray());
        } catch (Exception ex) {
            ex.printStackTrace();
        }```
fading drift
#

lobbyplugin onenable: this.getServer().getMessenger().registerOutgoingPluginChannel(this, "BungeeCord"); this.getServer().getMessenger().registerIncomingPluginChannel(this, "BungeeCord", this);

lobbyplugin command:```
ByteArrayDataOutput out = ByteStreams.newDataOutput();

    out.writeUTF("Connect");
    out.writeUTF("match1");

    player.sendPluginMessage(XinCraftLobby.get(), "BungeeCord", out.toByteArray());```

matchesplugin onenable:

        this.getServer().getMessenger().registerOutgoingPluginChannel(this, "BungeeCord");
        this.getServer().getMessenger().registerIncomingPluginChannel(this, "BungeeCord", this);```
matchesplugin onpluginmessagereceieved:
```java
    @Override
    public void onPluginMessageReceived(String s, Player player, byte[] bytes) {
        // handle plugin messages
        getLogger().info("Received plugin message from " + player.getName() + ": " + new String(bytes));
    }```
#

nothing is being logged by matches plugin

lilac dagger
#

is there a player on plugin message received server?

fading drift
#

no

lilac dagger
#

to receive a message a player has to be online

fading drift
#

is there any way to get around that

lilac dagger
#

nope

sly topaz
#

that's why you send them there first

lilac dagger
#

plugin messaging uses a message packet that comes with a player connection

#

you can skip bungee messaging in favor of sockets

#

you have full control over the connection this way

sly topaz
#

eh, just use a plugin on the proxy

fading drift
lilac dagger
#

or a plugin on proxy

sly topaz
#

they probably have APIs so you don't have to deal with sockets directly

lilac dagger
#

sockets are not as hard as you think

sly topaz
#

they aren't hard, just annoying to do properly

#

if you care about secure sockets at all, anyway

lilac dagger
#

you don't need that either

#

just local host the connection

sly topaz
#

that'll only work if the servers are in the same machine

#

and at that point, just use a unix socket

fading drift
#

so velocity plugin it is?

lilac dagger
#

then use secure sockets

#

it most likely is the same as normal but with either a password/token

fading drift
#

that sounds like a lot of fucking around

sly topaz
#

welcome to cross-server communication

#

then again, there's probably some kind of API in velocity so you don't have to deal with all of this yourself

#

if there's no first-party API, then for sure there's a third-party one

#

but that kind of thing you'll probably be better off asking the velocity guys

lilac dagger
#

if it uses plugin messages it'll face the same issue

sly topaz
#

just don't mention you have a 1.8 backend and you'll be fine lol

fading drift
#

ahaha

#

I dont understand how my plugins would connect to the velocity plugin tho

#

would I just send a plugin message like normal

#

and then my velocity plugin will intercept it and perform the proper task

#

bro why does velocity look so overengineered

sly topaz
#

pretty good post to get more or less an idea of what the different ways to go about it are

lilac dagger
#

communication with sql databases?

#

i guess communication is just data at the end of the day

fading drift
#

socket time it is

lilac dagger
#

ah, it's just one way to connect

fading drift
sly topaz
lilac dagger
#

but with socket you know in an instant that data has been received

sly topaz
#

yeah, but it's awkward to handle at scale

#

I guess it isn't such an issue for minecraft proxies

lilac dagger
#

i think i did

#

just try to accept new clients

fading drift
#

that was a good read btw I really like redis, but it seems to depict it only as an information giver. for example letting the lobby know which matches server to send the player to. but i’m not sure how to actually send the player if I can’t send the player to an empty world using plugin messanger?

lilac dagger
#

redis as far as i know will need a dependency

#

sockets is built into java

#

the connection is 2 way

fading drift
#

either or

#

how do I send the player even if I know where to send them to

wintry dagger
fading drift
#

apparantly that only works if theres players on both ends

#

I need to be able to send a player to an empty server

wintry dagger
#

ConnectOther i think works on empty server tho

fading drift
#

will try

#

yeah it works

#

wow you saved me a lot of trouble

#

wait Connect does work without players

#

dunno why it didnt work the first time

lilac dagger
#

because it connects the player itself

#

the one you use sendplugin message on

fading drift
#

I think I'm gonna use redis

#
  1. lobby server tells match server that player with uuid is connecting with map name and team size
  2. matches server recieves data and generates the match
  3. matches server prepares for the player by hooking into SpawnLocationEvent and checking for player uuid and sending them to the correct world
  4. matches server tells lobby server that its ready
  5. lobby server sends player to match server
#

does this make sense

#

I could probably use sockets but I want to write the code in mind of expandability

#

this makes sense right

grand flint
kindred sentinel
#

Is it possible, somehow add more than 1 server resourcepack to player?

chrome beacon
#

Merge them together and then send

shadow night
#

Can't you send multiple on newer versions

chrome beacon
#

I do recall hearing something like that

#

but I don't know if that's actually the case

smoky anchor
kindred sentinel
#

And I want to have another plugin with rp

slender elbow
#

you can just send multiple resource packs

#

?jd-s

undone axleBOT
kindred sentinel
#

Oh fr?

#

Thanks!

magic beacon
grand flint
smoky anchor
river oracle
#

I believe this is a 1.20.6 feature

valid basin
#

In the player#sendBlockChange method what is last argument responsible for and what can it be used for?
For reference I'm using 1.8.8 as a base version.
Since rn only viable option is using (byte) 0. But there's no wiki on what this actually does and/or is reponsible for. I assume some type of block data?

blazing ocean
#

either 1.19.3 or 1.20.3, can't remember

valid basin
#

I recognized there's a bug when I try to use sendBlockChange method with Material.AIR it doesn't seem to work. Could this be because AIR doesn't have viable block data and (byte) 0 doesn't work?

river oracle
#

If it does create a report on jira

#

?jira

undone axleBOT
river oracle
#

If the packet doesn't work as you expect I don't think we could really do anything

chrome beacon
short drift
#

Is there a known issue in Spigot with falling items and blocks going up and down, falling over and over and over again?

#

What could cause such a thing?

chrome beacon
#

That's a vanilla minecraft bug that's over 10 years old

short drift
#

Really? Is there anything I can do about it?

#

Also, you can't always pick up those items.

chrome beacon
#

You can teleport the items slightly so they're not right on the edge of a block

chrome beacon
short drift
#

I don't think they are on edge of anything. If I blow something up with TNT, for example, I have the blocks falling from 10 meters again and again and again.

chrome beacon
#

Are they on a ghost block?

short drift
#

I don't know.

#

Maybe?

#

Here's what it looks like.

#

Now I have constantly ~4000 falling blocks. Which can't be good.

chrome beacon
#

huh falling blocks? I assumed you were talking about the item 💀

short drift
#

No, blocks.

chrome beacon
#

The server is probably lagging

short drift
#

It's not.

chrome beacon
#

If the entity ticking is taking too long it will simply stop and move on

#

which will cause client desync

short drift
#

It's 50. Probably default.

chrome beacon
#

Try increasing it

short drift
#

To what would you suggest I increase it?

chrome beacon
#

A high value for now

#

Just to see if it's the problem

short drift
#

And if it is what then?

chrome beacon
#

That means the server is unable to keep up the amount of entities you have

#

so to prevent tps drops it just doesn't tick all of them

short drift
#

I wonder if it could be related to my custom block physics. It has been pretty laggy.

chrome beacon
#

When spawning entities you want to modify use the spawn method that accepts a consumer

#

That will ensure that it's modified before it's spawned instead of after

short drift
#

I'm not sure I understand what that is.

#

The consumer takes in values like sethurtEntities?

chrome beacon
#

a consumer is a functional interface

#

So you give it a lambda function where you modify the entity

short drift
#

Mkay. Thanks for the tip. I will look into it.

smoky anchor
chrome beacon
#

turns out their issue wasn't with items at all

#

it was actually falling block entities

smoky anchor
#

ah, didn't fully read the convo

short drift
hushed spindle
#

why was FoodComponent#setEatSeconds() removed in spigot 1.21.3? is it no longer possible to change the time it takes to eat a thing?