#help-development
1 messages · Page 1024 of 1
Make the bar a separate model and include it in other models.
I think that should be possible.
oh and I dont have a resource pack yet for my plugin
I have that planned, but not yet
Well I have no idea how to do it without a resource pack.
Except perhaps with fonts 🤔
But even then you would benefit from having a resource pack.
well maybe
but you cant just force every server owner to use your resource pack
so even then my plugin will have 2 separate versions
What I do is I just copy the relevant parts to my resource pack. Takes couple of minutes.
I just want it to work without a resource pack too
It's not that difficult. But of course it's an extra step.
So if you end up doing it, just make it look extra nice so that it's worth it.
yeah I plan to
Without resource pack it would be easiest to use numbers for displaying the damage. Or colored default fonts like the graphical part of the UTF-8.
hi
Not sure if there's space between them, though.
well yeah but sadly I am using the item name and amount already
for other indications
It can be swapped.
so I thought this would be the perfect way to represent when the item will expire
But of course you do have to account for some things to make sure it doesn't bug out.
ah wow, didn't expect that
thanks
is that why its so hard to update to 1.20.6? afaik ProtocolLib isn't even out yet
its also displayed in the item lore
so its not completely absent
but this would be a great finishing touch
My personal advice would be - don't be afraid of using resource packs as part of your plugin. You can do so much more with that. But you might want to consider making it optional. So that if they decide to use it - it's gonna look that much nicer. But it will work without it too.
I'm pretty sure that the latest dev builds supports 1.20.5+: https://ci.dmulloy2.net/job/ProtocolLib/
Updating is always hard.
I try to use as little third party plugins as possible. I have full control my own plugins so upgrade won't be stopped by anything other than my own skills.
And by the third party plugins which I cannot/do not want to build myself from scratch.
yes same for me
the only third party dependency (besides spigot/bungee) is an anvil gui xD
since I didnt wanna bother with the nms
I just spent a week swapping graphics to the minecraft:clock item.
Turns out when you want more than 64 textures things get really hard.
haha oof
I spent 4 days trying to come up with an algorithm to calculate the time predicate values. But in the end everything failed and I had to tweak them by hand.
Which was very very slow.
Hi, I'd like to know if it's possible but I've made a custom craft and I'd like to be able to change the matrix when I do it (after I've retrieved the result), is that possible?
ItemCraftEvent
CraftItemEvent*
But that gets called when the "recipe" is completed, not when the item is actually crafted
for that IIRC, InventoryClickEvent and check if the clicked item is the result
Loaded class blahblah from APlugin which is not a depend or softdepend of this plugin
^-- What's the consequence of not declaring your depends and softdepends?
Will md_5 come and slap me, or... ?
your plugin would fail to enable if it tries to load the class before the other plugin got loaded
declaring the dependency will make sure that the other plugin gets loaded first
ok, this is what I regretted having to do (a bit painful to do exactly what I want)
Got rid of the complaint.
(I just like to throw all my plugin code into a single plugin).
reminds me of Basics lol
player.getInventory().removeItem(new ItemStack(Material.WHITE_DYE, amount));
player.updateInventory();``` It's not getting rid of white dye.. Why?
I think it might be because you're creating a new item.
does your white dye have any custom data, i.e. custom name, PDC tags, or similar?
Yeah, it's got a custom name..
well then your provided ItemStack should also have that custom name
You could try replacing the custom model data.
Didn't know it would need me to do that, whoops
It's in ItemMeta. setCustomModelData()
You can swap it on the fly without creating a new item.
entities don't have custom model data?
I mean. There's people doing custom entities out there with animations and everything.
But it's probably complex to set that up.
https://advancedplugins.net/item/AdvancedMobs.47
Like here for example. That's just crazy.
yeah but those are just a ton of armorstands or itemdisplays with custom-model-data'd items
should be fine as long as you dont have a lot of these
emoji code is cursed
that baboon says hehe
Lets play piano on his teeth👀
database work is so mindnumbing
depends on what you mean
Orm ftw
somehow entitydismountevent isnt called when teleporting to some coords.
visually passenger is removed
no 1s in console
Pr fix would be pretty easy I think
but are they dismounted
visually yes
add what
the event call
spigot probably doesnt call the event for some reason
maybe its related to the portal bug with entities that is gettign fixed in 1.21
i was planning to do that but
does only teleporting make entities dismount?
hm good idea
@worldly ingot
Waiting for the people extending InventoryView to chime in...
We can all have a good laugh when they do

idk last time we made changes to InventoryView we got a full PR saying what if you extend InventoryView and changing stuff to non abstracts
lmao
for (ItemStack item : player.getInventory().getContents()) {
if (item == null) continue;
if (item.getType() == Material.WHITE_DYE) {
func = true;
amount = amount + item.getAmount();
balanceToAdd += amount * 10; // When you have 2 stacks, it's giving me 1920 instead of 1280?
player.getInventory().removeItem(item);
player.updateInventory();
}
}``` When I have 2 stacks of white dye it's giving me 1920 instead of 1280..? (128*10)
because you add to amount
Amount is set to 0 when you execute the command, i'm not showing that here
first stack: amount = 0 + 64
second stack: amount = 64 + 64 = 128
so balance to add is 640 + 1280
does the player's pdc get cleaned when he dies?
no
thanks
persistent data container :p
So I'm using REPLACE INTO syntax but I'm getting duplicate entry error for some reason, does anyone know why?
why not use INSERT ... ON DUPLICATE KEY UPDATE?
WHY ARE WE YELLING
So you don't need to define what should be updated?
If I'm not wrong it's gonna be a long query?
idk, mr sql decided to yell when creating the language
are you updating primary or unique keys?
and did you make sure no duplicates are in the table?
No I'm not updating that.
idk then
how many values do you update
might be worth to write the insert ... on duplicate query to test if that works
Idk like 15 or something.
upsert is a pretty standard practice
wtf i don't know about that somehow
Whats wrong with my gson?
[15:55:02] [Server thread/INFO]: {
[15:55:02] [Server thread/INFO]: "logLevel": "TRACE",
[15:55:02] [Server thread/INFO]: "sectionIndentation": 25,
[15:55:02] [Server thread/INFO]: "clearSpigotLogs:": true,
[15:55:02] [Server thread/INFO]: "allGroups": true,
[15:55:02] [Server thread/INFO]: "groups": {}
[15:55:02] [Server thread/INFO]: }
[15:55:02] [Server thread/INFO]: INFO | Initialized FPLogger with level TRACE.
[15:55:02] [Server thread/INFO]: false
comes from https://paste.denizenscript.com/View/123495. That doesn't really make sence to me?
if i had to guess, probably something wrong with FPLoggerConfig
@Getter
@AllArgsConstructor
public class FPLoggerConfig {
private FPLogger.LogLevel logLevel;
private int sectionIndentation;
private boolean clearSpigotLogs;
private boolean allGroups;
private Map<String, Boolean> groups;
}
the other things work, only clearSpigotLogs not
ah nvm, I'm just dump, there is a :
xd
i have been pinged by the gods of hell
Do you know why it throws me a syntax error.
String query = "INSERT INTO " + GENERATOR_TABLE + " VALUES (?,?,?,?,?) ON DUPLICATE KEY UPDATE";
Same error for some reason.
It's syntax error near "DUPLICATE".
String query = "INSERT INTO " + GENERATOR_TABLE + "(owner, location, generator_id, timer, is_corrupted) " + "VALUES (?,?,?,?,?) ON DUPLICATE KEY UPDATE generator_id=?, timer=?, is_corrupted=?;";
do you have a stack trace or a more explicit error message with an error code or something?
?paste
what sql engine and driver are you running?
Error log https://paste.md-5.net/xeciwuzepa.md
Code https://paste.md-5.net/uvoraxevel.cs
Not sure how to check the sql engine and driver but I use HikariCP, also would using SQLite cause this?
Doesn’t SQLite have an entirely different syntax for that
Damn it is.
Isn’t it ON CONFLICT or something
wtf is On duplicate key
MySQL syntax
Yeah it's ON CONFLICT I think
i know the basics of mysql but ive never heard of On Duplicate Key
it's pretty neat
usually better than replace into since it doesnt delete a record and then insert it again
Until your auto increment primary key reachs 1 billion
Yes I know it doesn't matter but it bothers me
Speaking of that: https://x.com/davidtolnay/status/1798483916015436158?s=46&t=7b0HU6BH7nDYXykSqx1WjQ
well that was the wrong URL here
thankfully we have stuff like uint128
Hey guys
I would need help
I’m making a /isplayerbanned plugin
And it looks into the yml file and sees if someone is banned
Here’s the code
It shouldn’t say “player is not banned” if he is banned
@EventHandler
public void onInventoryClick(InventoryClickEvent event) {
boolean forceInventory = config.getBoolean("item_on_join.forceinventory");
Player player = (Player) event.getWhoClicked();
if(forceInventory && !player.hasPermission("hubbly.items.bypass")) {
event.setCancelled(true);
player.setItemOnCursor(new ItemStack(Material.AIR));
}
}
is there any obvious reason im missing as to why this doesnt work?
setcancelled works but setitemoncursor does not
using updateinventory just does the opposite of what i want, it removes it from the hotbar and leaves it on the cursor...
you'll need to pull out the sendMessage logic out of your for loop
I'd probably use .getKey(false).contains(playername) while we are at it - but proceed with care
using a scheduler doesnt work either, same result
Ok, I’ll try
why signed lol
why not
why would you use negatives if you're always counting towards +inf
you're wasting half the domain
Issue id as negative as my appreciation for you
i know your appreciation for me is negative
2^127 is kinda high
kinda
let's count to 2^127
170,141,183,460,469,231,731,687,303,715,884,105,727
done
i skipped a couple numbers
a couple?
am bad at counting 😔
man's just counted to 2^127
technically not
sadly you would not survive that
i counted to 2^127 - 1
BigInt 🗿
you using java
no, that's godly
that's... quite a span
if you remove sleep, 1.5-2.5 billion seconds
who even needs sleep smh
sleep is such a waste of time
you know how expensive showering daily is?
it costs you like 600 seconds every single day
imagine taking ten minutes to shower
do you really shower every day for seventy years though
do you really shower
no, I usually shower every second day
who showers only 10min?
who takes 10min to shower
Way to short maybe like 20-30
@blazing ocean those 10 minutes include stuff like putting your clothing on again, getting dry and shit
💀
but then again do you pay for the time you're not using the water
just don't shower then
well but then I feel awful
then don't feel awful
and nobody wants to be with me, not that that would change anything tho
lmfao
Self care is the first step of changing that
meanwhile I'm out here often times showering multiple times a day because I'm not a slob
You know what? I won't shower out of protest thanks to you!
Bruh take care of your hygiene it's the bare minimum and especially if your depressed it gets you doing something other than laying in bed
Why not just sleep?
I know, I shower every 2 days
fine by me I don't care if you're all degenerates as long as your stink doesn't get close to me
you guys know that this was a joke tho?
well at least half lol
was it
Hi, I have a question about special characters loaded from json files with GSON. For example, I use ✦ or ü,ö,ä. But ingame, they are all weird. Does anyone know a fix?
utf8 encoding?
use utf-8
InteliJ sais my files are utf-8
Gson UTF-8 xd
Hi, i wanted to add some custom enchantments to my plugin. i have never done it before, so i don't really know how to to it.
i have got a bit of it already, but now i have to register my enchantment.
i'm working in 1.20.4 so the Enchantment.registerEnchantment() method doesn't exist anymore.
i read some things of doing it with nms but how?
where?
i mean gson takes a Reader
most things dont assume any encoding by default
make sure your file reader is set to use the UTF8 charset
would be shocked by the amount of things that assume some encoding from the stone age
they are using the registerEnchantment() method, which doesnt exist anymore...as i said
gson doesn't assume any encoding, it only works with a Reader
do u mean me?
Yes
either use NBT data as a workaround or use make enchants directly with NMS
Or wait for 1.21 :p
my question was how to do it with nms
actual custom enchants don't exist yet
as in registered enchants
that only works if it's registered in the client too
i mean this looks like it should work
https://www.spigotmc.org/threads/1-20-2-how-do-you-register-enchantments-now.629029/
this doesn't look vanilla
i highly doubt you can just register stuff into existing registries
the client will just not know it
its using the mojang-mapped nms
that's unrelated
I agree with you can. I inserted some custom structures and stuff into Registries 💀
I died after several hours of reading and researching
i mean yeah if you want players to crash :p
idk either
custom tags sure do
component tags
ah
item components
ngl i prefer nms over some bukkit apis any day of the week
bukkit apis just suck bc they're so outdated
Feel free to make some PRs
No, the item meta system is flexible and closely aligned with item components
that's what paper is for
i mean custom item component tags, not custom data tag or pdc
like you can register em but you just disconnect/crash
Well yea that doesn't work on a network level
mojank moment
i'm sad there's no pdc in fabric 😔

coping better
am using 1.21 already, just not paper
You mean -pre3
which one
Is it the missing ladder
No it's the "lemme hide item attributes without setting attributes" one
ah
Their "oh you can only define visibility of things if you also specify the component" is ass
i'd love the client to send more window data to the server ngl
as in width height gui scale
on vanilla
noxesium does that already but would be nice in vanilla
that would be next to impossible, theres already many issues regarding resizing
why
because the window updates dynamically while resizing by dragging
how is that related to sending width and height
which would be a ping hell
that isnt really good
You can use core shaders to modify stuff on the client
cuz it obv changes
i am 100% aware of those
I don't think it's a good idea for the server to handle players window sizes
not handling, just receiving ut
they are also incredibly unstable and version dependent, not documented, etc
just imagine a twm handling the resizing
twms my beloved
at this point, just ask players for their res
doesn't work that well for a huge server
it's for defining the layout of custom ui elements
what happened to ItemFlag.HIDE_POTION_EFFECTS?
guis exist
hide_additional_tooltip maybe
with font magic fuckery
okay ill try it out thanks
Setting to show/hide potion effects, book and firework information, map tooltips, patterns of banners, and enchantments of enchanted books.
seems to be whatcha want
god walking and typing is awful
yea
like my guis look fucking weird on gui scale 1/2
ah perfect, thanks again
guess I shouldve looked at the docs 😛
because shifts aren't relative but rather absolute
i mean fair
pixels usually aren't relative
oh you mean those comically wide tooltips?
It was finally destroyed praise commodore
i think that's just because the client doesn't do a nextline even when it's too much text to fit, except if the text itself has a \n or whatever mc uses
Can someone help me with compiling plugins and stuff, a server i used to play on dropped their plugins and i dont know what to do with them to make the server run
Would apprechiate any help and id be down to gift nitro if someone helps me
If im in the wrong channel for this im sorry
what part do you need help with?
everything kinda i guess
well you should have a libs folder and a plugins folder on your server
looks like its actually called lib
place the jars there as said
how to remove invulnerability when someone logs in ?
although the libs folder when compiling 🤷♂️
i assume thats the server lib folder, in the root of the server
just move said things to their place
bukkit doesn't use @Since iirc
is there any changes in spawning npc with nms in the 1.20.x ?
so you're better off checking the blame 
amazing
Who can help me with some coding
?ask
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!
Okay which is the correct server jar they want?
just normal 1.8.8 spigot?
player.isInvulnerable(false); something like this. It could be invincible
how to use sqlite-jdbc without shading in BUNGEECORD
add it to the plugins libraries section
whaat what is that
@tardy delta would you go vc with me and walk me through?
dont have time atm
return;
ServerGamePacketListenerImpl connection = ((CraftPlayer)player).getHandle().connection;
try {
connection.send(new ClientboundPlayerInfoUpdatePacket(ClientboundPlayerInfoUpdatePacket.Action.ADD_PLAYER, npc)); // "Adds the player data for the client to use when spawning a player" - https://wiki.vg/Protocol#Spawn_Player
connection.send(new ClientboundAddEntityPacket(npc));// Spawns the NPC for the player client.
connection.send(new ClientboundRotateHeadPacket(npc, (byte) ((npc.getBukkitYaw() / 360) * 256)));
connection.send(new ClientboundMoveEntityPacket.Rot(npc.getId(), (byte) (key.getLocation().getYaw() * 256 / 360), (byte) (key.getLocation().getPitch() * 256 / 360), true));
connection.send(new ClientboundAnimatePacket(npc, (byte) (0)));
new BukkitRunnable() {
@Override
public void run() {
connection.send(new ClientboundPlayerInfoRemovePacket(List.of(npc.getBukkitEntity().getUniqueId())));
}
}.runTaskLater(this.plugin, 5);
}catch (NullPointerException e){
//
}```
this is how I'm spawning npcs but I don't see anything that spawn is there any issue with it ?
Hey, I'm trying to update an entity's position and head rotation, but for some reason I am not seeing any difference in-game, am I doing something wrong, or not sending the correct packets?
ServerPlayer serverPlayer = ((CraftPlayer)plr).getHandle();
ServerGamePacketListenerImpl con = serverPlayer.connection;
entity.setPos(entity.position().x, entity.position().y + 2, entity.position().z);
entity.setYRot(entity.getYRot() + 90f);
con.send(new ClientboundRotateHeadPacket(entity, (byte)(int)(entity.getYRot() * 256.0F / 360.0F)));
con.send(new ClientboundSetEntityDataPacket(entity.getId(), entity.getEntityData().getNonDefaultValues()));
Fixed using ClientboundMoveEntityPacket$PosRot
lmao I found a bug im pretty sure
whenever I set the damage of a spawn egg, it changes types or dissapears completely
using Damageable.setMaxDamage and setDamage
thank you so much
probably getting haunted by legacy code
make sure spigot is up to date
if it is create a bug report
yeah I tried it twice, but the first time it said [org.bukkit.craftbukkit.legacy.CraftLegacy] Initializing Legacy Material Support. Unless you have legacy plugins and/or data this is a bug!
oh yeah set the api version
if it's at 1.20 it shouldn't start legacy material support
ig you have some other old plugin
I dont
🤷♂️ make a bug report
oh right , it may well be a paper thing, let me actually test on spigot xD
Commodore
why you no do your job
Is there a limit to the size of the minecraft command/subcommand tree? I use brigadier to register my commands:
val bukkitServer = (Bukkit.getServer() as CraftServer)
val root: CommandNode<CommandSourceStack> = bukkitServer.server.commands.dispatcher.root
root.addChild(/* my big command here */)
I have a command with quite a few sub commands. I've just recently added a few more sub commands, and now whenever a player joins, I get this error:
Error sending packet clientbound/minecraft:commands
io.netty.handler.codec.EncoderException: Failed to encode packet 'clientbound/minecraft:commands'
...
Caused by: io.netty.handler.codec.EncoderException: String too big (was 32847 characters, max 32767)
...
Essentially saying that the commands packet sent to the player is too big. Is this a known issue? Is there a known way to properly avoid this? Is there a way to split this large packet into smaller chuck packets? Thanks alot 🙏
Can you show more of that exception
having an issue with commands not executing at all and just returning usage, anyone know what could be going on?
Plugin onEnable
ItemManager.init();
getCommand("command").setExecutor(new Command());
plugin.yml
commands:
command:
description: command does thing
usage: /command <args>
Command implementing CommandExecutor
public class Command implements CommandExecutor {
@Override
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
if (sender instanceof Player player) {
player.getInventory().addItem(new ItemStack(ItemManager.ITEM));
}
return true;
}
}
my ItemManager just initializes all of my custom items, but commands even without custom items aren't working and I've checked to make sure it is working properly
yea sorry typo, i just wanted to simplify it a bit
i edited it, all commands were working up until I added a new command, I tried removing the new command and continue to have the issue
Provide your actual code
Plugin
https://paste.md-5.net/inojinasip.java
Command
https://paste.md-5.net/iyojutarah.java
Item Manager
https://paste.md-5.net/jisowavigu.java
plugin.yml
commands:
rocket:
description: gives rocket
usage: /rocket
aliases: r
theres several other stuff in the item manager but i cant really have them posted because of privacy reasons, plugin = private static Prisons plugin;, what else do you see that isn't valid? I'm sorry but I can't post everything as I'm not allowed
It's hard to troubleshoot something when you can't provide what's causing the problem
You'll have to figure out the issue on your own ig
why do I gte this error "pattern matching in instanceof is not supported in -source 8"
when im on jdk 21
You have it set to target Java 8
where
Probably your pom
mcdev template?
mcdev has java 8 target by default I believe
it also has a bunch of outdated plugins
which might not work with java 21
if the client crashes does it call PlayerQuitEvent?
if not. how can i make sure a function has run before they leave?
yes
It's called upon connection termination
I want to cancel their quest if they leave
then doing so in the quit event is fine
Hey, anyone know any good libraries I can use to interact with the spigotmc (spiget) website api? Using kotlin atm
Spiget just provides a rest api so that should be too difficult to find something for
Yes, this event is called upon any leave
I know there are some spiget libraries, none seemed too friendly when I looked
what exactly are you trying to do with spiget
Just get info about a plugin based upon its id
Probably auto updater?
if you want to check for updates you can use the lib by mfnalex
okay I made a bug report, now lets hope it gets fixed soon haha
I want to get the name, download count, and download url atm
I'd just use an httpclient and connect to the rest api myself
I'm not aware of any 3rd party libs that handle that part for you
Do you know where I can find the docs for that? search is flooded with the server api
that's nothing Spigot specific
if you're looking at the Spigot javadocs you're in the wrong place
https://api.spigotmc.org/legacy/update.php?resource=9089 im looking for docs related to endpoints like this one
found that in an old snippet channel
yeah that's a fixed link with your plugin id at the end
yea, is there similar endpoints which reveal actual data about a plugin?
spiget solves this, thought it might be best to go straight to the source though
go through spiget
pretty sure md said he doesn't like rest apis 
okay thank you
I think you have to send a packet which will add the fake player to client's tab list, and then send a packet which will remove it. I'm not sure if that's the correct solution for your problem
that is what they're doing
Bundle packet pog
i am executing build tools on linux for the 1.20.4
does the thing on the picture mean, that i executed build tools for the 1.20.4 in the past, or does it mean, that i executed build tools for no specific version in the past?
You didn't specify a version to build. So it picked the default
I think .6 is default now
i did specify a version to build
that was my cmd:
java -jar BuildTools.jar --rev 1.20.4
but can u answer my question if u know it?
bc i dont rly know, what that means rn
and i need 1.20.4 and dont want to build it again, if i already did
It's building 1.20.4 in that image
yeah, i know that 😂
but does the message mean, that i already built 1.20.4 in the past or not?
That message has nothing to do with what you've done in the past
oh
okay
it's just saying that you're building 1.20.4
then im stupid
nothing more
I mean you've started it again
so it's hard to tell if that's from the past or the current one running
Just let it run again
It doesn't take that long
you've already spent more time on this conversation than running it would take 😉
who can help me
?
org.bukkit.command.CommandException: Unhandled exception executing 'hh' in me.ByteMagic.Helix.command.BukkitBCommand(hh)
at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:169) ~[patched_1.16.4.jar:git-Paper-416]
at org.bukkit.craftbukkit.v1_16_R3.CraftServer.dispatchCommand(CraftServer.java:807) ~[patched_1.16.4.jar:git-Paper-416]
at net.minecraft.server.v1_16_R3.PlayerConnection.handleCommand(PlayerConnection.java:2021) ~[patched_1.16.4.jar:git-Paper-416]
at net.minecraft.server.v1_16_R3.PlayerConnection.c(PlayerConnection.java:1832) ~[patched_1.16.4.jar:git-Paper-416]
at net.minecraft.server.v1_16_R3.PlayerConnection.a(PlayerConnection.java:1785) ~[patched_1.16.4.jar:git-Paper-416]
at net.minecraft.server.v1_16_R3.PacketPlayInChat.a(PacketPlayInChat.java:47) ~[patched_1.16.4.jar:git-Paper-416]
at net.minecraft.server.v1_16_R3.PacketPlayInChat.a(PacketPlayInChat.java:5) ~[patched_1.16.4.jar:git-Paper-416]
at net.minecraft.server.v1_16_R3.PlayerConnectionUtils.lambda$ensureMainThread$1(PlayerConnectionUtils.java:23) ~[patched_1.16.4.jar:git-Paper-416]
at net.minecraft.server.v1_16_R3.TickTask.run(SourceFile:18) ~[patched_1.16.4.jar:git-Paper-416]
at net.minecraft.server.v1_16_R3.IAsyncTaskHandler.executeTask(IAsyncTaskHandler.java:136) ~[patched_1.16.4.jar:git-Paper-416]
at net.minecraft.server.v1_16_R3.IAsyncTaskHandlerReentrant.executeTask(SourceFile:23) ~[patched_1.16.4.jar:git-Paper-416]
at net.minecraft.server.v1_16_R3.IAsyncTaskHandler.executeNext(IAsyncTaskHandler.java:109) ~[patched_1.16.4.jar:git-Paper-416]
at net.minecraft.server.v1_16_R3.MinecraftServer.bb(MinecraftServer.java:1132) ~[patched_1.16.4.jar:git-Paper-416]
at net.minecraft.server.v1_16_R3.MinecraftServer.executeNext(MinecraftServer.java:1125) ~[patched_1.16.4.jar:git-Paper-416]
at net.minecraft.server.v1_16_R3.IAsyncTaskHandler.executeAll(IAsyncTaskHandler.java:95) ~[patched_1.16.4.jar:git-Paper-416]
at net.minecraft.server.v1_16_R3.MinecraftServer.a(MinecraftServer.java:1261) ~[patched_1.16.4.jar:git-Paper-416]
at net.minecraft.server.v1_16_R3.MinecraftServer.w(MinecraftServer.java:996) ~[patched_1.16.4.jar:git-Paper-416]
at net.minecraft.server.v1_16_R3.MinecraftServer.lambda$a$0(MinecraftServer.java:173) ~[patched_1.16.4.jar:git-Paper-416]
at java.lang.Thread.run(Thread.java:829) [?:?]
Caused by: java.lang.NullPointerException
at me.ByteMagic.HeadHunter.managers.GUI.HeadGUI.updateMenu(HeadGUI.java:132) ~[?:?]
at me.ByteMagic.HeadHunter.managers.GUI.HeadGUI.createNewMenuInstance(HeadGUI.java:155) ~[?:?]
at me.ByteMagic.HeadHunter.commands.HeadHunterCMD.perform(HeadHunterCMD.java:56) ~[?:?]
at me.ByteMagic.Helix.command.BCommand.execute(BCommand.java:607) ~[?:?]
at me.ByteMagic.Helix.command.BukkitBCommand.execute(BukkitBCommand.java:47) ~[?:?]
at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:159) ~[patched_1.16.4.jar:git-Paper-416]
... 18 more
HeadGUI.java:132
?whereami
Now we need a ?whenami
?
anyone else having issues trying to use https://github.com/WesJD/AnvilGUI in 1.20.6? for me it says 1.9.4 artifacts cant be found i the spigot-repo
isn't there like a repo tag in maven
what always worked for me is declaring the repo last and then the dependency last as well
who kwows how to fix this
:--)
oh yes that actually worked, I just copied the part from the pom in the example but I guess it mustve changed over time or something, thanks 😄
learning every hour
maven moment
- this isn't paper
- nobody can assist you without you sharing your code
🙂
Did you put 1.9.4 instead of 1.9.4-SNAPSHOT
no
but I already fixed it by using the correct repo xD
oh
kinda weird that it worked before though
since this is the first time I actually then used the correct repo
unless they moved it over
maybe you had the stuff in your local repo before
if you have any of the required stuff in local repo maven generally takes that before looking for dependencies elsewhere
Hey guys, question here:
If I have a cache of items that need to be removed give minutes after they are initiated, what do you think would be a better way of doing it? Should I create a runnable to be ran after the expiration time for each instance, or should I run one runnable at a specific interval checking the entire cache for expired items after said interval?
five*
Second
^
Please make this a real command
those interactions haven't been registered for years
You can't right click air
You can only left click
Fun fact, when you drop an item, an interaction is also fired
i wanna make my premium plugin free and let someone take over ownership is this possible without deleting the resource?
paper moment
Hold on, right click?
isRightClick is a paper method
Right click air only works if you are holding an item
How are you handling the event?
Is there anything major to note if trying to update a plugin from 1.19 to 1.20?
Spigot listens for cancelled events, unles you specify ignoreCancelled
Ngl i havent kept up with updates
Would you mind elaborating as to why?
or you could use a predefined caching library instead of janking something together
Caffeine is the obvious choice here as far as caching libraries
is there such an app that basically lets you draw particles and outputs code
Lol
Because if such a thing existed it would make a lof of peoples lives easier in regards to particles. Such a thing could exist but it would be an undertaking to accomplish it
You would need a client mod to have such a thing so it can see the particles, know where they are at etc and then create some of the code for it. Probably couldnt create all of it but maybe most
I have a friend who created something similar to this for their 3d print machine. They write on the whiteboard and the camera sees it, turns it into code for the 3d printer
so uh you basically draw particles and then you can forward 1 tick and draw again and keep repeating until you make a full animation without dealing with the pain of coding it
Basically wants what visualbasic and visualstudio allows where you can toss stuff into a scene and it will either generate all of the code for it or most of it
Pretty sure there are tools to convert images to particles
Yeah but i dont think we have a mod or tool to convert particles to code or code the animation
I am not aware of one that exists
nah that's just degeneracy
It can't be too hard to convert the commands to code
it pretty much just renders each pixel as a particle
and does some scaling sometimes
anyone know how hypixel skyblock store items
i tried using pdc to add ids into items but had big issue with stacked items
i am out of ideas
IIRC they do add ids as a sort of hash code however those IDs are ignored in item comparison checks and stripped from the client
¯_(ツ)_/¯
Unique non-stackable items can have a UUID attached to them
If the UUID is duplicate then whatever
It's all about tracking what happens to an item, what it gets crafted into
Or just patch all known dupes and get good quality plugin builds
They still have weird janky dupes
But they have tools to track it all
Once a guy got banned because a bot handed him a wooden axe 2 weeks prior
It's like that saying
A bunch of monkeys with typewriters and enough time can write shakespeare novels type deal
if u add a specific uuid for every item in stack it wont be stackable anymore
That sounds like an implementation detail that can be easily forked out
fork the server jar and skip checking that single nbt tag ??
thats my main issue
/ Rewrite the check entirely to just compare the tag
With some extra checks to create a new tag if there's none
that won't fuck things up right?
probably will for the first couple attempts
well ty for the idea
Although what happens when I stack two items together and then split the stack apart
Do I now get banned for duping
I feel like each itemstack should have an ID
And each ID should have data associated to it
Such as origin (type and data)
For example "crafted" with all the item ids, timestamp, location, version
"picked up" with who dropped it, timestamp
"Split" with the original item id etc
It's a TON of data but if you do the right optimizations it can be fairly simple
And you end up with a history for the itemstack's lifetime
Every player who dropped it, picked it up
Transformed it, cooked it
ItemStack: The RPG
I want to be the item
some guy also got banned for walking 💀 cause of the anticheat and a render bug...
Don’t want so illegally then
but the dupe finders have more way more to gain as you can make thousands of dollars from dupes
why does the server hang even if I added bukkit async processing for the code
https://paste.md-5.net/ibuxegawad.coffeescript - and in theory the movement check should happen 5 times (because the teleportation flow will be executed in 5 seconds) but it happens 1 time
oh i find
wasnt there a message here that talks about properly using/storing various api classes like world, player etc? I cant find it
does anyone know if display entities are supposed to have hitboxes that would bounce arrows?
I'm getting some weird behavior
actually it seems like when I set a custom hitbox for my entity is bounces arrows, how weird
also does anyone know what the EntityAttachments is actually for in the mojang remaps
is that mount points?
oh I got it
it's a lot of things
Look for an existing plugin that allows you to just import the bb file
The guy above you made one, dunno how good it is tho
I've heard of others but not sure how free or good those are either
I would advise against making it fully yourself as it can be quite complicated
(I am talking mainly about the model here, no clue about the mob logic)
[1.0000f,0.0000f,0.0000f,0.0000f,0.0000f,0.0000f,-1.0000f,0.0000f,0.0000f,1.0000f,0.0000f,0.0000f,0.0000f,0.0000f,0.0000f,1.0000f]}]}
what is this in AxisAngle4f
that's a 4x4 matrix i think
All depends on the plugin you use, I believe MythicMobs allows all that
What exactly ru trying to do
this
flat item display
pretty much this java DisplayItem display = ... displayset.TransformationMatrix(new Matrix4f(1.0000f, 0.0000f, 0.0000f, 0.0000f, 0.0000f, 0.0000f, -1.0000f, 0.0000f, 0.0000f, 1.0000f, 0.0000f, 0.0000f, 0.0000f, 0.0000f, 0.0000f, 1.0000f));
but using left and right transformation
whats wrong w using a matrix instead?
it's easier to work with for me
But yea there should be a formula for just converting it to axis angles
Or quaternions whatever u prefer
I think joml even has methods for it ^
getNormalizedRotation?
That’s if u wna work with quaternions i think
alr
You have the getRotation just for AxisAngle4f/d
But yea @dawn flower u can also use tools like https://misode.github.io/transformation/
that looks really useful
yea, well its a bit annoying to perform a singular value decomposition, so if u can avoid it for ur part, then thats pog, else I believe there should be some proper joml stuff to deal with it
I have no clue why but I used joml for matrix operations and I swear some of their math is wrong
like the code works on my own matrix operations but when applying joml it starts going sideways
then again it was for more complex operations than just this so you're probably fine doing this
(it was specific to some local operations)
yea joml is a bit weirdly designed
Like u really need to make sure which joml object is getting mutated and receives the result of the operation
even then
I am 99% sure I was doing it right
I debugged that thing for 2 whole months
and when I reverted to doing my own math it immediately worked
something just doesn't add up
(literally)
I don't know, there's just something weird in it
A lot of math
self-advertising smh
tbf you said it existed first
ik lol :D
besides it's not much of an ad if the plugin is free
the only thing I get is to do support for one more dev
Is that like ModelEngine for free? Nice
Probably not best time and place, but why do you have limit of 22.5 angles ?
yes
I don't minecraft does
you can bypass it by using bones
I got over 200 bones
but minecraft won't render cubes that are not in those coords and the only way to bypass it is to either mod the client or convert everything to be bones which is horrible for performance at scale
you can have over 200 bones if you want to, just don't have 200 entities with over 200 bones each
Oh I see ye, makes sense
i store them in my body
Lol
hm that doesn't seem to be referenced anywhere, you should get ready for the garbage collector
I have referenced them in this message dude ^
they can't be garbage collected unless discord deletes old messages
how do i move an item display smoothly with interpolation
how does that work then
(pom from your plugin)
see how the numbers are different
1.1.3-SNAPSHOT is on maven central though
besides my local was busted for a while because it had cached my repo locally
I moved to the snapshot repo at some point
https://s01.oss.sonatype.org/content/repositories/snapshots/ is the correct one
do you know what a maven repo is
anyone?
?img
Can't send images? That's because you're not verified! Use !verify to complete verification.
Alternatively, you can upload screenshots to any image hosting site and share the link.
Here's some screenshot utilities that you can use to upload images.
Lightshot: https://prnt.sc
Imgur: https://imgur.com/upload
Flameshot: https://flameshot.org
replace the repo link, it is different
change version to what magma said
<repositories>
<repository>
<id>ossrh-public</id>
<url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>com.magmaguy</groupId>
<artifactId>FreeMinecraftModels</artifactId>
<version>1.1.3-SNAPSHOT</version>
</dependency>
</dependencies>
this will work. Although you'll also need the paper repo for transitive dependencies
I mean if he doesn't get this part I'm starting to suspect he also won't get the rest of it
don't tell them to use that, that version is wrong
(your fault for not updating the readme)
tbf you are the one who posted the wrong repo url on their github
that's the version from your readme
not on github
how do i move a display entity fast and smooth
You got any code for your display entity moving ?
There is now teleport interpolation
It is the time it will interpolate over in ticks
iirc youc an just set a teleport duration
now the page is updated
then?
If you set it to 20 and teleport, it will visually take 20 ticks to move
declaration: package: org.bukkit.entity, interface: Display
and then you teleport it
teleport it in a loop or teleport it where i want it to be
just once is enough
ok
if you're not making some fancy curve lul
actually
the destination might change mid loop, is there a way to fix that
in the original loop the destination could change anytime
Just teleport it again (and maybe set the teleport duration)
it will start interpolating from the current place
hello i just wanna ask does spigot stop tnt duping and bedrock breaking etc?
alr
oh sorry
spooky scary skeletons
I can't figure out why the hitboxes make the arrows bounce
kinda weird
I don't assume anyone here has done custom hitboxes before right
do you mean interaction entities?
well.. about that
in a part of the loop i actually want to do a fancy curve
(not all of it)
So just teleport piece by piece, time it correctly
should i just set the teleport duration to 0 then after the curve is done set it to 30 again
yes, why don't you use interaction entities for the hitboxes?
uh mostly legacy, since I was supporting versions from before when that was an option
when did they come out again?
oh then no idea how to do it. I think interactions were added together with Displays
You have to set it every time before/after teleporting I believe
so 1.19.4
interactions are basically just invisible entities were you can set a custom width and height
it curves one time in the loop only so it shouldnt be that bad
1.20.5+ actually has some cool hitbox stuff that is a bit of shame not to use...
eh
yeah I found out just earlier
the nametag location, mount point, passenger point and so on are all now configurable, it's no longer a private field so it can be easily done and since there's a scale feature now it also autoscales every point for you which is neat
nice
That's not synchronized with client tho, is it ?
I do have other problems from using native hitboxes
so uh, i have a slight issue with teleport duration thingi, the longer the distance the faster it gets
of course it is
That's news to me!
well it is a new system
do math
I only found it randomly by decompiling some stuff to try to fix the arrow invulnerability every hitbox I try to make seems to have
I know this is Java, but you got any pointers for this ?
Might wanna play with that one day too
hrm so interact entities?
for what
How to configure nametag location, mount point, passenger point
it's trivially easy just look at the EntityAttachment class from the mojang remappings
and the EntityDimensions which sets the hitbox
well I guess it sets quite a few things now
why does it suddenly instantly teleprot after teleporting for like 5 blocks
because your code is 💩
thanks
np, any time
but fr hwy tho
based
let me go get my 8ball so it can divine what the fuck you wrote
yeah ofc. duration = distance / speed, so obviously speed gets higher if the distance is higher but duration stays the same?
i just set the teleport duration of the entity to 30 when i spawned it then made a loop that teleports it 5 blocks infront every tick
8ball in 2020 spigot was apparently kinda sad
you should set the duration to distance / desiredSpeed
that's fifth grade physics :p
fr
t=d/v
I remember a maths question from a while ago that involved that, easy af
no
fantastic start
huh I thought you wanted a hitbox that doesn't block arrows
I need a hitbox that acts like a living entity hitbox
oh ok
yeah then interactions aren't useful, they can only be interacted with by players
A living entity
Is the bouncing client-sided?
yes, that'swhat I have
I'm thinking fake slimes
it might be actually
How tf
I've used fake slimes and armor stands for clicking on holograms before
I think I spotted meg doing something similar tbh
oh fake slimes i read fake smiles i'm like "why are you faking smile what did he do to you"
I'd also use fake smiles
I'm pretty sure that causes secondary issues though, it's not possible to set a slime to have a specific height
Their hitbox is square
it's called SSRI
so if I don't think that would work if I need a hitbox that is like 2x1x2
4 or my math is wrong
yeah I failed 1st grade math
can't even count my sleep hours
you're lucky you a source of rotisserie chicken within crawling distance, who knows what could happen if you had to do something complex on your way there
chicken spot's closed for another week
have you been dropping weight due to it or just ordering more shit pizza
can you get the location that's being shown to others? so if the teleport duration is for example 30 and you teleport it 20 blocks away and then broadcast the location of the entity before it reaches the end it shows 20 blocks away
what a great life you lead
meanwhile I'm out here on month 5 of my strict diet
oh yeah
yesterday
delicious
cool so you're eating sand now
I don't want to scare you by introducing you to the concept of food other than junk food, let's start it slow by revealing the existence of vegetables
i get that you are trying to eat healthy but that does not qualify you for sand consumption
light a fire under your ass and you become a glass blower
for yesterday's lunch i had 2 meatballs and a cucumber
for yesterday's dinner i had 2 meatballs and a cucumber
for today's breakfast i had 2 meatballs and a cucumber
no sand
still rather healthy
bold words from the trash bin that resides in the Chega district of portugal
ok so the bouncing is not just client side
what in mc causes entities to bounce arrows?
other than god mode I guess
uh
because I can punch these
basically any hitbox
When an arrow collides with it
The entity "absorbs it" and takes damage
Given there was no damage dealt the arrow just bounces off
You can fuck with it by rewriting collision logic
I remember doing collision logic for zombies with client-sided blocks and it was like 800 lines of nms
I am just modifiying the entity's default hitbox though so don't really know why it would modify the behavior of whether or not it would take damage
hm I might just hijack the interaction entity and mod it to make arrows able to hit it
Pretty much yeah
this kinda causes a bunch of secondary problems anyway
might need to fuck with this
I'd prefer not to send packets about the baseline entity in the first place if I can avoid it
why is eating sand suddenly a development help
hrm
I mean if this thing is just another AABB hitbox I could also just cheap out and implement my own entity collision detection for projectiles
yeah even arrows are just aabb collision boxes
multibillion dollar game and it doesn't even try to do any kind of shaped hitboxes
or rotatable
if only I could be so based
Here's arrow code with some comments
If you want it to collide / skip fake blocks, it's around line 21 you want to mess with
If you want it to collide / skip entities, it's around line 69 / its method you want to mess with
it's not fake blocks, it somehow isn't colliding with a real hitbox
real but modified
just weird
And you're modifying the nms hitbox?
yes
It could have something to do with world.getEntities
also to make it weirder it's kinda inconsistent
sometimes it will damage, I think it might have to do with arrow velocity
basically extending the arrow class and debugging stuff
shut up
lol
is there any documentation for all the options on the new give command syntax since 1.20.5?
but it should be getting replaced, and I mean clearly it is bouncing off of something
also it 100% works if I just punch it
and it damages the entity correctly
also works to damage players via contact for entities where that is the case i.e. zombies
wdym
do you want to parse component strings into itemstacks?
well /give now uses components or whatever
and I just wanna see all the options available
outdated
they all still specify the old syntax or just say" components"
pretty sure if was somewhere
1 sec
this amybe
and if you wanna parse a string just use Bukkit.getItemFactory().createItemStack(string)
but I wanted to see if I can edit durability there too
matches the input for /give command
so anything you can do with give, you can do with createItemStack
the plot thickens
why the heck
should be mc doing it too
it's doing it even on the lowest priority
hey, i got this error, while working with nms, mojang mappings
like the error says, the error occurs in row 25
and i have no clue why.
i already reexectuted buildtools. changed nothing
any idea, why this happens?
