#help-development

1 messages · Page 1248 of 1

red bolt
#

the hashmap idea could work

#
package FineGamez.me.isometricView.managers;

import FineGamez.me.isometricView.IsometricView;
import FineGamez.me.isometricView.helpers.Enum;
import org.apache.commons.lang3.Validate;
import org.bukkit.configuration.file.FileConfiguration;
import org.bukkit.configuration.file.YamlConfiguration;
import org.bukkit.entity.Player;

import java.io.File;
import java.io.IOException;

public class GamemodeManager {

    private final IsometricView plugin;
    private FileConfiguration config;
    private File GamemodeFile;
    private YamlConfiguration GamemodeYML;

    public GamemodeManager(IsometricView plugin) {
        this.plugin = Validate.notNull(plugin, "Plugin cannot be null");

        this.GamemodeFile = new File(plugin.getDataFolder(), "Player_GameModes.yml");

        if (!GamemodeFile.exists()) {
            try {
                GamemodeFile.createNewFile();
            } catch (IOException e) {
                e.printStackTrace();
            }
        }

        this.GamemodeYML = YamlConfiguration.loadConfiguration(GamemodeFile);
    }

    public boolean SetGamemode(Player p, String gamemode) {
        if (p.isOnline()) {

            GamemodeYML.set(String.valueOf(p.getUniqueId())+".last-seen-username", p.getName());
            GamemodeYML.set(String.valueOf(p.getUniqueId())+".current-gamemode", gamemode);

            SaveFile();

            return true;
        } else {
            return false;
        }
    }

    public String GetGamemode(Player p) {
        return GamemodeYML.getString(String.valueOf(p.getUniqueId())+".current-gamemode");
    }

    public void SaveFile() {
        try {
            GamemodeYML.save(GamemodeFile);
        } catch (IOException e) {
            e.printStackTrace();
        }
    }

}

#

this is the gamemode manager script

#

sry for the big blob of script 😂

sly topaz
#

pascal case for methods 😔

#

C# ahh looking code

red bolt
#

XD

#

I do unity so..

red bolt
sly topaz
#

I mean, aside from not having a singleton for the manager, that code looks fineish

#

I wouldn't save to file every time someone switches gamemode since it's a sync operation, but I doubt they'd do it enough times for that to be an issue anyway

red bolt
#

say you have 100+ active players?

sly topaz
#

I mean, unless they're all constantly switching their gamemode, it shouldn't be an issue

red bolt
#

true, the gamemode would be the default gamemode for all players when joining the game

thorn isle
#

are you trying to make an isometric top-down thing

red bolt
#

isometric view game yeah

#

think animal crossing meets minecraft meets isometric game

#

(I've never played animal crossing lol)

thorn isle
#

latency is always the stumbling step with these but hopefully it'll turn out playable

#

since the player can't predict the serverside movement

sly topaz
#

client usually makes predictions to where things will go towards so that even with latency, the gameplay looks smooth

thorn isle
#

so the way it works normally is that the client, when you press a button to move, doesn't wait the server to tell the player to move in a certain way; the client just moves

sly topaz
#

you can't do that with server-side only movement as the client has no knowledge about it

red bolt
#

like by spectating an armor stand

thorn isle
#

sure

#

but inputs will be delayed

red bolt
#

OH

#

sry caps

#

oh thats what you mean

#

yeah ig

thorn isle
#

you press W on your keyboard, and before anything can happen on the screen, the client needs to tell the server "i pressed W"

red bolt
#

yeah

thorn isle
#

and then the server needs to tell the client "okay, now move this here"

red bolt
#

thats true

#

good point

thorn isle
#

hence why latency is always the stumbling step with these projects

#

there are some ways to alleviate this, like making the player character (or whatever it is that they control) have natural-feeling inertia that masks the latency

red bolt
#

I mean ig one way is that since I was already planning on making a quality of life modpack for the server I could have a mod that fills in that space

#

but players playing without it would still experience latency

#

what about... hear me out... The server predicts the client

#

a bit like how autocomplete works on your phone...

thorn isle
#

🤡 let me know how that turns out

red bolt
#

nah its a dumb idea

thorn isle
#

i wanted to do something similar except point-and-click

#

by listening to player mouse movement with the spectate+mount trick, and moving an actual cursor on the screen

red bolt
#

yeah prob with that is that you need some sort of ui if you want the player to stay frozen

thorn isle
#

but latency absolutely fucked it

#

imagine your mouse movement lagging behind 150ms

red bolt
#

roblox games be like

#

well ig most games use client side scripts but still

#

anyway dont know how I'll do this

sly topaz
red bolt
#

when one issue dissapears another comes

sly topaz
#

no matter how many times I use it, I am still pretty amazed at the capability of free AI nowadays

red bolt
#

lol thx I'll check it out

sly topaz
#

if your gamemode only does body movement and not head movement, latency isn't as much of an issue really

thorn isle
#

yeah third person is far more tolerant to input lag than first person

red bolt
#

but might still feel like bad cloud gaming

thorn isle
#

in first person you'll be throwing up with 150ms input lag

sly topaz
#

150ms isn't that bad

#

I play with 200ms regularly

red bolt
thorn isle
#

shore but the client predicts your movement

sly topaz
# red bolt HOW?

well, I am on the other side of the world so it can't be helped

thorn isle
#

or are we talking about another full conversion game

sly topaz
#

I can't count the amount of times I've been played by a ghost block in bedwars

red bolt
#

THATS HYPIXELS FAULT

thorn isle
#

like i get slightly nauseous from just like 5ms of input lag in first person camera movement

thorn isle
#

well okay that's probably an exaggeration, 15ms maybe

sly topaz
#

if the client is doing predictions properly and the server isn't messing with that, even 300ms shouldn't be much of an issue besides just having some disadvantage at high-mobility situations

red bolt
#

@sly topaz welp ig AI isn't the best cuz I think it messed up here... ISOMETRIC game mode isn't a thing

#

(in the gamemode object)

thorn isle
#

it's assuming you're using your own gamemode enum

#

which you should

red bolt
#

but that would be overriding no?

thorn isle
#

but probably don't name it GameMode

sly topaz
red bolt
#

exactly

thorn isle
#

because yes, name conflict

red bolt
thorn isle
#

it's not an issue issue but it is a bit inconvenient and can be confusing

red bolt
#

yeah

sly topaz
#

just use FQNs and it is never an issue 🤑

red bolt
#

and then ofter you need to provide an exact location

thorn isle
#

nms patches be like

sly topaz
#

nms patches just do it for the sake of reducing diff most of the time tho

red bolt
#

true

#

offtopic but what do you guys think of the happy ghast

sly topaz
#

I really like it

red bolt
#

same I think it'll add alot of possiblities to your world

grand flint
#

standing on it is so op i love it

red bolt
#

fr

#

best part I think

sly topaz
#

it's a breath of fresh air for the game, and lots of people are making their headcannon about the ghast lore now with this

red bolt
#

true

#

mc needed this

thorn isle
grand flint
thorn isle
#

but it does also make the code absolutely unreadable sometimes

sly topaz
#

like the ghast actually being an aquatic being and it confirming the headcannon that the nether was once frozen, one can also provide the explanation that ghast in the nether shoot fireballs to avoid getting dehydratated

red bolt
sly topaz
#

it being able to ride 4 players is also really nice, it's been due time for a mount that can actually ride more than one or two players

#

I'd wish they let us mount like 20 players on the dragon lol

red bolt
thorn isle
#

i wish they'd make the scale attribute work for dragons so you could have more manageable sized dragon mounts

red bolt
#

but atleast servers could do it with plugins

red bolt
#

but prob hard cuz of all the different parts of it and hitboxes

sly topaz
#

the dragon is like 5 entities in one so it's kind of a complex entity (no pun intended)

red bolt
#

ye thats what I'm saying

#

but would be cool nonetheless

#

like they could introduce a "baby dragon" which is a one part thing and make that scalable

thorn isle
#

smh

#

goldeneye did separate hitboxes in '97

wet breach
#

maybe just 10 but I know we counted some time ago and it was about that many lol

kind hatch
red bolt
robust saffron
#

would anyone know if there is a way to update the delay for sync repeating task? or is running a new task each update the only way?

sly topaz
#

it is indeed

#

if you want dynamic delay, you can just use a shorter timer and have a counter

robust saffron
#

okay thank you

#

i thought sync repeating ask was only deprecated for bukkitrunnable parameter?

thorn isle
#

one and the same, doesn't really matter what you use

sly topaz
#
new BukkitRunnable() {
    private int counter = 0;
    private int currentDelay = 1*20; // 1 second = 20 ticks

    @Override
    public void run() {
        if (counter >= currentDelay) {
            doTheThing();
            counter = 0;

            currentDelay = nextDelay(); 
        } else {
            counter++;
        }
    }
}.runTaskTimer(plugin, 0, 1);
#

this is how I would do it

robust saffron
#

thank you

slender notch
#

anyone mind helping me update a paper/spigot plugin, I'm struggling with updating dependencies from jitpack dm me please would love to learn how

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!

drowsy helm
#

just explain your issue and someone may respond

slender notch
#

getting an error Caused by: java.lang.NoClassDefFoundError: revxrsal/commands/exception/CommandErrorException when using 3.3.6
I got the source code from being commissioned, but after updating to jitpack.io/#Revxrsal/Lamp/3.3.6 or using 3.1.8 one it came with neither work and 3.1.8 can't be found when building
implementation("com.github.Revxrsal.Lamp:brigadier:3.3.6") any help? updating from 1.20.4 to 1.21.4

drowsy helm
#

looks like your package name is wrong

#

newest versions use maven central not jitpack

slender notch
#

could very much be dumb lol

sly topaz
#

it is com.github.revxrsal:lamp.common, not com.github.revxrsal.lamp:common. Same for the other one

#

also, you are using the old shadow plugin

#

you should use the gradleup version, which works with newer gradle versions properly

#

you are also not using spigot so I recommend asking in the paper discord

short pilot
#

Hey guys!

#

For a custom mob how do you give it set armor each time to wear?

rotund ravine
#

Set their equipment 👌🏻

short pilot
#

And also for a custom skeleton, is there a target goal for ranged attacks?

short pilot
blazing ocean
#

what constructor

short pilot
#

custom mob constructor

#

i would just call this.setItemSlot(); in the constructor right?

slim wigeon
sullen marlin
#

Just check if their uuid equals their offline id

slim wigeon
#

That won't check the official servers. I doing this because I might set my server to offline mode

azure zealot
#

check the players uuid version

#

online uuids are v4 i guess

#

und the other v2 or v3

#

or the other way around

#

ther is a check like this in bungee

#

offline uuids are version 3

rough drift
slim wigeon
#

Its not the request. The parsing of json is what I trying to do. The request is working properly

azure zealot
#

why do you want to parse it from the json

#

you want to check if the player is cracked or premium right?

slim wigeon
#

The api uses json

#

Check my code

azure zealot
#

you dont need no mojang api

#

you can do it like this:

UUID uuid = player.getUniqueId();

if(uuid.version() == 3)
{
// cracked
} else
{
// premium
}

slim wigeon
#

Ok that works, how do I get the player skin from the online account?

rough drift
slim wigeon
#

What can I use to get the skins?

rough drift
eternal oxide
#

get the sklins?

rough drift
#
Minecraft Wiki

This page provides documentation for API endpoints provided by Mojang Studios which allows user to query player data and make changes programmatically.
Currently, the API is rate limited at 600 requests per 10 minutes.

eternal oxide
#

You never have the skin on the server, only a link

rough drift
rough drift
eternal oxide
#

On the server you have a base64 encoded URL to the skin

eternal oxide
rough drift
#

I mean

#

2+2=4, probs allowing offline players to have skins

slim wigeon
#

I thinking about setting my server to offline mode

slim wigeon
#

That is why I need the skins

rough drift
#

you won't get support

#

also just use skinsrestorer instead lmao, complete sidenote

#

don't reinvent the entire town

eternal oxide
#

Offline server still doesnt actually tell us why you want the skin

rough drift
chrome beacon
#

I assume ElgarL is talking about the texture itself

#

Rather than the link to it

eternal oxide
#

If he just wants to apply online skins to offline accounts its simple, but He's not actually said why he wants the skin

slim wigeon
# rough drift you won't get support

I only setting the server offline to prove a point. I have game communities blacklisting mobile hotspots and all this stuff. So that was my goal. I already reported that server to mojang requested by someone from #general

#

Like static IP is required

eternal oxide
#

What you actually mean is you are logging into offline servers yourself and they are banning you when you use a different IP tyo access the same account?

#

I've never seen an online mode server ban someone for using different IP's

slim wigeon
#

I don't want to adv but years ago. I went into a offline/cracked server with a VPN, I got banned permly. Mobile hotspots and VPNs are IP changers

#

I was begging my ISP for a static IP for a week

eternal oxide
#

yeah it happens on cracked servers for security

slim wigeon
#

So I trying to prove that this can be enforced without blacklisting these networks

rough drift
eternal oxide
#

generally even cracked servers don;t care about the IP as they use an auth plugin for security

slim wigeon
#

That is why I needed these skin urls and all that. So I can make it like a premium server but cracked users can join

eternal oxide
slim wigeon
#

I don't have the money

eternal oxide
#

For cracked you will find nothing free

slim wigeon
#

I either program my own plugins. I started the dev because the plugins I wish to use was paid versions. JetsHoppers for a example, I would use it if it has a blockbreak but due to being a paid plugin, I cannot use it

#

Plus if I was going to put it on a hosting server, I have to prove that I purchased it as they don't allow cracked plugins

#

I might be exposing too much but at this point, I don't care long as my point is proven. Not all VPN users and all that is bad

eternal oxide
#

its GPL3 so you can update it yourself

molten hearth
slim wigeon
eternal oxide
#

They generally don;t require proof of purchase either

slim wigeon
#

Well, I cannot check given the rules of this server but I like to keep this safe

slim wigeon
#

I just noticed I just sent a message to a admin of another server that is in this server

eternal oxide
#

I just worked out why they ban VPN. It's to prevent griefers

jagged thicket
#

did u see #general

#

wrt to offline mode 💀

slim wigeon
#

Like I told multiple communities. They can ban VPNs all they want but when they start banning mobile hotspots, that is extreme and the need for static IP is grown massively

jagged thicket
slim wigeon
chrome beacon
#

8TB 💀

sly topaz
#

what kind of server are you playing on that you're using 8tb of data

slim wigeon
#

I downloaded a load of AI models

#

I at 3TB this month on my hotspot

jagged thicket
#

Ok i think upgrading the wifi is more viable

sly topaz
# jagged thicket bro they cannot differentiate a hotpost and vpn so easily

they kind of can actually, the cheap VPNs have IP ranges which are common to VPN, they can check whether your IP changed before and also if it is within that vpn range, unlikely that your internet provider has an IP in that range though still possible, hence why you have to check whether it changed first

sly topaz
chrome beacon
#

Or plugins?

slim wigeon
sly topaz
#

I don't know what SSI is

molten hearth
#

Social security income maybe

slim wigeon
sly topaz
#

that makes the idea of them running AI models even more strange lol

slim wigeon
sly topaz
#

that really doesn't answer my question

#

but when it comes to AI chatbots, you're better off waiting for the competition to get better so they're forced to provide a better free product than they do now

jagged thicket
#

even 20 dollar gpt limits u

#

sucks

#

but its very cool ngl

molten hearth
#

The limit is quite awful for 20$

jagged thicket
#

so helpful 🙏 thanks

#

So worth it tho

sly topaz
#

yeah, I just use free, not worth it

molten hearth
#

My gf pays for premium

sly topaz
#

or rather, I don't depend on AI enough for it to matter anyway

molten hearth
#

stonks

sly topaz
#

if I find myself using a lot, I just switch to another provider like claude, gemini, deepseek, even grok at times lol

molten hearth
#

oh yeah same

jagged thicket
#

i use it for getting ideas

#

on how to implement stuff

molten hearth
#

I usually switch between gpt / copilot / grok / Gemini depending on what I'm doing

sly topaz
#

for code it is mostly chatgpt and claude though deepseek does a fairly decent job at it

#

or if it is too long then maybe mistral, but only with very specific instructions as it isn't as good with code

jagged thicket
#

who owns claude

sly topaz
#

anthropic

jagged thicket
#

who dat

sly topaz
#

the ones who make claude

#

that's really the only thing they're known for

#

one would expect such a good chatbot to be made by another technology giant but surprisingly anthropic has been pushing the bar just as much as openai, at least when it comes to code generation

jagged thicket
#

frikin sussy python, why does it have to give output in float sometimes and sometimes int

#

now i gotta go find out when we get int and when we get float

sly topaz
#

just convert it to whatever you want it to be

rough drift
#

that is how their models are so good

#

a metric fuckload ton of data

chrome beacon
#

Yeah all the AI companies are adding a significant load from scanning sites

quaint mantle
#
<head><title>403 Forbidden</title></head>
<body>
<center><h1>403 Forbidden</h1></center>
<hr><center>Microsoft-Azure-Application-Gateway/v2</center>
</body>
</html>

Can someone explain why I'm getting this error? Could it also be the reason my player skulls aren't displaying?

sly topaz
#

As a consumer I personally don’t really mind, I am aware it has become quite the issue on the open source infrastructures around, but I assume they’ll eventually find a way to mitigate it

slim wigeon
# jagged thicket bro they cannot differentiate a hotpost and vpn so easily

The VPN provider saysThe static IP could be an issue if gaming servers, forums, or other services you use start associating it with your past reports or bans. If you’re concerned about privacy, a shared VPN IP might be a safer option because multiple users share the same IP, making it harder to track any one person. Additionally, if possible, you could switch between static IP when gaming and using a shared one when online.So I guess I done with multiplayer servers but only on my own servers. I in a place with no where to escape

remote swallow
#

you thought about contacting the staff team of any server to explain ur situation and its not a vpn or attempt to do anything malicious?

sonic goblet
#

This seems like a lot of work to propose your diy “solution” to the server and they go: 👍 and don’t do anything about it because why would they build out a whole layer of ip identification for 1 or even a small handful of players

#

And this doesn’t even bring up the problem that the people using VPNs (that the server is trying to keep out) can switch to a mobile hotspot to join the server. Effectively patching in a work around to their anti-vpn plugin

barren peak
#

how do I check if material is a spawn egg (any type)

tawdry echo
#

try
material.asItemType() instanceof ItemType.Typed<?> typed && typed.getItemMetaClass().isAssignableFrom(SpawnEggMeta.class)

barren peak
#

thanks ill try that

#

anyone know why i.getItemMeta().getItemName() is returning blank in EntityPickupItemEvent? (ItemMeta is not null, but the name is just returning blank / null)

#

also another question: How do I check if a Material is obtainable in the creative menu as an item? (EX: Material.LAVA would not be along with Material.NETHER_PORTAL) I have tried using Material.IsItem() but that only returns items and not blocks such as diamond block for example

barren peak
#

like .getDisplayName() is also empty. maybe when you pick up an item from the event it doesn't have a name until it enters your inventory? idk, thats my best guess

tawdry echo
barren peak
tawdry echo
#

idk try and play with that

barren peak
# tawdry echo what u want reach?

? I'm not sure what you are saying. I'd like to get the name of an item when you pick it up. For example, if you pick up dirt, it would return "Dirt" as that is the name of the item

barren peak
primal stirrup
#

Hi there,
I am currently having some issue on my server with: [Profile Lookup Executor #1/ERROR]: Got an error with a html body connecting to https://api.minecraftservices.com/minecraft/profile/lookup/bulk/byname:

I am aware that this is an issue of Minecraft it self but is there an work around which doesn’t cause this issue?

(Getting it with an GUI when showing the players head)

slender elbow
#

cache the resolved profiles the player heads display

winter jungle
#

I am currently working on a world reset system for a plugin, so that the world is unloaded, then the folder is deleted, and then the world is created again via the WorldCreator#createWorld, but it remains the same world and no new one is generated, does anyone know why?

barren peak
#

make sure world is actually deleted and make sure all players are not in the world and world is unloaded before you delete it

winter jungle
#

Here are the steps:

  1. all players are teleported to a world that is not deleted.
  2. the world is unloaded
  3. the folder is deleted
  4. new world is created

This also works with the order, but the world still remains the same, that's the problem

barren peak
#

same world meaning same seed or same exact world? (If you place blocks, does it keep the changes)

barren peak
#

check the world files and make sure the file is actually getting deleted is what I would check

#

because if it isn't, worldcreator will just load up the same world again

winter jungle
barren peak
#

im not sure then thats odd

sly topaz
winter jungle
sly topaz
#

well, show us the code that's doing the unloading & deletion I guess

winter jungle
#

Fun Fact: It works with the nether and end, not with the overworld. Seems like ChunkHolderManager does not unload the world why ever

sly topaz
#

my only guess is that the world isn't actually being unloaded and thus the same world is being loaded from memory, which would be a bug in the unloading code

winter jungle
#

Paper

young knoll
#

You can’t unload the main world

sly topaz
#

ah right

winter jungle
#

thats stupid af

#

but alright

young knoll
#

The game kinda requires a default world for various things

winter jungle
sly topaz
#

the server can't tick if there is no world available

young knoll
#

If you unloaded it the server would be very confused

winter jungle
sly topaz
#

yeah but the server doesn't know that, because it wasn't made with multiple worlds in mind

#

could be fixed, but I doubt people care

winter jungle
#

Then its time i guess

#

I don't know if it's a Spigot or Mojang decision, but if it's Mojang then they should get off their asses instead of doing stupid things like the player locator bar shit lmfao

sly topaz
#

Mojang has nothing to do with world management, as far as vanilla goes, only the main world exists

#

multiple worlds is a concept bukkit-based platforms introduced

#

that said, you're using Paper so you'd have to ask them for it

young knoll
#

Vanilla has multiple worlds

#

They just store them differently

eternal night
#

ehh

sly topaz
eternal night
#

what

#

They do internally for sure

young knoll
#

Pretty sure each one has its own ServerLevel

eternal night
#

The server just needs a level, it doesn't need dimensions on that

sly topaz
#

of course, I don't mean on the technical sense

eternal night
#

server.properties already includes the nether dimension skip

barren peak
eternal night
#

but yea, a default world is 100% something the server expects but also like, is virtually free if you need it to be

#

air world with nothing in it, no spawning, the void biome

#

it just does nothing

young knoll
#

Don’t forget to disable spawn chunks

sly topaz
#

though there probably aren't many

barren peak
sly topaz
#

that is a big ass if block

#

you could probably exclude a bunch just by using ItemType instead of Material

sly topaz
young knoll
#

But that’s still experimental :(

sly topaz
#

doubt it is gonna change at this point

young knoll
#

Either way Material#isItem delegates to ItemType anyway

sly topaz
#

if it does then welp

young knoll
#

Creative category is deprecated, it’s all client side now

sly topaz
#

deprecated in the sense it doesn't work at all or that spigot is manually keeping the feature alive for a little

young knoll
#

No idea

sly topaz
#

wonder if there's something in NMS to check if an item is obtainable in survival

young knoll
#

You could probably dynamically determine what items are obtainable

#

Go through each LootTable and check the drops

sly topaz
#

the current LootTable API is kinda shit for that kind of thing

young knoll
#

Hmm, yeah it kinda is

sly topaz
#

just had to make LootTable iterable and it'd have been perfect 😔

young knoll
#

You can check the drops of each block (with various tools ig) and the results of crafting recipes, etc

sly topaz
#

I'd rather scrape the minecraft.wiki tbh

#
Minecraft Wiki

There are many elements in Minecraft that are completely inaccessible to the player in Survival mode. This is due to many factors, such as game balance, or due to the fact that the player accessing certain content would not have any logical sense in the context of playing Survival mode, such as barrier blocks and spawn eggs.
The article encompas...

silent cove
#

does anyone know if any specific changes went into resource pack setup from 1.21 to 1.21.4? my pack doesn't work anymore.. i updated the pack_format to 46 which is i think 1.21.4, but no dice

sly topaz
#

it mentions the changes in each version of the format

silent cove
#

yes this is where i found tha the pack version is 46 for 1.21.4, however i don't see anything that would cause a pack to not work anymore

blazing ocean
#

show logs

#

(client logs)

silent cove
#

actually good call. i'll check the client log

sly topaz
#

if you have models on the resource pack, it is most likely related to that

silent cove
#

i do

sly topaz
#

because I can't really see any changes besides that

silent cove
#

it complains im missing a metadata but i definitely have it. unless there's a new one

sly topaz
#

the broken elytra model is now called elytra_broken and the equipment models have been moved up from models/equipment to just equipment/

silent cove
#

it really is just that line, [12:38:29] [Render thread/WARN]: Missing metadata in pack perhaps the format is different now i just have to look. im not modeling anything besides paper though with some custommodel data pointing to different pngs

sly topaz
#

what doesn't work anymore about your pack?

silent cove
#

the textures are defaulting

sly topaz
#

did you update the command you were using to get them?

silent cove
#

nop

sly topaz
#

well, that's probably it

silent cove
#

its in my plugin, it just adds custom model data to items

sly topaz
#

well, you're probably meant to use item_model data component now or some bs like that in the API

silent cove
#

oh geez. i hope not

#

i think there's just something off in my pack though. because putting the zip into the resource packs folder it doesn't appear, but when i unzip it it does. i confirmed with another working that that this is not supposed to happen

quaint mantle
#

hi guys any method to hide player oxygen bar?

silent cove
#

i do not have any shaders config in my pack

silent cove
#

i just need to find a resource pack that adds "custom" items with custom model data for 1.21.4. its gotta be something changed

sly topaz
#

other than that, it is really not possible to modify the oxygen bar on the server side other than setting the remaining air itself

silent cove
young knoll
#

Yeah custom model data was changed

#

item_model is the simpler method anyway

silent cove
sly topaz
#

would've been nice if they mentioned it in the minecraft wiki lol

silent cove
#

yeah this shit is annoying. now i have to update like 150 items

sly topaz
#

you can probably automate it

silent cove
#

oh im definitely gonna try

#

some quick and nasty regex or something

#

maybe there's a tool out there already

sly topaz
sly topaz
silent cove
#

haha

sly topaz
#

don't know how well it works, but it should get you somewhere

finite path
#

Can anyone contact me private if you could help me with a Custom Mining Manager using packets or whatever to use a Custom Mining speed (without flicker in the animation)

sly topaz
sly topaz
#

you can just adjust the tool's speed

finite path
#

Yeah but I want to do it in 1.18.2

sly topaz
#

I don't think it is even possible to do reliably in that version

young knoll
#

It is

sly topaz
#

latency taken into account?

finite path
#

Somehow hypixel did it so its possible..

young knoll
#

Client side negative mining fatigue ftw

#

Eh, normally with latency the block reappears, with this system you just won’t start breaking it for a bit

#

Neither is really better

red bolt
#

some things would end up breaking otherwise

#

not saying it aint possible tho, prob easier since more updates

past zephyr
#

has anyone got a plugin to just increase the zombie spawn rate so theres a tonne of zombies or if anyone can easily throw one together as I have no idea about spigot plugins but I assume it should be pretty easy for someone who knows

sullen marlin
#

CreatureSpawnEvent -> if zombie -> spawn more zombies 😄

eager hawk
#

Are there spigot pages for placing/spawning blocks?

#

?blocks

#

?place

#

I want to place a pressure plate at a certain loc when a command gets executed

eternal night
#

location.getBlock().setType(...)

eager hawk
#

But theres no block there yet

eternal night
#

that doesn't matter

#

A block may have type AIR

eager hawk
#

so p.getLocation().getBlock().setType(Material.xxxx) ?

eternal night
#

Yea

eager hawk
#

Oh thats easy lol

#

ty

nova notch
#

replacing other mobs would probably make more sense

thorn isle
#

the most robust approach is probably to cancel other mob types' spawns at a certain % rate (in the pre spawn event, to avoid creating the entity only to discard it)

#

the server is quite aggressive about reaching mob caps, so the total spawn rate of monsters won't diminish noticeably

#

the spawning logic will fire more and try spawning more mobs, with more zombies spawning as a result

#

manually replacing spawns with zombies works as well, but you will run into fringe issues like zombies spawning in creeper farms; the collision shapes and hence spawn checks aren't the same

sullen marlin
#

You can probably use a data pack now

slim wigeon
#

Trying to set the player textures, do I need to update the player for the textures to show?``` PlayerTextures tex = player.getPlayerProfile().getTextures();
String texBase64 = jsonObject.getAsJsonArray("properties").get(0).getAsJsonObject().get("value").getAsString();
//JsonObject jsonObject2 = JsonParser.parseString(Base64.getDecoder().decode(texBase64).toString()).getAsJsonObject();

            tex.setSkin(new URL("<A Player's texture URL>"));
            player.getPlayerProfile().setTextures(tex);
            
            player.hidePlayer(plugin, player);
            Bukkit.getScheduler().runTaskLater(plugin, () -> {
                player.showPlayer(plugin, player);
            }, 10L);```
#

Ignore that comment there, it has a error some where in that

chrome beacon
#

huh are you trying to get a players skin

#

and then setting it to them again

#

That won't do anything

#

Also hiding the player from themselves won't really do anything

young knoll
#

Not until they add mirrors

sullen marlin
#

But how can mirrors be real if our eyes aren't real

slim wigeon
eternal oxide
#

setting a players skin can be a pain

slim wigeon
eternal oxide
#

it requires packets, profiles and a bit of hacks to fix inventories

slim wigeon
#

You see I setting the textures from the player profile object

eternal oxide
#

just setting it in the profile will not change it for all

young knoll
#

There’s no setPlayerProfile unfortunately

eternal oxide
#

?paste

undone axleBOT
slim wigeon
#

Who?

eternal oxide
slim wigeon
eternal oxide
#

definitely not

#

oh setSkin method is ```java
private static void setSkin(ServerPlayer player, String[] skin) {

    String texture = skin[0];
    String signature = skin[1];

    player.getGameProfile().getProperties().removeAll("textures");
    player.getGameProfile().getProperties().put("textures", new Property("textures", texture, signature));

}```
slim wigeon
#

Here do I get the signature from?

eternal oxide
#

signatures are generated by mojang

slim wigeon
#

I was thinking about that but is it accessible thru their API?

eternal oxide
#

so from a skin site eg public static String[] skin1 = new String[] { //texture "ewogICJ0aW1lc3RhbXAiIDogMTY0NjkyNTYxMjk3NiwKICAicHJvZmlsZUlkIiA6ICI1ODkwNjAyNDYyMzE0ZGFjODM0NWQ3YjI4MmExZDI4ZiIsCiAgInByb2ZpbGVOYW1lIiA6ICJXeW5uY3JhZnRHYW1pbmciLAogICJzaWduYXR1cmVSZXF1aXJlZCIgOiB0cnVlLAogICJ0ZXh0dXJlcyIgOiB7CiAgICAiU0tJTiIgOiB7CiAgICAgICJ1cmwiIDogImh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvOTMyZTk1MjAzM2E3ZWI5MmFmNmJiN2VjMWIwYjEyN2EyNDMwZTI4MTk4MTRmNjA4MmFiNjQxNzI1YjA4MzM4NiIKICAgIH0KICB9Cn0=", //signature "bzWAwCt5ZCniUE/UkCyQENvV6JVDEwhhdVMWvquTTHbh9YoC2Poh7vKmGfxk7SYIJs7/PuwzVskydGFQo4h8CEmU0qFCDNl+wWo3Gl0x3n6O/dvMvOxY4jRMd9TWGk8biFLXRAEU/WmzcyTQSlWfw+wNNimGki7yCTvO9fISpXFz3ac6320xsMI8Yx7vOSDP7M27VNleDvnJsVyVtZBGAC6Mt6lLMlBfPZbQjclT42Cb/h9ruH54BJ/X+O+a1H8f5Ky9fU2f6vlL/21Ne1CnWbp3ag+vF6eQyUPWGSoJyIU3YHVTgmQjXS3TavRgd0CRS5JUuyxmwipE7xOYwvhN6EyvAAqwpGfGzsW6Mrj0iu/KNxh21arV2VSlMiVEAkWn/Qd0/h1VTDSug8h3XxFka3Y3b/mPIx8ECEnpsIC3hhv4t3k+xixcoiDsqremUpack5pH3ZKr1nderHTPjQ+ZamNndNiysJIUAWh5OEhR2ceNeyCcU8/p3UtB6RW4lgFe0ZTvdFHX10GLt903WzLW1OlYbDIUNJfkRRiHEG7DoUSQcH/GHdkX+9lQ9mqoiGOHIZUq+qlmMA2f7bdmdbnjW4cr+2Ha8F6tnfccuyowm6NhONaJXSZUpDD2JsuYHNk6FPk3jiPo7CznsJ/nORnH9x7HHc7w/PrUV7GJaR4n7mk=" };

#

you can pull the texture (url) and signature for any skin registered with mojang

#

from http://sessionserver.mojang.com/session/minecraft/profile/

slim wigeon
#

I do know about that but there is no signature value. Just the texture array in base64 string

eternal oxide
#

signatures only come from mojang

eager hawk
#

?runtime

#

Elgarl what was the ? for using timers and cooldowns?

eternal oxide
#

?scheduling

undone axleBOT
eager hawk
#

ty bro <3

slim wigeon
eternal oxide
#

no

#

if you parse the base64 you would get a section of json with a URL

#

there is no actual texture in it, its just a URL

#

the signature is from mojang to confirm the data

slim wigeon
#

http://textures.minecraft.net/texture/da130994fb599cc0d94135068b3a033157217f95d42e1f9437358ea92d6e19e5

eternal oxide
#

get the account UUID and append to http://sessionserver.mojang.com/session/minecraft/profile/

#

that gives you the texture info you need to apply a skin to a player

#

yes that is the texture. The server never uses/accesses it

#

it ONLY passs a URL to the client

#

the client pulls the texture, the server never does

slim wigeon
#

If the client pulls the texture, I don't know why I don't see it when setting to Jax_Macky but ok. I will test this

#

Wait, I said something about a line that has a error. Any fixes?JsonObject jsonObject2 = JsonParser.parseString(Base64.getDecoder().decode(texBase64).toString()).getAsJsonObject();

eternal oxide
#

You don;t see it because just setting the properties in the Profile will not show the skin

#

why are you decoding it?

slim wigeon
#

I can pass a base64 string?

eternal oxide
#

the properties are encoded

slim wigeon
#

That is for the Json

eternal oxide
#

just pass an array of properties, texture and signature

#

but as I stated that code is for 1.19 so will not work on 1.21

slender elbow
#

the textures property value is a base64-encoded json object that contains the url for the skin

slim wigeon
#

If you load the content from ?unsigned=false, you see the following:{ "id" : "0b605717d3a04cd48b673af1eb6449ca", "name" : "MrnateGeek", "properties" : [ { "name" : "textures", "value" : "ewogICJ0aW1lc3RhbXAiIDogMTc0Mjg1NzE4MTc5OCwKICAicHJvZmlsZUlkIiA6ICIwYjYwNTcxN2QzYTA0Y2Q0OGI2NzNhZjFlYjY0NDljYSIsCiAgInByb2ZpbGVOYW1lIiA6ICJNcm5hdGVHZWVrIiwKICAic2lnbmF0dXJlUmVxdWlyZWQiIDogdHJ1ZSwKICAidGV4dHVyZXMiIDogewogICAgIlNLSU4iIDogewogICAgICAidXJsIiA6ICJodHRwOi8vdGV4dHVyZXMubWluZWNyYWZ0Lm5ldC90ZXh0dXJlL2RhMTMwOTk0ZmI1OTljYzBkOTQxMzUwNjhiM2EwMzMxNTcyMTdmOTVkNDJlMWY5NDM3MzU4ZWE5MmQ2ZTE5ZTUiCiAgICB9CiAgfQp9", "signature" : "LSWINA6KhpBhN2Qk5OtLTCQut74n8jvmWjbJHLFkqz6Q2sepIcYs1Q9tU89wA//d7KBF3HOKeaebT6myMPrURtRDPkDnqx/wRdDGVtSGqFumWQcfsDCjLtOsXc+OCQvX2SY902FiVoNhy73Aa4upVp8mQG2Hz2YeBZis3rP7bqhx1aGWC/hb2lbRntxLiRPBlL7x5z7uPGZeRF9hU0mlHb3zppp6+qlo+FKzs1/OKXPESvBM1vM0is8lVXDR/kPJGf20UANr+cvi2ZKtKuTIFr4bxPqLjAyUoBosULurjOn1oaZnHy2/YqY7urmElNCQBJd8zTq/TzQIbMHCCiYzEHCPnOn007DA1gzRDuo0SryqXVpeBjYopGQaRcMfxxNYLdOmZJ7EQdWkznBOIrLPaKZ8mBkmUJHBMHG4EDd4bojLS59Vvd0j++YwfQzGkbCxCkepW/h1zbJHOk3rHXPwfNHzandtAbw5Qv2/kcvIMDQL+aO+JdkzaDEQjSqBTzzQaga+bk6hKwB06y9tIPwINt/oDPfGqIrk4rrbALzQ/NbBqneUJYdDhjnPJT3J44Xk9wXUIDp3AYDYq7JhVFr+cV6yFHur04UQ4PIsghX15uxikjZ/XADAhr6r7+Hzm8pQyGR9nyT0J2fBBvpJo9TkmuxRFp2DiBYP9l9CCrSac6E=" } ], "profileActions" : [ ] }

eternal oxide
#

yes

slender elbow
#

yeah? that's the whole profile

slim wigeon
#

I can pass the json string?

slender elbow
#

containing the textures property, with the base64-encoded json object containing the skin url

eternal oxide
slender elbow
#

pass a json string where

eternal oxide
#

that shows you how to use the profile

slim wigeon
eternal oxide
#

no

smoky anchor
#

Why do people keep trying to reinvent the wheel (setting player skin) ?
SkinRestorer has API for this.

young knoll
#

Isn’t that designed for offline mode

#

Smh

eternal oxide
#

you also do not need to remove - from the UUID string

#

the last code I posted has sysout which show you how to get teh texture and signature properties.

#

you do not neeed to decode at all

slim wigeon
eternal oxide
#

yes

slender elbow
#

just use the code Elgar shared earlier

slim wigeon
# eternal oxide yes

Description Resource Path Location Type
The method setTextures(PlayerTextures) in the type PlayerProfile is not applicable for the arguments (String) AuthGate.java /MG-AuthGate/src/main/java/com/mrnategeek/authGate line 57 Java Problem

slender elbow
#

you cannot use the playerprofile API for this

#

you have to use nms

eternal oxide
#

Yep GameProfile not Bukkit Profile

slender elbow
#

auth plugin :intjfall:

slim wigeon
#

How can I get the GameProfile from player object?

eternal oxide
#

it shows you in teh changeSkin method

#

its NMS ServerPlayer

slim wigeon
# eternal oxide its NMS ServerPlayer

Description Resource Path Location Type
The method restoreSkin(ServerPlayer) from the type AuthGate refers to the missing type ServerPlayer PlayerListeners.java /MG-AuthGate/src/main/java/com/mrnategeek/authGate/Listeners line 19 Java Problem

eternal oxide
#

ServerPlayer is NMS

#

?nms

slender elbow
#

this is getting ridiculous

eternal oxide
#

nms changes almost every version

#

which is why my 1.19 code will not run on your 1.21

slim wigeon
slender elbow
#

you cannot do this without nms

eternal oxide
#

yes everyone shoudl avoid nms, but what you want to do requires nms

young knoll
#

Life hack: Write the NMS once and force MD to upkeep it

#

If your PR ever gets accepted <3

slim wigeon
eternal oxide
#

textures are signed by mojang. if the signature does not match the client will reject it

slender elbow
#

the client will render the textures property on a player only if it has the correct signature

#

otherwise you'll get one of the default skins

young knoll
#

Player heads don’t require a signature, but actual players (and NPCs) do

slim wigeon
#

This was the line I was talking aboutplayer.getGameProfile().getProperties().put("textures", new Property("textures", texture, signature));

eternal oxide
#

those are the two fields from the mojang profile

#

texture and signature

slender elbow
#

I'm crying

eternal oxide
#

value and signature

slim wigeon
#

I done with this. I tried but I going in circles. I just going to start reporting cracked servers to mojang, I just need people to relax on VPNs and dynamic IPs

eternal oxide
#

lol

#

its never going to happen

young knoll
#

Who cracks down on dynamic ips

#

Almost everyone has a dynamic ip these days

eternal oxide
#

cracked players already demonstrate a willingness for illegal activities and as such "generally" do more griefing than premium players

slender elbow
#

just don't run offline mode

young knoll
#

?offline

undone axleBOT
young knoll
#

I should have that embed the video

#

The video is great

slim wigeon
# slender elbow just don't run offline mode

I was not going to run the server offline but these server really set a goal and its impossible to reach. I can already see a load of people being banned due to using a public wifi network. While these are risky, I don't recommend it but people are limited on money. Some people cannot get a house for a fixed IP known as static IP. The hotspot is useful so I don't risk being spyed on by hackers. You know VPN is a easy fix if these networks has to be used but do they cause a massive issue? They do. But if the server is authorized by mojang like my server is, its not a issue

eternal oxide
#

public wifi doesn;t generally change ip

#

its all behind NAT but the public facing ip is generally static

young knoll
#

Is public wifi actually that vulnerable to hackers

#

Or did VPN companies just need something to advertise

eternal oxide
#

only by others actually ON the same wifi

slender elbow
#

^ ip banning is generally useless given everyone is behind a CGNAT

#

and ipv6 is nothing but pain

slim wigeon
#

Well, I don't know. I seen a SA-MP game community ban a internet cafe, I forgot what it was for but think if a server limits its users to 3 per IP, only 3 in that cafe can connect

young knoll
#

That’s why you don’t do that

eternal oxide
#

it was likely banned because someone hacked/griefed from that IP

young knoll
#

I mean what if I had 3 siblings that wanted to play

#

Smh

eternal oxide
#

I'd do the same. If someone joined my server and hacked/griefed, I'd ban the IP

slim wigeon
slim wigeon
young knoll
#

“Most people” citation needed

chrome beacon
#

Source: Trust me bro

slim wigeon
#

...

thorn isle
#

i run an offline mode server so i did have to ban the ip range of this one entire school because the kids kept stealing one anothers passwords from the client logs and it was causing repeated drama

#

generally though i think offline mode servers limit accounts per ip to like 5 to let siblings from a single household etc. to play without letting someone spawn 100 alts unsupervised

#

i don't think restricting accounts per ip makes sense for online mode though

dawn flower
#

did i fuck up

#

i accidently pressed del and somehting else

#

the code still exists if i look in file explorer but it doesn't show in intellij idea

echo basalt
#

what's the packet that gets sent when a player gets an item from the creative menu

#

because the SetCreativeItem one isn't working in my case

#

well it does fire

dawn flower
#

can't you just check if the inventory type is creative in an inventoryclickevent

echo basalt
#

nah needs to be with packet manipulation

#

I think what's happening is that the server is aware but the client is not?

#

something tells me these don't match

jolly maple
echo basalt
#

raw slots vs formatted slots type deal

#

if I put it in my 4th hotbar slot it goes to my boots

#

or whatever

dawn flower
jolly maple
#

next time it happens

#

go modules

#

and set java folder

#

to sources

#

it happens a lot to me XD

dawn flower
#

k

echo basalt
#

I just run whatever gradlew build or mvn package

#

and it usually fixes itself

slim wigeon
red bolt
#

How should I check if the player holds a key with PlayerInputEvent? right now I can only get when they press it

sterile axle
#

You can't. The server doesn't get that information. That's mod territory.

red bolt
#

well I can get the player input

#

that I can

#

wasd crouch sprint jump

sterile axle
#

Yes but that's only limited to those inputs. You can't get a generic key

red bolt
#

ik

#

I mean like check when w is released

#

cuz rn I only get when w is first pressed

sterile axle
#

I'll have to defer to someone else. I don't know

thorn isle
#

this is the industry standard for blacklisting bots/proxies and compromised ip's

red bolt
thorn isle
#

afaik it should send another packet with the input being set to false when the key is released

slim wigeon
red bolt
#

well they use left click right click and stuff

#

but I mean like simulate my own movement system

#

I need to get when w is pressed and when its released

thorn isle
#

iirc there's an existing plugin that queries dnsbl's on join

#

maxbans

red bolt
#

huh?

thorn isle
short pilot
#

hey guys!

red bolt
#

hi

short pilot
#

wasup

red bolt
#

good, trying to figure out how to get movement keypress

short pilot
#

ic ic

#

now that i have my custom entities created, is there any way i can give them custom spawn eggs?

My current implementation is checking a custom spawn egg (given by commands right now) to have a specific NBT tag, and then cancel the spawn and spawn my own mob instead. Is there a better way to go about this?

thorn isle
#

the item registry isn't synchronized to the client, so custom items are off the table

short pilot
#

damn

#

I can't use the getCustomModelData method for example?

#

and define a specific range to be for my mobs?

thorn isle
#

yes though that's not really a custom item

red bolt
#

yeah but when we talk about plugins there is no such thing as a true custom item

short pilot
#

ah i meant not exactly a custom item then, but a way to spawn my custom mobs

thorn isle
#

your best bet is to use a pdc or nbt tag to uniquely identify the item as your "custom item" and add a custom model data tag + pair that with a resourcepack predicate to apply a custom texture to it

#

use the pdc/nbt tag to spawn your mob on right click

red bolt
#

yeah and spawn the mob where it was placed

short pilot
#

are NBT tags safe to use for server client?

#

for mods i tend to not use em

thorn isle
#

what version are you doing this in

#

also use the PDC if you're writing a plugin

sonic goblet
#

^^^

drowsy bramble
#

how would i grab an online player's skull? i'm running a 1.18.2 server if that matters

#

i want to make an inventory that shows all online players that are a member of a kingdom, but SkullMeta can only use OfflinePlayer

manic delta
#

get the player skull with uuid

#

using the mojang api

drowsy bramble
manic delta
#

no i mean using the player uuid fetch to the mojang api

#

then you need to modify the item data

#

to set the texture

drowsy bramble
#

skullmeta requires an offlineplayer though

manic delta
manic delta
#

something like this

#

you can use skinrestorer api too

thorn isle
#

or on paper i think you can just get the player's profile and then set it on the skullmeta and it'll work out of the box

eternal oxide
manic delta
drowsy bramble
eternal oxide
#

um

manic delta
eternal oxide
#

Bukkit.getOnlinePlayers()

#

iterate

manic delta
#

yea check if the player is online

eternal oxide
#

use uuid to get OfflinePlayer

manic delta
#

if not use offline one

eternal oxide
#

actually you only need their profile

#

so as you are using only online players

#

your Player#getPlayerProfile()

manic delta
#

ah yeah if you are using online players just use setOwner() or setOwning in paper then

#

lmao

teal granite
#

Hello, i made a plugin named myHub for hubs.
can someone pls suggest me what can i add on it?

eternal oxide
#

What is a "hub"?

umbral ridge
#

USB C HUB

teal granite
#

a "hub" is a center of activity.

eternal oxide
#

I'd say add a teleport feature then

teal granite
#

what do you mean

eternal oxide
#

seriously?

#

a teleport is an ability to travel between two locations fast

teal granite
#

but what do you mean

#

teleport to where?

#

teleport is a vanilla minecraft feature

eternal oxide
#

a hub

teal granite
#

...

umbral ridge
#

are we talking about a bungeecord plugin or individual plugin for each lobby server

teal granite
#

its a plugin for spigot/paper to install only on the hub that also support bungeecord (send people to another servers)

thorn isle
#

sounds like that's all it needs

#

it's just a way to get to the various backend servers

eternal oxide
#

so not a hub then

teal granite
#

it is hub

eternal oxide
#

well dangit I'm all out of ideas

teal granite
#

i already got some stuff

#

but i dont know what to add

thorn isle
#

well, what stuff do you have

eternal oxide
#

I'd definitely add that stuff

teal granite
#

search myHub

thorn isle
#

nuh

#

list your stuff

umbral ridge
#

if it would be a bungeecord plugin you could add a message command which you could send across hubs

teal granite
#

that is alot of stuff

umbral ridge
#

?paste

undone axleBOT
eternal oxide
#

it definitely needs a recipe to put bark back on stripped logs.

thorn isle
#

overlay a block display entity displaying a regular log on stripped logs and scale it so that some of the faces are visible while others are not - for a partially stripped log, so you can strip logs one face at a time

#

very good for decoration i'm sure

echo basalt
#

we do it with custom blocks at work

#

it also lets us do things like corner blocks and whatever

#

Example

thorn isle
#

aye, i've thought about using this for facades and such, but the entity tracker/client renderer performance is prohibitive for making much use of it

echo basalt
#

We're not using entities here

chrome beacon
fair rock
#

Its a baby stripped spruce log xd

echo basalt
chrome beacon
#

I see

#

Noteblocks or?

blazing ocean
#

it's just nexo

vivid skiff
#

How can i update a entity metadata for one player only without modifing the actual entity using NMS?

like right now i have a method called update take takes in a Consumer<Entity> and the player who is supposed to receive the update packet, but when i edit the entity from the consume, like i set the Entity#setNameVisible(true) the next time i show and hide that entity to some other player who is not supposed to se it, he still sees it. I tried to search some way to clone the entity but wasn't able to find anything.

chrome beacon
#

Need packets

#

Use ProtocolLib or PacketEvents

#

I mean one option is as you said keeping a bunch of clones walking around

#

but that'd just be more annoying to make

vivid skiff
#

Im using NMS i know what packet to send just don't know this thing about how to edit the entity without actually editing it

vivid skiff
#

I don't want to hide the entity, i need to show the custom name to some and show it glowing but only to the entity owner

blazing ocean
#

entity visibility api ❤️

eternal oxide
#

Multiple entites with different states

vivid skiff
eternal oxide
#

only show what you want to each player

vivid skiff
chrome beacon
#

It's slightly old now but should be good enough

#

?protocol

undone axleBOT
chrome beacon
#

Take a look at this as well ^^

blazing ocean
umbral ridge
#

how do you override commands again? like /msg ?

#

i created a new command "message" with alias msg... does that count as overriding?

#

after using msg.. it acts as if its not even alias of the message command

#

and outputs default minecraft vanilla stuff

#

i guess i could make the main command msg with alias message? but message command is cleaner

smoky oak
#

where would you guys take inspiration for magic systems?

echo basalt
#

uh

#

just videogaming

#

and a lot of research around indie game forums

chrome beacon
#

World building stack exchange is useful for ideas as well

smoky oak
#

is there a minecraft-adjacent version of those?

#

that aside, is there a guide somewhere on how to interface Lua with Java?

#

i want to have an api interface for lua since it's much faster to edit and test with

chrome beacon
#

There are a couple of implementations for Lua

#

Haven't tried them though so can't say how easy it is

smoky oak
#

would you recommend any of them over othesrs?

pliant topaz
smoky oak
#

yea im doing my coding with plugins so that it doesnt require anything from the user

#

no resource packs either

#

just 'join the server and u good'

pliant topaz
#

Some good inspiration could be Botania, Thaumcraft, Ars Nouveau, Astral Sorcery and maybe also Forbidden and Arcanus

#

They really have some nice magic systems, especially Thaumcraft in my opinion

smoky oak
#

well i was more thinking ritual magic

pliant topaz
#

i see

smoky oak
#

and since modern minecraft has the amethyst crystals...

blazing ocean
pliant topaz
#

most of them are hard to find, occultism has a few rituals but there it's like putting some symbols on the ground and then something happens

smoky oak
#

yea, i know how to stop items from combining into stacks

#

so i figured why not have the items, ontop the right structure, be the 'magic'

shadow night
smoky oak
#

yeaaaa i need ideas kek
i figured i could use the central block (lodestone) to declare the general 'type' of magic. like, an amethyst shard for creating better catalysts for higher-tier magic

#

tryina find a good item implying material transformation/transmutation

grim hound
#

how can I enable debug logging?

#

netty uses whatever logger provider is given, but refuses to print errors unless debug is enabled

#

how tf do I turn on debug in general?

eternal night
#

didn't server.properties have something

sullen marlin
#

server.properties and spigot.yml have a debug setting

eternal night
#

beyond that, change your log4j2 config if you need the debug level

grim hound
grim hound
sullen marlin
#

I forget

#

Can't hurt to change both

grim hound
#

aight makes sense

sullen marlin
#

Changing the setting will change the log4j level

eternal night
#

oh does it o.O

#

Ah, the spigot one yea, would have been surprised if the server.properties one hacked around in the root logger

grim hound
#

nms overriding spigot isn't in my book

#

I'd assume changing the spigot.yml is enough

worldly ingot
#

It's basically the de facto standard for magic plugins

sullen marlin
#

Choco made it didnt he

worldly ingot
#

NO

smoky oak
#

ill take a look ty

young knoll
#

There’s a lot of mods you can take inspiration from

worldly ingot
#

I'm actually surprised to still see Nathan working on that. Thought he would have abandoned it a while ago. It's so old lol

young knoll
#

I made a magic system similar to ars nouveau

slender elbow
#

Nathan who?

young knoll
#

Nathan Mama

#

Wait

worldly ingot
#

NathanWolf

smoky oak
#

hm. it doesnt really fit what i am envisioning so i cant just make it a configuration for that plugin lol

#

i dont want players running around spamming spells everywhere tbh lol
it feels 'too easy' for lack of a better explanation

wicked pendant
#

Hey guys, I am running into a sort of a weird issue, with map cursors.
So I am making a custom Factions plugin for my server, and I want it to use a literal map for the faction map, but for some reason the map cursor position is far from where it should be.

Image: https://postimg.cc/tnksr94r
Code:

@Override
    public void render(@NotNull MapView mapView, @NotNull MapCanvas canvas, @NotNull Player player) {
        if (!player.getInventory().getItemInMainHand().getType().equals(Material.FILLED_MAP) &&
                !player.getInventory().getItemInOffHand().getType().equals(Material.FILLED_MAP)) {
            return;
        }
        MapCursorCollection cursors = canvas.getCursors();
        while (cursors.size() > 0) {
            cursors.removeCursor(cursors.getCursor(0));
        }

        Location loc = player.getLocation();
        World world = player.getWorld();

        mapView.setCenterX(loc.getBlockX());
        mapView.setCenterZ(loc.getBlockZ());

        renderTerrain(loc, canvas, mapView);

        int mapCenterX = loc.getBlockX();
        int mapCenterZ = loc.getBlockZ();

        boolean test = false;
        for (int pixelX = 0; pixelX < 128; pixelX++) {
            for (int pixelY = 0; pixelY < 128; pixelY++) {
                int worldX = mapCenterX - 64 + pixelX;
                int worldZ = mapCenterZ - 64 + pixelY;

                int chunkX = worldX >> 4;
                int chunkZ = worldZ >> 4;

                Chunk chunk = world.getChunkAt(chunkX, chunkZ);
                Faction faction = factionManager.getFactionAt(world, chunk);

                if (faction != null) {
                    Color factionColor = getFactionColor(faction);
                    if (!test) {
                        canvas.setPixelColor(pixelX, pixelY, Color.BLACK);

                        if (pixelX >= 0 && pixelX < 128 && pixelY >= 0 && pixelY < 128) {
                            cursors.addCursor(new MapCursor((byte) pixelX, (byte) pixelY, (byte) 0, getFactionMarkerType(chunk, player), true, faction.getName()));
                        }

                        test = true;
                    } else {
                        canvas.setPixelColor(pixelX, pixelY, factionColor);
                    }
                }
            }
        }

        cursors.addCursor(new MapCursor((byte) 0, (byte) 0, getDirection(player), MapCursor.Type.PLAYER, true));
    }

I don't see any reason it's offset like that. The black pixel in the image is supposedly the cursor position.

#

I also saw someone else that had this issue in 2020 or so, but got ignored

sullen marlin
#

aren't map cursors absolute positions based on map center?

#

although maybe thats what your code is correcting idk

wicked pendant
sullen marlin
#

I am not sure, but I think they might be since they track players off the map

wicked pendant
#

Alright, I will try to correct it someway - I'll update you whether it works or not

sullen marlin
#

ok theyre not, but

#

Parameters:
x - The x coordinate, from -128 to 127.
y - The y coordinate, from -128 to 127.

wicked pendant
#

It's impossible for the cursor positions to be outside those ranges

sullen marlin
#

if that's right then I think there's negatives you're missing since yours starts at 0

wicked pendant
#

I tried a few times, but can't get it just right.
https://postimg.cc/HrgprqWn

@Override
    public void render(@NotNull MapView mapView, @NotNull MapCanvas canvas, @NotNull Player player) {
        if (!player.getInventory().getItemInMainHand().getType().equals(Material.FILLED_MAP) &&
                !player.getInventory().getItemInOffHand().getType().equals(Material.FILLED_MAP)) {
            return;
        }
        MapCursorCollection cursors = canvas.getCursors();
        while (cursors.size() > 0) {
            cursors.removeCursor(cursors.getCursor(0));
        }

        Location loc = player.getLocation();
        World world = player.getWorld();

        mapView.setCenterX(loc.getBlockX());
        mapView.setCenterZ(loc.getBlockZ());

        renderTerrain(loc, canvas, mapView);

        int mapCenterX = loc.getBlockX();
        int mapCenterZ = loc.getBlockZ();

        boolean test = false;
        for (int pixelX = 0; pixelX < 128; pixelX++) {
            for (int pixelY = 0; pixelY < 128; pixelY++) {
                int worldX = mapCenterX - 64 + pixelX;
                int worldZ = mapCenterZ - 64 + pixelY;

                int chunkX = worldX >> 4;
                int chunkZ = worldZ >> 4;

                Chunk chunk = world.getChunkAt(chunkX, chunkZ);
                Faction faction = factionManager.getFactionAt(world, chunk);

                if (faction != null) {
                    Color factionColor = getFactionColor(faction);
                    if (!test) {
                        canvas.setPixelColor(pixelX, pixelY, Color.BLACK);

                        byte cursorX = (byte) Math.max(-128, Math.min(127, worldX - mapCenterX));
                        byte cursorY = (byte) Math.max(-128, Math.min(127, worldZ - mapCenterZ));

                        cursors.addCursor(new MapCursor(cursorX, cursorY, (byte) 0, getFactionMarkerType(chunk, player), true, faction.getName()));



                        test = true;
                    } else {
                        canvas.setPixelColor(pixelX, pixelY, factionColor);
                    }
                }
            }
        }

        cursors.addCursor(new MapCursor((byte) 0, (byte) 0, getDirection(player), MapCursor.Type.PLAYER, true));
    }
#

It's way closer now - however it's still off, but if I am at the exact position it's accurate. Higher distance = higher inaccuracy it seems like

echo basalt
#

md can we have sweeping edge events please :)

#

even paper doesn't have them

#

making a feature at work where sweeping edge works off a percentage but eh

orchid brook
#

is Event Priority still applies to async events. a higher priority will still be triggered before one with a lower priority ?

chrome beacon
#

lower priority runs first

orchid brook
#

ugh yeah mb

#

but even with async event ?

wicked pendant
chrome beacon
#

yes

echo basalt
#

Because it'd only apply to half the entities and not the others

#

while still rendering the particle and sound

#

meanwhile I want it so it never renders or it always renders depending on a condition

#

and for that I either need to check swing events, run the chance and cache it

#

or I need to redo all the combat logic

wicked pendant
#

aha, I see

echo basalt
#

even cancelling the regular sweep damage event doesn't work.. tf?

#

nevermind ignorecancelled might have something to do with it

eternal night
echo basalt
#

eh

sly topaz
#

can't you just check the damage cause

eternal night
#

The DamageSource of the event will have the ENTITY_SWEEP_ATTACK bit

#

and you know the attacker

echo basalt
#

I can but it'll still play particles and sounds

#

even if I cancel them all

eternal night
#

mhm fair enough

echo basalt
#

I just want to be able to make any attack sweep vs not sweep

#

and ideally crit vs not crit

eternal night
#

Crit vs not crit paper has an open PR for, the sweeping part will be a lot harder yea

echo basalt
#

it's all part of the attack method

eternal night
#

it is

sly topaz
#

you could maybe perhaps make it work with paper's pre-attack event but it fires too early for the sweep effect to be detected

echo basalt
#

yeah there's no "great" solution

#

what we're going with is just "let us bother about this later" and I cancel the sweep damage and make the rest invisible with rsp trickery

eternal night
#

But, the idea of maybe flagging that is a good call

#

That might help me with the paper PR for crit

echo basalt
#

There's like 2 classes that start with "sweep" it's truly an underdeveloped concept

#

the sweeping edge enchant just affects an attribute too it's so lame

#

(and that attribute is just a damage multiplier, range is hardcoded)

sly topaz
#

it's a pretty easy effect to replicate tbf

echo basalt
#

I still need to disable the default shit

#

and I can either do that with packet manipulation

#

or a lot of event.setCancelled and emulation

sly topaz
#

emulating the effects on the server won't be as nice as the client can't make its usual predictions and latency will make it look off

#

but it is what it is

queen mica
#

Who can explain how to work with player levels and experience 1.20.4 now? Previously, experience was measured by float and now int, I need to implement a simple system of increasing levels by the amount of experience from the config, for example, initially in a player lvl 1, to increase it to the second you need 100 experience (this is taken from the config) and so on, here is my example but it does not work. ```java
@EventHandler(priority = EventPriority.HIGHEST)
public void LevelUp(PlayerExpChangeEvent event) {

    Player player = event.getPlayer();
    int totalPlayerExp = player.getTotalExperience();
    int totalPlayerLevel = player.getLevel();


    String path = plugin.LevelUpConfig.getString("Levels.") + totalPlayerLevel;

    if(plugin.LevelUpConfig.contains(path)) {
        int nextLvlExp = plugin.LevelUpConfig.getInt(path + ".Exp");

        if(totalPlayerExp >= nextLvlExp) {
            player.setLevel(totalPlayerLevel + 1);
            player.sendMessage("Ви підвищили рівень!");
        }
    }
}```
#

More precisely, it works, but not quite as it should, for example, to increase the level from 7 to 8 you need 100,000 experience, but by killing a couple of mobs it increases, although it should not

thorn isle
#

i don't see you preventing the player from leveling up naturally

#

so the player will still accumulate xp as in vanilla, and level up when the vanilla xp threshold (which is far less than 100,000 for level 8) is reached

queen mica
thorn isle
#

try cancelling that event if it's cancellable

#

or iirc there's a setLevel or setXp method that takes an int (level) and a float (progress to next level, 0..1), and use that

#

divide the current xp with the target xp to get the float

queen mica
thorn isle
#

are there maybe methods on the event itself that could be used to set the level and level progression?

#

i don't have javadocs in front of me right now

queen mica
dawn flower
#

how do i get the original item in a protocollib SET_SLOT packet before any plugin was able to modify it

#

e.g.
if plugin A modifies the item in SET_SLOT to have some extra lore and plugin B tries reading the item in SET_SLOT, it would have the added lore

chrome beacon
#

Working with creative mode?

dawn flower
#

yes

#

i'm doing that to make it compatible with creative mode actually

chrome beacon
#

Don't over think it

dawn flower
#

i got 2 plugins that need client side lore, one is enchants and one items. i make it compatible with creative by storing the original lore in a pdc and then restoring the lore from the pdc in InventoryCreativeEvent

the issue is when you try custom enchanting a custom item then removing that enchant, one of the plugins stores an instance of the lore when it had client side stuff in it into the pdc

#

tldr: enchanting and disenchanting a custom item when in creative that has client side lore makes the client side lore into server side

sullen marlin
#

Creative is all sorts of ew, does the plugin need creative?

#

You should be able to strip the lore in the creative event

dawn flower
#

not really but it would confuse people if the lore doesn't exist if they're creative

sullen marlin
#

But yes the client will send client side lore to the server in creative

wide vigil
#

how do i get lukcperms working for bungeecord?

(I host my server on my own pc)

wintry anvil
wide vigil
#

yeah but idk does it automatically save across all servers?

#

@wintry anvil ?

wintry anvil
#

No need for ping

#

And yeah it does... Also RTFM

#
wide vigil
wintry anvil
#

They should work just like they would with the normal LP version

#

Also for tablist I'd use VelociTab bc that syncs the tablist across all servers

wide vigil
wintry anvil
#

idfk

#

probably

#

Never used deluxehubs

wide vigil
slender elbow
wide vigil
#

locally on my pc

wintry anvil
#

Both of these allow you to host mysql and pma on your machine

wide vigil
robust saffron
#

Anyone write java code in notepad?

torn shuttle
#

huh

#

in-game game tests?

#

can't wait to misuse that for something it was never meant for

#

Entity Data
Custom data (previously present only on Marker) is now available on all entities
It's exposed as a minecraft:custom_data component, so it can be set by spawning items and matched by predicates
The component is currently stored in a field called data, which will be changed in the future when more proper storage for entity components is introduced
It's stored only if it's non-empty

#

well

#

I can tell we're about to have some api fun

sly topaz
wintry anvil
sonic goblet
#

Is there a way to include a different BungeeCord in BuildTools? When building Spigot 1.21.5 it seems to still be bundling BungeeCord 1.20-R0.2 when I believe the latest is 1.21-R0.1

sullen marlin
#

Open a bug report please, a release of 1.21 is probably due

sonic goblet
#

Will do, thank you as always

slim wigeon
#

I can set the time out for typing in chat with the conversation module of Spigot but how can I do that with the block selection like how this plugin does with its linking system?
https://songoda.com/product/epichoppers-8

slim wigeon
slim wigeon
#

Anyone here?

sullen marlin
#

You're asking about a timeout?

#

I'm sure you can figure that out with System.currentTimeMillis() and/or scheduler

slim wigeon
#

ChatGPT said something about that but I don't want alot of timers. I got enough already. I don't have to use timers for the chat conversation module

sullen marlin
#

So there's a nail and a hammer but you'd prefer to use your shoe?

slim wigeon
#

...

sullen marlin
#

start = currentTimeMillis. If (currentTimeMillis - start > timeout) // timed out

slim wigeon
#

I will see if that can work. But one issue, I had this issue with my SA-MP server in the past and I did something to make it operate again. The issue was I had my computer online for a week or more, stuff like anticheat broke. I don't know if this is the same for Java but if it is, I need a different way for linking chests. I not going to ask about the filters because people don't get what I trying to do

outer tendon
#

Hey md_5, you told me my code was not thread safe in a Jira issue. I have been working on a BlockPopulator that loads chunks based on how they were generated in another world. Is it possible to make such a solution thread safe?

sullen marlin
slim wigeon
jagged thicket
#

md were u able to replicate that login event issue?

sullen marlin
sullen marlin
jagged thicket
outer tendon
sullen marlin
#

Yes

outer tendon
#

Thank you bt

#

btw*

#

Alright

jagged thicket
#

i was able to replicate it both locally and in a vps

#

reliably with my method in the video

outer tendon
#

Are the BlockPopulators ran asynchronously? Im guessing Ill have to schedule retrieval of information from the other world and then when it's received, continue with populattion?

sullen marlin
slim wigeon
sullen marlin
#

I think the deprecated method (without limited region) is sync

grim hound
#

Are VirtualThreads as cheap or pretty much as cheap as just scheduling a future?

slim wigeon
#

If you a nodejs programmer, you know what I talking about

#

I saying this because I seen refs to this on the bukkit code

outer tendon
outer tendon
jagged thicket
#

there is also an issue of entity teleport event firing twice

sullen marlin
#

You could use the callSync method and get the future

jagged thicket
#

but i gotta test more

outer tendon
#

Ill try that

#

Thank you

slim wigeon
outer tendon
#

Im pretty sure synchronisity works much differently in JS

#

synchronicity*

blazing ocean
slim wigeon
#

It might be but I just telling you so if some things freeze on the server. I never ran into this issue but if I using sync methods, I just try to find async methods

jagged thicket
#

yeah 💀 but not everything can be done async

outer tendon
#

Sync methods will stop the server if it is doing something that is intended to be asynchronous

jagged thicket
#

imagine async plugin loading

outer tendon
#

That would not go well xD

slim wigeon
jagged thicket