#help-development

1 messages ยท Page 1193 of 1

undone axleBOT
silent slate
#

what actual code?

#

this is an example i have

#

this is actual code in my plugin

chrome beacon
silent slate
blazing ocean
#
val timersMarkedForRemoval = mutableListOf<TimedTask>()
for (timer in timerManager) {
    timer.tick(startTick, tick)

    if (timer.shouldRemove()) {
        timersMarkedForRemoval.add(timer)
    }
}

timersMarkedForRemoval.forEach(timerManager::remove)

I don't understand why I'm getting CME'd here. Message is just null, at the for (timer in timerManager) line

pseudo hazel
#

cme?

blazing ocean
#

ConcurentModificationException

pseudo hazel
#

weird

#

i blame kotlin

#

maybe shouldRemove isnt const or whatever, idk what kotlin does

blazing ocean
# pseudo hazel i blame kotlin
List timersMarkedForRemoval = new ArrayList();
for (TimedTask timer : this.timerManager) {
    timer.tick(startTick, tick);
    if (!timer.shouldRemove()) continue;
    timersMarkedForRemoval.add(timer);
}
Iterable iterable = timersMarkedForRemoval;
TimerManager timerManager = this.timerManager;
boolean $i$f$forEach = false;
for (Object element$iv : $this$forEach$iv) {
    TimedTask p0 = (TimedTask)element$iv;
    boolean bl2 = false;
    timerManager.remove(p0);
}
#

doesn't look that bad to me

grim hound
#

yo

lilac dagger
#

wait, in kotlin you don't have generics?

blazing ocean
#

we do lol

#

this is just the decomp output

lilac dagger
#

ah

grim hound
#

anyone knows how link javaFX in gradle?

lilac dagger
#

makes sense ๐Ÿ˜„

grim hound
#

or just generally how to link it to a project?

lilac dagger
#

is javafx like swing?

#

the gui stuff?

grim hound
#

well gui

#

but not swing

lilac dagger
#

i think it's in the standard library, or at least it was until some time

lilac dagger
#

unless it's the wrong one

grim hound
lilac dagger
#

if it's separated find the repository and dependency

grim hound
#

can't find the rep

lilac dagger
grim hound
#

so how do I link this bad boi

lilac dagger
#

oh look

#

jetbrains has a tutorial

grim hound
#

nice

lilac dagger
#

there you go then ๐Ÿ˜„

#

have fun

grim hound
#

will do

#

will send results

old coral
#

If you mean player.closeInventory, I've allready tried that and it didn't worked. Unless player#closeInventory is something else lol

old coral
#

One Minute

#
        Block block = event.getClickedBlock();

        Player player = event.getPlayer();

        boolean isContainer =
                block.getType().equals(Material.CHEST)
                || block.getType().equals(Material.TRAPPED_CHEST)
                || block.getType().equals(Material.BARREL);

        if (isContainer) {
            Container container = (Container) block.getState();
            String cName = container.getCustomName();
            String key = "locked:" + player.getName();


            if (cName.contains("locked:")) {
                if (!cName.equals(key)) {
                    player.sendMessage(ChatColor.RED + "You are not the owner of this container!");

                    player.closeInventory();
                }
            }
        }

This is bassicly just an PlayerInteractEvent that is (for now) supposed to just check if the custom name of a chest contains "locked:" and if it is, its checking if the playername is behind that "locked:".
If its not you get a message that you are not allowed to do that and then closes the Chest

young knoll
#

The chest isnโ€™t opened yet in that event

chrome beacon
#

I just told you not to detect inventories by their name ๐Ÿ’€

young knoll
#

event#setUseInteractedBlock(Result.DENY)

#

Iirc

blazing ocean
#
@EventHandler
fun on(event: InventoryClickEvent) {
    println("Drag event | Holder: ${event.inventory.getHolder(false)?.javaClass?.simpleName}")
    val furnace = (event.inventory.getHolder(false) as? Furnace) ?: return
    furnace.cookTime = Short.MAX_VALUE
    furnace.cookTimeTotal = Int.MAX_VALUE
    furnace.burnTime = Short.MAX_VALUE
}

I'm trying to make the furnaces insta-smelt, however it does not, in fact, worky

chrome beacon
blazing ocean
#

Yessss

young knoll
#

Tell me more about Doug Ford

blazing ocean
#

this guy

young knoll
#

Jk donโ€™t I live in Ontario inflatable

chrome beacon
# young knoll Tell me more about Doug Ford

Use code notjustbikes at the link below to get 60% off an annual Incogni plan: https://incogni.com/notjustbikes

Watch this video ad-free and sponsor-free on Nebula:
https://nebula.tv/videos/notjustbikes-the-worlds-dumbest-bike-lane-law-just-passed-in-canada

Patreon: https://patreon.com/notjustbikes
Mastodon: @notjustbikes@notjustbikes.com
NJB ...

โ–ถ Play video
blazing ocean
#

anyway any idea why I still need to wait for it to finish cooking?

chrome beacon
#

I assume

blazing ocean
#

getHolder(false) doesn't return a snapshot (I should go to paper, fuck I forgor)

young knoll
#

Get him

old coral
chrome beacon
#

inb4 a player renames a chest

#

|| and suddenly bypasses anticheat ||

young knoll
#

Me on my way to rename a chest to โ€œlocked: peepeepoopooโ€

#

Also me when I change my name and get locked out of all my chests

blazing ocean
old coral
#

The Plugin is just for a server from we with some friends so it doesn't have to be that save against bugs and stuff like that

#

so I'll leave it like that for now

chrome beacon
#

"for now"

#

soon(tm) fix

smoky anchor
#

// temporary fix (date: 2004)

blazing ocean
smoky anchor
#

-# or you could use a datapack to change the recipes cooking time

blazing ocean
#

no

chrome beacon
#

Now make auto pickup and then make it smelt entire inventory on interact

blazing ocean
#

not needed for this

grim hound
#

the fuq

blazing ocean
#

shade javafx

grim hound
#

it's really only for testing

lilac dagger
#

might have to add javafx sdk in the path

grim hound
lilac dagger
#

you know, like you do with java sdk

grim hound
#

never have I done anything with sdks

chrome beacon
lilac dagger
#

yup this is it ^

chrome beacon
#

see also the maven and gradle plugins

lilac dagger
#

i gave him early an intellij plugin

#

so on compile it's fine i think

grim hound
#

no

#

it's there

#

what the fuq

blazing ocean
#

do not nut

grim hound
#

uh

#

donut

#

do donut

#

do not do, do not not, do not nut

#

Been trying to make the spinning donut in javafx for like

#

5 hours

grim hound
fair rock
blazing ocean
#

hell yeah

lilac dagger
#

that's it

#

it should work

#

nvm,path for system

#

type system variables in search box

grim hound
#

reinstalling my system language to english rn

#

can't find shit in polish

grim hound
silent slate
#

nah bro

chrome beacon
lilac dagger
#

but compiling java classes individually doesn't seem nice tho

chrome beacon
#

Which is why you use the maven/gradle plugin

silent slate
#

Okay now i finally understood how this connector J thing works i now have this error:

[Server thread/WARN]: java.sql.SQLException: Connector/J cannot handle a connection string 'IP-ADRESS'.

My sql server is on version 8.0.40, but connector J only goes up to 8.0.30, is that a problem?

I init my db connection using this:


    @Override
    public void onEnable() {

        mysqlDataSource.setURL("IP-ADRESS");
        mysqlDataSource.setPort(3306);```

I just use mysqlDataSource.getConnection(user, password) everywhere
chrome beacon
#

Sounds like you have a bad connection string

silent slate
#

is the ip adress supposed to be the literal ip adress or some jbdc:// thing

lilac dagger
chrome beacon
#

jdbc:mysql://

silent slate
#

and then the ip?

chrome beacon
#

yes

silent slate
#

ok imma check then

chrome beacon
#

Not sure about that datasource but that's what you'd do with the DriverManager

silent slate
#

in that spigot guide it tells me that and some other stuff

grim hound
chrome beacon
silent slate
#

mhh

#

reloaded plugin, nothing reponds

#

imma restart see what happens

#

timed out now

#

failed to verify username

grim hound
silent slate
#

restarted launcher same bs

chrome beacon
#

You do need it installed on the system to run ofc

#

So you're not wrong

grim hound
#

I mean

#

it is

chrome beacon
#

Did you use the gradle or maven plugin to compile

silent slate
#

wtf

chrome beacon
#

Send your build file

grim hound
#

within intellij

silent slate
#

hypixel works but the server now always says failed to verify username

chrome beacon
grim hound
#

so in intellij

#

would this be like a compiler option?

chrome beacon
#

That's not needed

#

When using Gradle

grim hound
#

okay

chrome beacon
#

Are you using the run task to start

#

also you don't really need the jlink stuff

grim hound
chrome beacon
#

You're not making a runtime image are you

grim hound
#

no idea

chrome beacon
#

Use the run task

grim hound
chrome beacon
#

a gradle task

#

Open gradle menu on the right side of your IDE and locate run

silent slate
#

Now i have this error

[20:47:21] [Server thread/WARN]: 
[20:47:21] [Server thread/WARN]: The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.```
chrome beacon
#

or run ./gradlew(.bat) run

grim hound
#

oh

#

it works

#

xd

#

nice

#

I love you

#

this took way too long

#

I wonder why the run task works, but not the main() run

chrome beacon
#

Can by caused by many things

#

Is the database accessible

silent slate
#

idk how to test that

chrome beacon
grim hound
#

I recently had it

#

it's either 1. The server is firewalled or 2. An invalid driver is used

chrome beacon
#

Could be more reasons that that

#

but the first one is usually the most common issue

grim hound
#
   Class.forName("com.mysql.cj.jdbc.Driver").getConstructor().newInstance();
``` after unfirewalling solved it for me
chrome beacon
#

creating an instance shouldn't be needed

#

Just using forName and forcibly loading the class should be enough

grim hound
#

I guess so

silent slate
#

wait so if i paste the code in onEnable i should be safe right?

grim hound
silent slate
#

why

grim hound
#

not good to throw everything in one method

silent slate
#

not good or not working

grim hound
silent slate
#

for testing ok?

#

yes

#

i have that, just the enabling functions in the main class

#

still the same error

#

how to test if it has to do with firewall?

#

i can connect to the db just fine with my pc

#

mhh

#

weird, if i use mysql workbench i also cant connect

#

why

chrome beacon
#

Is it running

silent slate
#

ye

#

myphp works fine

chrome beacon
#

no idea what that is

#

phpMyAdmin?

silent slate
#

ye

#

just short for that

chrome beacon
#

Is it on the same machine

#

as the spigot server

silent slate
#

nah, the minecraft server and the database are both neither on my pc, nor on the same server

chrome beacon
#

where is the phpMyAdmin

silent slate
#

on the database server (vserver)

chrome beacon
#

That would probably be why

#

for security reasons the default behaviour is to only listen for local connections

#

You need to expose the database if you want to use it externally

silent slate
#

how to do that

chrome beacon
#

First make sure that you don't have a firewall blocking the port

silent slate
#

dont think i have, the vserver is letting everything through

#

but how to check for ubuntu

chrome beacon
#

ufw

silent slate
#

found a tutorial

chrome beacon
#

When you've done that set:

[mysqld]
bind-address=0.0.0.0
#

in your mysql config file

silent slate
#

okay, digital ocean saying the same

chrome beacon
#

Probably worth to run mysql_secure_installation first

silent slate
#

i think i did that when i installed the whole server

#

how to save and exit in nano

chrome beacon
#

ctrl + s to save

#

ctrl + x to exit

pure dagger
#

i made this, so if i want to create custom config i extend it and add methods like getPlayers or get somethnig

i dont know if this is good approach so just wanna post it her

import org.bukkit.configuration.InvalidConfigurationException;
import org.bukkit.configuration.file.FileConfiguration;
import org.bukkit.configuration.file.YamlConfiguration;
import org.bukkit.plugin.java.JavaPlugin;

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

public abstract class CustomConfig {

    private final File file;
    private final FileConfiguration config;
    private final ConfigValidator validator;

    private final JavaPlugin plugin;

    public CustomConfig(JavaPlugin plugin, String fileName, ConfigValidator validator) {
        this.plugin = plugin;
        this.validator = validator;
        file = new File(plugin.getDataFolder(), fileName);

        if (!file.exists()) {
            file.getParentFile().mkdirs();
            plugin.saveResource(fileName, false);
        }

        config = new YamlConfiguration();
        reloadCustomConfig();
    }

    private void validate() {
        validator.validate(config);
    }

    public void saveCustomConfig() {
        try {
            config.save(file);
        } catch (IOException e) {
            plugin.getLogger().severe("Failed to save config file: " + file.getName());
            e.printStackTrace();
        }
    }

    public void reloadCustomConfig() {
        try {
            config.load(file);
            validate();
        } catch (IOException | InvalidConfigurationException e) {
            plugin.getLogger().severe("Failed to load config file: " + file.getName());
            e.printStackTrace();
        }
    }


    protected File getFile() {
        return file;
    }

    protected FileConfiguration getConfig() {
        return config;
    }

    protected JavaPlugin getPlugin() {
        return plugin;
    }

}
silent slate
#

that opens some weird tabs in termius

chrome beacon
#

sounds like they have an overlapping keybind that takes priority

#

unfortunate

silent slate
#

huh, but i know that in settings u can disable all of them

#

strike for me

azure zealot
#

can someone explain to me why bungee does not get any problems caused by the bundledelimiter packet?

i coded a proxy in rust and i needed to handle and sync them because its not allowed to send a config start while the client is bundeling.
If the client received one (StartConfig from server) while bundeling it disconnects.

So why doesn't it happen on bungee, as we do not handle those

pure dagger
sullen marlin
azure zealot
#

it doesnt have bundle packets registered i guess

azure zealot
coarse coral
#

@sullen marlin do u like chicken nuggets?

blazing ocean
#

chuggies

#

i love chuggies

coarse coral
shadow night
#

CHUGGIES??? SOMEBODY SAID CHUGGIES?

azure zealot
#

but if i do the same i sometimes gat disconnected because the startconfig is between the 2 bundle delimiter packets

slate mortar
shadow night
pine sandal
#

Question, is there plans for events relating to the Crafter?

coarse coral
#

@azure zealot arent u a bungee collab?

azure zealot
#

yes

coarse coral
#

saw u on github i guess

azure zealot
#

nice

coarse coral
#

but why dont u have helper rank? impersonator? ๐Ÿคทโ€โ™‚๏ธ

blazing ocean
#

lol

#

i find it interesting how bungee isn't on stash

#

tho its a good thing

silent slate
shadow night
azure zealot
blazing ocean
#

contributor != helper

azure zealot
blazing ocean
#

what

coarse coral
azure zealot
#

i am collaborator not contributer

coarse coral
#

i saw him on collaborator members

chrome beacon
silent slate
#

ye

#

systemctl restart mysql

#

or whatever

blazing ocean
azure zealot
#

i never said so

azure zealot
#

schnitzel

coarse coral
azure zealot
coarse coral
azure zealot
#

๐Ÿ’€

coarse coral
#

โ˜ ๏ธ

grim hound
#

how often does the australian fauna overthrow the australian government?

silent slate
#

n e v e r

silent slate
#

i am too

grim hound
coarse coral
#

autobahn

blazing ocean
#

๐Ÿ’€

azure zealot
grim hound
coarse coral
blazing ocean
#

๐Ÿ’€

sullen marlin
silent slate
#

very often

#

๐Ÿ’€

grim hound
blazing ocean
#

stereotypes

coarse coral
sullen marlin
#

Have not had zebra....

coarse coral
#

nice

sullen marlin
#

Do people even eat that

coarse coral
#

idk

#

i think

azure zealot
coarse coral
#

ling lings does it

#

i guess

grim hound
#

never heard of that one

blazing ocean
#

apparently so

silent slate
#

in germany very much

azure zealot
coarse coral
#

like Romanians

sullen canyon
lilac dagger
#

man, why do romanians are only known for the worst things ๐Ÿ˜ฆ

echo basalt
#

I know a romanian plugin dev

#

he drives to moldova to smuggle cigars

#

goes to raves every night

#

has mad women around him but he pushes them aside and opens up intellij

blazing ocean
#

lmfaooo

lilac dagger
#

is someone i know?

sullen marlin
#

Love some intellij at a rave

blazing ocean
#

gotta open up netbeans or eclipse to get those women

young knoll
#

What about vim

blazing ocean
#

you mean neovim?

#

with neovim you'll only get femboys

azure zealot
sullen marlin
#

Yeah

azure zealot
#

why xd

sullen marlin
#

Netbeans best beans

azure zealot
#

it looks like a something that my grandpa has installed on his pc from 1990

young knoll
lilac dagger
#

i like my beans rare

sullen marlin
#

Does everything I need and the maven integration is better than every ide out there

azure zealot
#

i tried it ones, but it was laggy for me idk

sullen marlin
#

You can just open a pom.xml without making a project

#

Absolutely mind blowing stuff

azure zealot
#

crazy

lilac dagger
#

that's cool ๐Ÿ˜„

azure zealot
#

but can you please think about my bundle packet question? xd

sullen marlin
#

I don't know the answer

#

I don't think bungee messed with bundles, it would just pass them through

azure zealot
#

yeah

sullen marlin
#

Is it your proxy or the client breaking

azure zealot
#

but i dont understand why bungee can do so, because the client normaly does not allow that a startconfig is send during a bundle

#

and we just send it without knowing if the client is bundeling at the moment

sullen marlin
#

Why is the server sending start config in a bundle

azure zealot
#

the server isnt

#

the proxy

#

is

#

because i want to switch server

sullen marlin
#

Idk, magic

azure zealot
#

user.unsafe().sendPacket( new StartConfiguration() );

#

FR

sullen marlin
#

Does vanilla use bundles a lot?

azure zealot
#

some dark netty magic

#

yes

#

for very entity spawn

#

it sends very much of those

#

i am really confused

#

velocity also added thos bundle checks

sullen marlin
#

Sounds strange that bungee doesn't have an issue but your proxy consistently does

azure zealot
#

but bungeecord somehow overpowers the minecraft client bundle checks

wide cipher
#

is there a place where you can see what all the nms methods do?

chrome beacon
#

Your IDE

#

You can open the code and read the methods

#

Other than that no

sullen marlin
#

Idk

azure zealot
#

maven is goated

sullen marlin
#

Gradle support is similar but I don't use gradle

shadow night
#

I personally do not like maven, not a fan of xml ngl

shadow night
sullen marlin
#

No, also that's xml

shadow night
#

But it's worse than maven imo

river oracle
#

Ant is ancient

shadow night
river oracle
#

I wonder if it's still used by any modern java projects

shadow night
river oracle
#

I'd assume you'd see it for some legacy java 6 or java 8 project or something in a business

shadow night
#

Yeah there's most likely a bank somewhere using ant and like java 5

river oracle
#

Lombok is a shit show honestly not surprised

shadow night
young knoll
#

It does

#

The only thing from Lombok that would be nice is @Getter and @Setter

#

Or something like C# properties

echo basalt
chrome beacon
#

Lombok builders are nice

lilac dagger
chrome beacon
#

But there are better alternatives

lilac dagger
#

pfew, i'm safe ๐Ÿ˜„

chrome beacon
#

record-builder >>

blazing ocean
#

kotlin >>

chrome beacon
#

but it requires records so no Java 8

lilac dagger
young knoll
#

Kotlin? More like Notlin

#

Fuckin gottem

sullen marlin
#

Wtf is record-builder

chrome beacon
sullen marlin
#

why is it better

river oracle
#

it clearly isn't

#

look at that radio silence

lilac dagger
#

i have like 1 class that is a record class

#

i don't need a builder for that

wide cipher
#

how can i get an EntityPlayer from a player without invoking CraftPlayer? I have 0 experience in Reflection

sullen marlin
#

wdym without invoking

blazing ocean
#

well ((CraftPlayer) player).getHandle() is your only real option

lilac dagger
#

that or via world

#

or wait, craftserver

#

either way, you need to interact with craftbukkit

vagrant stratus
#

^ You need to interact with it no matter what lol

young knoll
#

You could maybe get the internal player list and do a uuid lookup

wide cipher
#

hmmm could i reflect everything?

chrome beacon
#

yes

#

if you want to

torn shuttle
#

hey, know how 1.21.4 changed attributes? does anyone know if the registry namespaced keys were also used or can I switch to getting that for a version independent getter for attributes (assuming attributes were already there before, I think so?)

sullen marlin
#

sorry I dont understand the question

#

but I think the answer is yes

torn shuttle
#

tl;dr has this changed since, say, 1.19.4

#

because MAX_HEALTH has

#

and I can't use that anymore

#

(not an enum anymore)

lilac dagger
#

Check the difference

sullen marlin
#

yes, pretty sure it used to be generic.max_health or something

#

the answer is always compile the oldest version you wish to support and let the server handle the rest

torn shuttle
#

can't

#

it errors

#

well it probably errors due to a number of problems to be fair

#

some self-inflicted

frigid prism
sullen marlin
#

yes

torn shuttle
#

for this plugin specifically I want to support the latest features, not least of which because the resource pack format has changed quite significantly for the better in my use case

#

but I still want a degree of backwards compat

frigid prism
#

Ahh, api version is for that?

sullen marlin
#

yes

frigid prism
torn shuttle
#

hm?

#

I think I'll have to rely on a conversion table

#

and use value of and the old enums

#

well let's hope that doesn't deprecate out of existence before 1.24ish

frigid prism
#

You had a plugin for managing all of your resource packs, right? So that users don't have to do everything manually.
I don't remember if I asked in your Discord but I noticed that your plugin didn't send the resource pack while in config phase but it sends while in play phase

torn shuttle
#

hm yeah that's been online and working for several months

#

really useful

#

I've yet to adequately document it or announce it to the wider world but it's also just a set it and forget it thing anyway

sullen marlin
#

the server should convert it for you I think

frigid prism
#

But could also fail ๐Ÿ’€

sullen marlin
#

if you're using the string methods

torn shuttle
sullen marlin
#

get("generic.max_health") or whatever should still work on 1.21.4 and automatically convert to get("max_health")

torn shuttle
#

oh

sullen marlin
#

ie, you don't need a lookup table, the server has one

torn shuttle
#

but not the other way around huh

#

guess which way I was halfway done writing lol

sullen marlin
#

well yeah because an old server doesn't know what changed in a new server

torn shuttle
#

ok this was probably not going to work anyway because I was going through the registry

sly topaz
#

just predict the future smh

torn shuttle
#

and this wasn't in the registry before I think

frigid prism
young knoll
torn shuttle
#

should I be going through the key then?

frigid prism
sullen marlin
#

yeah just ask chatgpt

sly topaz
torn shuttle
#

not valueOf?

#

can I even get an attribute via namespacedkey in 1.19.4, hm

echo basalt
torn shuttle
#

guess I'll try valueOf

sly topaz
#

I wouldn't do valueOf

#

unless you're supporting a really old version

echo basalt
#

valueOf has diff bytecode for enums so it gives errors on older versions

#

iirc

#

I had to do some cursed shit

sly topaz
#

it should be fine to get by namespaced key if it is in a registry, which it should in 1.14+

lilac dagger
#

Strange, I thought I knew all the plug-in devs lol

echo basalt
torn shuttle
#

oh I see it

#

yeah they're in the registry

sly topaz
torn shuttle
#

ok

frigid prism
sullen marlin
#

1

#

2

lilac dagger
#

Md5, rad Javier, need i name more?

sullen marlin
#

3

#

4

torn shuttle
#

wow md_5

echo basalt
#

wow md_5

torn shuttle
#

I can't believe you're leaking sensitive data like that

#

I'm suing

frigid prism
#

Does Australia even have data protection law?

lilac dagger
#

MD knows all our id's

#

Pretty sure they do

frigid prism
#

How are the PWs hashed?

torn shuttle
#

I knew it was sus when md_5 showed up on my discord server and told me it was time to verify my spigot account and then asked me for my legal id and social security number

young knoll
torn shuttle
#

he also then sent me a file called validator.pdf.exe

young knoll
#

4th member leaked

young knoll
#

Wait whoโ€™s member 69

lilac dagger
#

Who even is the first member?

young knoll
frigid prism
# torn shuttle I'm suing

We know at least that he doesn't care about EU ๐Ÿคฃ

Opting Out of Third Party Cookies
If you wish to limit third party advertising cookies, you may be able to turn cookies off by visiting the following links:

Your Online Choices
Network Advertising Initiative
Digital Advertising Alliance

Opting out of any internet based advertising will only work for the browser you are currently using. Any additional browsers or devices with which you access our Platform must be opted out of separately. Some opt outs may only work if your browser accepts cookies. If you delete cookies, change your browser settings, switch browsers or computers, or use another device you may be required to opt out again.

That part isn't legal in the EU afaik. because you must opt in lol

lilac dagger
#

It better be md5

frigid prism
#

But I'm not a legal expert

young knoll
#

MD is 1st

lilac dagger
#

Nice

frigid prism
#

Test accounts have priority

young knoll
#

Well there is no user 0

frigid prism
sullen marlin
#

user -1

frigid prism
#

The username is "Error"

sullen marlin
#

(it's steve)

young knoll
torn shuttle
#

the real question is who is user #1 in md_5's heart

young knoll
#

Thatโ€™s not Steve :(

frigid prism
sly topaz
frigid prism
#

We turned the text into Steve

young knoll
sullen marlin
young knoll
#

Man that account is old

#

How many accounts are there

frigid prism
sullen marlin
#

at least 3

#

maybe 4

sly topaz
#

wonder how long till we hit integer overflow

frigid prism
#

currently looking up!

lilac dagger
#

More accounts than atoms in the universe

sullen marlin
sly topaz
#

2m users is a lot

young knoll
#

2182236

sullen marlin
#

guess I was right, it's at least 3

lilac dagger
#

Still long way from integer overflow

young knoll
#

1/1000th of the way to 2.1 billion

torn shuttle
#

what are we going to do when there's as many spigot users as people on earth?

ebon topaz
#

Hi do you know the menu for spectate game mode where you can teleport to a player, is it possible to remove a player from the list so they arenโ€™t able to teleport to them??

frigid prism
#

Spigot has 2182238 users

sullen marlin
#

assimilate humanity

frigid prism
#

Oh, I am too late

sullen marlin
#

I dont know the list, but I assume it's based on everyone on the tab list

frigid prism
#

I was looking it up by hand ๐Ÿคฃ

sly topaz
#

we will setup a huge civilation VII server

sullen marlin
#

is civ 7 gonna be good? I think I preferred 5 to 6 tbh

young knoll
#

I wonder how many of those 2182236 have been thanosed

torn shuttle
#

I dropped off of civ at 3

#

baba yetu

sly topaz
#

I prefer 5 honestly, it's my childhood

torn shuttle
#

also they got rid of army doom stacks and I hated the new way conquering cities works

lilac dagger
sullen marlin
#

I've only ever played 5 and 6

#

weren't the tiles squares before 5? wacky

torn shuttle
#

yes

#

a lot changed

#

you also used to have a button to see a render of what your city looked like

#

don't think that has ever returned

#

making roads was also hilarious

#

you'd end the game with basically railroads on every tile

sullen marlin
#

and then gandi would nuke you

torn shuttle
#

don't think that changed, has it

ebon topaz
#

damn i cant post a image, was going to send a ss of the spectate teleport list

sly topaz
#

?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

ebon topaz
#

!verify

undone axleBOT
#

Usage: !verify <forums username>

ebon topaz
#

!verify TillyMasters1

undone axleBOT
#

A private message has been sent to your SpigotMC.org account for verification!

mortal hare
#

Rip paper fork

torn shuttle
#

well I fucked up

#

I put way too much chicken in my slow cooker

#

I think it's just barely too much

sullen marlin
#

oh no it's magmaguy chicken day again

torn shuttle
#

my man

#

it's been chicken day every day since february

#

I'm still on the same diet

#

Truly on a quest to single handedly offset the losses to the chicken industry brought about by vegetarians

#

mmmh

worldly ingot
#

Jesus Christ. You think you added just a little too much?

sly topaz
#

that chicken looks raw still

torn shuttle
#

I mean yeah

#

I should hope it's raw, it's a slow cooker and I barely just put them on

#

they still have at least 5 hours to go

#

I have faith that it will cook even filled to the brim like that

#

I believe in you chicken

lilac dagger
#

That chicken is gonna be raw

#

There's no way

torn shuttle
#

been using it since feb and it has yet to come out raw a single time

lilac dagger
#

If you tried it then it's amazing ๐Ÿ˜„

torn shuttle
#

I mean I overfill it about 20% of the time

#

the vaccuum sealed chicken I buy comes in large doses, the amount in the slow cooker right now is just 2 bags

#

my other option would be to cook exactly half

#

and that's really annoying

lilac dagger
#

Half is still like 2 meals no?

sly topaz
#

do you just make a lot of servings then put it in the freezer and reheat with microwave

torn shuttle
#

more than 2

#

let me check

lilac dagger
#

Then it's not that bad

sly topaz
#

I would do that if I had a microwave honestly, can't be bothered to cook for myself every day

lilac dagger
#

I rather eat freshly cooked food

torn shuttle
#

400g/day, 2.2kg per bag

#

so little over 4 days

lilac dagger
#

Awesome ๐Ÿ˜„

sly topaz
torn shuttle
torn shuttle
#

before I had the slow cooker

lilac dagger
sullen marlin
torn shuttle
young knoll
#

I thought that was a mountain of candy corn

torn shuttle
#

protein time

lilac dagger
#

Nice

torn shuttle
#

I don't like cooking in anything less than multiples of 1kg

#

5-6kg at a time is usually my goal

sullen marlin
#

MagmaGuy don't overfill pot challenge (impossible)

lilac dagger
#

I wanna try to boil a protein shake

torn shuttle
#

I cook then vacuum seal everything

#

peak efficiency, just how I like it

nova notch
#

i just air fry everything

lilac dagger
#

Fancy

torn shuttle
#

another peculiarity is that this ends up being so much food I have to eat every day that I gave up and now I just eat out of mixing bowls

#

and I'm still losing too much weight so I'm probably going to have to step it up

sullen marlin
#

is this cause youre working out a lot

torn shuttle
#

yeah

#

gotta be strong enough to lift the bar on spigot ya know

#

still this is absolutely nothing compared to some guys I know

#

I know a guy who eats almost exactly 4x more than I do

#

I don't know how he does it

#

when he gets sick for a day he drops 5kg

#

it's crazy

lilac dagger
#

How much do you weigh?

torn shuttle
#

83-84kg

lilac dagger
#

That's good

#

What's your height?

torn shuttle
#

185cm

lilac dagger
#

Nice muscle mass

#

Compared to me it's really good lol

sullen marlin
#

is magmaguy the perfect specimen

lilac dagger
#

I don't think so

#

But he is in shape

sullen marlin
#

clearly you haven't seen his beard

lilac dagger
#

Is that actually him in the profile Pic?

river oracle
#

not only can he code very well (super talented) He is also beautiful

mortal vortex
#

was going to ask a question, but I guess u guys are too busy drooling over magma

river oracle
#

no no you can ask I guess

sullen marlin
#

sorry, please ask

mortal vortex
#

lol uhm

#

Is there a method to stop items despawning? I'm trying to create a plugin that has "shooting stars", whereby random items just suddenly fall in unloaded chunks, if possible, and keep them persistent there until picked up

sullen marlin
mortal vortex
#

wtf just scrolled up, why are there so many food pics

#

Anyways ty @sullen marlin

worldly ingot
#

Food is an important development

torn shuttle
#

never doubt again

young knoll
#

Would fit in great in Norse Mythology

worldly ingot
#

Damn that's so accurate too

torn shuttle
#

hey not too bad for good old one take jake

worldly ingot
#

I'm playing through AC: Valhala lately and like, KEKW that's spot on

young knoll
#

I think heโ€™ll automatically go to Valhalla when he dies

worldly ingot
#

The Hall of Odin's Champions awaits, drengr

lilac dagger
mortal vortex
ancient plank
torn shuttle
ancient plank
#

no thanks

torn shuttle
#

weird after singing holding out for a hero and making the video that didn't seem to fix my code

young knoll
#

Well

#

It was worth a try

mortal vortex
#

Anyone heere good at algorithms and can help me in refining a location perturbation algorithm, using weight distribution?

#

The idea of this is to calculate an ideal location to spawn a boss, or item drop, based on the distribution of players on a server. It avoids being completely random, predictable*, and doesn't simply average out a location, instead it disregards outliers.

torn shuttle
#

and it's a terrible way of doing it

mortal vortex
#

I am completely open to suggestions criticism, but I'd rather you explain :)

torn shuttle
#

people don't group up in perfect grids, if you have a city with 5 players and then random individual players everywhere else in the map then your bias will be to spam those 5 players with bosses and everyone else in the server will never see them

mortal vortex
#

Yeah and isn't that better than just averaging it to a location that no one can feasibly get to either?

torn shuttle
#

your spawn system should be representative of player distribution, not exclusionary

#

that's just another terrible way of doing it

mortal vortex
#

The goal is to calculate an optimal location for spawning a boss. The problem with just creating an average is, if there is any significant outlier, all the other players will be negatively affected due to having a skewed output. if the dataset was like:

X: 100,130,110,121,134,122,123,123,143,300000

Then an average location would be within the 30Ks, which is impractical to all players.

torn shuttle
#

how about instead of making it impractical to everyone all the time you make it practical to someone every time

mortal vortex
#

I'm all for that, but could you expand on how?

torn shuttle
#

you can just pick a random player, go X distance in a radius around it, check if it's too close to any other player then just spawn the boss there

#

this is how minecraft basically works in the first place

mortal vortex
torn shuttle
#

or you can do even easier and just pick a natural spawn and replace that spawn with a boss, or add a boss to it

#

if the server is spread out then it would only make even more sense to have it spawn like that

#

if people are truly spread out and it averages out a location it might spawn 2k blocks away from anyone

#

can you imagine if minecraft mobs spawned like that?

#

no one would ever see one

#

not to mention that if they're consistently radially spread out from a spawn point it will average out to the center of the map, which is the spawn

#

at least traditionally

#

and traditionally also where the newest players tend to be

#

as in, the least well equipped to deal with a boss

#

speaking of, are there any rules in spigot for a resource to have such bad performance that it gets taken down due to that?

#

there's one that is pretty popular and is absolutely wrecking everyone, I keep getting support tickets from people using it

#

BetterRTP

#

I think it's called

#

yeah

#

it's crazy, it keeps loading chunks, leaks memory, also seems to nearly infinitely generate worlds well beyond world borders

#

I think in the background it is always trying to randomize locations for some reason, even if people are not actively using it

#

and causing chunks to load

mortal vortex
torn shuttle
#

that's for forum staff

ancient plank
sullen marlin
#

If there were rules against being a bad developer we'd have to ban everyone

mortal vortex
sullen marlin
#

/s

mortal vortex
#

is my algorithm neccessarily bad

worldly ingot
torn shuttle
#

no but seriously this plugin has 114573 downloads since may 24th and it actually bricks servers consistently

worldly ingot
remote swallow
#

choco tell ur gf to lock in

worldly ingot
#

She has ADHD. She's currently going on a music video binge for some reason

torn shuttle
#

well guess I'll make an alternative that isn't broken and see if I can steal their SEO or something

remote swallow
torn shuttle
#

I'm so tired of tickets about this plugin

remote swallow
#

still got another monitor to code

mortal vortex
torn shuttle
#

I don't know if it's the top but with this dl count I would guess yes

mortal vortex
#

theres another plugin that has rtp

#

forgot which

#

huskhomes?

torn shuttle
#

I have a fancy rtp plugin and I never even publicly released it

#

let me see if it even stil lworks

worldly ingot
#

plops you right into an ocean

torn shuttle
#

meh where it can land you can be configurable

#

not hard to do

#

I think there was even code in there to avoid worldguard regions

young knoll
#

Essentials has RTP

torn shuttle
#

yeah I thought it might

sullen marlin
worldly ingot
#

Gone are the days where Minecraft always spawned you on a beach :(

young knoll
#

Hey at least it doesnโ€™t put you right into the ocean

#

It is quite dedicated to searching for a safe block

torn shuttle
#

it's not that bad

mortal vortex
young knoll
#

The good news is weโ€™ll be landing immediately!

#

The bad news is, weโ€™re crash landing

torn shuttle
#

short flight, good flight

#

love being ahead of schedule

ancient plank
#

remember guys, measure once cut twice

torn shuttle
#

I prefer eyeball it half a time and wear two circular saws as rollerblades

mortal vortex
#

@torn shuttle did u read my code btw?

#

is it 100% ass

#

or is it useable

torn shuttle
#

it's conceptually bad so I didn't get to that step

mortal vortex
#

๐Ÿ˜ญ jesus christ

#

Its a good algorithm

ancient plank
#

I'd read it but I'm on mobile

torn shuttle
#

don't ask questions you don't want the answer to

mortal vortex
#

Wait but how can you say its bad if u didnt read it?

ancient plank
#

conceptually bad = the concept (idea) is bad

#

impractical

mortal vortex
#

Oh right

mortal vortex
#

if you're unbothered to read the code, I can explain it's process.

#

It begins by calculating the local density for each player's location based on the number of nearby players within a defined fairness radius. Only players with significant density influence are considered, ensuring fairness in the calculation. Then calculates a weighted centroid (average position), where weights are based on the local densities of the filtered player locations. This ensures that denser clusters of players influence the spawn location more. It ensures the spawn location is within a minimum and maximum distance from the server's spawn point by adjusting the location outward or inward as necessary.

torn shuttle
#

did the men in black show up in your room an neuralize your memories of my criticism of this exact system out of your brain

torn shuttle
#

this is probably why I had you blocked to start with

mortal vortex
#

huh?

#

what does that mean?

young knoll
#

If the server is spread out

#

Will players even be close enough for them to be inside the โ€œfairnessโ€ radius

mortal vortex
#

I don't understand what you mean by blocking me, I dont think I have ever even had a conversation with you, so it just seems wholly unnecessary and confusing.

torn shuttle
#

52 changed files, 48 of which modifications, turns out I use attributes quite a lot

#

well it works now

sly topaz
tender shard
#

Is it possible to discover all recipes (for all players) without them seeing a thousand toast messages?

mortal vortex
sullen marlin
#

Can you do it before they join

left jay
#

question: can you access the the value of a set key in a pdc? (the 1 in this case)

pdc.set(immovableKey, PersistentDataType.INTEGER, 1);```
sullen marlin
#

Get?

left jay
#

oh i get it

sharp bough
#

i wonder if it would be possible to use Array of varint on other packets, like entity position, entity metada etc ๐Ÿค”

#

tags?

drowsy helm
mortal vortex
hybrid spoke
#

just kick them directly after

zealous burrow
#

Has anyone figured out how to use custom armor models in 1.21.4
I can't seem to get the new format to work:

{ "layers": { "horse_body": [ { "texture": "minecraft:diamond" } ], "humanoid": [ { "predicate": { "custom_model_data": "test" }, "texture": "minecraft:iron" }, { "texture": "minecraft:diamond" } ], "humanoid_leggings": [ { "texture": "minecraft:diamond" } ] } }

zealous burrow
drowsy helm
ruby pebble
#

I want to manipulate every message sent to the chat with e.setFormat and make it clickable, but although I have tried everything, I cannot make it clickable in any way. I have been researching for 2 weeks and I have seen that papermc's chatrender feature can do this, but it doesn't work for me because it receives raw messages rather than messages manipulated by other plugins

sharp bough
#

Player.spigot().sendMessage..

hybrid spoke
ruby pebble
#

Moreover, the delay that will occur will basically increase

chrome beacon
#

The delay won't create by much

#

but yeah modifying messages on their behalf isn't something that the game likes

hybrid spoke
#

i would look for chatpackets, but it seems like wikivg is down

blazing ocean
#

its been merged into the mc wiki

hybrid spoke
blazing ocean
hybrid spoke
#

?protocol could be more efficient

ruby pebble
young knoll
#

?protocol

blazing ocean
sharp bough
#

the og protocol

young knoll
#

The main page has a link to it

#

What if people want the other pages smh

sharp bough
#

?wiki and ?protocol ๐Ÿค”

undone axleBOT
sharp bough
#

lmao

tawny furnace
#

have you ever worked with item durability? How can I check an item's durability? If an item's durability is 1, the item disappears from the inventory. private void decreaseDurability(ItemStack item, int amount, Player player) {
short durability = item.getDurability();
item.setDurability((short) (durability + amount));
if (durability == 1) {
player.getInventory().remove(item);
}
} this theme does not work

blazing ocean
#

stop crossposting, this is the right channel

tawny furnace
#

ok

young knoll
#

Isnt durability part of meta now

blazing ocean
#

use the damageable interface

tawny furnace
#

int currentDurability = damageable.damage(); ?

pseudo hazel
#

?tryandsee

undone axleBOT
tawny furnace
#

one second

#

private void decreaseDurability(ItemStack item, int amount, Player player) {
if (item.getItemMeta() instanceof Damageable damageable) {
int currentDurability = damageable.damage();
int newDurability = currentDurability + amount;
damageable.damage(newDurability);
item.setItemMeta((ItemMeta) damageable);
if (newDurability <= 0) {
item.setAmount(0);
}
}
}

tawny furnace
pseudo hazel
#

nothing is happening?

young knoll
#

Probably the wrong Damagable

tawny furnace
#

guys

#

maybe this?

#

private void decreaseDurability(ItemStack item, int amount, Player player) {
if (item.getItemMeta() instanceof Damageable damageable) {
short currentDurability = item.getDurability();
int newDurability = currentDurability + amount;
damageable.damage(newDurability);
item.setItemMeta((ItemMeta) damageable);
if (newDurability >= item.getType().getMaxDurability()) {
item.setAmount(0);
}
}
}

tawny furnace
sonic goblet
#

What import do you have for Damageable at the top of the class

tawny furnace
#

@EventHandler
private void onMove(PlayerMoveEvent e) {
final Player p = e.getPlayer();
if (p.getAllowFlight()) {
return;
}
ItemStack i = p.getInventory().getBoots();
effectiveDurability += 0.1;
if (effectiveDurability >= 1) {
decreaseDurability(i, 1, p);
effectiveDurability -= 1;
}

    }
sonic goblet
#

Above that, its either
import org.bukkit.inventory.meta.Damageable; or import org.bukkit.entity.Damageable;

tawny furnace
#

one sec

#

import org.bukkit.entity.Damageable;

sonic goblet
#

You want the other one

tawny furnace
#

wow

#

erros in Intel is end

#

now test

#

private void decreaseDurability(ItemStack item, int amount, Player player) {
if (item.getItemMeta() instanceof Damageable damageable) {
int currentDurability = damageable.getDamage();
int newDurability = currentDurability + amount;
damageable.setDamage(newDurability);
item.setItemMeta((ItemMeta) damageable);
if (newDurability >= item.getType().getMaxDurability()) {
item.setAmount(0);
}
}

tawny furnace
sonic goblet
#

Thank Jishuna, he called it first :p

tawny furnace
#

if its work

#

its so good

#

wow

#

its work

#

thanks guys

#

top g

#

@young knoll also thanks

pseudo hazel
#

thats another win for api class names

strange copper
#

Can I ask questions here about plugin development

pseudo hazel
#

yes

wet breach
#

no, you may not ask questions about plugin development in the plugin development channel ๐Ÿ˜‰

glossy laurel
#

What are the default values used for PotionEffect(PotionEffectType type, int duration, int amplifier, boolean ambient, boolean particles, boolean icon) when calling PotionEffect(PotionEffectType type, int duration, int amplifier)?

pseudo hazel
#

1

#

I guess

#

particles true, icon true, ambient idfk

wet breach
#

amplifier is 0-3 depending on the level of the potion

glossy laurel
#

ambient is probably false

#

๐Ÿค”

pseudo hazel
#

i dont know what ambient even is

glossy laurel
#

ambient is when there are some particles

#

but not all

#

like from beacon

strange copper
#

Even if Iโ€™m still developing for 1.8.9?

pseudo hazel
#

oh

#

yeah then false

glossy laurel
pseudo hazel
wet breach
pseudo hazel
#

but you can still ask the question

glossy laurel
chrome beacon
#

yes

glossy laurel
#

why

strange copper
#

I think my issue is more with just Java and not necessarily with a Minecraft version, since Iโ€™m new to Java in general

undone axleBOT
#

For Beginners:

Codecademy - Learn Java: Interactive Java programming course from basics to more advanced concepts. Perfect for absolute beginners.
https://www.codecademy.com/learn/learn-java
JetBrains Academy - Java Developer Track: Learn by doing with projects and challenges. It covers Java fundamentals to advanced topics.
https://www.jetbrains.com/academy/
Udemy - Java Programming Masterclass for Software Developers: Updated courses that cover Java 8 to Java 17 features. Suitable for those who prefer structured learning.
https://www.udemy.com/course/java-the-complete-java-developer-course/

For Intermediate to Advanced Learners:

Oracle Java Tutorials: The official guides by Oracle for Java programmingโ€”great for understanding the depth of Java.
https://docs.oracle.com/javase/tutorial/
Baeldung - Learn Java and Spring: Focus on Spring Framework and modern Java technologies. Best for intermediate learners aiming to expand their knowledge.
https://www.baeldung.com/

Practice and Hands-on Learning:

Exercism - Java Track: Solve exercises and get feedback from mentors. Great for practicing coding skills.
https://exercism.io/tracks/java
LeetCode: Practice your coding skills and prepare for technical interviews with Java.
https://leetcode.com/

Free Resources and Documentation:

Java Programming and Documentation: A comprehensive collection of Java programming guides, tutorials, and API documentation.
https://docs.oracle.com/en/java/

Community and Support:

Stack Overflow: A vast community of developers. Great for getting help with specific problems or understanding concepts.
https://stackoverflow.com/questions/tagged/java
r/learnjava on Reddit: Join the community of Java learners and get advice, share resources, and discuss projects.
https://www.reddit.com/r/learnjava/

Remember: Learning to program takes practice and patience. Don't hesitate to experiment with code and participate in community discussions. Happy coding! ๐ŸŽ‰

glossy laurel
#

holy flood

pseudo hazel
#

lmao

#

anyways

#

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

sonic goblet
#

just ask

#

^

pseudo hazel
#

then we will be the judge of what to do xD

worldly ingot
#

But yes, ambient is true by default

glossy laurel
ruby pebble
strange copper
#

Okay so Iโ€™m working on an โ€œOverwatchโ€ equivalent for an ultimate that charges passively or when doing damage. I use an itemโ€™s durability to show how far itโ€™s charged. So far pretty much everything works. My only issue is that for some reason when it checks if charge is higher or equal to maxcharge, it always thinks itโ€™s lower than maxcharge, even though when debugging it clearly shows itโ€™s not. And I donโ€™t know if this is because Iโ€™m using the wrong values

dusky rivet
#

why is getHighestBlockYAt returning a block with AIR material?

glossy laurel
strange copper
#

If only I was home right now ๐Ÿ˜…

glossy laurel
ruby pebble
pseudo hazel
chrome beacon
#

Send it as the server

glossy laurel
ruby pebble
#

But there is no such thing and I need to use protocollib. Is there still such a manipulative thing?

strange copper
#

But is it not just as simple as
If
charge < maxCharge
return

pseudo hazel
#

yes

#

it is

sharp bough
pseudo hazel
#

but we dont know how you defined and set the charges

strange copper
#

What values am I supposed to use

#

Float?

ruby pebble
pseudo hazel
#

doesnt matter

#

any number works

strange copper
#

Then it should just work

glossy laurel
#

indeed

#

we'd prolly have to see your code

strange copper
#

I will once Iโ€™m home

glossy laurel
strange copper
#

I used three floats, an ultimateCharge to update the current charge, an ultimateMaxCharge to show what the maximum number is before itโ€™s charged, and an ultimateChargeAdd to specify how much charge gets added every second passively.

glossy laurel
#

?sendcode

dusky rivet
blazing ocean
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.

pseudo hazel
#

what is verifyBlock

glossy laurel
dusky rivet
#

I say this because the highest block is for example at y: 70 and it is returning me at y: 80

strange copper
#

Iโ€™ll be home in 4 hours I guess

glossy laurel
#

How to get potion effect type from string? I think it has something to do with registries but idk where to go from there

chrome beacon
#

and then call get on it

#

Vanilla effects are under the minecraft namespace you can use the static method for it

glossy laurel
dusky rivet
#

PottionEffectType is an enum

glossy laurel
#

so is potiontype

dusky rivet
#

you can add a potion effect to a Player with a method similar to addPotionEffect and for this you need to provide the duration, amplifier and enum

glossy laurel
#

which is constructed from PotionEffectType

chrome beacon
#

PotionType can contain multiple PotionEffects

#

They represent what type of potion it is

chrome beacon
#

If you think of it from the creative inventory

glossy laurel
#

yea yea I read the docs

#

fr

chrome beacon
#

For example I can make my own PotionType that gives the effect slowness

glossy laurel
#

well seems like I need PotionEffectTypes

#

instead

#

so

#

Registry#get(Namespaced key)

#

so how do I get the namespaced key again

chrome beacon
#

instead of type if that's what you want

dusky rivet
chrome beacon
glossy laurel
young knoll
#

You can also just use Registry#match

glossy laurel
#

into the get method

dusky rivet
#

but that's not the problem because I checked that the block on top of the printed block is AIR too

glossy laurel
#

?whereami

pseudo hazel
#

then report an issue, maybe its a bug, but I have never seen issues with getHighestBlockatY

young knoll
glossy laurel
#
registry.get(new NamespacedKey(NamespacedKey.MINECRAFT, input));```
#

does this look good

chrome beacon
#

NamespacedKey.minecraft(input)

glossy laurel
#

oh

chrome beacon
#

if you're going to hardcode the namespace

glossy laurel
#

registry.get(NamespacedKey.minecraft(input));?

young knoll
#

Registry.EFFECT#match(input)

glossy laurel
#

what's the difference

#

that getRegistry accepts a variable?

young knoll
#

There are static constants for all the registries

chrome beacon