#help-development

1 messages · Page 1259 of 1

mighty wind
#
        if (this.timeEntitySatOnShoulder + 20L < this.level().getGameTime()) {
            if (this.respawnEntityOnShoulder(this.getShoulderEntityLeft())) {
                this.setShoulderEntityLeft(new CompoundTag());
            }

            if (this.respawnEntityOnShoulder(this.getShoulderEntityRight())) {
                this.setShoulderEntityRight(new CompoundTag());
            }
        }

    }```
#

this is causing parrots to dupe even if i handle it

#

i am not sure if there is a way to stop this either, it just makes a new entity

eternal oxide
#

wth? new CompoundTag()

mighty wind
#

um, this is just in the remapped nms player

#

so basically i have two vices i want to get rid of if u know how to stop one id appreciate the help

#

well actually im not sure why getting hit removes the parrot i assume thas a minecraft thing

#

id imagine its that function above though

#

i cleared goals and disabled AI it still happens

#

infact when they get hit it spawns a new parrot that it duplicates

#

which has AI and no custom nametag

#

well yeah when someone gets hit it makes a copy of the entity but not a deep copy

#

gg

sour cosmos
#

hi

#

I just donated, where do I request a name change?

slender elbow
#

in the name shop, of course

warm mica
sly topaz
sly topaz
undone axleBOT
#

Name changes on the forums are granted to those who have donated to the project. Donations are processed manually and generally take up to 24 hours. The donation widget can be found on the home page of SpigotMC at: https://www.spigotmc.org/.

sour cosmos
#

error

blazing ocean
#

you have to wait till your donation is processed

echo basalt
#

any way to bypass the 99 max stack size limit :3

thorn isle
#

downgrade to 1.8

echo basalt
#

goes up to like 255 on 1.8

#

I need at least 8k

blazing ocean
#

but like, why

thorn isle
#

you will find that very difficult

echo basalt
#

fucking containers

echo basalt
blazing ocean
#

concern

#

just use font fuckery to display a number there

pseudo hazel
#

use percentage progress

thorn isle
#

the bundle tooltip has a nice progress bar

echo basalt
#

yo @blazing ocean you ever got that negativespacefont offset feature working?

#

it puts a %s

#

I might need the datapack

blazing ocean
#

no

#

you just add the negative offset and then the positive one

#

doesn't need a datapack

echo basalt
#

yeah but I gotta calculate the width of my string

#

and I have custom fonts n shit

echo basalt
#

I'll pray it matches

#

wtf is visit

echo basalt
#

wtf is compactChildren

#

ah

pseudo hazel
#

visitor pattern mention

bright spire
#

Guys the queued packet thing is actully throwing exceptions on some servers
https://paste.helpch.at/bipalupixo.css
// we should limit this so bad api usage won't oom the server.
Preconditions.checkState( packetQueue.size() <= 4096, "too many queued packets" );

You probably want to make this thing silent or only print once in a time as a small warn. Ill make a PR if anyone is willing to merge.

#

nvm ill make a pr

echo basalt
#

porting this to java be like

blazing ocean
#

L

echo basalt
#

fucking lambdas

#

and now I need a font registry

#

@blazing ocean what's TranslatableComponent#arguments

#

if it's just args I don't need to filter

blazing ocean
#

well I wanna add the width of translatable arguments too

#

this probably doesn't work with the global translator btw

bright spire
echo basalt
#

apparently my font bugs out on lowercase but yeeting everything to uppercase works fine

blazing ocean
#

....why would you put that text in there

echo basalt
#

it's a menu

blazing ocean
#

I'm talking about the content

echo basalt
#

ah

#

it's just sample text

#

womp womp this font's fucked

#

I need to map characters

echo basalt
#

we're using spritesheet

blazing ocean
#

spritesheet... ttf?

#

you mean bitmaps?

echo basalt
#

yeah

blazing ocean
#

why not a TTF?

#

that font exists as a TTF

echo basalt
#

uh

#

because we've done our own changes

blazing ocean
echo basalt
#

I put the guy at work to map out my font widths for the custom font

#

poor man

blazing ocean
#

😭 I did that once

echo basalt
#

you did it for the minecraft one right?

#

I got him counting pixels

blazing ocean
#

nah

#

I also did

echo basalt
#

could prob automate it ngl

blazing ocean
#

Yeah pretty easily

#

I got a negative space font for the MC font a while ago and just used a vim macro to turn it into a kotlin map lmao

#

(MC font magic discord my beloved)

rough ibex
#

why separate providers

#

and not just 1

#

oh it's mapped to the original ones

odd sentinel
#

is there any way to determine if an inventory holder will drop it's contents on break? I suppose only shulker boxes fit this category but I'd rather not hard-code a check for those

slender elbow
#

its* 👍

slate siren
#

and

young knoll
#

or

rough ibex
#

xor

slate siren
#

i need settings for knockback

#

knockback:
friction: 0.5
horizontal: 0.6
vertical: 0.4
vertical-limit: 0.5
extra-horizontal: 0.5
extra-vertical: 0.1

thats so bad

#

lol

young knoll
#

For what

#

Don’t think those are spigot settings

slate siren
hardy lagoon
# slate siren pvp

this feels a lil too specialized for spigot, you may wanna ask inside of a practice community as this channel is for coding plugins

hardy lagoon
prime sequoia
#

Anybody know how can i do gradient rank or ranks in Border?

sly topaz
old flicker
#

Anyone know what the best way for clearing/resetting a world after a minigame has finished (eg. skywars).

I tried loading a backup by doing file operations and unloading the old world, but this only works if the server is restarted and doesn't take effect immediately.

sly topaz
#

uh, I guess the shulker itself is counted as a drop lol

#

hm, yeah no I can't think of anything other than specifically checking of a shulker box, or checking if the dropped item's item meta is a BlockStateMeta whose BlockState is a BlockInventoryHolder, but that seems oddly complicated

odd sentinel
#

heh. thanks for the idea though. for now I just created a tag and added shulker to it, so I at least have some flexibility if it ever changes

sly topaz
#

it'd be a little nicer if InventoryHolderMeta existed 😔

sly topaz
old flicker
#

It should lol, this is how I am unloading. Confirmed working with the loggers I added to debug

    public String getGameWorld() {
        return gameWorld;
    }

            World gameWorld = Bukkit.getWorld(val.getGameWorld());

            if (gameWorld != null) {
                Bukkit.getLogger().info("Unloading world: " + val.getGameWorld());
                Bukkit.unloadWorld(gameWorld, false);
            }

The string from my values class is constructed from a .yml file. Its just the name of the world. Bukkit.getWorld takes string correct? it would have thrown an exception if the world didn't exist either...

sly topaz
old flicker
#

I am replacing the old world by copying the backup world (in the backup folder) to the root directory where worlds are generated and stored by default.

File backupFolder = new File(RamCTF.getInstance().getDataFolder(), "backups/" + val.getGameWorld());

File worldFolder = new File(Bukkit.getServer().getWorldContainer(), val.getGameWorld());

Before I copy the backup, I delete the world folder first, then do:

copyWorld(backupFolder, worldFolder);


    private static void copyWorld(File source, File destination) {
        try {
            if (source.isDirectory()) {
                for (File file : Objects.requireNonNull(source.listFiles())) {
                    copyWorld(file, new File(destination, file.getName()));
                }
            } else {
                Files.copy(source.toPath(), destination.toPath(), StandardCopyOption.REPLACE_EXISTING);
            }
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
#

After that I just call world creator to make the new world, which should load it?


WorldCreator creator = new WorldCreator(val.getGameWorld());
creator.environment(World.Environment.NORMAL);
World newWorld = Bukkit.createWorld(creator);

if (newWorld != null) {
    Bukkit.getLogger().info("World created successfully: " + newWorld.getName());
} 

else {
    Bukkit.getLogger().warning("Failed to create world: " + val.getGameWorld());
}
odd sentinel
young knoll
#

Locking containers

#

They can only be opened if you have the corresponding key item

#

“Represents a block (usually a container) that may be locked. When a lock is active an item with a name corresponding to the key will be required to open this block.”

#

The key used to just be a string, now it’s an entire itemstack

odd sentinel
#

I read that part but I'm not sure why it's there... is that a vanilla mechanic I've never known about or a spigot one

young knoll
#

It’s vanilla

#

Been around for many years

odd sentinel
#

til

sly topaz
#

It’s been around for many years but nobody really uses it

#

Mostly because it is more of a thing you use in adventure maps or something, not survival

slender elbow
#

ah yes, adventure maps :pepeold:

sly topaz
#

I honestly haven't seen one in years lol, I remember playing them casually when I happened to find one I liked in planetminecraft

sly topaz
#

I don't know if it is the actual issue, but it could certainly be that some of the region files containing the changed chunks are not getting replaced for whatever reason

#

I'd delete the world first and then just move the backup there just to make sure

faint vector
#

Would anyone know why my worldguard would be trying to open a link when clicking flags? have very few plugins and have isolated it to not be a conflicting plugin

old flicker
sly topaz
#

because you can't unload the main world

old flicker
#

In my testing I am doing it on just "world", so yeah the default. I did not really know that but I suppose that makes sense. Should I try to multiverse create a new world and set it to that?

sly topaz
#

sure, that works

sly topaz
old flicker
#

Yeah, I would have had another world in my actual implementation lol, but I assumed it would be fine to just use world especially beacuse it gave me zero indication that you cant do that. The function even executed successfully and my debugging statements work as expected. Naturally a lot a functions I would think follow good exception handling and are really just boolean logic when its not a getter or calulate x for example..... but I guess not in this case

#

Okay strange... now its just not working at all. 😭

#

Not even print statements.... it just doesnt wanna

#

ooooh wait I know why

#

Im mad, I kept wondering why my if statement wouldnt trigger where it cant find the world of the same name in backups... I had two backup folders in different location sin the server folder. I kept doing it to the wrong one. No idea how the other backup folder got there

#

Okay... so its not really working. Its better as I got a new world to generate instantly, but the world it loads is not the copied one. It generates an entirely new one with the same name

slate siren
#

Looking for

old flicker
#

I figured it out!

I needed to add this line to my copy function as well:

if (!destination.exists()) {
destination.mkdirs();
}

Since the destination folder was deleted, it couldnt actually copy anything to it. Thanks @sly topaz again for pointing out the main world issue 😅

paper viper
#

Consider using the NIO API btw

odd sentinel
#

is there any event for inserting/removing items from blocks that don't "open" aka chiseled bookshelves, composters, etc? or am I limited to using PlayerInteractEvent

sly topaz
#

but other than that, yeah, you're kind of stuck with the PlayerInteractEvent

odd sentinel
#

ok thanks

sly topaz
#

getting the slot clicked should be easy though, since you can do chiseledBookshelfState.getSlot(playerInteractEvent.getClickedPosition())

grim hound
#

Does anyone know of a wiki without missing basic shader info?

#

Or a tutorial/document

grim hound
sly topaz
#

your best bet is just looking around and collecting all of them as you go since the info about them is pretty scattered right now, even more so considering the recent changes to the core shaders

grim hound
#

Yeah a lot has changed each like 3 minor versions since 1.20

sly topaz
#

if I were you I'd just take yarn and take a look at the client source code

odd sentinel
#

so seems like ProjectileLaunchEvent doesn't fire for ender pearls. is there another event or again... I gotta look at the player interact event?

sly topaz
#

ProjectileLaunchEvent should definitely fire for ender pearls tho

jagged thicket
#

its not a projectile

#

you can check entity spawn event

odd sentinel
#

ah smart

jagged thicket
#

wait you mean ender pearl or eye

grim hound
jagged thicket
#

im a bit unsure if ender pearl will spawn an entity

sly topaz
jagged thicket
#

Oh yeah i was confused with ender eye

grim hound
#

I don't remember there being a rep for the clients src

jagged thicket
#

because that won't throw projectile

odd sentinel
#

oof I meant the eye sorry

jagged thicket
#

YESSSS

#

i was wrong but also right

sly topaz
#

makes sense

odd sentinel
#

I'm testing my code and pearls were fine but the eye for stronghold hunting doesn't fire that event

jagged thicket
#

check for ender signal spawn

odd sentinel
#

ok awesome thanks

sly topaz
#

I think the ender signal might not fire the entity spawn event

#

I remember that being an issue at some point, no idea if it ever got fixed

#

what people used to do is listen to the statistics increment event and just check if use_item statistic was incremented

odd sentinel
#

maybe Container works for identifying blocks a player can "open" vs not, like chest vs chiseled bookshelf

#

hmm maybe not

sly topaz
#

it does, yeah

#

is there any inventory that can't be opened that extends Container?

odd sentinel
#

I need to remind myself which blocks can be opened and compare

#

no but I think there are some than can that do not

#

ya the loom can be opened

sly topaz
#

if you have the block, you can check whether the BlockData is an instance of Openable

odd sentinel
#

I'll try that

sly topaz
#

ah that only works for blocks which have an open animation

#

so loom excluded ig

odd sentinel
#

ya I think I just need a tag for these

sly topaz
#

let me check if it is a Container in NMS

#

wait, Loom doesn't have its own BlockState class, so it might just return Container as BlockState

odd sentinel
#

ya there's a few that don't use inventoryholder/container/etc because they don't actually store stuff. loom, smithing table, grindstone

fossil flax
#

does anyone know why the code doesn't save spaces and comments in config file? (1.8 plugin)


    private final Main instance;
    private final FileConfiguration config;
    private final FileConfiguration messages;

    public ConfigFile(Main instance) {
        this.instance = instance;
        this.config = saveConfig("config.yml");
        this.messages = saveConfig("messages.yml");
    }

    public void saveFile(FileConfiguration configuration, File file) {
        try {
            configuration.save(file);
        } catch (IOException e) {
            e.printStackTrace();
        }
    }

    private FileConfiguration saveConfig(String configName) {
        File file = new File(instance.getDataFolder(), configName);
        if (!file.exists()) {
            instance.saveResource(configName, false);
        }
        return loadConfig(file);
    }

    public FileConfiguration loadConfig(File file) {
        YamlConfiguration configuration = new YamlConfiguration();
        try {
            configuration.load(file);
        } catch (IOException | InvalidConfigurationException ex) {
            ex.printStackTrace();
        }
        return configuration;
    }

    public FileConfiguration getConfig() {
        return config;
    }

    public FileConfiguration getMessages() {
        return messages;
    }
}```
odd sentinel
#

although I don't care about those now that I realize it

#

all I want is a way to separate non-openable invs like bookshelf so I can use a tag if nothing else pops up

sly topaz
fossil flax
sly topaz
#

though comments aren't deleted from the default config, they're only deleted if you make modifications to the config inside the plugin

fossil flax
dawn flower
#

how do i turn a png into a map

blazing ocean
#

you can load an image into a map

dawn flower
#

how

sly topaz
odd sentinel
#

oh that might work

#

let me see

sly topaz
#

yeah, you can just do getInventory().getType().getMenuType() != null

#

checking InventoryType#isCreatable might work just as well tbh

odd sentinel
#

the pot says menu type of chest, isCreatable

sly topaz
#

decoratedpot isn't even an inventory though, is it

#

oh it is

odd sentinel
#

it is for one stack I think

#

it has no ui, you have to break it

#

so why it has a menu type of chest is weird

sly topaz
#

it doesn't have a menu type though, that's probably a bug lol

#

it doesn't even have an InventoryType now that I am looking at it lol

#

yep, it is a bug

#

since decoratedpot doesn't have an inventory type, it defaults to chest

odd sentinel
#

haha nice

sly topaz
#

well, at least you can just report that one and add it as an exception until it is fixed lol

odd sentinel
#

been a decade since I reported a spigot bug... gotta remember where it was and my credentials lol

sly topaz
#

I can do it if you're fine with that

odd sentinel
#

sure, can you send me the link pls

sly topaz
#

will do as soon as I finish the report

odd sentinel
#

I found my login and am in, not that it matters

sly topaz
#

oh well I haven't even started writing it yet so you can do it if you want to lol

#

I don't particularly care either way, I was just about to run BT to get the latest Spigot

odd sentinel
#

ok I'll file it

sly topaz
#

it probably doesn't matter for this kind of bug report where the bug is clear but eh

odd sentinel
#

ya I'm updating to latest too to ensure I'm just not out of date

sly topaz
odd sentinel
sly topaz
#

nice

jagged thicket
#

btw can you confirm that EnderSignal doesn't fire EntitySpawnEvent

sly topaz
#

it's interesting since it sends a projectile shoot game event even though the entity isn't a projectile

sullen marlin
#

Looks good I think, will merge shortly

nocturne mirage
#

Searching an all round dev who wants to develop for me you get paid!!

sly topaz
#

I wonder if these types of containers deserve a SlotType, or rather if it'd be useful to have one specifically for this kind of pseudo-slot

undone axleBOT
sly topaz
#

also don't cross-post

nocturne mirage
#

Searching an all round dev who wants to develop for me you get paid!!

young knoll
#

Yeah post it again

#

That’ll help

sly topaz
#

if I had a finger pointer, I'd totally make the meme with this lmao

smoky anchor
nocturne mirage
#

Lmao

#

Did it for what you told 2 days ago lmao

smoky anchor
nocturne mirage
#

cry about it

pseudo hazel
wet breach
#

breaking the rules is also a quick way to get the boot too

drowsy helm
wet breach
misty ingot
#

i want to use custom item models on items for like different armor skins or whatever
players will already have a resource pack loaded on their client which will have the custom models

whats the easiest way to achieve what i want?

smoky anchor
#

Seems like you want two things.
Custom item models
Custom armor textures
Both should be done by changing the respective data component in item meta

#

Depends on version too, latest -> change the item model component thing

misty ingot
#

the plugin is on the latest version of minecraft

sly topaz
misty ingot
#

um im sorry i have never worked with models before but this is my json for one of the models

#

@sly topaz

smoky anchor
#

that seems redundant

warm mica
smoky anchor
#

if in: gui, gound, item frame: show model 1
otherwise show model 1

#

But yes, use the item model data component

sly topaz
misty ingot
#

i didnt make the resource pack :p

#

i did notice that the redundancy isnt much of a redundancy yeah

misty ingot
smoky anchor
#

no, it's the namespace

misty ingot
#

where would i find the namespace

smoky anchor
#

in /assets/<namespace>

smoky anchor
#

tools are items, if you have a block in your inventory that too is an item so it would work too (not if you place it tho, those are block models)

sly topaz
#

I mean, that's for turning an item into armor

misty ingot
#

i meant like

smoky anchor
#

ye but it contains the asset id

misty ingot
#

just giving normal armor a new model

smoky anchor
#

for the texture used when wearing armor

sly topaz
misty ingot
#

so if i do #setItemModel it will give the armor that model while holding it in my hands

smoky anchor
#

correct

misty ingot
#

the #equippable is for when wearing it

smoky anchor
#

yes

misty ingot
#

alright, thanks for all that help

eternal oxide
#

Well done Disc ord, suddenly decided to use black text on a black background

chrome beacon
#

css fail

eternal oxide
#

yep, even a restart doesn;t fix it though 😦

#

its cached something and broke

slender elbow
#

they want you to use light theme

#

the fiends

eternal oxide
#

Seems so

slender elbow
#

actually swapping themes back and forth might fix it?

#

or.. forth and back

eternal oxide
#

Tried and nope

slender elbow
#

bleh

#

damn

chrome beacon
#

Time to nuke the cache

eternal oxide
#

all text stays black no matter what theme I select

#

yeah I'll give that a go

#

welp clearing the cache folder did nothing 😦

wet breach
#

are you using discord in the browser?

eternal oxide
#

I guess it will make no difference if I can read chat or not, I alwasy talk garbage

#

Windows discord app

wet breach
#

tried updating it?

eternal oxide
#

um, I assume there is a button somewhere to check for an update, but perhaps I'm giving them too much credit

wet breach
#

upper right

#

there should be like a check mark? or something like that next to the inbox

eternal oxide
#

nope just a ? help

wet breach
#

weird, wonder if its conflicting with your windows theme =/

#

might have to try re-installing discord

eternal oxide
#

I guess thats possible. I'll try nuking stuff in its data folder and see what breaks 🙂

wet breach
#

lol

eternal oxide
#

looks like discord no longer has an install for Win7 😦

#

it installs but fails to start due to OS 😦

#

looks like no dark mode for me. Blindness incoming

mighty wind
#

with GUIs, do i need to destroy an inventory or does the garbage collector handle it

#

i wanna have a dynamic inv but i cant just set an items meta/amount and have it done with

#

i feel like u need to just open a new copy of the inventory

smoky anchor
#

You don't have to open a new inventory every time you want to change its content
that's a horrible idea

mighty wind
#

REAL

#

but why doesnt it update

smoky anchor
#

?nocode

undone axleBOT
#

It’s hard to answer a programming question without code
Oh no! You ran into a problem. But no worries, people are willing to help, but first they need to see your code. This is because otherwise, they would be providing help based on guesses instead of concrete knowledge. Whether it be a compile error, runtime error, or an unexpected output, I'm sure that if you were to provide code, you'd receive a quick solution.

smoky anchor
#

?paste if too long

undone axleBOT
mighty wind
#

im looking @ it bc the meta updates but the item count doesnt

#

i dont think posting my whole menu implementation is gonna be too helpful

#

a better question is, is thre a quirk with inventories where u can update itemstack meta but not the counts

#

i have the clicked item's itemstack and yeah if i update its count it doesnt work but meta does

smoky anchor
#

Perhaps just show how you update the count
Tho I don't see any other options than ItemStack#setCount :D

mighty wind
#

true

#

wait one seci might have done smsth stsupid

#

ill ask again once i go thru it one more time

smoky anchor
#

mhmm, that clicked item sounds sus
not sure why meta would work tho

mighty wind
#

wait

#

yeah i think its just sosmething with itemstacks

#
 ItemMeta skillMeta = clickedItem.getItemMeta();
        skillMeta.setDisplayName(ChatColor.GREEN + ChatColor.BOLD.toString() + skill.getName());
        clickedItem.setItemMeta(skillMeta);
        clickedItem.setAmount(30);
        this.setItem(clickedItem);

this will work... but the amount wont update

#

if anyone knows a fix it'd be much appreciate it id rather not clone it and set it via slots

odd sentinel
mighty wind
#

oh wtf....

#

you cant override max stack amounts

#

this whole time it was because i was using an enchanted book

#

swapped it over to a regular book and it worked

#

i thought you could programatically override this

shy dawn
#

any ideas on how to fix this?

#

it said not compatible for paper 1.21.4

#

but when I change to spigot, there comes another problem

#

mythic lib wont read the skills of my mmoitems

eternal oxide
#

look in your servers latest.log for an earlier error

#

the plugin did not load

shy dawn
#

its enabled but it keeps saying paper 1.21.4 not supported

eternal oxide
#

Yes, I'd pay attention to errors/warnings

#

after it tells you that paper is not supported I'm sure it also tells you it is disabling

smoky anchor
shy dawn
#

yeah, crazy plugin, it works on spigot 1.21.4 but not for paper

kind hatch
#

Well, this is bound to happen more and more often with plugins supporting both platforms.

shy dawn
#

any suggestions on how to fix this?

eternal oxide
#

run spigot?

shy dawn
#

I did try to switch up to spigot which works, now it wont let me use my modelengine

#

lol

kind hatch
#

Unfortunately, you have to wait for the dev to fix it.

shy dawn
#

its like a double edged sword hahaha

kind hatch
#

Otherwise use what works

eternal oxide
#

I only code against Spigot. If a fork breaks base Spigot functions I don;t code for it.

mighty wind
#
    @EventHandler
    public void onEntityDamageByEntity(EntityDamageByEntityEvent event){
        if(!(event.getEntity() instanceof Player)) return;
        if(!(event.getDamager() instanceof Fireball)) return;
        Player target = (Player) event.getEntity();
        Fireball fireball = (Fireball) event.getDamager();
        if(!shooterMap.containsKey(fireball)) return;
        Client shooter = shooterMap.get(fireball);
        Client hit = getInstance().getClientManager().getClient(target);
        if(shooter.isFriendly(hit)){
            event.setCancelled(true);
            return;
        }
        event.setDamage(0);
        target.setFireTicks(40);
        getInstance().getServer().getPluginManager().callEvent(new PureDamageEvent(getInstance().getServer().getPlayer(shooter.getUUID()),
                target, 1, getName()));
    }
        Fireball fireball = (Fireball) player.getWorld().spawnEntity(player.getLocation().add(0, 1.5, 0), EntityType.SMALL_FIREBALL);
        Vector tosend = player.getEyeLocation().getDirection().normalize().multiply(1.2);
        fireball.setVelocity(tosend);
        player.getWorld().playSound(player.getLocation(), Sound.ENTITY_BLAZE_SHOOT, 1, 5);
        shooterMap.put(fireball, getInstance().getClientManager().getClient(player));
        return true;
#

does anyone know why updating spigot versions makes players not get set on fire

kind hatch
#

I’ll probably have to decide here soon which one I’ll be using, but as long as the changes are minimal I could still do both.

(Example being the version string change that paper made somewhat recently)

shy dawn
#

should I just break down the jar file and update it myself

eternal oxide
#

no, that would be a huge task

mighty wind
#

ok delaying it by a tick seems to fix it... must be something to do with damaging a player/stopping fire ticks?

shy dawn
#

Id have problems on those

mighty wind
#

how performance instensive are bukkit runnables

#

esp if u run them a tick later

mighty wind
#

UM ok ive fixed all my other issues lol

#

can u remove nbt tag gray messages below items

pseudo hazel
#

wdym gray messages

torn badge
mighty wind
#

it says

#

minecraft:ink_sac
8 component(s)

pseudo hazel
#

ah

#

no you cant hide that

#

thats client

#

you can hide it for yourself by using f3+h

mighty wind
#

ah ok

#

thought i wasj ust being a shit dev

#

ty

smoky anchor
#

yesh you can

#

wait no, I misread

odd sentinel
#

why are stairs and trapdoors counted as Bisected

chrome beacon
#

That doesn't sound right

odd sentinel
#

I agree it sounds weird, hence my asking. But maybe I don't understand a technical reason they are

chrome beacon
#

Trapdoor seems to share the half property

eternal oxide
#

Because they can be placed top or bottom of a block

chrome beacon
#

That javadoc description could be better tbh

#

It's missleading

shadow night
thorn isle
#

i'm guessing it was originally for slabs

#

no? what

#

okay yeah that is beyond misleading

chrome beacon
echo basalt
#

any guy libs that have "slot" logic so I can take player input and have it all restricted?

#

like handling shift clicks properly and whatever

thorn isle
#

nms

echo basalt
#

bleh

#

how would I go around using something like it

#

even the NMS route is a little fucked

thorn isle
#

implement your own container implements net.minecraft.world.Container, MenuProvider

echo basalt
#

ah AbstractContainerMenu is what I want

thorn isle
#

you may also have to implement your own CraftInventory to wrap it for api access, i don't quite remember

echo basalt
#

I should really build a menu lib around this

thorn isle
#

then overriding the MenuProvider methods you construct a Menu for each viewer by constructing a bunch of Slots, which then can be assigned their own behaviour in a very nice and oop way

#

yeah, this is fairly abstractable into an api or a library; it's very straight-forward and clean in my opinion

#

i'm not sure why bukkit hasn't done it

echo basalt
#

why does nms make me override quickMoveStack all the time

thorn isle
#

there are also other very nice things you can hook into apart from canPlace/canTake, such as setChanged, which is called whenever anything changes the item in the slot

echo basalt
#

yeah I'm gonna think about how I'd abstract this all night

thorn isle
#

tbh just wrap the object types in api interfaces and it'll already be pretty clean for a library

echo basalt
#

yeah but quickMoveStack

#

ug

silent slate
#

Hey, if i have a statement like this:

SELECT * FROM users WHERE UUID = 'test';

And want to check if a user with the UUID "test" exists, can i do this:

PreparedStatement statement = conn.prepareStatement("statement...");
            ResultSet result = statement.executeQuery();

            if(!result .isBeforeFirst()) {
                //there was no user
            }

And also, can i just read the uuid afterwards without doing any other command before

like this:
result.getString(1)

thorn isle
#

i don't remember having to implement that

echo basalt
#

not with the interface but the abstract class requires it

thorn isle
#

which class requires you to implement it?

echo basalt
#

AbstractContainerMenu

thorn isle
#

iirc i just use ChestMenu and replace the slots to my liking

#

they are public

echo basalt
#

yeah

thorn isle
#

and ChestMenu will take care of quickmove

echo basalt
#

I don't think it checks mayPlace

thorn isle
#

yeah now that i look at it, it doesn't seem to

echo basalt
#

moveItemstackTo checks it somewhere

thorn isle
#

suppose you could copy-paste it and throw in a check, though that's not exactly clean

blazing ocean
#

?codereview

undone axleBOT
silent slate
echo basalt
#

if you're using kt just use jetbrains exposed

silent slate
#

no code else required

echo basalt
#

it does it all for you

manic delta
#

where is that option

echo basalt
#

it's a library

#

dummy

manic delta
#

oh

manic delta
#

does it support other sql ?

#

like maria

#

or mysql

echo basalt
#

yeah

#

auto translates

manic delta
#

oh thats nice

#

ill use that then

#

i was building one for myself

blazing ocean
#

exposed is the best shit ever

manic delta
#

seems nice

blazing ocean
glossy laurel
#

what event gets called when a player swaps their held item with their offhand when their inventory is open?

thorn isle
#

can you do that with the inventory open?

#

iirc the keybind for that, when the inventory is open, will cause the hovered-over item to be swapped with the offhand, rather than swapping the held item

#

if you mean the former, that's i think an InventoryClickEvent with InventoryAction set to HOTBAR_SWAP

#

i could be wrong; easiest way to check is to just write a listener and tryitandsee what the action is

odd sentinel
#

is there any api to detect the result of an inventory click to move items between inventories? aka was it successful and how many items moved? or.. is there a way to know if an item is accepted in an inventory? an example is I have an item stack of beacons and a FurnanceInventory and I need to know if they'll be accepted if a player tries to insert

#

getRecipesUsed seems like the only way I see

echo basalt
#

nms lets you do it easily

thorn isle
#

yeees

odd sentinel
#

ah maybe it's time I give in and use nms for some things

grand flint
#

hi guys ☺️

#

is the unbreakable tag a thing? || in 1.8 ||

#

pls no ban :3

rotund ravine
#

Spigot doesn’t ban u for asking that

#

As far as i know we didn’t have it back then, but u can check

grand flint
rotund ravine
#

Def has some sort of unbreakable tag

grand flint
#

Yeah exists

#

Ight thanks md_5 schnitzel

rotund ravine
#

Looks like it’s here

young knoll
#

Yeah it was in the spigot subclass back then

odd sentinel
#

How do projects using nms use jenkins, do they have a separate buildtools task setup somehow or do they run it manually now and then for newer versions

sly topaz
#

but if you have the resources to host a CI, you can also just host a maven repository with credentials where you can host the spigot dependency

odd sentinel
#

I do have nexus running

chrome beacon
#

I know that you can run BuildTools with Github Actions so I assume there's something similar with jenkins

odd sentinel
#

ya thats what I was thinking, setup a task to run it or something. I've avoided nms as best as I can but I think there are a few things it can help with, like determining whether moving items between inventories were successful. it's always bugged me I can't know if an inventory click successfully moved items

chrome beacon
#

👀 Looks like ssamjh has a video on it

odd sentinel
#

oh good find, thanks

chrome beacon
#

ah wait that's grabbing the output jar

sly topaz
#

I am honestly never really sure for what scenarios that event triggers lol

#

though if that doesn't work, is checking whether the InventoryAction is MOVE_TO_OTHER_INVENTORY in the InventoryClickEvent not enough?

chrome beacon
sly topaz
odd sentinel
#

ya thats for hoppers moving items. the InventoryAction is useful in that it tells me what the user is trying to do, but as far as I see there's no way to know if it worked. for example if you shift click a stack of beacons into a furnace it will just jump around in your inventory since they're not allowed, but you can directly click to place invalid items in.

#

In the past I wrote logic to "guess" if it would work like checking if the inv was full, etc, but there are too many scenarios to account for. I'd kill for some kind of "result" event that says how many items were moved, the InventoryAction, etc

odd sentinel
chrome beacon
#

Yeah it places in the .m2 repo

odd sentinel
#

but having never used nms I don't know if it really can solve my problems so I'm not eager to see

sly topaz
#

there's also IInventory#canTakeItem to check whether they can remove the item, but that's only used by chiseled bookshelves

#

those two methods could be added to the API as is tbh

odd sentinel
#

those would be cool, although still ultimately lame I have to write so much to figure out if they moved items etc

sly topaz
#

well if it gets added to the API it'd ultimately just be Inventory#canPlaceItem(int slot, ItemStack item) and the equivalent for taking as well, I'll try making a PR for it and see if it gets accepted

#

oh and if you want to see the PRs, you just have to agree to the CLA

#

?cla

undone axleBOT
odd sentinel
#

submitted

young knoll
#

MD will arrive at your house momentarily

#

With cookies

blazing ocean
#

I haven't gotten my cookies yet

sly topaz
#

is this good enough or should I be more specific about the use-cases

odd sentinel
#

seems good to me

quaint mantle
#

can you guys help me i cant link essentialsX correctly

rough ibex
#

you mean e.x. not i.e.

#

i.e. meaning (in other words, equal to this) e.x. meaning for example

quaint mantle
rough ibex
#

if you tell me the issue and give code

quaint mantle
#

ok

#

its the pom.xml ill send in pm

rough ibex
#

why in DMs

quaint mantle
#

because i cant send files here

sonic goblet
undone axleBOT
quaint mantle
#

oh

#

?paste

undone axleBOT
rough ibex
#

read this

quaint mantle
#

alr

#

thx

quaint mantle
rough ibex
#

what did you change

quaint mantle
#

dependency and repository

#

im just trying to update a plugin i made a while back

rough ibex
#

did you add the paper repo

#

as docs tell you to

#

and scope is provided

quaint mantle
#

im using spigot for my plugin 😭

#

what nvm they same thing

quaint mantle
rough ibex
#

no

#

show me new pom

quaint mantle
#

?paste

undone axleBOT
quaint mantle
rough ibex
#

did you resync maven

quaint mantle
#

huh 😭 i havent made a plugin in years

quaint mantle
#

im so done with this bullshit bro now all my code doesnt work

sly topaz
#

what is your issue

sly topaz
quaint mantle
#

but my plugin is using spigot

sly topaz
#

so remove the paper dependency then

quaint mantle
#

ok i did but its like im using ess3 which is a old version of essentials and like idfk

sly topaz
#

it shouldn't matter what version of essentials you're using

#

why are you even depending on essentials to begin with

#

economy? If so I'd just use vault for that

quaint mantle
sly topaz
# quaint mantle its stuff with /pay

Essentials hooks into vault so you can just use it to interface with Essentials or any other economy plugin really, since most interface with Vault

quaint mantle
#

ok i just did something and now almost everything has no errors

#

when trying to sync i get this error : io.papermc:paperlib;1.0.6 was not found in https://repo.essentialsx.net/snapshots/ during a previous attempt. This failure was cached in the local repository and resolution is not reattempted until the update interval of essentials-snapshots has elapsed or updates are forced

#

@sly topaz

sly topaz
#

my solution is to not use essentials API at all and just depend on Vault instead

odd sentinel
#

So what's the difference between a door being Bisected and a sunflower, lilac etc not?

young knoll
#

The flowers are too

young knoll
#

They just don’t have a special subclass since they don’t need one

sly topaz
#

you beat me to the punch twice in a row

young knoll
#

Speeds the name sonics my game

#

Wait

odd sentinel
#

ah, I should have realized that lol

deep dagger
#

Does anyone know how i can change a players skin without it updating in the tab menu? Im making a /mask command and i don't want players to be able to peep the tab menu and see that their skin has changed.

sly topaz
drowsy helm
wet breach
#

And just have a custom one

drowsy helm
kindred maple
#

hey guys, i want to make custom mobs but im running into an issue where i cant make 2 line custom display names, any ideas on how to do this?
Zombie\n❤️20/20 something like this

sly topaz
#

if you want more lines, mount a text display to the entity in question

kindred maple
#

a text display?

sly topaz
#

yes

kindred maple
#

ill look into it, thank you <3

shy dawn
#

guys im having problems on my mythiccmobs, it does no damage to players that has armors, any solution?

lean pumice
#

why if i use LegacyComponentSerializer.legacyAmpersand().deserialize, the displayname/lore is all on &o

young knoll
shy dawn
wet breach
#

Lol

ivory sleet
#

if you want §, use section() instead

lean pumice
#

i dont want the Italic format and i dont know how to fix this

#

i fixed

lusty cipher
#

yo how would I go about having a trapdoor be immune from redstone input? Like so that it can only be opened/closed by a player and not by any redstone?

young knoll
#

Listen to either the redstone or physics event and cancel them for the trapdoor

#

Idk if the redstone event itself is enough

lusty cipher
#

can you be more specific with "the redstone or physics event"

#

already listening to BlockRedstoneEvent which isnt cancellable, but I can set the current to 0, but that doesnt do it

young knoll
#

You may also need to do it for the blocks around it

#

Otherwise BlockPhysicsEvent

dawn flower
#

if i store a stat in the player's pdc, will i be able to make a leaderboard later for that stat

eternal night
#

not easily

dawn flower
#

k

blazing ocean
#

if you have a list of players, sure

young knoll
#

And they are online

blazing ocean
#

but honestly just use a DB

dawn flower
eternal night
#

Yea, the offline bits are the annoying part

dawn flower
#

i was asking to skip the hassle of a db

young knoll
#

Or you use a bit of NMS to access the pdc for offline players

eternal night
#

don't we have API for that?

#

o.O

young knoll
#

Sadly no

eternal night
#

ah

#

no that was paper

young knoll
#

I’ve been meaning to do an expanded offline player api

blazing ocean
#

????????whereami

lusty cipher
eternal night
#

?????????????????????????????????whereami

young knoll
#

But effort :(

lusty cipher
#

please enlighten me

young knoll
#

I believe getBlock will be the changed block

lusty cipher
#

oh yes lmao

#

I misread something

#

nevermind

young void
#

how do people know how different minecraft versions support which resource pack namespaces

is it in a certain changelog or something??

one version the server resource pack works and voilla 1.21.4 nothing works anymore

thorn isle
#

.4 changed quite a bit of things

young void
thorn isle
#

there are converter scripts out there but they aren't perfect

young void
#

some of them straight up change the mcpack format file like thank you mr🤣

blazing ocean
#

I just stay up to date with snapshots and read their resource pack changes

#

then add those features to my pack compiler accordingly

young void
blazing ocean
#

you mean item definitions?

young void
blazing ocean
#

you've always been able to do that

young void
#

tbh i am pretty clueless in resource packs

young void
young void
blazing ocean
#

github is having issues again kekw

#

unicorn my beloved (actually, puma is much better)

young void
#

nice

deep dagger
robust helm
#

how do i get a list of all players connected to the proxy, from spigot? I have rabbitmq as a message broker, so I could maybe send a request and then reply from the proxy. For that approach I'd need to use some operation ids, so it won't give me the reply to another request. Is there something built-in in rabbitmq for that?

left jay
#

hey so im still stuck on what you ment by this, can you explain what it means to hide a key?

blazing ocean
#

PlayerList specifically

robust helm
#

oh thats also supported be velocity then, right?

blazing ocean
#

yeah

worldly ingot
#
public class ItemWrapper {

    private static final NamespacedKey SPECIAL_VALUE_KEY = new NamespacedKey(MyPlugin.getInstance(), "special_value");

    private final ItemStack itemStack;

    public ItemWrapper(ItemStack itemStack) {
        this.itemStack = itemStack;
    }

    public String setSpecialValue(String value) {
        ItemMeta itemMeta = itemStack.getItemMeta();
        var container = itemMeta.getPersistentDataContainer();
        return container.set(SPECIAL_VALUE_KEY , PersistentDataType.STRING, value);
    }

    public String getSpecialValue() {
        ItemMeta itemMeta = itemStack.getItemMeta();
        var container = itemMeta.getPersistentDataContainer();
        return container.get(SPECIAL_VALUE_KEY , PersistentDataType.STRING);
    }

}
ItemWrapper wrapper = new ItemWrapper(itemStack);
wrapper.setSpecialValue("Hello world!");
String specialValue = wrapper.getSpecialValue();
#

Kind of a rough example, but gives you an idea of what I mean by "hidden key". The API user doesn't ever need to pass in an instance of your plugin, or a key. It just knows that it can either get or set the special value on that item. Doesn't know how it gets or sets it, just that it can

#

The key is "hidden" because the API doesn't know about it

#

Again, rough example, you could forego the ItemWrapper entirely and just use a static utility method that takes in an ItemStack if you really wanted. It's up to you how you want to design the API. The overall idea though is that you never need to say "I need the key found at plugin:special_value", you just say "I want the special value"

robust helm
#

or do pluginmessasges allow for usage outside of spigot?

#

like is there some extracted library for stand-alone usage?

slender elbow
#

plugin message is a minecraft packet

#

at that point just use rabbitmq or any other message broker

robust helm
#

So id need to reimplement parts of a server for a website that displays all online players?

upper hazel
#

what is currently the best and easiest plugin to create a team with all the standard features (customize chat format, etc.) and have api?

#

i need just simple team

#

system

robust helm
#

team meaning?

#

no fighting for team members and that is?

chrome beacon
#

^ you need to be more specific

#

Otherwise I'll just say the vanilla team system

left jay
upper hazel
chrome beacon
#

It works fine

upper hazel
#

and as far as I remember it doesn't have many of the settings that most plugins have on the team.

chrome beacon
#

What settings are you after

upper hazel
#

chat formatting

#

tab formatting

blazing ocean
#

which teams also have

upper hazel
#

smth like clan system

#

but simple

#

disabple enable pvp?

chrome beacon
#

Yeah they can do that too

upper hazel
#

prefix,sufix

blazing ocean
#

teams have friendly fire settings

chrome beacon
upper hazel
#

oh

worldly ingot
upper hazel
#

then ok

worthy yarrow
#
public interface Team {

    int getMaximumPlayers();
    
    boolean isFull();
    
    void addPlayer(UUID playerId);
    
    void removePlayer(UUID playerId);
    
    Set<UUID> getTeamMembers();
    
    UUID getOwner();
    
    Set<Component<?>> getTeamComponents();
    
    boolean contains(UUID playerId);
    
    void addComponent(Component<?> component);
    
    void removeComponent(Component<?> component);
    
    Component<?> getComponent(String componentId);
    

    // Disregard
    Context<? extends ContextType> setTurnIndex(int turn);
    int getTurnIndexContext();
}```

Never used the teams api and this is prolly ass but the components bit helps in the regard of extra team related features
blazing ocean
#

Component<T> whar

worthy yarrow
#

My own component obj

blazing ocean
#

ECS moment?

upper hazel
#

I can't decide. So the vanilla team system sucks?

worthy yarrow
#

I just use them more as compositional functions than anything else

upper hazel
#

why devs create owns team systems

#

they use vanilla system in core?

worthy yarrow
#

Cuz maybe I want to handle my teams in a way that vanilla doesn't exactly work for

#

Most cases you're probably fine using vanilla teams tho

upper hazel
#

but you not use vanille system inside?

worthy yarrow
#

no

upper hazel
#

why

worthy yarrow
#

Just never did

#

And didn't want to read over docs

upper hazel
#

lol

blazing ocean
#

there isn't a need to, unless doing collision, name tag or glowing colour stuff

upper hazel
#

who said the vanilla team api was good?

blazing ocean
#

nobody

worthy yarrow
#

Worst bit of spigot api has to be the conversations section imo

upper hazel
blazing ocean
#

it's a clusterfuck of legacy shit and everything being stringified

chrome beacon
#

Works fine does not mean good

upper hazel
#

uh

chrome beacon
#

It can do most of the basic things

worthy yarrow
chrome beacon
#

but as Rad said it's full of legacy text and such

blazing ocean
worthy yarrow
#

I mean with my components bit, I could just as easily handle all the things vanilla teams do

#

Internally for my use case tho, I found it easier to just handle my own objects

remote swallow
#

ay?

worthy yarrow
quaint mantle
#

Can you guys rate my plugin that took me one day to make

#

It’s my first plugin

worthy yarrow
remote swallow
#

after what you just said no

worthy yarrow
#

It's probably sticky D:

#

The plugin... that is

thorn isle
#

i need a sanity check, what's a reasonable amount of packets per second the server should be sending a player? looking at my numbers i seem to be at triple digits for no apparent reason

chrome beacon
#

I mean that depends on what's going on

#

but yeah it could do that if you have a bunch of things visible

worldly ingot
#

Also depends which packets you're sending. Not all packets are created equal

#

A chunk data packet is going to be magnitudes larger than a simple teleport packet

misty ingot
#

is there a way to differentiate between when a mob is spawned naturally and when they were spawned with commands or a spawner (unnaturally)

thorn isle
#

yeah i guess i'll just have to take a look at the traffic and see which packets are being sent at what rates

grim hound
#

can you replace a word with a bitmap in a resource pack?

#

or basically just replace a word

echo basalt
#

bruh I decided to do custom menus with nms

#

and for some reason every slot acts as one

#

I can put an item into any slot in the gui and it'll fill the entire gui

eternal oxide
#

Well done!?

echo basalt
#

it also wipes my inv for some reason

#

wtf is going on

thorn isle
#

did you put the same slot in all the indices?

echo basalt
#

No

#

I'm just wrapping it

#
    @Override
    protected Slot addSlot(Slot slot) {
        return super.addSlot(new CustomSlot(slot));
    }
thorn isle
#

plug it into an ide and throw breakpoints at it until it makes sense i suppose

echo basalt
#

still haven't figured out if I'm gonna be doing all the slot logic with an event system or just a million interfaces

#

oh yeah the index is

#

ug

#

not set yet

worldly ingot
#

idk why you're doing it with server internals though

echo basalt
#

I want slot logic :)

#

and emulating all of it is just too much of a pain in the ass

worldly ingot
#

Pain in the ass vs compatible across multiple versions thonk

echo basalt
#

it's for work I don't really care

#

90% of our menus need all the fancy quirks of "you can only place X custom item here"

#

and it needs shift click, number keys etc support

thorn isle
#

the bukkit api is kind of ass for custom menu's

#

it's much more an inventory api than a menu api

#

which, well, it is

echo basalt
#

Exactly

worldly ingot
#

Yeah, so is vanilla lol

echo basalt
#

Not really

thorn isle
#

weeeellll

echo basalt
#

AbstractContainerMenu uses slots which have fancy methods like mayPlace

thorn isle
#

vanilla has a distinction between a container, an inventory, and a menu

echo basalt
#

I can easily yeet my filter there and it'll just work

thorn isle
#

there's also callbacks for when players put things in places

echo basalt
#

"works"

#

fixed it just had to pass slot.slot instead of slot.index

thorn isle
#

for which in bukkit you have to reimplement the whole shift-click quickmove logic

echo basalt
#

you do need to reimpl that entire thing for most menus yeah

#

and if you do it wrong people can put/take items from it

thorn isle
#

there was a project at one point that implemented completely packet based menus, where the items never reached the server, being in principle exploit proof

#

but i think maintenance turned out to be untenable

echo basalt
#

I can just let mojank do all the maintenance for me

blazing ocean
#

there's lots of those

thorn isle
#

yeah ones that let you click buttons

#

but shift clicks and actual container mechanics i'm not sure if i've seen apart from that one

thorn isle
#

the spawn event and iirc the entity itself record a SpawnReason

misty ingot
#

hm. i see.

echo basalt
#

oh god I have to override doClick to pass context

#

(if it's a drop / left / right / whatever)

earnest girder
#

If I’m storing player IDs, would opening the server to bedrock crossplay break it?

echo basalt
#

No, geyser uses custom uuids

#

As uuids are used for server internals too

unborn hollow
#

For some reason whenever my plugin writes over a file, the file itself doesn't visually update, but the plugin acts as if it has and can further read data from an invisible updated file. Is this a bug?

echo basalt
#

What kind of file?

unborn hollow
#

a .json file

echo basalt
#

Could be that the data is being updated in memory but not being flushed

unborn hollow
#

I'm using writer.flush() and writer.close() though

#

or is that not the way to do it?

#

okay, I just copy pasted the file and it visually updated, so everything's working fine its just some weird visual bug with either vscode (which i use to look at json files) or something

sly topaz
#

way easier than wrapping around mojang's code

#

though I don't feel like all of this is worth the effort

echo basalt
#

nah it's not that bad

upbeat silo
#

I'm spawning a skeleton in daylight and setting it to setInvulnerable(true) and adding FIRE_RESISTANCE, but it still shows the burning animation in sunlight (even though it doesn't take damage). How can I completely remove the fire animation as well

sly topaz
#

you'll have to keep up with mojang changes

upbeat silo
sly topaz
#

well, of course

upbeat silo
#

I wasted 1 hour of my time

worthy yarrow
#

First thing I always think of when a listener class doesn't work... "did I even register it?"

#

96% of the time... no I did not

sly topaz
#

could be made into an IDE inspection tbh

upbeat silo
#

Haha, exactly 😄 When I forget to register the listener, it feels like the plugin is just like I dont care 😅. Ive learned to not forget it now, so problem solved!

rough drift
#

ya'll, why is this weird hand thing happening only the first time the block is broken? After the cancel it works just fine

#

I'm using the minecraft:block_break_speed attribute to change mining speed fyi

young knoll
#

Probably because you are changing the break speed when they are already mining

rough drift
young knoll
#

When

rough drift
#

it just checks if you're looking at a minable block and calculates the break speed (uses a multiplier of 0.25 in this case)

young knoll
#

It looks like the animation you get when you switch what item you’re holding

#

Are you doing anything to the held item

rough drift
#

am I doing that? No, the item stays the same as far as I'm aware, though there's like 167 plugins or something on here

#

I can check if the item changes

#

nope @young knoll

#

The items stay the same

short pilot
#

guys how can I make custom entity data save between server restarts

#

using PDC

sly topaz
#

well, as long as the entity wasn't despawned that is

short pilot
#

wait idk if i did the PDC part right

blazing ocean
#

persistent data container

lavish wing
sly topaz
lavish wing
#

oh..

#

thanks!

left jay
nocturne mirage
#

I just have an error by adding my texture pack
It says : Missing mcmeta data Invalid resource pack

young knoll
#

Does your pack have a pack.mcmeta

nocturne mirage
nocturne mirage
blazing ocean
#

show it

#

and show the full error

lavish wing
eternal oxide
#

?nms

sly topaz
#

it clones all the necessary repositories

#

but what are you trying to do? Modify a spigot server?

blazing ocean
#

@nocturne mirage

#

?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

nocturne mirage
nocturne mirage
blazing ocean
#

can you send your resource pack here

nocturne mirage
blazing ocean
#

okay

manic delta
#

is there any way, to "detect" double jump? i want to give fly to players if they double jump

chrome beacon
#

Hm? Just allow them to fly?

manic delta
chrome beacon
#

???

#

Anyways you'd normally use the fly state change to detect double jumps

manic delta
#

yea just found the way

#

thank you olivo

#

🫒

young knoll
#

I don’t understand

#

You want them to fly when they use the fly input

#

But you don’t just want to allow they to fly

manic delta
#

is a request

#

im not the plugin designer

#

i just code it

young knoll
#

Well your only option would be the input event then

#

And checking for the player pressing space, releasing it, and then pressing it again shortly after

manic delta
#

yea just figured about it

#

thank you jishuna

sullen marlin
blazing ocean
#

NaN

slender elbow
#

it's non-negative

#

so no

young knoll
#

I mean -0 is also valid

#

But it’s the same as +0

slender elbow
#

-0 is just +0

#

we aren't talking about fp arithmetic in here

young knoll
#

-0 == +0

slender elbow
#

true

young knoll
#

I bet that returns false in JavaScript

slender elbow
#

it does not

young knoll
#

Yay JavaScripts logic makes sense for once

remote swallow
#

yeah but does .1 + .2 == .3

young knoll
#

Best I can do is .29999999999999999999999

blazing ocean
#

.1 + .2 == -NaN

slender elbow
blazing ocean
#

is 0.1f + 0.2f == 0.3 tho

slender elbow
#

who knows

blazing ocean
#
jshell> 0.1f + 0.2f == 0.3
$1 ==> false
#

kotlin throws an error here ```

0.1f + 0.2f == 0.3
error: operator '==' cannot be applied to 'Float' and 'Double'
0.1f + 0.2f == 0.3

young knoll
#

Evidently it can in normal java code

#

Smh literally a downgrade

blazing ocean
#

🦶🔫

young knoll
#

Foot gun

manic delta
young knoll
#

Yes

#

It’s a recent feature

vague swallow
#

Does one of you have an idea why I can't spawn a block display aligned? It always deviates slightly from my specified values

#

When I spawn the block display with per command with the exact same values it spawns perfectly aligned but not when I spawn it with the plugin

sly topaz
odd sentinel
#

is there a way to determine blocks that can hold attachable blocks like torches, tripwire hooks etc

#

if I have Block I need to know if can hold those items

sullen marlin
#

isSolid probably?

#

should be easy to check the code to be sure

torn shuttle
#

don't ask me why but I've made a script to play cookie clicker for me

#

and now I'm slowly going down the rabbit hole of trying to figure out the most optimal building investment strat to get cookies as fast as possible

lavish wing
sullen marlin
#

?howold 1.6.4

undone axleBOT
sly topaz
#

feels older than that at this point

#

was 1.6 the horses update or was that 1.5

lavish wing
#

1.5 redstone update

sly topaz
#

I started playing in 1.6, so I don't know what minecraft without horses is

sullen marlin
#

anyway buildtools wont work below 1.8

lavish wing
#

why?

#

ah, buildtools

sullen marlin
#

you'd have to find an archive somewhere for below

#

though if youre running 1.6.4 already I assume you have those jars somewhere

sly topaz
#

I ended up making another method for that PR, however I am not sure whether I should return null or an empty array

sullen marlin
#

Now it's for hoppers?

#

Are we sure this API is actually useful

#

canPlaceItem seems fine but I'm really sceptical about the other method

sly topaz
# sullen marlin canPlaceItem seems fine but I'm really sceptical about the other method

I changed it to accept a BlockFace parameter since a more useful version of the method exists in IWorldInventory which tells you from where an item can be pulled from, however I don't see any other utility for the method other than replicating hopper behavior for whatever reason so I am honestly fine with removing both (the canTakeItem method and getSlotsFor method. that is)

sullen marlin
#

I feel like I need to see a plugin actually using these methods to do something sensible

lavish wing
sullen marlin
#

Yes

sly topaz
#

I feel like anyone trying to replicate hopper behavior would straight out use NMS anyway for other methods like tryMoveItemIntoContainer, and I personally can't think of any use so I'll just remove canTakeItem/getSlotsFor. canPlaceItem definitely is the more useful method for inventory checks

lavish wing
sullen marlin
#

Sounds fine to me, I can much easier see the use case for that method

sly topaz
#

I still added a BlockFace parameter to the method tho, since some inventories using IWorldInventory#canPlaceItemThroughFace (i.e. shulker boxes and composters) do not delegate to Inventory#canPlaceItem for whatever reason (I imagine Mojang just hasn't gotten into refactoring that code)

vague swallow
vague swallow
#

--- next question ---

#

does anyone have a tip how to track a left click on an interaction entity?

young knoll
#

Damage event

grim hound
#

Can a minecraft server have a few texture packs?

young knoll
#

In modern versions, yes

vague swallow
grim hound
young knoll
#

1.20.5 I think

jagged thicket
#

?whereami

vague swallow
#

Does anyone know if there is a way to prevent a player from being pushed out of a block he's standing in?

jagged thicket
#

🔥 🔥

vague swallow
vague swallow
# jagged thicket LMAO

anyway, Do you know if there is a way to prevent a player from being pushed out of a block he's standing in?

lavish vine
#

Place another 4 blocks on the 4 sides