#help-development

1 messages · Page 1304 of 1

hardy garnet
#

this

young knoll
#

It’s a reply to something else

hardy garnet
#

I know

#

I meant, the whole thing with "violent associations". I was asking if that person who made that comment was joking or serious lol

mortal vortex
#

Why would a software be joking tho idek wym

hardy garnet
#

Oh the software is what said it

#

I didnt catch that

mortal vortex
#

All good!

dusky crane
#

How does Spigot generate the patches it applies to the Minecraft server?

inland hemlock
#

got a question, is reading block data in a seperate async thread not recommended in any situation? do I have to use separate block snapshots that are given to the task?

sly topaz
dusky crane
#

What do contribuitors modify before making their patches?

#

Do they modified a patched and decompiled version of Minecraft?

sly topaz
#

Spigot uses a fork of Fernflower to generate the decompiled minecraft source, as well as a bunch of source patches to clean up the decompiled output

sly topaz
#

that kind of question is generally seen when someone is doing something asynchronous and doesn't want to context switch for whatever reason it might be

thorn isle
#

depends on what you mean by block data specifically, and there are also quite a few differences in behavior between paper and spigot in this

dusky crane
#

The contribuitor copies a target decompiled, santised class and modifes it? And then runs make patches to make the patch with their modification.

#

Thanks for the help!

sly topaz
#

yep, that's pretty much it

inland hemlock
thorn isle
#

reading block type is safe in that it won't corrupt the world or anything, being a read operation

#

but there aren't much in the way of guarantees that what you get is actually there

#

as a practical example, simple async reads weren't enough for my flood-fill algorithm that tried to map enclosed rooms; occasionally, blocks that weren't air would return their type as air

#

so i had to manually synchronize on the paletted container of the chunk section to make sure i was getting the correct data

sly topaz
#

that being said, if you can abstract out the calculations so that's the only thing you're doing asynchronously, then that'd be ideal

thorn isle
#

depending on how large of an area you access, a sync chunk snapshot + async processing on it might be a cleaner and safer option

#

ideally we could get chunk section snapshots, since snapshotting the entire chunk is almost always overkill, but maybe one day

sly topaz
#

it wouldn't be particularly hard to make an API for in spigot at least, no idea in paper

thorn isle
#

internals are about the same in terms of a section's relation to its chunk i think

#

the funny thing is that if we don't include tile entities or heightmaps or anything other than block/biome data in the snapshot, we can actually take the snapshot async

#

since nms synchronizes over the paletted container for all writes

sly topaz
#

I would give it a go if I had the patience to deal with the contribution process

thorn isle
#

having "async" in the pr title is a surefire way to get your pr in forever review limbo on paper

inland hemlock
#

well, whole chunk snapshots seem a bit much, especially if it stretches over more than one. Inaccurate calculations are okay if it is on a small scale, I haven't really experienced any yet. and filling up enclosed rooms works. Im really satisfied rn, only problem is the async read. But if you say it wont corrupt any world files then i believe im good. If not, I would have created a snapshot block class which would have saved important block data + the surrounding blocks for flood check, but that would take a small hit on perfromance. ig, ill keep it? tyvm!

thorn isle
#

i'm not 100% on this but i think on spigot, checking a block's type on async schedules a task to run on the next tick that gets it and passes it to the calling thread, meaning the async thread can block for up to 50ms if the main thread has just finished ticking

#

probably want to check if that's still the case and keep that in mind if it is

#

in the worst case, checking 100 blocks asynchronously can take 5 seconds if you miss the main thread's tick loop on each call

inland hemlock
#

im not sure but that sounds logical. But as of right now, I never had any infinite or large calculations. Seems like request always got an answer. If i ever encounter to a serious problem, ill switch. But right now, im rather enjoying the insane performance.

harsh patrol
#

Looking for a Minecraft Developer (Paid)
Hi! I’m looking for a Minecraft developer to help with my project. This is a paid position, and I’m happy to discuss rates depending on experience and the scope of work.
If you’re interested, please send me a message!

harsh patrol
grand flint
harsh patrol
grand flint
thorn isle
#

what's an al plugin

sly topaz
young knoll
#

It’s a plugin made by weird Al Yankovich

pine sandal
#

I am trying to catch the CrafterCraftEvent and go thru the recipe of the crafter item, I am having an issues when leather armor is dye. It seems to not be a ShapedRecipe, ShapelessRecipe, TransmuteRecipe but just a ComplexRecipe. Does this mean it would be inpossible to get what ingredents were used for the craft?

thorn isle
#

a complex recipe is a recipe where the recipe itself doesn't know what exact items are used in it and what exact result it produces

#

e.g. attaching a potion to an arrow to make a tipped arrow; any potion could be the input, a tipped arrow with any potion effect the result

#

if you need to get the specific items involved, you'll have to look at the inventory

young knoll
#

In the case of dying armor the input is up to 8 of any dye

earnest girder
#

?help

undone axleBOT
#
CafeBabe Help Menu
*Red V3*
__**Admin:**__

selfrole Add or remove a selfrole from yourself.

__**Cleanup:**__

cleanup Base command for deleting messages.

__**Core:**__

embedset Commands for toggling embeds on or off.
info Shows info about CafeBabe.
licenseinfo Get info about Red's licenses.
mydata Commands which interact with the data CafeBabe has about...
set Commands for changing CafeBabe's settings.
uptime Shows CafeBabe's uptime.

__**Downloader:**__

findcog Find which cog a command comes from.

__**Mod:**__

names Show previous usernames, global display names, and server...
userinfo Show information about a member.

__**ModLog:**__

listcases List cases for the specified member.
reason Specify a reason for a modlog case.

__**Permissions:**__

permissions Command permission management tools.

solid wave
#

anyone help

#

im try to reset all my player money

#

i has try to delete file, or in game command but it's still dont work

chrome beacon
#

and do specify what files and commands you've used

thorn isle
#

delete the server directory, that'll probably do it

chrome beacon
#

as well as what economy plugin

solid wave
minor urchin
#

best way to change the size of an armorstand's hitbox?

chrome beacon
#

Version? And for what purpose?

minor urchin
#

1.21.5-R0.1-SNAPSHOT so that I can interact with the hitbox but a bigger one

solar slate
minor urchin
minor urchin
#

because armorstands throw the InteractAtEntity event

young knoll
#

Same one

chrome beacon
#

^

minor urchin
#

ok thanks

minor urchin
#

is there a way to make an armorstand invis while being able to see its items in its main and offhand?

chrome beacon
#

I recommend using two Item Displays instead of armor stands

hardy garnet
#

What do people use for making animations? I'm assuming its display blocks

chrome beacon
#

depends on the version and what type of animation

#

but yes display entities are a good idea

hardy garnet
#

1.21.8. So yea display entities

#

I am already using them to a small extent, but thinking about using them to make animations feels kinda overwhelmingly complicated.

chrome beacon
#

It can be a lot of math

hardy garnet
#

Well what if you wanted, say for example, a large expanding ring

#

You'd need to make code to make a bunch of display entities all rotated in a way to make a circle, then make the entities go outwards and increase their scale depending on how far theyve gone

#

already this is a mess

chrome beacon
#

yeah math time

inland hemlock
#

im trying to set a water block using nms, but somehow flowing water always updates itself and disappears in the ground, cancelling BlockPhysicsEvent and BlockFromToEvent didnt work. Any1 know why?

    ServerLevel nmsWorld = ((CraftWorld) block.getWorld()).getHandle();
    BlockPos blockPos = new BlockPos(block.getX(), block.getY(), block.getZ());
    BlockState nmsBlockState;
    if (level <= 0) {
      nmsBlockState = ((CraftBlockData) Material.AIR.createBlockData()).getState();
    } else {
      BlockData waterData = Bukkit.createBlockData(Material.WATER, "[level=" + (level == 8 ? 0 : 8 - level) + "]");
      nmsBlockState = ((CraftBlockData) waterData).getState();
    }
    int flags = 2 | 16;
    nmsWorld.setBlock(blockPos, nmsBlockState, flags);
  }
chrome beacon
#

Why are you using nms

inland hemlock
#

Want to change a large amount of blocks.

sly topaz
#

I'd recommend just using FAWE's API for that

#

setting blocks that way isn't going to be any different than doing it with the API

chrome beacon
#

yeah FAWE or work distro

inland hemlock
#

is it that hard to just fix the water from updating?

chrome beacon
#

It'll save you time in the long run

#

since you don't need to maintain it

inland hemlock
#

well as of right now i dont wanna rely on external APIs. If it really is that hard to do for now, maybe, but for the short run I just wanna test if it is even showing improvements. If it is fixable within a method, then i'd be grateful for any advice.

thorn isle
#

just use fawe

#

if you really want to figure out why nms does what nms does, plug the server into a debugger and step through the call stack and see where and behind which branch the block gets put into the chunk's tick list

#

also consider caching the nms blockstate, parsing a blockstate string through bukkit is far from "fast"

chrome beacon
#

yeah wouldn't suprise me if that's slower than doing setType to begin with

echo basalt
#

damn just reached 65k lines of code at work

#

thought we were still in the 40's

chrome beacon
#

👀

fresh timber
#

can anyone help me understand why systems like this are better than using regular inventory systems such as is described at the start of the form by just checking what slot the player clicked in to perform actions? I read this tutorial like 3 times and I still don't understand what they are doing, why they are doing it, or how to do it at all xD

https://www.spigotmc.org/threads/a-modern-approach-to-inventory-guis.594005/

#

they say the system is better but it looks a lot harder because you have to make a new class for each gui

thorn isle
#

nothing a little bit of inheritance and OOP won't solve

#

personally i have some gripes with the specifics of how oop is implemented in that tutorial, but it's still leagues better than filling classes with switch boilerplate

fresh timber
#

but like you didn't answer any question I had

thorn isle
#

what is your question exactly

#

"why is it better" is a bit vague; i see a switch block at the start of the tutorial, is that what we're comparing the tutorial to?

fresh timber
# thorn isle what is your question exactly

I have many but yes why is it better would be one of the main ones

why is it better than just making an inventory and showing it to the player and then checking the slots that the player clicks

wet breach
fresh timber
wet breach
#

its not about taking up more space

thorn isle
wet breach
#

^

#

vcs2 is on point tonight

#

you should listen to them 😉

fresh timber
#

its pretty easy for me to make new guis and I wouldn't want to copy the same switch statement

wet breach
#

instead of duplicating the code, to make it a bit different, you would instead created a class that extends it

#

and in that class you add the code that is different

#

leaving what you want to retain in the original class

fresh timber
#

oh well that seems like a problem if you want to change the original one

wet breach
#

overriding is the same concept, but instead of creating new methods, we want to alter the methods that already exist in what they do

fresh timber
#

but I don't really need to make 2 guis similar to eachother so its fine

wet breach
#

right, but they are explaining why its better

#

later on, you might want 2 guis though

#

and maybe 3 and so forth

fresh timber
#

ofc I have a lot of guis

#

but they aren't all the same lol

wet breach
#

instead of just duplicating code all the time, you could just extend and override as needed instead

thorn isle
#

well, let's take two of your guis as example

#

what do they do and how did you make them work?

fresh timber
#

got a menu that has a bunch of items to go to sub guis I just made a new inventory with bukkit.createinventory and filled it with items then showed the player the inventory and listened for when they clicked

I have a teleport gui that is made the same except for when they click it teleports them somewhere

thorn isle
#

do they use pagination?

fresh timber
#

idk what that is so no

thorn isle
#

what if you have more teleport points that fit in a single gui page?

#

you'll need multiple pages

#

same with sub guis

fresh timber
thorn isle
#

this is shared behavior which could be contained in a superclass that the two guis extend

#

yes but the point is that you don't copy paste the pagination code in two places

#

DRY; don't repeat yourself

fresh timber
#

I mean the only thing I would be repeating is creating/showing the inventory and having page turning arrows

echo basalt
#

@torn shuttle Any tips for optimizing client-side lag with custom models?

#

We got thousands of props and there's no culling algorithm that'll fix this

thorn isle
#

and sorting the items from the full list and placing them in the inventory and assigning the slot index -> action mappings based on their ordering

echo basalt
#

Models are already low-poly enough

thorn isle
#

it's maybe like 10-20 lines sure, but not having to repeat those 10-20 lines is why it's better

echo basalt
#

write a layer system that already does your pagination stuff for you

#

we do pagination at work with titles instead of items or whatever

thorn isle
#

i'm trying to explain to him why you'd want to do something like that instead of a switch block for every gui

fresh timber
thorn isle
#

the same logic can apply to different data

fresh timber
#

but it shouldn't matter because the gui is being filled with different stuff so I am not just going to copy the old GUI's items

thorn isle
#

no, but you will be copying the pagination logic

#

or are you manually writing out the layout of each page instead of taking a list of "all the stuff" and splitting it into pages?

echo basalt
#

the most I repeat in my guis is just like

#
registerButton(NEXT_PAGE_KEY, layer::nextPage)
fresh timber
#

but creating a bunch of classes just to save the layout of a page seems way too hard

echo basalt
#

load the layout from a config

thorn isle
#

creating classes isn't hard

#

maintaining massive copy pasted switch blocks is hard

fresh timber
#

well no but you gotta make a new one for each gui

thorn isle
#

not an entire class

#

a subclass that extends a superclass

#

a class can be 1 line

fresh timber
echo basalt
#

each gui has a class

#

each gui element has a class

thorn isle
#

in java everything is an object and every object has a class

echo basalt
#

anything that comes from a config is in a config loader class

thorn isle
#

having different classes and objects to represent different things is natural

fresh timber
echo basalt
#

each menu has a config file

#

all the configs are loaded from a folder

fresh timber
echo basalt
#

Here's an example

thorn isle
#

i'll take slimefun for an example, since that has a lot of nested and fairly complicated guis

#

there is a main category gui that has to paginate

#

it takes a list of item categories in the game, sorts them by level, and splits them into pages

#

clicking any category opens another paginable gui (sharing a common superclass with the category gui for pagination logic) that lists all the items in that category

#

clicking on an item shows another gui with its recipe, the recipes its used in, and the recipes crafted in it if it's a crafting station/machine

#

clicking on any item in the recipe will take you to the item page for that item

echo basalt
#

I'd just make that a paginable area where each element is a button that opens a sub menu

thorn isle
#

that's how it works, yeah

#

there's also logic for sorting/hiding/decorating items based on whether you've unlocked its research or not

echo basalt
#

and if you fuck around with titles for long enough maybe it'll even look nice

thorn isle
#

now, since there are a lot of things paginating in each direction, i represent each paginable area in the gui with its own object that's attached to a list of items to paginate through, and two buttons in the gui to paginate it with

echo basalt
#

I have a gui that was really difficult to do with traditional pagination so I made a 2d engine for it

fresh timber
echo basalt
#

took me 7 hours to make a system where you can align layers and stuff

#

life's been easy since I've done that

thorn isle
#

looks very good for sure

#

there is also a variant of the entire gui set for the "cheat gui" which rather than showing item recipes will spawn them in

fresh timber
thorn isle
#

the item search gui also uses the same gui class for pagination

grand flint
echo basalt
#

magic

thorn isle
#

it looks almost as good as the shit bedrock gets natively

#

meanwhile we have to do this or cope with dialogs

grand flint
#

meh we got display entities

#

tbh

#

they got builtin mod manager 😭

minor urchin
#

any way to change an armorstand hotbox size so that i can detect collisions?

pliant topaz
#

if >=1.19.4 u can use interaction entities (effectively just a hitbox with configurable size)

thorn isle
#

there's also the scale attribute

cinder abyss
#

meanwhile me, just done autoconfig for spigot lol (annotation-based config loading)

echo basalt
#

I didn't even mention

#

All these menus work cross-server

mortal vortex
echo basalt
#

I did it the most lame way possible

#

I guess this also helps

mortal vortex
echo basalt
#

as for figuring out somewhat different but consistent colors I use a random where the seed is the chunk key or something

#

or the claim id either works

#

that way different claims have different color outlines but it's consistent

manic delta
#

i always wanted to learn about that

#

those texts

echo basalt
#

You already know how the background is done, right?

manic delta
#

yes

#

is a texture

echo basalt
#

it's basically the same

#

different fonts for different heights

#

negative spacing to align it all

manic delta
#

so those all texts are on the title?

echo basalt
#

yup

manic delta
# echo basalt yup

So I understand that the title doesn't have a character limit, or at least not a small one

echo basalt
#

pretty much

#

I'm sure you'll hit a packet size limit at some point

manic delta
#

how much is the limit to be exact

echo basalt
#

dunno

#

but it's big

manic delta
#

damn

#

so thats the trick

#

thank you for showing us that

mortal vortex
manic delta
#

i only have two fortnite bucks

manic delta
echo basalt
#

fuck no

manic delta
#

so u made a function for it

#

thank you

echo basalt
#

layers

#

might even make minimessage tags out of them

manic delta
#

it should

echo basalt
#

that's the layers for that settings ui

manic delta
# echo basalt

i always wanted to do things like that guis with that dynamic texts, ill try to do it

echo basalt
#

bet you didn't notice the progress bar on the first UI :)

manic delta
#

i did

#

thats cool

slender elbow
echo basalt
#

my own placeholder system kicks in for those

#

code's too decoupled

slender elbow
#

:(

echo basalt
#

I mean nothing's stopping me from doing that

#

but no

#

it'd make things annoying because placeholders don't always have names

#

they're just replacement functions

#

which lets me just add a PAPI function in the middle and whatever

slender elbow
#

can also do that with tags tho

echo basalt
#

I mean yeah

#

I can like

#

<papi>%whatever%

slender elbow
#

skull

echo basalt
#

shoo

manic delta
#

🤔

echo basalt
#

stole it off nexo but you can just lookup negative space character

#

or whatever

manic delta
echo basalt
#

you need to know the width of every character for every font

#

title is probably like 24 characters long or something

#

so you send like

#

except every height needs its own font

manic delta
#

if i use normal font i need to know it too

echo basalt
#

yup

manic delta
#

i have a class for that

#

to use <center>

#

but i stole code by myself it somewhere years ago

echo basalt
manic delta
#

uh i have that one

#

looks like it is outdated

echo basalt
#

I'm also accounting for the 1 pixel after each letter

manic delta
#

oh ok ill try it

#

thank you

torn shuttle
#

that's what I added

echo basalt
#

frustum culling has an awful pop-in effect

torn shuttle
#

does that look like my problem

#

I have a minimum render distance of 20, so packets are sent anyway if you're within 20 blocks for the most egregious examples

#

otherwise it's culling

#

and I don't update animations for stuff that is culled

#

alos it's all in async

echo basalt
#

I'm taking a mixed approach

torn shuttle
#

half of it is shit, the other half is doo doo

echo basalt
#

render distance based on the viewing angle + ray casting + whatever else

torn shuttle
#

I mean that's what frustum culling is

#

frustum is about getting your view volume

echo basalt
#

I know

#

but even with the frustum some things are just too far

torn shuttle
#

I check if I can see any other corner of a bounding box

#

works pretty well

#

if you can't see any vertex of the bounding box / hitbox then you definitely can't see the entity

echo basalt
#

what if the entity is multiple blocks long and you can't see the vertex but you can see the edge

torn shuttle
#

so that's just not possible

#

like

echo basalt
#

it's unlikely but possible

torn shuttle
#

the only way you'd get mc to render something like that up close would be to put several entities together through multiple bones because mc models have a hardcoded limit of something like 111 pixels

#

I have it in my wiki somewhere

#

so no it is not possible

#

when you take my minimum render distance into account

echo basalt
#

what if it's not an open space

#

and you're seeing through like a slab or between 2 blocks

torn shuttle
#

and you're more than 20 blocks away?

#

then maybe you should get good and just live with the fact it will pop in when you're closer

manic delta
echo basalt
#

I'm more concerned as to why your entire inventory is invisible

manic delta
#

haha is the rp

manic delta
echo basalt
#

different fonts for different shifts

#

keep in mind that horizontal shifts still apply across fonts

manic delta
#

uhh im not getting it

echo basalt
#

this does left-right

#

for vertical, make a font that's a copy of the default font

#

but change the ascent of it

#

you can make copies of that ascented font with different ascents for different heights

#

For example defaultslot1, defaultslot2, defaultslot3

manic delta
#

oh so i need to make a "copy" of a font for each slot

echo basalt
#

for each vertical change yeah

#

so 6 rows I guess

#

I have as many as 20 for some more complex stuff

manic delta
#

so to do this

#

i need 3 fonts

#

for those a, per row

#

or just one

manic delta
#

so 6 fonts

echo basalt
manic delta
#

those among us

#

lol

slender sphinx
#

Not sure if this is considered development related or not, but is there a decent documented library that contains premade frequently used things such as colors, GUIs, item stack manipulation, etc.?

pseudo hazel
#

the difference between development and server help would be asking for libraries vs plugins

#

all of those things mentioned are part of the development api so I assume you are looking for a plugin that does all of these so you can do it in game?

slender sphinx
#

I found something called AdventureAPI (and TriumphGUI for inventories)

pseudo hazel
#

what are you looking to do regarding item stack manipulation?

slender sphinx
#

Normal things I used to do with meta data, such as changing name, lore, etc.

pseudo hazel
#

cant you still do that?

slender sphinx
#

I mean I most likely still can, last time I coded plugins was in 1.8 so no idea, just thought maybe there are things to help make this quicker and reusable

#

Is /reload still a thing?

pseudo hazel
#

not sure, minecraft has its own reload command now

slender sphinx
#

Oh that explains why it kept saying my username and "Reloading!"

pseudo hazel
#

but it sounds like you wanna use the paper api xD

#

it has a data component stuff to edit item data

slender sphinx
#

Shh we don't talk about that here lol (but yes)

slender sphinx
thorn isle
# echo basalt and you're seeing through like a slab or between 2 blocks

when i worked on something similar for culling slimefun machines with expensive-to-render models, i combined all occluding objects into a single mesh and then shrunk the mesh so that holes in it, like the half-slab, got bigger; this way unless you were moving super fast, things would pop in while they were still obscured by other objects

#

this was quite expensive on the server side though so eventually i ended up going with a different approach that was more well-suited to the fact that machines were usually concentrated in enclosed rooms, but i'm not sure if this applies to your use case

#

for entity tracking packets, i use frustum culling with 3 different volumes with different update rates; entities even directly behind the player aren't culled entirely, they just send packets less frequently, making the pop-in effect when turning a bit less noticeable, though you can still see it if you look for it

#

since you're presumably working with display entities, in terms of bandwidth/packet spam, their built-in interpolation is your best bet at lowering them

#

it is unfortunately kind of shit and doesn't really support more than two consecutively attached bones, but accounting for these limits when creating the animations themselves can help a bit

young knoll
#

Don’t display entities have an option to control how far they render from

thorn isle
#

they do, so you don't need serverside distance culling

#

the client also does frustum culling on them for rendering purposes, so unless you're cpu-bound on that, you shouldn't need to do frustum culling on the server side

#

unless what you want to reduce is the bandwidth from updating their position/rotation

#

all you can really do on the server side to help the client render faster is occlusion culling, but that gets very expensive very fast, and latency makes it look horrible unless you do tricks like what i mentioned, which make it even more expensive

#

at the end of the day i just told my players to install the entity culling fabric mod which does occlusion culling on the client side

young knoll
#

Fair enough

cinder abyss
misty ingot
#

whats an easy way to create "zones"?
I wish to be able to know when players enter and exit the zones and be able to define/redefine the area of the zone at will

one way is to check the player's position relative to the zone every tick using a function but are there any better ways to do this?

thorn isle
#

depend on worldguard

#

iirc they have events for entering/exiting a region

frail pilot
#

Yup

hardy cairn
#

i was trying to add a custom flag but it doesnt work can someone help me ```
public static void registerFlags() {
FlagRegistry registry = WorldGuard.getInstance().getFlagRegistry();
final String flagName = "powertrims-abilities";

    try {
        StateFlag flag = new StateFlag(flagName, true);
        registry.register(flag);
        USE_TRIM_ABILITIES = flag;
    } catch (Exception e) {
        Flag<?> existing = registry.get(flagName);
        if (existing instanceof StateFlag) {
            USE_TRIM_ABILITIES = (StateFlag) existing;
        } else {
            System.err.println("[PowerTrims] WorldGuard flag '" + flagName + "' already exists but is not a StateFlag. This is a critical conflict.");
        }
    }
}```
thorn isle
#

they'll also support complex region shapes like polygons out of the box so you aren't stuck with boxes

frail pilot
#

And catching Exception is not a good idea

hardy cairn
#

ah sorry i meant the flag doesnt seems to be registering i was trying to make this flag deny but it couldnt find this flag ingame

#

i dont really know what im doing lol

frail pilot
#

Iirc, you can only register them during the plugin loading phase

hardy cairn
#

oh

frail pilot
#

Need to be in onLoad()

hardy cairn
#

ah thanks

misty ingot
grand flint
#

i can see the display entity, text entity from way further than what i can render

forest cobalt
#

how to make pearls never go away

smoky anchor
#

change the gamerule enderpearlsVanishOnDeath I think
And update to the yet unreleased Fall Drop 'cause that had some bug fixes I think

#

oh I'm still pink oops :D

waxen anchor
#

hi i need a hd skin system with my client and bungeecord server. how do you do this system. Can I you help please

forest cobalt
smoky anchor
forest cobalt
smoky anchor
#

next time provide the number after . as well
But I don't see any changes in the wiki changelog regarding this, may be spigot server specific thing

young knoll
#

Don’t they get removed when the player logs out

#

And then get respawned when they log back on

tawny osprey
#

Hi guys, am I able to ask for help regarding java stuff here or just spigot specific?

grand flint
#

only w clients

grand flint
#

as long as its not 🧻

tawny osprey
#

Thank you

#

..?

#

toilet paper?

grand flint
#

yes the forbidden word after toilet

tawny osprey
#

Anyways

#

Regarding constructors and Inheritance, if I have a constructor in a subclass am I able to use a this statement in a constructor and a super() in the next constructor?

grand flint
#

i have no idea

#

but im pretty sure

#

u cant use this and super in the same constructor

chrome beacon
#

Are you trying to run some stuff before calling the super constructor?

tawny osprey
#

Yes @chrome beacon

chrome beacon
#

For what purpose

tawny osprey
#

No purpose, I am just curious because I am a beginner and want to know if I can

chrome beacon
#

It is something that's being worked

#

Should be come available in Java 25 and is currently available as preview 22, 23 and 24

#

though for the versions you'll encounter the most 8 and 21 it is not

tawny osprey
#

hmmm

chrome beacon
#

If you want to read more about it it's called Flexible Constructor Bodies and the relevant JEP is 513

smoky anchor
thorn isle
tawny osprey
thorn isle
#

can't wait for flexible constructor bodies

chrome beacon
buoyant viper
tawny osprey
#

It's good for flexibility

jade bone
#

Anyone knows how i can remove the "Applies to: & Ingredients" from the item Meta? I tried ItemFlag.HIDE_ADDITIONAL_TOOLTIP, ItemFlag.HIDE_ATTRIBUTES but it doesnt seem to work

young knoll
#

Isn’t that creative mode only stuff

jade bone
#

Can see it in survival as well

young knoll
#

Can always try slapping all the flags on

#

addItemFlag(ItemFlag.values())

#

If that doesn’t hide it then you’re out of luck

jade bone
#

Iguess I'm out of luck 😢

umbral ridge
#

did you set the item meta

jade bone
#

Yes i did:

public static ItemStack createItem(Material material, String displayName, List<String> lore, boolean enchanted) {
        ItemStack item = new ItemStack(material);
        ItemMeta meta = item.getItemMeta();
        if (meta != null) {
            if (displayName != null) {
                meta.setDisplayName(displayName);
            }
            if (lore != null && !lore.isEmpty()) {
                meta.setLore(lore);
            }

            if (enchanted) {
                meta.addEnchant(Enchantment.MENDING, 1, false);
                meta.addItemFlags(ItemFlag.HIDE_ENCHANTS, ItemFlag.HIDE_ADDITIONAL_TOOLTIP, ItemFlag.HIDE_ATTRIBUTES);
            }

            item.setItemMeta(meta);
        }
        return item;
    }```
#

I removed the all flags again

tulip slate
#

What’s the formula for horizontal air drag? I wanted to make a plugin to counteract/reduce it but idk how it’s calculated

chrome beacon
tulip slate
#

Ty

waxen anchor
chrome beacon
grand flint
waxen anchor
mortal vortex
# waxen anchor optifine mpc 1.8.9
  1. When they said a client, they likely meant one of those PVP clients which has a cosmetic store. Optifine on its own, would not have that.
  2. Could you further clarify what you mean by a HD Skin? Theres a possibility you're mistaken in what you're asking and we are confused.
  3. You can't exactly setup a "HD Skin System", each client handles skins differently, whenever you purchase a cosmetic on Lunar for instance, the server needs no particular software to render those cosmetics on other players, their client is what does the magic. There is no cross-platform plugin or service for exchanging those cosmetics between clients or software.
solid wave
#

my mobs in mythic mob get health limited 1000

#

anyone know how to fix

mortal vortex
#

What’s your code look like?

solid wave
#

the mobs code?

#

cuu:
Type: SHEEP
Display: '&dCừu Lv3'
Health: 9999
Damage: 0
Drops:

  • cuurung
    LevelModifiers:
  • health 1
  • damage 0.5
    Options:
    MovementSpeed: 0.2
    Silent: true
    AlwaysShowName: true
    Angry: true
#

this

jade bone
solid wave
#

ok

#

s

jade bone
#

3x then next to it the languague enter then code enter then 3x

solid wave
mortal vortex
solid wave
#

ok

waxen anchor
mortal vortex
#

Okay then, so if you're building the client yourself, you'd probably just have some plugin which sends a custom packet if its relying on a custom client either way

shadow night
waxen anchor
#

wait

#

i dont send image there

#

where to upload ?

shadow night
#

ugly ahh skin

waxen anchor
#

i need hd skin my opfine client

mortal vortex
#

This is like 1.7.3 when everyone had HD resourcepacks

shadow night
#

lmao

#

literally everybody ran like faithful atleast

waxen anchor
#

How can I do the HD skin thing?

mortal vortex
mortal vortex
mortal vortex
#

Okay. So for a second you need to forget about the server. The server is used to transmit packets which ultimately, the client needs to handle.

#

As is, can your client handle HD skins?

#

Atleast client-side / singleplayer.

waxen anchor
mortal vortex
#

So are you prepared to make your own client?

#

like completely, write your own client?

#

Wait didnt you already say you have a client? I asked, "will everyone be using your client" and you said yes?

waxen anchor
#

but how do you import this skin system my client

mortal vortex
#

Again, I am asking you, do you have a client written?

#

I am asking, are you prepared to, or have coded a client?

waxen anchor
#

yes i have client and codes and run intelij idea

#

but where to edit which file

#

which class

mortal vortex
#

You'll need to begin by actually modifying the client to even handle incoming skins, parsing them, and then actually physically rendering them. Hook into the skin render method, circumvent the part that downscales the skin, but rather scales it. However you do that is up to you to decide. I'd expect you to already have experience with clients. I think the class is PlayerEntityRenderer, atleast in Fabric.

You'll also need some kind of CDN or server where you're hosting the skins, and dispatching them to the client. Then write a plugin which sends the skin to the client.

waxen anchor
#

i dont have PlayerEntityRenderer class only have SkinManager first blocks:

package net.minecraft.client.resources;

import com.google.common.cache.CacheBuilder;
import com.google.common.cache.CacheLoader;
import com.google.common.cache.LoadingCache;
import com.google.common.collect.Maps;
import com.mojang.authlib.GameProfile;
import com.mojang.authlib.minecraft.InsecureTextureException;
import com.mojang.authlib.minecraft.MinecraftProfileTexture;
import com.mojang.authlib.minecraft.MinecraftSessionService;
import com.mojang.authlib.minecraft.MinecraftProfileTexture.Type;
import java.awt.image.BufferedImage;
import java.io.File;
import java.util.Map;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.LinkedBlockingQueue;
import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.IImageBuffer;
import net.minecraft.client.renderer.ImageBufferDownload;
import net.minecraft.client.renderer.ThreadDownloadImageData;
import net.minecraft.client.renderer.texture.ITextureObject;
import net.minecraft.client.renderer.texture.TextureManager;
import net.minecraft.util.ResourceLocation;

public class SkinManager
{
    private static final ExecutorService THREAD_POOL = new ThreadPoolExecutor(0, 2, 1L, TimeUnit.MINUTES, new LinkedBlockingQueue());
    private final TextureManager textureManager;
    private final File skinCacheDir;
    private final MinecraftSessionService sessionService;
    private final LoadingCache<GameProfile, Map<Type, MinecraftProfileTexture>> skinCacheLoader;

    public SkinManager(TextureManager textureManagerInstance, File skinCacheDirectory, MinecraftSessionService sessionService)
    {
        this.textureManager = textureManagerInstance;
        this.skinCacheDir = skinCacheDirectory;
        this.sessionService = sessionService;
        this.skinCacheLoader = CacheBuilder.newBuilder().expireAfterAccess(15L, TimeUnit.SECONDS).<GameProfile, Map<Type, MinecraftProfileTexture>>build(new CacheLoader<GameProfile, Map<Type, MinecraftProfileTexture>>()
        {
            public Map<Type, MinecraftProfileTexture> load(GameProfile p_load_1_) throws Exception
            {
                return Minecraft.getMinecraft().getSessionService().getTextures(p_load_1_, false);
            }
        });
    }

    public ResourceLocation loadSkin(MinecraftProfileTexture profileTexture, Type p_152792_2_)
    {
        return this.loadSkin(profileTexture, p_152792_2_, (SkinManager.SkinAvailableCallback)null);
    }```
#

How do I edit this part?

mortal vortex
#

i dont know dude

mortal vortex
#

You should ask in a modding community

#

i dont even know if there are MCP groups nowadays

waxen anchor
storm mango
umbral ridge
#

ta

grand flint
waxen anchor
#

sen biliyormusun hd skin nasıl entegre etçeğimi

delicate stump
#

java biliomusun briaz

solid wave
#

my mob dont deal poison

#

- potion{type=POISON;lvl=2;duration=100} @PlayersInRadius{r=1}

#

is there any wrong with that code?

thorn isle
#

lol

delicate stump
#

hi

ivory sleet
delicate stump
#

uhh i need a nick plugin that works with death messages and leave messages

#

anyone has it?

#

for 1.21.5

#

the best one i could find is haonick but when i type in chat it shows my name blue and doesnt really work with death messages

#

i did change the config a little to make it work with join and leave messages but no idea about the chat and death messages

#

and it also works in tab

delicate stump
#

or anyone knows

thorn isle
#

you'll have to listen to the death events and replace the player's name in them

waxen anchor
ivory sleet
#

idk if there are any good free nickname plugins

delicate stump
#

cant i do it with config

thorn isle
#

listen to the player death event

thorn isle
#

in your plugin write an @EventHandler for the player death event

ivory sleet
#

@waxen anchor english only

thorn isle
#

an event listener

waxen anchor
delicate stump
#

do u think it ll work with nicked death messages?

thorn isle
#

get the nick from your nick plugin of choice through its API and then substitute it for the player name in the death event handler

delicate stump
#

uhhhh

#

can we vc?

thorn isle
#

no but if you take a screenshot of your current project layout in your ide or whatever i can probably tell you which class to put it in

delicate stump
#

im on aternos tho

#

idk how to host a local

#

do i need any other plugin other than haonick rn?

#

i have the nickapi too

waxen anchor
# delicate stump java biliomusun briaz

sen bana biraz nereyi ne ile değiştiriceğimi söylesen (kod olara değil tabiki yani mesela class söylesen buraya şöyle bir mantık ekle desen eklerim en kötü gptden yardım alırım)

translate: If you could tell me what to change and where (not as code of course, but for example if you told me a class, I would add a logical element like this and at worst I would get help from GPT)

waxen anchor
delicate stump
#

ik englisd dw no need to translate

thorn isle
#

this is dev-help

delicate stump
waxen anchor
thorn isle
delicate stump
#

i just need to like modify a plugin

#

not recode it

waxen anchor
#

I'll be there in 5 minutes then.

delicate stump
grand flint
#

or 64x idk

#

but then u need ur own skin uploading system

#

cuz u cant upload hd skins into java

#

so u need to store the players skin on ur client and render it from wherever u store it

delicate stump
waxen anchor
delicate stump
#

i need a good nick plugin that work for death messages

grand flint
grand flint
#

u need to also change the model of the player to fir that

delicate stump
grand flint
thorn isle
#

because this is for coding help

delicate stump
#

its not about server

grand flint
#

it is?

thorn isle
#

are you coding a plugin?

delicate stump
thorn isle
#

no, that is not coding

grand flint
#

thats about ur server

#

go help server

delicate stump
#

but like someone that knows coding can fix it

grand flint
#

we cant fix it

#

ur searching for a plugin

#

go help server

#

and i already gave u a recommendation

waxen anchor
# grand flint idk u gotta see how mc renders the current skin
public BufferedImage parseUserSkin(BufferedImage image)
    {
        if (image == null)
        {
            return null;
        }
        else
        {
            this.imageWidth = 64;
            this.imageHeight = 64;
            int i = image.getWidth();
            int j = image.getHeight();
            int k;

            for (k = 1; this.imageWidth < i || this.imageHeight < j; k *= 2)
            {
                this.imageWidth *= 2;
                this.imageHeight *= 2;
            }

            BufferedImage bufferedimage = new BufferedImage(this.imageWidth, this.imageHeight, 2);
            Graphics graphics = bufferedimage.getGraphics();
            graphics.drawImage(image, 0, 0, (ImageObserver)null);

            if (image.getHeight() == 32 * k)
            {
                graphics.drawImage(bufferedimage, 24 * k, 48 * k, 20 * k, 52 * k, 4 * k, 16 * k, 8 * k, 20 * k, (ImageObserver)null);
                graphics.drawImage(bufferedimage, 28 * k, 48 * k, 24 * k, 52 * k, 8 * k, 16 * k, 12 * k, 20 * k, (ImageObserver)null);
                graphics.drawImage(bufferedimage, 20 * k, 52 * k, 16 * k, 64 * k, 8 * k, 20 * k, 12 * k, 32 * k, (ImageObserver)null);
                graphics.drawImage(bufferedimage, 24 * k, 52 * k, 20 * k, 64 * k, 4 * k, 20 * k, 8 * k, 32 * k, (ImageObserver)null);
                graphics.drawImage(bufferedimage, 28 * k, 52 * k, 24 * k, 64 * k, 0 * k, 20 * k, 4 * k, 32 * k, (ImageObserver)null);
                graphics.drawImage(bufferedimage, 32 * k, 52 * k, 28 * k, 64 * k, 12 * k, 20 * k, 16 * k, 32 * k, (ImageObserver)null);
                graphics.drawImage(bufferedimage, 40 * k, 48 * k, 36 * k, 52 * k, 44 * k, 16 * k, 48 * k, 20 * k, (ImageObserver)null);
                graphics.drawImage(bufferedimage, 44 * k, 48 * k, 40 * k, 52 * k, 48 * k, 16 * k, 52 * k, 20 * k, (ImageObserver)null);
                graphics.drawImage(bufferedimage, 36 * k, 52 * k, 32 * k, 64 * k, 48 * k, 20 * k, 52 * k, 32 * k, (ImageObserver)null);
                graphics.drawImage(bufferedimage, 40 * k, 52 * k, 36 * k, 64 * k, 44 * k, 20 * k, 48 * k, 32 * k, (ImageObserver)null);
                graphics.drawImage(bufferedimage, 44 * k, 52 * k, 40 * k, 64 * k, 40 * k, 20 * k, 44 * k, 32 * k, (ImageObserver)null);
                graphics.drawImage(bufferedimage, 48 * k, 52 * k, 44 * k, 64 * k, 52 * k, 20 * k, 56 * k, 32 * k, (ImageObserver)null);
            }

            graphics.dispose();
            this.imageData = ((DataBufferInt)bufferedimage.getRaster().getDataBuffer()).getData();
            this.setAreaOpaque(0 * k, 0 * k, 32 * k, 16 * k);
            this.setAreaTransparent(32 * k, 0 * k, 64 * k, 32 * k);
            this.setAreaOpaque(0 * k, 16 * k, 64 * k, 32 * k);
            this.setAreaTransparent(0 * k, 32 * k, 16 * k, 48 * k);
            this.setAreaTransparent(16 * k, 32 * k, 40 * k, 48 * k);
            this.setAreaTransparent(40 * k, 32 * k, 56 * k, 48 * k);
            this.setAreaTransparent(0 * k, 48 * k, 16 * k, 64 * k);
            this.setAreaOpaque(16 * k, 48 * k, 48 * k, 64 * k);
            this.setAreaTransparent(48 * k, 48 * k, 64 * k, 64 * k);
            return bufferedimage;
        }
    }
``` where to edit
thorn isle
#

we make plugins, we aren't as good at suggesting them as the people in help-server

#

you'll get better help there

grand flint
#

since u beed to calculate it to a sifferent resolutin

thorn isle
#

it looks like k is some sort of image scale and a power of two

waxen anchor
# grand flint probs all ghose math
public BufferedImage parseUserSkin(BufferedImage image)
    {
        if (image == null)
        {
            return null;
        }
        else
        {
            this.imageWidth = 64;
            this.imageHeight = 64;
            int i = image.getWidth();
            int j = image.getHeight();
            int k;

            for (k = 1; this.imageWidth < i || this.imageHeight < j; k *= 2)
            {
                this.imageWidth *= 2;
                this.imageHeight *= 2;
            }

            BufferedImage bufferedimage = new BufferedImage(this.imageWidth, this.imageHeight, 2);
            Graphics graphics = bufferedimage.getGraphics();
            graphics.drawImage(image, 0, 0, (ImageObserver)null);

            if (image.getHeight() == 32 * k)
            {
                graphics.drawImage(bufferedimage, 24 * k, 48 * k, 20 * k, 52 * k, 4 * k, 16 * k, 8 * k, 20 * k, (ImageObserver)null);
                graphics.drawImage(bufferedimage, 28 * k, 48 * k, 24 * k, 52 * k, 8 * k, 16 * k, 12 * k, 20 * k, (ImageObserver)null);
                graphics.drawImage(bufferedimage, 20 * k, 52 * k, 16 * k, 64 * k, 8 * k, 20 * k, 12 * k, 32 * k, (ImageObserver)null);
                graphics.drawImage(bufferedimage, 24 * k, 52 * k, 20 * k, 64 * k, 4 * k, 20 * k, 8 * k, 32 * k, (ImageObserver)null);
                graphics.drawImage(bufferedimage, 28 * k, 52 * k, 24 * k, 64 * k, 0 * k, 20 * k, 4 * k, 32 * k, (ImageObserver)null);
                graphics.drawImage(bufferedimage, 32 * k, 52 * k, 28 * k, 64 * k, 12 * k, 20 * k, 16 * k, 32 * k, (ImageObserver)null);
                graphics.drawImage(bufferedimage, 40 * k, 48 * k, 36 * k, 52 * k, 44 * k, 16 * k, 48 * k, 20 * k, (ImageObserver)null);
                graphics.drawImage(bufferedimage, 44 * k, 48 * k, 40 * k, 52 * k, 48 * k, 16 * k, 52 * k, 20 * k, (ImageObserver)null);
                graphics.drawImage(bufferedimage, 36 * k, 52 * k, 32 * k, 64 * k, 48 * k, 20 * k, 52 * k, 32 * k, (ImageObserver)null);
                graphics.drawImage(bufferedimage, 40 * k, 52 * k, 36 * k, 64 * k, 44 * k, 20 * k, 48 * k, 32 * k, (ImageObserver)null);
                graphics.drawImage(bufferedimage, 44 * k, 52 * k, 40 * k, 64 * k, 40 * k, 20 * k, 44 * k, 32 * k, (ImageObserver)null);
                graphics.drawImage(bufferedimage, 48 * k, 52 * k, 44 * k, 64 * k, 52 * k, 20 * k, 56 * k, 32 * k, (ImageObserver)null);
            }

            graphics.dispose();
            this.imageData = ((DataBufferInt)bufferedimage.getRaster().getDataBuffer()).getData();
            this.setAreaOpaque(0 * k, 0 * k, 32 * k, 16 * k);
            this.setAreaTransparent(32 * k, 0 * k, 64 * k, 32 * k);
            this.setAreaOpaque(0 * k, 16 * k, 64 * k, 32 * k);
            this.setAreaTransparent(0 * k, 32 * k, 16 * k, 48 * k);
            this.setAreaTransparent(16 * k, 32 * k, 40 * k, 48 * k);
            this.setAreaTransparent(40 * k, 32 * k, 56 * k, 48 * k);
            this.setAreaTransparent(0 * k, 48 * k, 16 * k, 64 * k);
            this.setAreaOpaque(16 * k, 48 * k, 48 * k, 64 * k);
            this.setAreaTransparent(48 * k, 48 * k, 64 * k, 64 * k);
            return bufferedimage;
        }
    }```
will it work ?
grand flint
#

try and see

#

how would i know

waxen anchor
#

which plugin set support hd skin

grand flint
#

r u stupid

thorn isle
#

lol

grand flint
#

we asked u

#

7 times

#

if ur making a client

#

n u said yes

waxen anchor
#

okay but how do you set my skin to hd ???

grand flint
#

basically

#

install bedrock

#

and add a hd skin

waxen anchor
grand flint
#

knk senin beynin düzmü? (do u have a smooth brain)

delicate stump
#

are u turk?

waxen anchor
thorn isle
#

you make a mod for the client

#

as in you take your client and you change its source code to make it do something else

grand flint
#

u cant join a bedrock server on java

#

the player model is harcoded

#

u cannot change it with a plugin

#

u can do resourcepack magic

#

but it will require all players to use optifine probably

waxen anchor
#

heh

#

okay im try

grand flint
#

yeah so just drop the silly project and do something else

waxen anchor
#

change default minecrtaft skin

#

to hd

#

and try work ?

grand flint
#

malsin emir :D

thorn isle
#

🤡

waxen anchor
#

türkmüsün,

grand flint
waxen anchor
#

türksen geçsene

#

dm

#

amk

#

ingilizcem yetmiyo

#

çıkldırcma

grand flint
#

imkansiz knk yapamassin

waxen anchor
#

sonoyuncu nasıul yapıyor

grand flint
#

plugin yapamaz oyle bise

#

son oyuncuya knk son oyuncu clienti ile giriyon

waxen anchor
#

tamam

#

bende client yaptım

#

işte

grand flint
#

o plugin degil, modded minecraft

#

bok yaptin

#

optifine diyon hala

delicate stump
waxen anchor
#

gelsene

#

dm ekliyecedm

grand flint
waxen anchor
#

ark attım

#

mcp optifine var

#

işte

#

kanka

#

skin koduınu değiştirdim

#

yetmeszmi

grand flint
#

@thorn isle he still is telling me

#

he has optifine

#

my god bro 😭

waxen anchor
#

ben şimdi

#

değişltirdim ya hani

#

skin kodunu

#

bunu nasıl deniyecem amk

#

skinrestorer desteklermi hd skini

#

onu soruyorum

#

sabahtan beri

grand flint
#

knk

#

salaksin

#

baska bi ise gir

#

mekanik ol

delicate stump
#

dam

grand flint
#

its not possible to do it with a plugin

waxen anchor
#

nasıl deni

grand flint
#

skinrestorer isnt magic its mc skins

waxen anchor
#

yecem

#

kendi clientime hani ekledim ya

echo basalt
#

oh god people are having an argument in turkish

#

greece better

delicate stump
grand flint
#

dont be a poopoo

delicate stump
#

bu sunlight tum sunucuyu degistirdi a

waxen anchor
#

@grand flint kanka adam akıllı yazsana bak şimdi elimde bi mc server birde mcp optine 1.8.9 client var ve ben bu clientdeki kodu değiştirdim ve daha fazla çözünürlük eklettirdim peki ben bunu şimdi nasıl test edicem hd skini nasıl yüklüyecem

delicate stump
#

su kocaman plugin dunyasında bitane bile sade bir nick plugini yok a

waxen anchor
#

hasbinallah

#

@grand flint Dude, write smart, look, I have a mc server and an mcp optine 1.8.9 client and I changed the code in this client and added more resolution, so how do I test this now and how do I install the HD skin?

#

al

#

translate denilen bir şey icat etmişler

echo basalt
#

send the hd skin with plugin messaging or something

#

applying it straight to the gameprofile won't work because texture data is funky

grand flint
#

what

#

he doesnt have a client

waxen anchor
echo basalt
#

you can achieve hd skins with both a client + server-side mod but none of that is applicable to a vanilla client

waxen anchor
#

client

#

bro

grand flint
#

he calls is optifine install custom

waxen anchor
#

no

delicate stump
#

yk any good nick plugin?

waxen anchor
#

im have minecraft mcp 1.8.9 optifine

grand flint
echo basalt
#

haonick

grand flint
delicate stump
waxen anchor
delicate stump
#

or can i

waxen anchor
#

and possble change codes

echo basalt
#

not my problem

grand flint
#

by making a mod

waxen anchor
#

im have all options

echo basalt
#

you're asking in help-development you should have a rough idea

waxen anchor
echo basalt
#

Given it's spigot you can't really run any mods

thorn isle
#

lol

echo basalt
#

you make a plugin that communicates using plugin messaging to send, to the client, the hd version of the skin

#

your client-side mod then receives that data and does whatever

grand flint
#

dows optifine let u chaneg the player model

#

if it does u can do it with resourcepack and optifine

echo basalt
#

client modding is not my problem

delicate stump
#

i did checked the config but couldnt figure out some things

thorn isle
#

we don't do config help here

grand flint
thorn isle
delicate stump
echo basalt
grand flint
thorn isle
#

then go there and wait for someone to be there

delicate stump
grand flint
#

i hate turks

delicate stump
#

its been 17 mins since i asked

grand flint
#

i wouldve answered tbh but ur just being annoying 🙏

delicate stump
echo basalt
grand flint
echo basalt
#

im european so its ok

grand flint
#

real

#

but turkey mostly asia

#

so not ok

echo basalt
#

that's why greece better

grand flint
#

:(

shadow night
#

I read that as cheese

grand flint
#

real

#

horrendous country name imo

tawny osprey
#

Hey guys,can anyone give me an example on how 2D Arrays can be used in plugin development?

#

just a question out of curiousity :)

sinful kiln
#

Quick question: On a LimitedRegion, if I call getBlockState(x, y, z), what happens if I try to get a block state outside of the region limit?

pine forge
#

is it possible to serialize an entity (or more specifically, get their nbt as string) with the 1.12 api

#

getAsString() does not seem to exist there

#

im only looking to get a player's nbt as string

chrome beacon
#

You'll probably have to use nms

pine forge
#

i dont want that

#

maybe someone can recommend an nbt api

#

i was using bananpuncher's nbteditor but it seems to have stopped working on 1.21.8

pliant topaz
smoky anchor
#

Ey ppl. How does Minecraft LAN scanning work ?
My idea would be to send some scan packet to all possible ports (which is around 16k iirc)
But that just can't be it

eternal oxide
smoky anchor
#

Ye that's enough for me to start. Thank you very much.

young void
#

morning
how are these cool bossbars made? i suspect its a thingy for sale because i see this everywhere

smoky anchor
#

A bossbar retextured to be invisible and some font magic

young void
#

because i have seen this exact bossbar multiple times

smoky anchor
#

the "Custom Huds" section is what you want

smoky anchor
#

So many great examples to steal for, great!

#

I mean- get inspired by ;)

#

I'll still have to do the receiving part too 'cause I'm not actually working with Minecraft here haha
But that should be fine

buoyant viper
#

i probably shouldve cached that inetaddr lookip

young void
smoky anchor
#

"spigot bossbar fancy text" lol

forest cobalt
#

how to add sound to shop plugin

young void
# forest cobalt how to add sound to shop plugin

if it has a config for playing custom sound you can add a .ogg sound in sound folder of your resource pack and then define that sound in sounds.yml. then use the config to play that sound.

if not, you have to code it yourself

pseudo hazel
#

first look for any way to cghange the sound in config files of the plugin

forest cobalt
#

ya there none

#

it the shop plugin

pseudo hazel
#

if there is nothing there, you probably cant change it without actually changing the code of the plugin

forest cobalt
#

but there no sound at all

pseudo hazel
#

the shop plugin, as if there was only 1

#

okay, then yeah you would definitely need to edit the code

pseudo hazel
#

since you ask in here I assume you have experience in developing a plugin?

#

check to see if the plugin has a github page/ open source

#

if its not open source it becomes way harder

void hinge
#

does anybody know of or able to make a plugin that allows Twitch viewers in a Twitch chat to be able to earn tokens which they can use for chat commands to make stuff happen in a Minecraft server (creeper spawns, teleporting, etc.)?

eternal oxide
#

?services

undone axleBOT
grand flint
#

u need to make a twitch bot as well

void hinge
#

i have one

grand flint
#

ill make it for 50£

void hinge
#

i might take you up on that let me just ask around with a few people first

grand flint
#

or nvm look

#

here

#

free

#

so is this

#

the first one seems better

void hinge
#

ive seen both of those but sadly they arent what im looking for

grand flint
#

well first one

#

does excatyl what u want

void hinge
#

i want it to use a twitch bot where it listens to chat messages and commands are worth tokens

grand flint
#

creper spawns, teleports

void hinge
#

commands only available through paid means and follows

grand flint
#

it uses channel points

void hinge
#

which would be great except i making 100s of channel rewards isnt really the most efficient

grand flint
#

this is probably a limit i cant bypass either

#

idk what it limits but yeah

void hinge
#

i am an affilliate so thats fine lol

grand flint
#

Yeah good

void hinge
#

i have a file of an old program that worked perfectly before but now it no longer works

#

but i think the code might be in a backend

#

actually i think i found it

#

i got the old program to work awesome

young void
#

usually you should use another plugin
but if you have to use this and only this plugin only then you have to edit the code yourself or pay someone to do it

trim depot
forest cobalt
trim depot
#

Or else what plugin are you using

forest cobalt
#

Economy shop

#

i want to add sound when you open it and buy smt

thorn isle
#

you can play a sound with Player::playSound

trim depot
#

Or you could make another plugin that listens for inventory interactions and checks if gui is from economyshop then play sound for player. But that would be nasty and last option thing in my opinion

tribal wraith
#

When I'm sending a block break animation it only shows for a tick - how do I make it show indefinitely? Is there a better way other than using a runnable every triggered every second?

public static void sendBlockBreakAnimationPacket(Player player, Location location, int stage) {
        ((CraftPlayer) player).getHandle().f.sendPacket(
                new PacketPlayOutBlockBreakAnimation(
                        player.getEntityId(),
                        new BlockPosition(location.getBlockX(), location.getBlockY(), location.getBlockZ()), stage
                )
        );
    }
chrome beacon
#

What version are you on

#

Also is the player currently breaking anything

worldly ingot
#

We have API for this

#

Player#sendBlockDamage()

tribal wraith
#

1.21.5

#

Thx I'll try that, does it stay?

#

No the player isn't breaking anything, I just want to send the block animation indefinitely

#

Yea sendBlockDamage() is awesome, how do I do my original question though? Sending it indefinitely until I cancel it? Is a runnable the best way?

echo basalt
#

the client times it out

#

if you want it to work across multiple blocks you might need to send the packet with a different (random) entity id each time

tribal wraith
#

Right now it only sends for a tick, is that what you mean by times out? I want to be able to last until I cancel it

sly topaz
sly topaz
woeful sleet
#

Please who can Help me setup the license system for free dm me please

drowsy helm
#

Whats that

wet breach
cobalt drift
#

Hi, how can I get the CommandMap? With the paper API it's just Bukkit.getCommandMap() but that doesn't work for spigot.

grand flint
#

oh

lilac dagger
#

Wait

#

You can use the command map on paper still?

cobalt drift
lilac dagger
#

Can you also remove commands?

#

Wait

#

I'm talking about 1.21 for example

cobalt drift
#

Hmm idk I will test it out for you. The JD dont say anything about this

swift lichen
#

It id

#

It is

#

this.getServer().getCommandMap()

cobalt drift
# swift lichen this.getServer().getCommandMap()

Are you talking about spigot or paper now? Because yeah with paper api it works like this or Bukkit.getCommandMap but with spigot api there is no method to get the command map or at least i dont find anyone

swift lichen
#

Well I don't think that works in spigot since spigot just uses getCommand or something

#

I am new to spigot

cobalt drift
cobalt drift
#

So does anyone know how to get the Command Map using spigot api?

swift lichen
#

@cobalt drift

#

Chatgpt:

#
  1. Getting the CommandMap

Spigot doesn’t expose the CommandMap directly, but you can access it via reflection:

import org.bukkit.Bukkit;
import org.bukkit.command.CommandMap;
import org.bukkit.plugin.java.JavaPlugin;

import java.lang.reflect.Field;

public class MyPlugin extends JavaPlugin {

private CommandMap commandMap;

@Override
public void onEnable() {
    try {
        Field f = Bukkit.getServer().getClass().getDeclaredField("commandMap");
        f.setAccessible(true);
        commandMap = (CommandMap) f.get(Bukkit.getServer());
    } catch (Exception e) {
        e.printStackTrace();
    }
}

public CommandMap getCommandMap() {
    return commandMap;
}

}

✅ This gives you access to the server’s CommandMap.


  1. Registering a command dynamically

Once you have the CommandMap, you can register commands with arbitrary names:

import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;

public class CustomCommand extends Command {

public CustomCommand(String name) {
    super(name);
    setDescription("A dynamically registered command");
}

@Override
public boolean execute(CommandSender sender, String label, String[] args) {
    sender.sendMessage("You ran the command: " + label);
    return true;
}

}

Then register it dynamically:

MyPlugin plugin = ...;
plugin.getCommandMap().register("myplugin", new CustomCommand("customname"));

"myplugin" is the plugin fallback prefix.

"customname" is the actual command name users will use.


  1. Letting users choose the command name

You could store the user’s preferred command name in a config file:

String commandName = getConfig().getString("userCommandName", "defaultcmd");
plugin.getCommandMap().register("myplugin", new CustomCommand(commandName));

This way, the command name is fully dynamic and doesn’t need to be in plugin.yml.

eternal oxide
#

Google Spigot sommand map reflection

cobalt drift
eternal oxide
#

both are fine

cobalt drift
cobalt drift
# eternal oxide both are fine

Ah okay, so this would work?

try {
            if (Bukkit.getPluginManager() instanceof SimplePluginManager spm) {
                Field commandMapField = SimplePluginManager.class.getDeclaredField("commandMap");
                commandMapField.setAccessible(true);
                return (CommandMap) commandMapField.get(spm);
            }
        } catch (NoSuchFieldException | IllegalAccessException e) {
            e.printStackTrace();
        }
eternal oxide
#

looks ok

#

its been a while since I did it

cobalt drift
#

Ah okay then Ill just try out

eternal oxide
#

not that I remember

cobalt drift
misty ingot
#

theres no event for when a player enters/exits a worldguard region is there
ill just have to check if they are now in said region every time they move right?

misty ingot
cobalt drift
#

1st question:
Is there any method to get the Main Thread Executor? With the paper API it's just Bukkit.getScheduler.getMainThreadExecutor(plugin) but with this method doesn't exist in the spigot API.

2nd question:
How can I set the texture value of a player head ItemStack? With the paper API I use:

public ItemBuilder setPlayerHeadData(String textureValue) {
        if (itemStack.getType().equals(Material.PLAYER_HEAD) && !textureValue.equalsIgnoreCase("null") && !textureValue.isBlank()) {
            UUID uuid = UUID.randomUUID();
            PlayerProfile customPlayerProfile = Bukkit.createProfile(uuid);
            customPlayerProfile.setProperty(new ProfileProperty("textures", textureValue));
            SkullMeta skullMeta = (SkullMeta) itemMeta;
            skullMeta.setPlayerProfile(customPlayerProfile);
            itemStack.setItemMeta(skullMeta);
        }
        return this;
    }

But also that doesn't work out with spigot API

thorn isle
#

mm yes the programmer sock discord

thorn isle
cobalt drift
thorn isle
#

on paper yes, god knows about spigot, i don't use spigot and hardly anyone else does either

woeful sleet
#

But please i need someone who can help me with the license system cuz for my plugin will be op

thorn isle
#

give it to me for free

mint nova
#
    @Override
    public boolean onCommand(@NotNull CommandSender sender, @NotNull Command command, @NotNull String label, @NotNull String @NotNull [] args) {

        if (!(sender instanceof final Player player))
            sender.sendMessage("Only players can access this command");

        player        

        return true;

why i cant access player? idk if i do something wrong it used to work back then but idk i have java 21 in project module

slender elbow
#

you are not returning

#
if (!(sender instanceof player)) {
  send message foobar
  return;
}
mint nova
#

omg

#

yea now its working

#

ty

winter jungle
#

Is there an event that is triggered as soon as mobs become angry or target a other player?

winter jungle
#

thanks

daring light
#

In what case is getTo() Location of the PlayerMoveEvent null?

#

Since I noticed it's nullable

sly topaz
#

when the event is cancelled probably

#

though I wouldn't know for sure

#

there's probably some weird player state that makes it be null at some point

chrome beacon
#

I don't think it's actually ever null

#

I assume it's for the PlayerPortalEvent which inherits from it

sly topaz
#

it could just override the annotation tho

chrome beacon
#

🤷‍♂️

daring light
#

Guess we need the person who created this event 12 years ago to answer

eternal night
#

It is for portal events fired for portals that lead to disabled dimensions

daring light
#

Ah

eternal night
#

So, disable nether in server.properties and bam

worthy yarrow
#

I need to test if you can teleport a player to a location with a null world, I use location objects with null worlds and assign it later but never tested this case specifically... I would imagine either it bombs or just handles the teleport within the players current world

#

Fun nullability things 😄

sly topaz
worthy yarrow
#

Bad edge case management imo

#

Am I correct in the assumption that given a world is null in a location then you should probably just handle the teleport for the world the player currently is in? Or is it truly better to throw here?

#

I suppose you could argue that it's better for debugging since I guess most cases your world shouldn't be null but in the event this occurs you'd still know the world is null because the teleportation occurred in an unexpected world

cobalt drift
woeful sleet
cobalt drift
quaint mantle
#

Nobody is going to buy your /spawn plugin bro 😭

woeful sleet
woeful sleet
cobalt drift
#

dont expect too much

woeful sleet
cobalt drift
woeful sleet
quaint mantle
#

Prolly better to open up a public server to get money from minecraft

woeful sleet
#

And i got 0

cobalt drift
#

yes if you really want to make money from minecraft just make a good public server

#

or i think it would work out to provide a custom plugin development service

woeful sleet
woeful sleet
cobalt drift
mellow edge
#

Hello, how do I get payload from CustomClickAction?

#

using dialogs

#

Or how can I do something like Consumer when clicking on a dialog button

echo basalt
mellow edge
#

Hello, I encounter the following error when I try to set the AfterAction to NONE:

java.lang.IllegalStateException: Dialogs that pause the game must use after_action values that unpause it after user action!

            MultiActionDialog multiActionDialog = new MultiActionDialog(new DialogBase(new TextComponent("")).afterAction(DialogBase.AfterAction.NONE)*<<---- error here*.canCloseWithEscape(false), buttons).columns(3);

I basically don't want the dialog to close when I press on a button. But this error basically disallows me to do just that. WAIT_FOR_RESPONSE does work, but idk why this doesn't. Any ideas on how to fix?

#

if I need to stick to WAIT_FOR_RESPONSE, how to respond?

swift lichen
#

@worldly ingot can you help me?
so basically, when you create a scoreboard usins spigot, you have to like create an objective with SIDEBAR, then you can add scores right? becuase I have been stuck with these ugly looking, required for working score numbers, but when I take a look at hypixel, donutsmp etc, I don't see them, how do you do that with coding? not external plugins

thorn isle
#

as of 1.20.4 or something, the client supports custom number formattings for the scores

#

so what you do is you send an empty number format where the score always gets rendered as an empty string

#

no clue how you do this on spigot

swift lichen
#

okay

#

what about paper? any clue?

thorn isle
#

paper has simple api for it

#

the Score object iirc has a method to set the format

swift lichen
#

okay, lemme try that

#

thanks for your help already

thorn isle
#

yeah, Score::numberFormat

swift lichen
#

🙏 ty

smoky anchor
swift lichen
#

oh all

#

r

#

?whereami

echo basalt
#

welp boys I'm fucking around with influxdb wish me luck

swift lichen
bold nebula
#

can someone help me find this exact packet?

young knoll
#

?mappings

undone axleBOT
wet breach
bold nebula
#

prob it does i tested something similar before

wet breach
#

Well its either going to be that or the update entity position and look

smoky anchor