#help-development

1 messages · Page 1024 of 1

pseudo hazel
#

well it can be any item in the game

short drift
#

Make the bar a separate model and include it in other models.

#

I think that should be possible.

pseudo hazel
#

oh and I dont have a resource pack yet for my plugin

#

I have that planned, but not yet

short drift
#

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.

pseudo hazel
#

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

short drift
#

What I do is I just copy the relevant parts to my resource pack. Takes couple of minutes.

pseudo hazel
#

I just want it to work without a resource pack too

short drift
#

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.

pseudo hazel
#

yeah I plan to

short drift
#

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.

dawn flower
#

hi

short drift
#

Not sure if there's space between them, though.

pseudo hazel
#

well yeah but sadly I am using the item name and amount already

#

for other indications

short drift
#

It can be swapped.

pseudo hazel
#

so I thought this would be the perfect way to represent when the item will expire

short drift
#

But of course you do have to account for some things to make sure it doesn't bug out.

silver robin
#

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

pseudo hazel
#

its also displayed in the item lore

#

so its not completely absent

#

but this would be a great finishing touch

short drift
#

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.

tender shard
short drift
pseudo hazel
#

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

short drift
#

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.

pseudo hazel
#

haha oof

short drift
#

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.

still ridge
#

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?

echo basalt
#

ItemCraftEvent

tender shard
#

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

short drift
#

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... ?

tender shard
#

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

short drift
#

Ah. Load order thing. Ok, got it.

#

Makes sense.

still ridge
short drift
#

Got rid of the complaint.

#

(I just like to throw all my plugin code into a single plugin).

tender shard
harsh ruin
#
player.getInventory().removeItem(new ItemStack(Material.WHITE_DYE, amount));
player.updateInventory();``` It's not getting rid of white dye.. Why?
short drift
tender shard
tender shard
short drift
#

You could try replacing the custom model data.

harsh ruin
short drift
#

It's in ItemMeta. setCustomModelData()

#

You can swap it on the fly without creating a new item.

tender shard
#

entities don't have custom model data?

short drift
#

Oh, it's an entity? 🤔

#

No idea then. Probably can't.

#

Except in Bedrock. Lol.

tender shard
#

stupid microsoft D:

#

adding features to bedrock but not java

short drift
#

I mean. There's people doing custom entities out there with animations and everything.

#

But it's probably complex to set that up.

tender shard
#

yeah but those are just a ton of armorstands or itemdisplays with custom-model-data'd items

short drift
#

Yes, exactly.

#

The performance must be horrible.

pseudo hazel
#

should be fine as long as you dont have a lot of these

tender shard
#

i hope mojang will finally add baboons to 1.21

pseudo hazel
#

emoji code is cursed

tardy delta
#

that baboon says hehe

fair rock
torn shuttle
#

database work is so mindnumbing

pseudo hazel
#

depends on what you mean

drowsy helm
#

Orm ftw

charred blaze
#

somehow entitydismountevent isnt called when teleporting to some coords.

#

visually passenger is removed

#

no 1s in console

drowsy helm
#

Pr fix would be pretty easy I think

pseudo hazel
#

but are they dismounted

charred blaze
charred blaze
#

probably?

pseudo hazel
#

pull request

#

he is saying it would be easy to add it into the spigot code

charred blaze
#

add what

pseudo hazel
#

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

charred blaze
#

uhh

#

how do i fix this without forking spigot?

pseudo hazel
#

idk

#

maybe you can watch the teleport event and check passengers?

charred blaze
#

does only teleporting make entities dismount?

pseudo hazel
#

no

#

but you can just listen both events

charred blaze
#

hm good idea

river oracle
#

@worldly ingot

Waiting for the people extending InventoryView to chime in...
We can all have a good laugh when they do

worldly ingot
pseudo hazel
#

.. why would you.. nvm

#

maybe they are beyond our comprehension

river oracle
pseudo hazel
#

lmao

harsh ruin
#
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)
tender shard
#

because you add to amount

harsh ruin
#

Amount is set to 0 when you execute the command, i'm not showing that here

tender shard
#

first stack: amount = 0 + 64
second stack: amount = 64 + 64 = 128

so balance to add is 640 + 1280

harsh ruin
#

Now I see, that's stupid of me

#

Thanks

golden turret
#

does the player's pdc get cleaned when he dies?

slender elbow
#

no

golden turret
#

thanks

tender shard
#

persistent data container :p

summer scroll
#

So I'm using REPLACE INTO syntax but I'm getting duplicate entry error for some reason, does anyone know why?

pseudo hazel
#

why not use INSERT ... ON DUPLICATE KEY UPDATE?

smoky anchor
#

WHY ARE WE YELLING

summer scroll
#

If I'm not wrong it's gonna be a long query?

pseudo hazel
#

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?

summer scroll
pseudo hazel
#

idk then

#

how many values do you update

#

might be worth to write the insert ... on duplicate query to test if that works

summer scroll
#

Idk like 15 or something.

slender elbow
#

upsert is a pretty standard practice

summer scroll
#

wtf i don't know about that somehow

brazen hollow
#

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?

barren trail
brazen hollow
#
@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 :

barren trail
#

ya just spotted that lol

#

😛

brazen hollow
#

xd

slender elbow
#

i have been pinged by the gods of hell

summer scroll
pseudo hazel
#

idk

#

depends on how you used it

summer scroll
#

String query = "INSERT INTO " + GENERATOR_TABLE + " VALUES (?,?,?,?,?) ON DUPLICATE KEY UPDATE";

pseudo hazel
#

I think you have to specify what values to update

#

after UPDATE

summer scroll
pseudo hazel
#

maybe there are already duplicate values?

#

im not sure

summer scroll
#

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=?;";

slender elbow
#

do you have a stack trace or a more explicit error message with an error code or something?

fair rock
#

?paste

undone axleBOT
slender elbow
#

what sql engine and driver are you running?

summer scroll
young knoll
#

Doesn’t SQLite have an entirely different syntax for that

summer scroll
#

Damn it is.

young knoll
#

Isn’t it ON CONFLICT or something

valid burrow
#

wtf is On duplicate key

young knoll
#

MySQL syntax

summer scroll
#

Yeah it's ON CONFLICT I think

valid burrow
#

i know the basics of mysql but ive never heard of On Duplicate Key

pseudo hazel
#

usually better than replace into since it doesnt delete a record and then insert it again

young knoll
#

Until your auto increment primary key reachs 1 billion

#

Yes I know it doesn't matter but it bothers me

remote swallow
#

if it does

#

time to cry

quiet ice
slender elbow
#

thankfully we have stuff like uint128

polar forge
#

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

polar forge
# polar forge

It shouldn’t say “player is not banned” if he is banned

lean ermine
#
@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...

quiet ice
#

I'd probably use .getKey(false).contains(playername) while we are at it - but proceed with care

lean ermine
blazing ocean
#

2¹²⁷ - 1

slender elbow
#

why signed lol

blazing ocean
#

why not

slender elbow
#

why would you use negatives if you're always counting towards +inf

#

you're wasting half the domain

eternal night
slender elbow
#

i know your appreciation for me is negative

orchid gazelle
blazing ocean
orchid gazelle
#

let's count to 2^127

blazing ocean
#

170,141,183,460,469,231,731,687,303,715,884,105,727

#

done

#

i skipped a couple numbers

lean ermine
#

a couple?

blazing ocean
#

am bad at counting 😔

orchid gazelle
#

man's just counted to 2^127

blazing ocean
#

technically not

orchid gazelle
#

sadly you would not survive that

blazing ocean
#

i counted to 2^127 - 1

orchid gazelle
#

I bet you cannot count to 10 billion until you die

#

wanna try?

quaint mantle
#

BigInt 🗿

orchid gazelle
#

you guys know what's sad?

#

I only have about 2-3 billion seconds left in my life

blazing ocean
orchid gazelle
#

no, that's godly

blazing ocean
orchid gazelle
#

if you remove sleep, 1.5-2.5 billion seconds

blazing ocean
#

who even needs sleep smh

orchid gazelle
#

sleep is such a waste of time

blazing ocean
#

juts don't sleep?

#

sleeping is a huge skill issue

orchid gazelle
#

you know how expensive showering daily is?

#

it costs you like 600 seconds every single day

pseudo hazel
#

imagine getting 1 dollar per second

#

you would still not be the richest person

blazing ocean
orchid gazelle
#

600*365*70

#

you are wasting 15330000 seconds of your life with showering

#

💀

blazing ocean
pseudo hazel
#

assuming you are showering 10 minutes every day

#

yikes

slender elbow
#

do you really shower

orchid gazelle
#

wait I just got fucking confused

#

I thought I was writing in general

orchid gazelle
quasi gulch
#

who showers only 10min?

blazing ocean
quasi gulch
#

Way to short maybe like 20-30

orchid gazelle
#

@blazing ocean those 10 minutes include stuff like putting your clothing on again, getting dry and shit

blazing ocean
blazing ocean
orchid gazelle
#

yes, with my time

#

it's a chore so it's a waste of time

blazing ocean
#

just don't shower then

orchid gazelle
#

well but then I feel awful

blazing ocean
#

then don't feel awful

orchid gazelle
#

and nobody wants to be with me, not that that would change anything tho

drowsy helm
torn shuttle
#

meanwhile I'm out here often times showering multiple times a day because I'm not a slob

quiet ice
#

You know what? I won't shower out of protest thanks to you!

river oracle
quiet ice
#

Why not just sleep?

orchid gazelle
torn shuttle
orchid gazelle
#

well at least half lol

tardy delta
#

was it

brazen hollow
#

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?

tardy delta
#

utf8 encoding?

lean ermine
#

gson by default should use utf-8 though no?

brazen hollow
#

InteliJ sais my files are utf-8

fair rock
#

Gson UTF-8 xd

lean ermine
#

try setting
charset=UTF-8

#

just incase 🤷‍♂️

dense oracle
#

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?

brazen hollow
slender elbow
#

i mean gson takes a Reader

tardy delta
#

most things dont assume any encoding by default

slender elbow
#

make sure your file reader is set to use the UTF8 charset

tardy delta
#

would be shocked by the amount of things that assume some encoding from the stone age

dense oracle
fair rock
#

Read the damn documentation of what she send

#

please.

slender elbow
#

gson doesn't assume any encoding, it only works with a Reader

brazen hollow
#

your right

#

thanks for the quick help

dense oracle
fair rock
lean ermine
young knoll
#

Or wait for 1.21 :p

dense oracle
blazing ocean
#

actual custom enchants don't exist yet

#

as in registered enchants

#

that only works if it's registered in the client too

lean ermine
blazing ocean
#

i highly doubt you can just register stuff into existing registries

#

the client will just not know it

young knoll
#

You can

#

heh

lean ermine
#

its using the mojang-mapped nms

blazing ocean
fair rock
#

I agree with you can. I inserted some custom structures and stuff into Registries 💀
I died after several hours of reading and researching

blazing ocean
young knoll
#

Not sure if enchantments will kill the client

#

?tas I guess

undone axleBOT
blazing ocean
#

idk either

young knoll
#

Blocks do

#

kinda

blazing ocean
young knoll
#

Tags shouldn't?

#

Datapacks can add those

blazing ocean
#

component tags

young knoll
#

ah

blazing ocean
#

item components

#

ngl i prefer nms over some bukkit apis any day of the week

#

bukkit apis just suck bc they're so outdated

young knoll
#

Feel free to make some PRs

eternal night
#

No, the item meta system is flexible and closely aligned with item components

blazing ocean
blazing ocean
#

like you can register em but you just disconnect/crash

eternal night
#

Well yea that doesn't work on a network level

young knoll
#

Why not

#

Smh Mojangles

blazing ocean
#

mojank moment

eternal night
#

custom_data exists

#

Good enough

blazing ocean
#

i'm sad there's no pdc in fabric 😔

eternal night
young knoll
#

Make it

#

Or cope

#

:D

blazing ocean
#

coping better

eternal night
#

Use paper in 1.21 and be blissful

#

It'll be glorious

blazing ocean
eternal night
#

You mean -pre3

blazing ocean
#

yea

#

it's basically 1.21

eternal night
#

I hope not

#

Still one bug report I want them to fixxx

blazing ocean
#

which one

young knoll
#

Is it the missing ladder

eternal night
#

No it's the "lemme hide item attributes without setting attributes" one

young knoll
#

ah

eternal night
#

Their "oh you can only define visibility of things if you also specify the component" is ass

blazing ocean
#

i'd love the client to send more window data to the server ngl

#

as in width height gui scale

blazing ocean
#

noxesium does that already but would be nice in vanilla

slate mortar
blazing ocean
#

why

slate mortar
#

because the window updates dynamically while resizing by dragging

blazing ocean
#

how is that related to sending width and height

slate mortar
#

which would be a ping hell

blazing ocean
#

oh i get what you mean

#

i think nox just does it on connect

slate mortar
#

that isnt really good

chrome beacon
#

You can use core shaders to modify stuff on the client

slate mortar
#

cuz it obv changes

blazing ocean
chrome beacon
#

I don't think it's a good idea for the server to handle players window sizes

blazing ocean
#

not handling, just receiving ut

blazing ocean
icy beacon
slate mortar
#

just imagine a twm handling the resizing

blazing ocean
slate mortar
#

at this point, just ask players for their res

blazing ocean
#

doesn't work that well for a huge server

#

it's for defining the layout of custom ui elements

pseudo hazel
#

what happened to ItemFlag.HIDE_POTION_EFFECTS?

slate mortar
#

guis exist

blazing ocean
#

i mean overlays

#

like bossbar type shit

icy beacon
blazing ocean
#

with font magic fuckery

pseudo hazel
#

okay ill try it out thanks

icy beacon
#

seems to be whatcha want

slate mortar
#

god walking and typing is awful

blazing ocean
#

yea

blazing ocean
pseudo hazel
#

guess I shouldve looked at the docs 😛

blazing ocean
#

i mean fair

#

pixels usually aren't relative

slate mortar
#

oh you mean those comically wide tooltips?

river oracle
slate mortar
#

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

bitter frost
#

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

eternal night
#

Just Link the plugin I guess?

#

Their GitHub I presume

tardy delta
#

what part do you need help with?

bitter frost
#

everything kinda i guess

tardy delta
#

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

cosmic hazel
#

how to remove invulnerability when someone logs in ?

tardy delta
#

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

pseudo hazel
#

how can I see when something was added to the api?

#

like since what version

blazing ocean
vital sandal
#

is there any changes in spawning npc with nms in the 1.20.x ?

blazing ocean
#

so you're better off checking the blame kekwhyper

pseudo hazel
#

amazing

compact hound
#

Who can help me with some coding

worthy yarrow
#

?ask

undone axleBOT
#

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

bitter frost
#

just normal 1.8.8 spigot?

wraith delta
slim gate
#

how to use sqlite-jdbc without shading in BUNGEECORD

eternal oxide
#

add it to the plugins libraries section

slim gate
bitter frost
#

@tardy delta would you go vc with me and walk me through?

tardy delta
#

dont have time atm

vital sandal
#
            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 ?
agile plover
#

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()));
agile plover
#

Fixed using ClientboundMoveEntityPacket$PosRot

pseudo hazel
#

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

slim gate
chrome beacon
#

make sure spigot is up to date

#

if it is create a bug report

pseudo hazel
#

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!

chrome beacon
#

oh yeah set the api version

pseudo hazel
#

how do I know if spigot is up to date

#

to what

#

its at 1.20 rn

chrome beacon
#

if it's at 1.20 it shouldn't start legacy material support

#

ig you have some other old plugin

pseudo hazel
#

I dont

chrome beacon
#

🤷‍♂️ make a bug report

young knoll
#

Make sure you are on the latest build

#

/version

pseudo hazel
#

oh right , it may well be a paper thing, let me actually test on spigot xD

eternal night
#

Commodore COPIUM why you no do your job

autumn cave
#

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 🙏

eternal night
#

Can you show more of that exception

spice burrow
#

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

chrome beacon
#

command != rocket

#

and if you modified your code at all don't do that

spice burrow
#

yea sorry typo, i just wanted to simplify it a bit

spice burrow
#

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

chrome beacon
#

Provide your actual code

spice burrow
chrome beacon
#

looks like you've modified the code again

#

because that's not valid

spice burrow
#

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

chrome beacon
#

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

pseudo hazel
#

why do I gte this error "pattern matching in instanceof is not supported in -source 8"

#

when im on jdk 21

chrome beacon
#

You have it set to target Java 8

pseudo hazel
#

where

chrome beacon
#

Probably your pom

pseudo hazel
#

im in intellij

#

om u right

#

thats the default I guess..

chrome beacon
#

mcdev template?

pseudo hazel
#

yeah

#

or I messed it up

chrome beacon
#

mcdev has java 8 target by default I believe

#

it also has a bunch of outdated plugins

#

which might not work with java 21

wraith delta
#

if the client crashes does it call PlayerQuitEvent?

#

if not. how can i make sure a function has run before they leave?

grim hound
wraith delta
chrome beacon
#

then doing so in the quit event is fine

raw sky
#

Hey, anyone know any good libraries I can use to interact with the spigotmc (spiget) website api? Using kotlin atm

chrome beacon
#

Spiget just provides a rest api so that should be too difficult to find something for

grim hound
raw sky
#

I know there are some spiget libraries, none seemed too friendly when I looked

chrome beacon
#

what exactly are you trying to do with spiget

raw sky
#

Just get info about a plugin based upon its id

grim hound
#

Probably auto updater?

chrome beacon
#

if you want to check for updates you can use the lib by mfnalex

pseudo hazel
raw sky
#

I want to get the name, download count, and download url atm

chrome beacon
#

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

raw sky
#

Do you know where I can find the docs for that? search is flooded with the server api

chrome beacon
#

that's nothing Spigot specific

#

if you're looking at the Spigot javadocs you're in the wrong place

raw sky
#

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

chrome beacon
#

yeah that's a fixed link with your plugin id at the end

raw sky
#

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

chrome beacon
#

go through spiget

blazing ocean
#

pretty sure md said he doesn't like rest apis kekw

raw sky
#

okay thank you

silver robin
young knoll
#

Bundle packet pog

dense oracle
#

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?

chrome beacon
young knoll
#

I think .6 is default now

dense oracle
#

that was my cmd:

java -jar BuildTools.jar --rev 1.20.4
chrome beacon
#

yeah that's fine

#

the message should have said latest. My bad I read it wrong

dense oracle
#

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

chrome beacon
#

It's building 1.20.4 in that image

dense oracle
#

yeah, i know that 😂
but does the message mean, that i already built 1.20.4 in the past or not?

chrome beacon
#

That message has nothing to do with what you've done in the past

dense oracle
#

oh
okay

chrome beacon
#

it's just saying that you're building 1.20.4

dense oracle
#

then im stupid

chrome beacon
#

nothing more

dense oracle
#

sryy

#

and thanks

#

but this means, that i already built it in the past right?

chrome beacon
#

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

dense oracle
#

okay

#

thyy

chrome beacon
#

It doesn't take that long

#

you've already spent more time on this conversation than running it would take 😉

dense oracle
#

😂

#

thanks

#

waaait
its wayyy faster i remembered

#

xD

simple valve
#

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

tawdry echo
#

HeadGUI.java:132

sullen marlin
#

?whereami

ocean crypt
#

xd

#

valid

young knoll
#

Now we need a ?whenami

chrome beacon
#

?whoami

#

?whatami

#

?whyami

simple valve
pseudo hazel
blazing ocean
#

what always worked for me is declaring the repo last and then the dependency last as well

simple valve
#

:--)

pseudo hazel
#

learning every hour

blazing ocean
#

maven moment

blazing ocean
simple valve
#

🙂

chrome beacon
pseudo hazel
#

no

pseudo hazel
#

but I already fixed it by using the correct repo xD

chrome beacon
#

oh

pseudo hazel
#

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

wet breach
#

if you have any of the required stuff in local repo maven generally takes that before looking for dependencies elsewhere

pseudo hazel
#

hmm idk

#

could be

outer tendon
#

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*

hazy parrot
#

Second

tardy delta
#

^

quaint mantle
river oracle
#

those interactions haven't been registered for years

quaint mantle
#

You can't right click air

#

You can only left click

#

Fun fact, when you drop an item, an interaction is also fired

olive lance
#

i wanna make my premium plugin free and let someone take over ownership is this possible without deleting the resource?

quaint mantle
#

I think it's the same with and/or without item

#

The client won't send any packet

remote swallow
#

paper moment

quaint mantle
#

Hold on, right click?

remote swallow
#

isRightClick is a paper method

young knoll
#

Right click air only works if you are holding an item

quaint mantle
#

How are you handling the event?

olive lance
#

Is there anything major to note if trying to update a plugin from 1.19 to 1.20?

quaint mantle
#

Spigot listens for cancelled events, unles you specify ignoreCancelled

olive lance
#

Ngl i havent kept up with updates

outer tendon
river oracle
#

Caffeine is the obvious choice here as far as caching libraries

dawn flower
#

is there such an app that basically lets you draw particles and outputs code

dawn flower
#

?

#

what's funny

wet breach
#

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

rough ibex
#

draw particles?

#

like, draw lineart and it'll put particles in the shape of that line

wet breach
#

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

dawn flower
wet breach
#

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

echo basalt
#

Pretty sure there are tools to convert images to particles

wet breach
#

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

echo basalt
#

nah that's just degeneracy

rough ibex
#

It can't be too hard to convert the commands to code

echo basalt
#

and does some scaling sometimes

past oriole
#

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

echo basalt
#

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

past oriole
#

then how they check dupes

#

@echo basalt

echo basalt
#

¯_(ツ)_/¯

#

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

river oracle
#

Or just patch all known dupes and get good quality plugin builds

echo basalt
#

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

past oriole
echo basalt
#

That sounds like an implementation detail that can be easily forked out

past oriole
#

like how

#

no ideas ?

echo basalt
#

fork the server jar and skip checking that single nbt tag ??

past oriole
#

thats my main issue

echo basalt
#

/ Rewrite the check entirely to just compare the tag

#

With some extra checks to create a new tag if there's none

past oriole
#

that won't fuck things up right?

echo basalt
#

probably will for the first couple attempts

past oriole
young knoll
#

The client won’t approve of that

#

Unless you strip the data when sending to them

past oriole
#

fuck

#

no better ideas

#

using packets?

young knoll
#

Although what happens when I stack two items together and then split the stack apart

#

Do I now get banned for duping

echo basalt
#

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

sullen marlin
#

ItemStack: The RPG

young knoll
#

I want to be the item

dawn flower
#

why doesnt LivingEntity#damage work?

#

no errors

#

nvm

pliant topaz
young knoll
#

Don’t want so illegally then

bitter frost
upper hazel
#

why does the server hang even if I added bukkit async processing for the code

#

oh i find

glass mauve
#

wasnt there a message here that talks about properly using/storing various api classes like world, player etc? I cant find it

torn shuttle
#

does anyone know if display entities are supposed to have hitboxes that would bounce arrows?

#

I'm getting some weird behavior

torn shuttle
#

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

smoky anchor
#

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)

dawn flower
#

[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

smoky anchor
#

All depends on the plugin you use, I believe MythicMobs allows all that

ivory sleet
dawn flower
#

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

ivory sleet
#

whats wrong w using a matrix instead?

dawn flower
#

it's easier to work with for me

ivory sleet
#

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 ^

dawn flower
#

getNormalizedRotation?

ivory sleet
dawn flower
#

alr

ivory sleet
#

You have the getRotation just for AxisAngle4f/d

dawn flower
#

that looks really useful

ivory sleet
#

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

torn shuttle
#

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)

ivory sleet
#

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

torn shuttle
#

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

torn shuttle
#

you'd have to also buy modelengine

#

that's because it's not a simple thing

smoky anchor
#

A lot of math

torn shuttle
#

or use freeminecraftmodels and it will do it for you, for free

#

yes

smoky anchor
#

self-advertising smh

torn shuttle
#

tbf you said it existed first

smoky anchor
#

ik lol :D

torn shuttle
#

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

quasi gulch
#

Is that like ModelEngine for free? Nice

smoky anchor
#

Probably not best time and place, but why do you have limit of 22.5 angles ?

torn shuttle
#

yes

smoky anchor
torn shuttle
#

you can bypass it by using bones

tender shard
#

I got over 200 bones

torn shuttle
#

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

smoky anchor
#

Oh I see ye, makes sense

tender shard
shadow night
#

Lol

torn shuttle
tender shard
#

they can't be garbage collected unless discord deletes old messages

dawn flower
#

how do i move an item display smoothly with interpolation

torn shuttle
#

we're not in 1.1.3 anymore

#

1.3.0

tender shard
#

this is the proper repo

smoky anchor
torn shuttle
tender shard
torn shuttle
#

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

dawn flower
icy beacon
#

?img

undone axleBOT
#

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

smoky anchor
#

replace the repo link, it is different
change version to what magma said

tender shard
#
    <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

torn shuttle
#

I mean if he doesn't get this part I'm starting to suspect he also won't get the rest of it

torn shuttle
smoky anchor
#

(your fault for not updating the readme)

tender shard
torn shuttle
#

fine

#

I updated the readme

tender shard
#

not on github

torn shuttle
#

ah damn it

#

it's on the branch

dawn flower
#

how do i move a display entity fast and smooth

smoky anchor
#

There is now teleport interpolation

dawn flower
#

i just make a bukkit runnable and teleport it

#

idk how to use that

smoky anchor
#

It is the time it will interpolate over in ticks

tender shard
#

iirc youc an just set a teleport duration

torn shuttle
#

now the page is updated

dawn flower
#

then?

smoky anchor
#

If you set it to 20 and teleport, it will visually take 20 ticks to move

tender shard
#

and then you teleport it

dawn flower
#

teleport it in a loop or teleport it where i want it to be

smoky anchor
#

just once is enough

dawn flower
#

ok

smoky anchor
#

if you're not making some fancy curve lul

dawn flower
#

actually

#

the destination might change mid loop, is there a way to fix that

#

in the original loop the destination could change anytime

smoky anchor
#

Just teleport it again (and maybe set the teleport duration)
it will start interpolating from the current place

tired jewel
#

hello i just wanna ask does spigot stop tnt duping and bedrock breaking etc?

dawn flower
#

alr

tired jewel
#

oh sorry

torn shuttle
#

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

tender shard
#

do you mean interaction entities?

dawn flower
#

in a part of the loop i actually want to do a fancy curve

#

(not all of it)

smoky anchor
#

So just teleport piece by piece, time it correctly

tender shard
#

and sprinkle in some math

#

lel

dawn flower
#

should i just set the teleport duration to 0 then after the curve is done set it to 30 again

torn shuttle
#

no, normal living entities

tender shard
#

yes, why don't you use interaction entities for the hitboxes?

torn shuttle
#

uh mostly legacy, since I was supporting versions from before when that was an option

#

when did they come out again?

tender shard
#

oh then no idea how to do it. I think interactions were added together with Displays

smoky anchor
tender shard
#

so 1.19.4

torn shuttle
#

ok yeah I'm only doing 1.19.4+ now so I can do that

#

still

tender shard
#

interactions are basically just invisible entities were you can set a custom width and height

dawn flower
torn shuttle
#

1.20.5+ actually has some cool hitbox stuff that is a bit of shame not to use...

#

eh

tender shard
#

really? haven't heard of that

#

what exactly did they add?

torn shuttle
#

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

tender shard
#

nice

torn shuttle
#

so all in all yeah pretty cool

#

that being said

smoky anchor
torn shuttle
#

I do have other problems from using native hitboxes

dawn flower
#

so uh, i have a slight issue with teleport duration thingi, the longer the distance the faster it gets

torn shuttle
smoky anchor
#

That's news to me!

torn shuttle
#

well it is a new system

torn shuttle
#

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

smoky anchor
torn shuttle
#

hrm so interact entities?

smoky anchor
#

How to configure nametag location, mount point, passenger point

torn shuttle
#

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

dawn flower
#

why does it suddenly instantly teleprot after teleporting for like 5 blocks

torn shuttle
dawn flower
#

thanks

torn shuttle
#

np, any time

dawn flower
#

but fr hwy tho

icy beacon
torn shuttle
#

let me go get my 8ball so it can divine what the fuck you wrote

tender shard
dawn flower
#

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

icy beacon
tender shard
#

you should set the duration to distance / desiredSpeed

#

that's fifth grade physics :p

shadow night
#

fr

tender shard
#

t=d/v

shadow night
#

I remember a maths question from a while ago that involved that, easy af

torn shuttle
#

mhk so what was it again

#

interaction entity?

#

can that take arrows?

slender elbow
#

no

torn shuttle
#

fantastic start

tender shard
#

huh I thought you wanted a hitbox that doesn't block arrows

torn shuttle
#

I need a hitbox that acts like a living entity hitbox

tender shard
#

oh ok

torn shuttle
#

the problem is that it makes arrows bounce right now

#

for some reason

tender shard
#

yeah then interactions aren't useful, they can only be interacted with by players

shadow night
echo basalt
#

Is the bouncing client-sided?

torn shuttle
echo basalt
#

I'm thinking fake slimes

torn shuttle
shadow night
#

How tf

torn shuttle
#

not 100% tbh

#

it's weird

#

fake slimes?

echo basalt
#

I've used fake slimes and armor stands for clicking on holograms before

torn shuttle
#

I think I spotted meg doing something similar tbh

slender elbow
#

oh fake slimes i read fake smiles i'm like "why are you faking smile what did he do to you"

echo basalt
#

I'd also use fake smiles

torn shuttle
#

I'm pretty sure that causes secondary issues though, it's not possible to set a slime to have a specific height

echo basalt
#

Their hitbox is square

tender shard
torn shuttle
#

so if I don't think that would work if I need a hitbox that is like 2x1x2

echo basalt
#

Use 2 slimes ?

#

sounds like an interaction entity thing 🤔

#

make em fake

torn shuttle
#

4 or my math is wrong

echo basalt
#

can't even count my sleep hours

torn shuttle
#

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

echo basalt
#

chicken spot's closed for another week

torn shuttle
#

have you been dropping weight due to it or just ordering more shit pizza

echo basalt
#

great question

#

my lunch was a monster white and a snickers

dawn flower
#

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

torn shuttle
#

meanwhile I'm out here on month 5 of my strict diet

#

oh yeah

#

yesterday

#

delicious

echo basalt
#

cool so you're eating sand now

torn shuttle
#

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

echo basalt
#

you're literally eating sand ?? the fuck

icy beacon
echo basalt
#

light a fire under your ass and you become a glass blower

icy beacon
#

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

torn shuttle
#

ok so the bouncing is not just client side

#

what in mc causes entities to bounce arrows?

#

other than god mode I guess

echo basalt
#

uh

torn shuttle
#

because I can punch these

echo basalt
#

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

torn shuttle
#

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

echo basalt
#

Just look into its code

#

This is arrow code

torn shuttle
#

hm I might just hijack the interaction entity and mod it to make arrows able to hit it

echo basalt
#

Pretty much yeah

torn shuttle
#

this kinda causes a bunch of secondary problems anyway

echo basalt
#

might need to fuck with this

torn shuttle
#

I'd prefer not to send packets about the baseline entity in the first place if I can avoid it

shadow night
#

why is eating sand suddenly a development help

torn shuttle
#

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

echo basalt
#

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

torn shuttle
#

it's not fake blocks, it somehow isn't colliding with a real hitbox

#

real but modified

#

just weird

echo basalt
#

And you're modifying the nms hitbox?

torn shuttle
#

yes

echo basalt
#

I mean

#

this is the underlying code

torn shuttle
#

nothing fancy about it

echo basalt
#

It could have something to do with world.getEntities

torn shuttle
#

also to make it weirder it's kinda inconsistent

#

sometimes it will damage, I think it might have to do with arrow velocity

echo basalt
#

maybe the canDamage check

#

We can kinda check this by employing something mega hacky

icy beacon
echo basalt
#

basically extending the arrow class and debugging stuff

echo basalt
icy beacon
#

lol

torn shuttle
#

see that?

#

It's like it knows what the "real" hibox is

pseudo hazel
#

is there any documentation for all the options on the new give command syntax since 1.20.5?

torn shuttle
#

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

icy beacon
#

do you want to parse component strings into itemstacks?

pseudo hazel
#

well /give now uses components or whatever

icy beacon
#

yeah

#

i guess minecraft.wiki give command

pseudo hazel
#

and I just wanna see all the options available

#

outdated

#

they all still specify the old syntax or just say" components"

icy beacon
#

pretty sure if was somewhere

#

1 sec

#

this amybe

#

and if you wanna parse a string just use Bukkit.getItemFactory().createItemStack(string)

pseudo hazel
#

ah there we go

#

yeah I already use that

#

for chat components on itemstacks

icy beacon
pseudo hazel
#

but I wanted to see if I can edit durability there too

icy beacon
#

matches the input for /give command

#

so anything you can do with give, you can do with createItemStack

pseudo hazel
#

yes

#

but that link is what I was looking for, thanks

torn shuttle
#

the plot thickens

#

why the heck

#

should be mc doing it too

#

it's doing it even on the lowest priority

dense oracle
#

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?