#help-development

1 messages ยท Page 843 of 1

quiet ice
#

Then we shall know

#

Right now it is only registered, but it could be that you are missing the @EventHandler annotation

storm raven
quiet ice
#

(Does anyone know whether you can use local or anonymous classes for event listeners?)

quiet ice
#

Good.

storm raven
#

otherwise I can send you a link "code with me"

#

in mp

quiet ice
#

that looks right

#

the only thing that could cause issues if EssX does not actually export it's economy, which would be odd but I do not know it too well. Try it with another provider for the time being

tender shard
#

?paste your whole main class

undone axleBOT
storm raven
tender shard
quiet ice
#

ah yeah. I did go off the assumption that they do not know where it should be printing that message

tender shard
#

does it print NOTHING, or does it at least print that it's a creeper?

storm raven
#

wait, I not have a last version of essentialsX, can it play?

storm raven
#

it print nothing

quiet ice
#

and just FYI by "printing" we mean in the console, not in chat

tender shard
#

send your whole latest.log then pls

storm raven
tender shard
#

essentials fails to enable properly

storm raven
#

I try with the last version of essentials

tender shard
#

also you have your plugin twice in your plugins folder

#

you're using an older version of your plugin

#

that's why it doesnt print anything

storm raven
#

no

tender shard
#

[22:01:54] [Server thread/ERROR]: Ambiguous plugin name EthernaPl' for files plugins\EthernaPl.jar' and plugins\EthernaPl-1.0.jar' in plugins'
yes

lost matrix
storm raven
#

........

#

I'm dupe

#

I retry :(

#

my bad

lapis schooner
#

So I added a structure using a datapack and make a new world with spigot. I am trying to prevent the structures from generating in overworld and I'm pretty sure it can only be done w/ plugin. Canceling AsyncStructureSpawnEvent does nothing(prob cuz it's async). Any idea how else could it be done?

storm raven
#

ahhhhhhahhahah

#

it's nice !

#

thanks you !

tender shard
#

np

storm raven
#

you solved 2 of my problems, thank you very much without you I would have alt F4 for a long time

lapis schooner
tender shard
#

does the structure event even get called for that custom structure?

lapis schooner
storm raven
#

I have warn when I kill my creeper, it's normal ?

tender shard
#

add Vault as softdepend or depend in plugin.yml

tender shard
tender shard
storm raven
tender shard
orchid trout
#

es

storm raven
#

here ?

tender shard
#

yes

#

use depend if your plugin requires vault, or softdepend if it also works without vault

storm raven
#

okay

#

thanks

lapis schooner
tender shard
lapis schooner
#
@EventHandler
    public void onStructureSpawn(AsyncStructureSpawnEvent event)
    {
        if(event.getWorld().getName().equals(Main.DIM_NAME)) 
        {
            System.out.println("a " + event.getStructure().getKey() + " " + event.getStructure().getKey().getNamespace());
            if(!event.getStructure().getKey().getNamespace().equals(Main.DIM_NAME))
            {
                System.out.println("b");
                event.setCancelled(true);
            }
        }
        else
        {
            System.out.println("c " + event.getStructure().getKey() + " " + event.getStructure().getKey().getNamespace());
            if(event.getStructure().getKey().getNamespace().equals(Main.DIM_NAME))
            {
                System.out.println("d");
                event.setCancelled(true);
            }
        }
        event.setCancelled(true);
    }
#

The last line was added out of desperation to check if setting it to cancel even works(it deosn't)

#

System.out was me verifying that events fire and i didn't mess up if statements

#

I think it doesn't work cuz It's async

#

Or it's a purpur bug

#

Cuz I run it on purpur

tender shard
#

well try it on spigot first

lapis schooner
#

Good idea, not sure why I haven't thought of that

lapis schooner
tender shard
#

hm weird, ill look into the spigot code and see if i find anything

quaint mantle
#

Are the namespaces even the same

fickle mantle
#

Hey, does anybody here have a Code for a unique Scoreboard for each player?

lapis schooner
young knoll
#

Just make a separate scoreboard per player

#

With Bukkit.getScoreboardManager.createNewScoreboard

lapis schooner
fickle mantle
fair crest
#

hey guys. how do i detect a player item and get the name of it

young knoll
#

Ah right there is the generate and spawn event for structures

#

Try the generate one

fickle mantle
#

First Player joins: everythings works fine, gets the scoreboard
Second Player joins: 2nd player gets the scoreboard, player 1 will no longer have his scoreboard

#

and my scoreboard turns upside down if you know what i mean

#

the scores switch

#

could anybody here look over my code and help me?

young knoll
#

Send the code

fickle mantle
fickle mantle
#

In the join event i do: new LobbyScoreboard(player);

umbral ridge
#

so, if you were to do /reload, it could break some stuff

fickle mantle
#

but I create them on every join?

fickle mantle
lapis schooner
young knoll
#

Did you try the other event

umbral ridge
# fickle mantle and have you got any idea why only 1 Player can have see the scoreboard?

I don't know right now, sorry. I'm even a noob myself with scoreboards but I always use the main scoreboard and then set up teams. put players with the same group in same teams, so you get a prefix/suffix per team thing. If it's a sidebar I think that should be per 1 player. So what I would do, create a team for each player. That way you can ensure other players in the team wont conflict with other players since each player will have different values, the sidebar text

#

Coll1234567 knows more than me im sure

#

XD

fickle mantle
#

I send you a dm

young knoll
#

With?

umbral ridge
young knoll
#

Ah hmm the other one isnโ€™t cancellable

#

Looks like itโ€™s just for adding transformers

#

Yeah if cancelling that one doesnโ€™t work itโ€™s likely a bug

tender shard
#

it's also weird that ChunkGenerator#tryGenerateStructure returns true if the event is cancelled - shouldnt it return false?

fickle mantle
#

@young knoll Could you please answer my dms? I have no idea why my code doesn't work

umbral ridge
#

yea but i have no idea schnitzel

#

should return false since its in isValid block

#

i dont know

orchid gazelle
#

hello guys, does anybody know what the safest way is to teleport a player back to like in front of the end portal frame after they try to enter it and I deny it?

young knoll
#

I assume the event worked at some point?

#

If you can find the issue Iโ€™m sure a pr could be made :p

orchid gazelle
#

nvm found a solution

tender shard
orchid gazelle
#

im just tping 3 blocks in x direction lmao

lapis schooner
lapis schooner
lapis schooner
tender shard
sullen marlin
lapis schooner
sullen marlin
#

I don't think that's what it says

tender shard
#

i tested on 1.20.4 built 20 minutes ago btw

lapis schooner
#

This server is running CraftBukkit version 3950-Spigot-2888990-d485cde

umbral ridge
#

what is this version number

tender shard
#

maybe try this. it'd create a new world called jefflib-test-world (you can tp into it with /jefflibtest) and it should print to console all structures it prevented to spawn

tender shard
umbral ridge
#

it only generated numbers here lol

#

lucky

sullen marlin
#

888

#

Wow very lucky in china

umbral ridge
#

china numbah #1

tender shard
#

Is that javascript

umbral ridge
#

typescript better

#

XD

#

Cmarco is from china

lapis schooner
#

Migrating NMS unmapped code from v1_20_R2 to v1_20_R3 is gonna finally force me to use maven

tender shard
#

be sure to use mojang maps this time lol

lapis schooner
dry hazel
#

there's literally no reason not to use mojang remapping

tender shard
lapis schooner
lapis schooner
lapis schooner
late sonnet
tender shard
#

but if you have to change all methods anyway, why not switch to mojang maps, then you never have to change them again

lapis schooner
dry hazel
#

you're doing something wrong if 70% of your project is NMS

umbral ridge
#

I use 0% nms

quiet ice
#

I managed to rid all my NMS use a long time ago (just when mojmap came to be a thing). Good decision

sullen marlin
#

slay

tender shard
#

if only there'd be an api way to make items glow ๐Ÿฅฒ

lapis schooner
quiet ice
#

I don't ever dare touch that part of EnchantmentsPlus

tender shard
#

i got all my NMS stuff in jefflib so I only have to update one library instead of 20 plugins

quiet ice
#

It used to work, somewhat - I think. So I ought not break it as I don't understand it.
But well I think I already did. Doesn't matter too much anyways though.

river oracle
#

then you're probably fine

late sonnet
river oracle
#

all of my NMS revolves around components and Inventories basically

#

PR pending on that one

late sonnet
#

Components? Then you mean the Choco PR xd

river oracle
#

Choco ofc got components

late sonnet
lapis schooner
river oracle
#

if Components gets merged before inventories which it likely will

#

i will add components to the stuff that gets nuked by my PR :P

tender shard
#

de_nuke

late sonnet
#

Can be a great race what is the prox PR in being merged... But i think a better race its what PR need first a rebase

river oracle
#

rebasing is painful with patches

#

I pray every day that there are no patch conflicts

late sonnet
#

Well rebase a PR in CB/Bukkit its not than bad rather rebase a Spigot PR

river oracle
#

I will never PR spigot it seems painful

late sonnet
river oracle
#

their are things I need from it to make a plugin

#

that aren't possible even with NMS

tender shard
#

wtf is this

late sonnet
#

Yeah, currently exists many things where the damage info can help rather than the current

late sonnet
tender shard
#

what's the purpose of that enum

river oracle
#

which you can't get currently

#

but with your PR all is possible

#

I look forward to it ๐Ÿ‘

late sonnet
tender shard
late sonnet
river oracle
#

ahaha I get that

#

looks like some weird Enum Singleton thing

tender shard
river oracle
#

private static final Optional<Object> STOP_ITERATION = Optional.of(Unit.INSTANCE); lol what

late sonnet
#

Strange

tender shard
#

looks like it's supposed to be used similar to Void

river oracle
tender shard
#

yeah that's the question

river oracle
#

look like its been around since atleast java 8 too

late sonnet
#

NMS has very cursed or strange things like entities where use new memory things but still exists legacy stuff in others

river oracle
#

my guess is they very slowly change stuff over since they have no real incentive to change everything over cuz it works ig

#

I forgot there was Fluids in NMS

#

xD

tender shard
#

bukkit also got fluids

river oracle
#

really?

#

I didn't think we had fluid api

tender shard
river oracle
#

enum ๐Ÿ’€

white root
#

I feel kinda dumb

Recently I had to reinstall windows onto a new ssd, and as such ive had to reinstall intellij and setup my development environment again
All of my projects are on github, so I didnt lose anything, but the javadocs that normally appear when you hover over a class are just not appearing?

Normally, I feel like there would be text thats like "This event would be sent when a player moves or something blablabla", but instead it just shows me what the class extends and implements: https://senpai.plz-choke.me/๐Ÿซ๐Ÿ”๐Ÿพ๐Ÿ“๐Ÿ’Ÿ

Is there some setting somewhere that im just missing?

tender shard
#

have you tried "download docs"?

#

press shift twice to open that menu

river oracle
#

I forgot I was making this xD

late sonnet
#

Kotlin....
With show source you can also get the button for get docs too i think

tender shard
#

show horse

river oracle
#

is their anyway to get a recipe by the output item?

#

or nah

tender shard
#

If there isnt, loop over recipe iterator

river oracle
#
    public Optional<RecipeHolder<?>> byKey(ResourceLocation recipeId) {
        return Optional.ofNullable(this.byName.get(recipeId));
    }``` :P might beable to hack together something with this given recipes are appropriately named
white root
tender shard
tender shard
river oracle
#

this is just some fun thing I'm making :P

#

its pure NMS

#

this is technically raw server code I was gonna see if bukkit did anything I could look at

tender shard
#

run buildtools with --generate-javadoc (or however that's called) and then mvn install:install-file -DartifactId=spigot-api -DgroupId=org.spigotmc -Dversion=1.20.4-R0.1-SNAPSHOT -Dclassifier=javadoc -Dfile=<path-to-buildtools-javadoc-jar> -Dpackaging=jar

sullen marlin
#

I feel like generate-javadoc should install it also?

tender shard
#

last time I checked, it didnt

kind hatch
#

Yea, it doesn't do that currently. Choco confirmed that functionality for us.

tender shard
#
#!/usr/bin/env bash
BUILDTOOLS_DIR=/Users/mfnalex/buildtools
VERSION=1.20.4

set -e
cd $BUILDTOOLS_DIR
java -jar BuildTools.jar --rev ${VERSION} --remapped --generate-docs
mvn install:install-file \
  -DartifactId=spigot-api \
  -DgroupId=org.spigotmc \
  -Dversion=${VERSION}-R0.1-SNAPSHOT \
  -Dclassifier=javadoc \
  -Dfile=./Spigot/Spigot-API/target/spigot-api-${VERSION}-R0.1-SNAPSHOT-javadoc.jar \
  -Dpackaging=jar

this should do, just adjust the bt path

rough harness
#

I am just going to give up i add the custom_model_daya and it just gives me a map with out the texture in the gui

tender shard
river oracle
#

didn't you say before you weren't a dev

#

I probably wouldn't try to do things you don't understand

#

especially as something as complex as development

#

it takes quite a while to learn

rough harness
rough harness
#

but with this code the texture works

#

wait i fixed it

#

ok so i add the 36515 to this

glad prawn
quaint mantle
proud badge
#

what if I did thread.sleep on the main thread

tall dragon
#

then ur server would freeze

#

untill it crashes

waxen delta
#

Hey, so I have this problem, where the inventoryCloseEvent is being fired 2 times.

I have a "combat" plugin, so when the player leaves in combat it kills them. But when they have a menu open, and are in combat, the menu they had open, is being closed 2 times if they leave.

I have no idea why this is happening, and don't know how to fix it.

    @EventHandler
    public void onInventoryClose(InventoryCloseEvent event) {
        Bukkit.broadcastMessage("Inventory closed"); //sends 2 times
        Bukkit.broadcastMessage(event.getInventory().getName()); //sends 2 times
    }
rough harness
cursive kite
#

I am giving Bedrock health so after 5 TNT hits it will break, what is the best way to save this and run it

inner mulch
#

fnalex's customblockdata would be useful

#

with this you can save data to blocks

young knoll
#

Persistent data

cursive kite
#

I was just going to save to a hashmap Location::Int (hits) and save / write to config but didnt know how that would last over time as more blocks in the wilderness take 1 tnt hit to never be touched again

inner mulch
#

customblockdata is the way then

#

it is being saved in the chunks data

#

no database

#

no files

cursive kite
#

The issue is for this project it is in 1.8, will that still work?

inner mulch
#

that could be an issue, im not sure how stuff like this works in 1.8

#

you could try

lavish flower
#

CustomBlockData is compatible with all Bukkit versions from 1.16.3 onwards, including all forks. Older versions are not supported because Chunk only implements PersistentDataHolder since 1.16.3.

cursive kite
#

rip

young knoll
#

Pdc didnโ€™t exist back then

inner mulch
#

i guess you either write your own customblockdata (if you can even save data in a chunk in 1.8) or use some kind of database

cursive kite
#

So I just its just gonna be a hashmap

inner mulch
#

i guess

#

but you gotta save the hashmap ondisable

cursive kite
#

any way i should optimize it

young knoll
#

You could pack the xyz into a single long I guess

cursive kite
#

Eh

#

I kinda wanna map them by chunk so its easy to check blockhealth per chunk

#

would <Chunk,<Location,Health>> be good

river oracle
#

ints are 32 bits and can go negative

#

you make the worrying assumption you'll never utilize more than 21 of those bits per integer

cursive kite
#

Actually don't Chunk objects delete after they unload and create a new object when loaded

#

Dang it

river oracle
#

just do Map<ChunkCoord,Map<Coord,Health>>

#

on chunk unload dispose of the maps properly

cursive kite
#

For the block Coord would it be bad to use Location in that case?

river oracle
#

I wouldn't

#

location is tied to the world

cursive kite
#

Omg I forgot worlds too

river oracle
#

and a myriad of other things that it probablly shouldn't be

cursive kite
#

What about blocks in other worlds

#

dang it

river oracle
#

what are you trying to do?

cursive kite
#

Maybe a custom object for the data at this point

#

Bedrock breaks after X hits

river oracle
#

ahhh use PDC ๐Ÿ˜‰

cursive kite
#

Unfortunately this project is 1.8 ๐Ÿ˜ฆ

river oracle
#

mfnalex's block pdc library would be helpful here

#

use NBT then

cursive kite
#

It works for Blocks?

river oracle
#

no only Chunks have PDC

young knoll
river oracle
#

you make a strong assumption

#

that a coordinate will not exceed the 21 bit integer limit

cursive kite
#

Might just end up with; HashMap<World, HashMap<Chunk, HashMap<Location, Integer>>> blockHealth;

river oracle
#

its definitely applicable here

young knoll
#

26

river oracle
#

Chunks have PDC

#

utalize it

young knoll
#

26 bits is enough for +- 30 million

river oracle
young knoll
#

And 12 bits is enough for +-2048

river oracle
#

you make an assumption no one will ever exceed those coordinates

young knoll
#

Good luck

#

The world is hard limited to +-30 mil

echo basalt
#

mm I do love my world hard references

cursive kite
#

Dang it forgot that too

echo basalt
#

it's only prone to hardcore memory leaks

river oracle
#

hardocre references for hardcore memory leaks

echo basalt
#

chunk too

#

location is prone below 1.14

river oracle
#

they're on 1.8

#

so

young knoll
#

1.8 tax

river oracle
#

I would just reccomend they use NBT-API

#

and edit Chunk PDC

echo basalt
#

I wonder if I can make a PDC compatibility layer with 1.8

#

by doing fucked up bytebuddy stuff

young knoll
#

You could

#

But

#

Why would you

echo basalt
#

well

#

gotta beat auxilor when it comes to hacky stuff

young knoll
#

?1.8

undone axleBOT
echo basalt
#

you seriously think I'm gonna let that opportunity pass

#

imma be considered a hackerman

young knoll
#

I did asm on pistons to increase the push limit and make tile entities moveable

#

Does that count

echo basalt
#

I've extended every nms entity and made them all collidable with client-sided blocks

#

solid 700 lines for each one of them

young knoll
#

Now if only we could make easy the invisible collision for players

#

Sadge

cursive kite
#
    public class ChunkCoord {

        private int x, z;

        public ChunkCoord(int x, int z) {
            this.x = x;
            this.z = z;
        }
    }

    private final Map<String, Map<ChunkCoord, Map<Location, Integer>>> blockHealth;

    public BlockHealthManager() {
        blockHealth = new HashMap<>();
    }

    public void setBlockHealth(World world, Chunk chunk, Location location, int health) {
        blockHealth
            .computeIfAbsent(world.getName(), w -> new HashMap<>())
            .computeIfAbsent(new ChunkCoord(chunk.getX(), chunk.getZ()), c -> new HashMap<>())
            .put(location, health);
    }

    public int getBlockHealth(World world, Chunk chunk, Location location) {
        return blockHealth
            .getOrDefault(world.getName(), new HashMap<>())
            .getOrDefault(new ChunkCoord(chunk.getX(), chunk.getZ()), new HashMap<>())
            .getOrDefault(location, 0);
    }
}```
#

For night I might have to settle for something like this

#

ofc with better chunkcoord handling

echo basalt
#

location is still leak prone

cursive kite
#

omg

echo basalt
#

But for the record

#

Map<Map<Whatver> deserves its own class

#

So

young knoll
#

You can pack the location of a block within a chunk into like

#

16 bits :p

#

Well in 1.8 anyway

echo basalt
#
public class BlockHealthManager {

  private final Map<String, BlockHealthContainer> worldContainers = new ConcurrentHashMap<>();

} 
public class BlockHealthContainer {

  private final Map<ChunkCoord, ChunkHealthData> data = new ConcurrentHashMap<>();

}
public class ChunkHealthData {

  private final Map<Integer, Integer> health = new ConcurrentHashMap<>(); // The key could be a short if you had chunk sections

} 
#

You can do some clever BS to store chunk health data in like 8 longs or sumn stupid if you use your brain

#

clearly I don't have one

young knoll
#

Someone likes concurrent maps

echo basalt
#

yuh

#

it's what I use by default

young knoll
#

But but

#

Muh overhead

echo basalt
#

micro optimization looking ass

young knoll
#

Hey

#

I could have used those cpu cycles for something important

echo basalt
#

the same way you could've spend this time coding instead of arguing

cursive kite
#

I did this

echo basalt
#

reminds me of this

#

and I had a hard ref to location fml

cursive kite
#

So mine is bad?

echo basalt
#

nah it's similar

cursive kite
#

I guess the hard part will be writing this mess to config

#

And reading it

echo basalt
#

easier than you think

cursive kite
#

Should I do a for loop and just loop inside out and map it into sections

echo basalt
#

first design your config structure

#

then build code around it

young knoll
#

I vote for janky reflection mapping

echo basalt
#

no we're not making a shitty orm

young knoll
#

Itโ€™s not shitty

#

mostly

#

Anyway it should be fairly simple

#

One world has multiple chunks, one chunk has multiple blocks

opaque scarab
#

Anyone know how to control the colors of a biome? From my understanding, the only effective way was to send a packet when the player joins that specifies the biome colors for each chunk. Is it the ClientboundLoginPacket?

young knoll
#

You can do it whenever a chunk is sent

kind hatch
#

I'm trying to reassign an interface when I use my reload command. This is so that I can swap databases on the fly. Here is the method I'm using to do so.
https://paste.md-5.net/irizexefup.cs

For some reason, the interface does not seem to update correctly as my data isn't being updated. I think the reference isn't being updated correctly, but I'm using the standard getter/setter methods. Am I missing something here?

opaque scarab
young knoll
#

Itโ€™s in the chunk data packet

opaque scarab
# young knoll Itโ€™s in the chunk data packet

Alright, if itโ€™s a chunk data packet (ClientboundLevelChunkWithLightPacket), how might I go about editing parameters such as tree color, grass color, etc? Sorry Iโ€™ve been trying to find some info on the web, but havenโ€™t found much

echo basalt
#

Only other alternative is make a ProxyPlayerDataManager that just proxies to whatever is set right now

#

Still an icky approach

#

On a side note I'd change to a more modular system as that DatabaseType enum can be pretty restrictive

#

And use a Map<DatabaseType, Supplier<PlayerDataManager>> providers instead of that huge switch

#

But that's more of a personal opinion

kind hatch
echo basalt
#

Show me a method that uses the playerDataManager

kind hatch
echo basalt
#

alright you call the getter on your method call

#

Anywhere else where you store the manager as a field?

kind hatch
#

A couple places

echo basalt
#

Yeah if you store it as a field that's where your problem comes

carmine mica
kind hatch
#

So I should always be using the getter instead of making a field for convinence?

young knoll
kind hatch
#

Cause if so, I'll update and let you know if I still have the same issue.

young knoll
#

Biome data is part of the ClientboundLevelChunkWithLight packet

carmine mica
#

yeah, what biomes, not the definitions

young knoll
#

Yeah

#

If you want to define them you can do it with the sync packets

#

Or just registry inject them

carmine mica
#

which is what they were asking. changing colors

rare rover
#

oof

young knoll
#

They mentioned the specified colors for each chunk

#

So I figured they had custom biomes they wanted to use

rare rover
#

hey custom biomes!

#

my favorite

young knoll
#

If you want to change the vanilla ones you can probably do that? Idk if the client respects changes to those

rare rover
#

ew dont change vanilla ones

#

make your own

#

one sec

#

that creates a new biome with a custom resource key

young knoll
#

Gotta love unfreezing registries

rare rover
#

yeah ๐Ÿ˜ฆ

#

but i freeze it again

#

so

#

i had to do something to register biomes at runtime

slender elbow
#

plugin developers will do everything unholy to avoid using data packs when the time is right ๐Ÿ’€

opaque scarab
# rare rover make your own

My goal here is to add seasons. I made a plugin adding custom crops, and Iโ€™d like to create another plugin to add on to it. Would it be possible to change the colors on existing biomes by replacing their registry?

rare rover
young knoll
#

Well, you can but not well

rare rover
#

making custom biomes ain't even a hard task just gotta do some research

slender elbow
rare rover
#

and i dislike datapacks

#

i like plugins better

slender elbow
#

you're missing out

young knoll
#

But then users have to install my plugin and datapack!

#

And users areโ€ฆ :)

opaque scarab
slender elbow
#

and that's why you don't make public things, kachow

kind hatch
young knoll
#

Paper becomes private fork when

slender elbow
echo basalt
#

It's kinda weird

#

But basically when you assign a field you're saying "that field points to XYZ's current memory address" instead of "that field points to whatever XYZ points to"

young knoll
#

Itโ€™s not my fault Mojang doesnโ€™t let us have fun

rare rover
#

lol

young knoll
#

I mean I guess itโ€™s more spigot lacking proper api

#

But writing such api is basically impossible ๐Ÿ™ƒ

echo basalt
#

A stupid solution to this is to just make them both point to a constant "proxy object" which points to the real mutable object

slender elbow
young knoll
#

I mean maybe if we yeet runtime plugin loading and unloading

#

And then redo the loading systemโ€ฆ

#

And then cry a bit

opaque scarab
young knoll
#

Thatโ€™s unmapped

#

Mapped is just Biome iirc

#

?mappings

undone axleBOT
rare rover
#

in mojang mappings

#

Question for y'all. What's the best way of storing locations inside an sqlite database?

opaque scarab
rare rover
#

Json string?

#

or what

young knoll
#

I would just store them as an x y and z column

#

And a varchar world name I guess

#

Or uuid

rare rover
#

well i need to store locations per uuid ofc

young knoll
#

Multiple rows

rare rover
#

damn really?

#

that's better than a single string?

carmine mica
#

don't try to make data structures inside your database. that is generally a sign you are using one incorrectly

#

you want to store a location with a UUID? have a db with columns for UUID and x, y, z, world uuid.

#

just keep inserting new rows and use queries effectively to get all the locations for one uuid

rare rover
#

ah okay

wet breach
#

you could just store an int of xyz together

#

so you are not wasting space on 3 columns

astral scroll
#

is there a way i import nms from 1.8 to 1.20?

#

without hardcoding it on pom.xml

rare rover
#

you'd have to do something like this

astral scroll
#

im really new to nms

#

im creating a fork from a ctw

#

and well:

rare rover
#

oh my

#

i'd split them into modules

astral scroll
#

i really only need 1.20 and up

rare rover
#

i'd still use modules

#

that's only 3 versions though

#

but still

astral scroll
#

can u teach me?

#

never touched nms in my life

rare rover
#

i'm not that familar with maven anymore

#

i use paperweight in gradle so

#

i'd wait for someone else

astral scroll
#

yeah

#

i'll just check on it tomorrow

quaint mantle
#

Guys what is Collections class called

#

Like the design pattern

#

In Effective java it was mentioned in the static factory method (not related to the factory design pattern)

river oracle
rare rover
#

is there a way to copy the resource config.yml to the ConfigurationFile

#

Bukkit has a goofy ah config system

#

never used it before

river oracle
# river oracle Probably just a static factory

It doesn't really matter what it's called though if you wanna use it go for it. Only case in which I think it's important to know the name of your design is when you're both trying to convey your idea and plan out before you actually create a project.

rare rover
#

huh?

quaint mantle
river oracle
river oracle
rare rover
#

ah

river oracle
#

sorry I'm not Up with what the kids bbe speaking like now adays

quaint mantle
#

Aren't u like 19

river oracle
#

18*

#

lol

#

but also I don't use social media I'm fairly secluded from the online sphere outside of here

rare rover
#

well i have the config.yml resource and i'm wanting to copy whatever that file contains in the FileConfiguration

river oracle
rare rover
#

ye

river oracle
#

one second

#

I have had this abstracted for 3 years xD

echo basalt
#

saveResource

quaint mantle
#

Do you guys think if I applied all of Effective java's contents into a library it would be a good api

echo basalt
#

Maybe

river oracle
#

might be dif for configs

echo basalt
#

it isn't

echo basalt
quaint mantle
#

when do I make my class final

echo basalt
river oracle
#

While yes applying the concepts yoh learned will probably result in better design

#

Go with the flow where applicable stress about the details later

river oracle
#

This can be useful on util classes

echo basalt
#

i.e utility classes

#

ye

river oracle
#

Otherwise not expressly useful unless for some reason you need to stop extension

quaint mantle
#

well the static factory pattern basically makes your class not very extendable

river oracle
#

Static factories are basically glorified utility classes

slender elbow
#

i mean yeah you aren't going to make a Util interface and DI some mockable implementation lol

quaint mantle
#

no like

#

not the design pattern

#

bruh how do I even call this thing

echo basalt
#

example

quaint mantle
#

like String.valueOf

echo basalt
#

Ah

#

They still allow for inheritance

#

The idea of them is to allow for developers to change the impl based on parameters in the future without breaking stuff

quaint mantle
#

?

#

wdym

echo basalt
#

It's extendable

quaint mantle
#

Usually the constructor is private tho right

echo basalt
#

Can be package private

#

or protected

#

I'd make it protected in those cases

opaque scarab
#

https://www.spigotmc.org/threads/how-to-create-custom-biomes.512105/#post-4195590

Ah, here I am asking more questions. I was looking at this tutorial listed above, and I was able to translate the mappings to the Mojang remappings so far, but I canโ€™t figure out the equivalent of IRegistry.aO. Iโ€™ve found itโ€™s remapped to net.minecraft.core.Registry but I canโ€™t find an equivalent of Registry.aO Any ideas? This is the full line of code:

ResourceKey<BiomeBase> newKey = ResourceKey.a(IRegistry.aO, new MinecraftKey("test", "fancybiome"))

quaint mantle
#

What about something like

ConfigDao
FileJsonConfigDao impl ConfigDao

Should I make the FileJsonConfigDao final

undone axleBOT
echo basalt
#

find aO in the old version and find its equivalent in the new version

river oracle
#

I gotta go but my personal advice here max. Would be to write code and revise it don't overly worry about code architecture.

opaque scarab
echo basalt
#

what's the version that has aO

#

1.16?

sullen marlin
#

its clearly gonna be Registry.BIOME or something

echo basalt
#

prob yeah

river oracle
echo basalt
#

why does it map to RECIPE_SERIALIZER in 1.16.1

river oracle
#

Making mistakes is great

echo basalt
#

I'm prob in the wrong version

opaque scarab
river oracle
#

Prob Registries.BIOME in remapped or something

echo basalt
#

this is what it maps to in 1.16.5

#

just find the IRegistry of the type BiomeBase and move on

river oracle
#

Click the history button and ctrl f it

quaint mantle
#

what if I gotta do some huge refactor

echo basalt
#

at least you learned what went wrong

river oracle
#

That's where you learn

echo basalt
#

I've done dozens of massive refactors over the years

river oracle
#

I just started programming theory this year lol

echo basalt
#

sometimes rewriting a project like 5 times

river oracle
#

All I've done is code

echo basalt
#

p much

#

I've been coding for a while

#

over the years I've started knowing more and more at a "formal" level

#

knowing what things are named as

quaint mantle
#

I'm taking notes on Effective java so I can reference back to them

opaque scarab
river oracle
echo basalt
#

learning all the technical terms

echo basalt
#

You find what it meant in the old version

#

you find its equivalent in the new version

echo basalt
#

tbh it was ab ad course

river oracle
quaint mantle
#

I got some of these notes

river oracle
#

Well our course work only just taught us to code and I just took data structures

quaint mantle
#

Exceptions are designed for exceptional circumstances.
JVMโ€™s code optimizations are more limited for code inside try-catch blocks.
Never use exceptions to control ordinary code flow.
Never force other developers to use exceptions to control ordinary code flow.
If a โ€œstate-dependentโ€ method is unpredictable, a โ€œstate-testingโ€ method should be available to inform if it is appropriate to invoke the โ€œstate-dependentโ€ method. For example: boolean Iterator#hasNext()
Alternative (to 5): Have the โ€œstate-dependentโ€ method return a distinguishable value such as an empty Optional or null.
Condition (to 5): If a โ€œstate-testingโ€ method essentially does the same work as a โ€œstate-dependentโ€ method, a distinguishable value should be returned due to performance concerns.

echo basalt
#

you're doing better than most by reading effective java

#

it's a book I read sometimes

#

I'm only ~30% in

quaint mantle
#

bro why was item 1 so long ๐Ÿ’€

#

He started providing so many advantages

#

of why the static factory was good

river oracle
echo basalt
#

I used to read programming books for fun when I was a kid

quaint mantle
#

Effective java is kinda nice I can't lie

echo basalt
#

I'd just go into the school library and read for like 3 hours

#

from start to finish

quaint mantle
#

isn't Joshua bloch like

#

30+ years of programming experience?

river oracle
quaint mantle
#

I can't lie tho these books are kinda boring

river oracle
#

Anyways I've overstayed Max just code and fuck up

#

Don't get down about it

echo basalt
#

Someone should make a TL;DR super well produced video of it

river oracle
#

Fucking up is part of the process

echo basalt
#

it probably exists already

quaint mantle
#

I'm just taking notes on every item and chapters

echo basalt
#

bro turned a 5 minute read into a 50 minute video

quaint mantle
#

I'm also a slow reader

#

So that sucks

opaque scarab
quaint mantle
#

In the first item

#

It talked about some really weird service provider pattern I've never heard of

#

With like 4 layers

opaque scarab
echo basalt
#

ah

#

Registries

sullen marlin
#

probably BuiltinRegistries in 1.20

opaque scarab
#

ResourceKey#create() does seem to take a minecraft.core.Registry though

echo basalt
#

yeah

#

Registries

opaque scarab
#

Especially this late

echo basalt
#

Registries.WHATEVER

#

iirc

opaque scarab
#

Thanks @echo basalt @sullen marlin

echo basalt
#

There we go

quaint mantle
#

What is so special about nms? What can you do with it

echo basalt
#

NMS is basically working with the server's internals rather than the entire bukkit abstraction layer

#

So anything that is achievable within minecraft, but not with bukkit

#

Proper client-sided blocks and entities, custom entities, custom biomes

#

Tile entities and all

bleak stream
#

I really want to figure out how to use it, but it seems like itโ€™s highly frowned upon

#

And Iโ€™ve never been able to get access to the non-obfuscated version

#

It has never worked for me

slate tinsel
#

Could it be that if I retrieve the location of my projectile in the Hit Event, it is not correct as the projectile has gone too fast?

#

So the location I get is two to three blocks too far back compared to where the arrow ended up

quaint mantle
proud badge
#

does this look right? I dont use configs in my plugins often

tender shard
proud badge
#

epic

#

btw what happens if I for example do getBoolean but it isnt a boolean?

#

Does it throw a stacktrace?

proud badge
#

also should I not inicialise it or should I just set it to null?

tender shard
#

If the boolean does not exist but a default value has been specified, this will return the default value. If the boolean does not exist and no default value was specified, this will return false.

proud badge
#

ok I see

tender shard
#

same for all the other methods, like getInt will be 0, etc

proud badge
#

ok I see

tender shard
proud badge
#

ok

proud badge
#

is it possible to save a java Date object in a MySQL table?

hazy parrot
#

just save millis ?

molten hearth
#

they're always yapping

onyx fjord
molten hearth
#

i personally only store utc timestamps

#

numbers look better what can I say ๐Ÿ˜ฉ

lean pumice
#
[12:48:23 ERROR]: Error occurred while enabling Core v1.0 (Is it up to date?)
java.lang.NullPointerException: Cannot read the array length because "<local2>" is null
        at dev.vedcodee.it.BetterHologram.onEnable(BetterHologram.java:35) ~[?:?]
        at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:321) ~[spigot.jar:git-Spigot-21fe707-741a1bd]
        at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:340) [spigot.jar:git-Spigot-21fe707-741a1bd]
        at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:405) [spigot.jar:git-Spigot-21fe707-741a1bd]
        at org.bukkit.craftbukkit.v1_8_R3.CraftServer.loadPlugin(CraftServer.java:357) [spigot.jar:git-Spigot-21fe707-741a1bd]
        at org.bukkit.craftbukkit.v1_8_R3.CraftServer.enablePlugins(CraftServer.java:317) [spigot.jar:git-Spigot-21fe707-741a1bd]
        at net.minecraft.server.v1_8_R3.MinecraftServer.s(MinecraftServer.java:414) [spigot.jar:git-Spigot-21fe707-741a1bd]
        at net.minecraft.server.v1_8_R3.MinecraftServer.k(MinecraftServer.java:378) [spigot.jar:git-Spigot-21fe707-741a1bd]
        at net.minecraft.server.v1_8_R3.MinecraftServer.a(MinecraftServer.java:333) [spigot.jar:git-Spigot-21fe707-741a1bd]
        at net.minecraft.server.v1_8_R3.DedicatedServer.init(DedicatedServer.java:263) [spigot.jar:git-Spigot-21fe707-741a1bd]
        at net.minecraft.server.v1_8_R3.MinecraftServer.run(MinecraftServer.java:525) [spigot.jar:git-Spigot-21fe707-741a1bd]
        at java.lang.Thread.run(Thread.java:833) [?:?]
``` ???
quaint mantle
#

Avoid NMS if you can

#

If spigot allows you to do it, don't use NMS

hazy parrot
lean pumice
molten hearth
hazy parrot
#

if it isn't directory

#

how do you declare directory

quaint mantle
#

Or smth like that

#

Alternatively you could use Path and Files API

slate tinsel
#

what other things affect a player's BoudingBox more than its position?

chrome beacon
#

if they're sneaking or not

ocean hollow
#

I need to save information about which block the player has open in their inventory. (a custom block opens a gui and you need to find out from your inventory what kind of block it is).

what's better?

  • store in Map<Player, Block>?
  • or add it to some itemStack PDC with coordinates to get a block
chrome beacon
#

pdc

#

actually I read that wrong

#

You don't need it to be persistent

slate tinsel
chrome beacon
#

Probably more things like riding entities

#

Why do you ask?

#

I hope you're not hardcoding the hitbox

slate tinsel
#

I check if a player Bounding Box overlaps the blocks around the player

#

To check if the player takes damage from suffocation in the block when i teleport the player

#
    public boolean isLocationValid(Location location) {
        Location tempLocation = location.clone();

        double locationX = tempLocation.getX();
        double locationY = tempLocation.getY();
        double locationZ = tempLocation.getZ();

        BoundingBox playerBox = new BoundingBox(-0.30000001191 + locationX, 0.0 + locationY, -0.30000001191 + locationZ, 0.30000001192092896 + locationX, 1.7999999523162842 + locationY, 0.30000001192092896 + locationZ);

        for (int x = -1; x <= 1; x++) {
            for (int y = -1; y <= 1; y++) {
                for (int z = -1; z <= 1; z++) {
                    Block block = tempLocation.getBlock().getRelative(x, y, z);

                    Log.info("PlayerBox: " + playerBox);
                    Log.info("BlockBox: " + block.getBoundingBox());

                    if (playerBox.overlaps(block.getBoundingBox())) {
                        return false;
                    }
                }
            }
        }

        return true;
    }```
chrome beacon
slate tinsel
tender shard
#

i think that's the size of the player

#

not the location or sth

chrome beacon
#

Get the bounding box of the player

tender shard
slate tinsel
#

So then it will be the wrong location

tender shard
#

why?

#

you can just move the box

slate tinsel
#

Because I want a specific position that is not where the player is

tender shard
#
double widthX = playerBox.getWidthX();
double widthZ = playerBox.getWidthZ();
double height = playerBox.getHeight();
BoundingBox newBox = BoundingBox.of(centerLocation, widthX/2, height/2, widthZ/2);
#

might wanna adjust the height if it should be on the ground or whatever

#

alternatively get the playerBox and shift it twice, once to -playerLocation, then to target location

slate tinsel
#

But don't you also need to specify a position to create the boudingBox?

#

Therefore when I fetch the player's BoudingBox it changes depending on where the player is

tender shard
slate tinsel
lapis schooner
tender shard
#

to move it to 0,0,0

slate tinsel
#

how do you mean? boundingBox.shift(player.getLocation() * -1);

tender shard
#

turn the player location into a vector and multiply it by -1

slate tinsel
#

Like this?


BoundingBox boundingBox = player.getBoundingBox();
boundingBox.shift(targetLocation);

Vector vector = player.getLocation().toVector();
vector.multiply(-1);
boundingBox.shift(vector);
tender shard
#

yes that should do i guess

lapis schooner
tender shard
lapis schooner
tender shard
#

set it to startup

lapis schooner
#

I see, thanks a lot

storm jungle
#

does anyone know a way how to make the crops to grow in a chunk when there is no player nearby but a special block is placed that must do this function

tender shard
inner mulch
#

is there an event for when a player stomps farmland and it turns into dirt, or when a block is placed an a grass block and the block changes into dirt afterwards

tender shard
#

trampling crops is PlayerInteractEvent

#

grass turning into dirt should be BlockPhysicsEvent i guess

inner mulch
#

okay, thank you

viral hamlet
#

Again lol, I'm trying several ScoreBoard plugins, none of them are working correctly, I'm running spigot 1.20.4

inner mulch
#

Is there a specific event being called when a player harvests honey or is it just the playerinteractevent?

river oracle
inner mulch
#

okay, so for milking cows it's interact too?

river oracle
#

Their might be a PlayerInteractEntityEvent

#

But otherwise yes

slate tinsel
#

Hi, I was thinking of using trajectory to create a list of all locations than the arrow will pass how do I create this?

inner mulch
#

thanks tho

tender shard
#

huh weird

inner mulch
#

this event is called for sweetberry bushes i think

tender shard
#

yeah but it should be called for all blocks that aren't broken on "harvest"

inner mulch
#

yeah, it should but i guess not

river oracle
inner mulch
#

what does jira mean?

remote swallow
#

its our issue panel

#

?jira

undone axleBOT
wispy plume
#

How do y'all provide 1.8 and 1.20 support in your plugins? Talking about chat component differences.
Assuming the plugin doesn't have translations implemented.

proud badge
#

would using MyPlugin.getInstance() be fine in an async environment? (To use the plugin logger)

wispy plume
river oracle
#

And separate modules per version

#

Since your on 1.8 you'll have a lot of work for you

wispy plume
#

Yeah, this is what I'm doing. It's a bit of a hassle

river oracle
#

If you wanna be smart cut out everything under 1.20 ๐Ÿ˜‰

wispy plume
#

Utility plugin for 1.8 and 1.20 games

river oracle
#

1.8 is 7% of the market share

#

Not a 7% worth grabbing either

wispy plume
#

Not really, as running pvp related minigames on 1.8 (custom fork of course) is the perfect choice for my network.

quaint mantle
jagged briar
#

hey

#

so im running a 1.19 plugin and i want to update it to update it to 1.20, so the issue i currently have is that the method player.sendSignChange(); is deprecated. Whats the updated method?

eternal night
#

check the method javadocs

jagged briar
#

i did, in the official docs its not shown as deprecated

eternal night
#

Hmm, are you pulling in paper-api by chance

jagged briar
#

i actually am, i just realized im currently doing further research gimme a moment

#

found it, thanks for pointing that out

lean pumice
#

??

#

what is this?

hallow lion
#

Is there any reason why namespacedkey class is final?

eternal night
#

because you should not be implementing types from the API

#

Implementing interfaces. The Bukkit API is designed to only be implemented by server software. Unless a class/interface is obviously designed for extension (eg BukkitRunnable), or explicitly marked as such, it should not be implemented by plugins. Although this can sometimes work, it is not guaranteed to do so and resulting bugs will be disregarded.

hallow lion
#

no fun :/

lean pumice
eternal night
#

???

#

a random image

lean pumice
#

look the pom

#

and the class

#

and the package

#

@eternal night

chrome beacon
#

so?

#

what about it

lean pumice
#

I don't know why he does this

remote swallow
#

are you talking about the fact it hasnt took it as a java package

#

most likely ur getting an error

lean pumice
#

I don't know why

#

there isnt error on pakage of the module

remote swallow
#

it would most likely be on the build tab at the bottom

#

or just reload maven and it might show an error

lean pumice
remote swallow
#

right click the java package then mark as sources directory

grim hound
#

Does anyone know where the server netty pipeline is located at?

lean pumice
#

@remote swallow now the pakage go but the pom no

opaque scarab
#

Does anyone know what the equivalent to DedicatedServer#getCustomRegistry() is for the mojang remappings? I canโ€™t find any documentation on this method.

Following an example, and this is the code Iโ€™m trying to figure out: ```
ResourceKey<BiomeBase> oldKey = ResourceKey.a(IRegistry.aO, new MinecraftKey("minecraft", "forest"));
IRegistryWritable<BiomeBase> registrywritable = dedicatedserver.getCustomRegistry().b(IRegistry.aO);
BiomeBase forestbiome = registrywritable.a(oldKey);

https://mappings.cephx.dev/1.17/net/minecraft/server/dedicated/DedicatedServer.html
dry hazel
#

MinecraftServer#registryAccess()

bronze monolith
#

Hello, I'm facing a problem. I need to put a custom font on text_display, but I can't find a method for this. help me please

grim hound
opaque scarab
#

Nvm Iโ€™m stupid

opaque scarab
opaque scarab
bronze monolith
opaque scarab
sterile flicker
#

how do I set the biome type to 16chunks correctly so that the rain turns into snow java player.setPlayerWeather(WeatherType.DOWNFALL); location.getWorld().setBiome((int) location.getX()*16, (int) location.getZ()*16, Biome.SNOWY_TAIGA); ?

bronze monolith
grim hound
#

with loc.getWorld().getChunkAt

#

or wait

sterile flicker
grim hound
#

does setBiome

#

need the actual x and z

#

or the chunk x and z?

opaque scarab
#

Then thereโ€™s this BaseComponent#setFont("minecraft:uniform");

grim hound
#

wait

#

what 16 chunks

#

do you want to modify?

#

just around the x and z you've been given?

sterile flicker
grim hound
#

what chunks do you want to modify

#

also, don't multiply them by 16

sterile flicker
#

around the player's position

bronze monolith
# opaque scarab In paper you can do ```display.text( component )```

this my code

        BaseComponent baseComponent = new TextComponent(message);
        baseComponent.setFont("graffiti_small_one");

        TextDisplay text = p.getWorld().spawn(spawnLocation, TextDisplay.class);
        text.setRotation(90,0);
        text.setText(baseComponent);

but there`s error in text.setText(baseComponent)

Required type:
String
Provided:
BaseComponent
grim hound
#
            for (int i = -2; i <= 2; i++) {
                for (int j = -2; j <= 2; j++) {
                    loc.getWorld().setBiome((int) x + (i << 4), (int) z + (j << 4), Biome.BADLANDS);
                }
            }
#

try this

#

this modifies 25 chunks tho

#

since a 16 chunk array doesn't have a middle one

sterile flicker
grim hound
#

just do Chunk#getWorld if really necessary

sterile flicker
grim hound
#

you can

sterile flicker
#

how?

carmine mica
#

Also, remember that biomes are not exact. They are saved in 4x4x4 blocks, but the borders will be fuzzy (aka not a straight line)

grim hound
#

or the actual x and z

sterile flicker
#
                     
                }``` I have a method that gets all chunks within a position radius
#

how do I set a biome for a chunkัŠ

grim hound
lost matrix
#

Biome data is now 3 Dimensional btw.

grim hound
#

Chunk#getWorld

grim hound
lost matrix
sterile flicker
#

so now i have for (Chunk chunk : ChunkLoader.getChunks(player.getLocation(), 8)) { for (int i = -2; i <= 2; i++) { for (int j = -2; j <= 2; j++) { chunk.getWorld().setBiome((chunk.getX() >> 4) + i,(chunk.getZ() >> 4) + j, Biome.SNOWY_TUNDRA); } } }

grim hound
#

also, smile, do you know whether setBiome requires the chunk's x and z or the actual world x and z?

opaque scarab
lost matrix
#

It requires the x, y and z of a block because you can have multiple biomes in a single chunk

grim hound
#

you already have the chunk array you want to use, right?

grim hound
#

do you then have to set the biome to all of the blocks?

lost matrix
#

Biomes are now stored in 4x4x4 areas. You dont need to set it for each block.

grim hound
#
for (Chunk chunk : ChunkLoader.getChunks(player.getLocation(), 8)) {
    chunk.getWorld().setBiome(chunk.getX(), chunk.getZ(), Biome.SNOWY_TUNDRA);
}
``` This shuld work fine
sterile flicker
#
        final HashSet<Chunk> addedChunks = new HashSet<>();
        final World world = location.getWorld();

        final int chunkX = location.getBlockX() >> 4;
        final int chunkZ = location.getBlockZ() >> 4;

        for (int x = chunkX - radius; x <= chunkX + radius; ++x)
            for (int z = chunkZ - radius; z <= chunkZ + radius; ++z)
                addedChunks.add(world.getChunkAt(x, z));

        return new ArrayList<>(addedChunks);
    }``` by the way, this is what my method looks like
lost matrix
scenic onyx
#

?paste

undone axleBOT
grim hound
#

pretty odd way of doing it tho

grim hound
#

I'm pretty sure you gotta set it block by block

sterile flicker
lost matrix
grim hound
lost matrix
#

Yeah. Poop implementation.

#

Take a look at the fillbiome command

scenic onyx
grim hound
#

oh wait, it does store in 4x4x4

undone axleBOT
sterile flicker
#

so why doesn't it work?

scenic onyx
lost matrix
scenic onyx
#

dont go all dep

sterile flicker
grim hound
#

it's not by chunk

scenic onyx
grim hound
#

but rather by small areas

#

now, that is

lost matrix
scenic onyx
#

is like dont exist

grim hound
#

???

sterile flicker
grim hound
#

uhh

#

gimme a sec

#

I'll send you a less optimized version for now

scenic onyx
#

@lost matrix so?

chrome beacon
grim hound
#
for (Chunk c : chunks) {
    int chunkXStart = c.getX() << 4;
    int chunkZStart = c.getZ() << 4;
    for (int x = 0; x < 16; x++)
        for (int z = 0; z < 16; z++)
            c.getWorld().setBiome(chunkXStart + x, chunkZStart + z, Biome.BEACH);
}
#

this should suffice for now

scenic onyx
chrome beacon
#

???

grim hound
#

you can also probably run this async

scenic onyx
chrome beacon
#

What does that even mean

grim hound
#

but I don't have the head to think of the 4x4x4 way rn

scenic onyx
sterile flicker
# grim hound you can also probably run this async
                    @Override
                    public void run() {
                        for (Chunk c : ChunkLoader.getChunks(player.getLocation(), 8)) {
                            int chunkXStart = c.getX() << 4;
                            int chunkZStart = c.getZ() << 4;
                            for (int x = 0; x < 16; x++)
                                for (int z = 0; z < 16; z++)
                                    c.getWorld().setBiome(chunkXStart + x, chunkZStart + z, Biome.SNOWY_TUNDRA);
                        }
                    }
                }.runTaskAsynchronously(Main.plugin);```?
chrome beacon
#

What exactly do you mean by that

#

and how do you know that's the case

scenic onyx
grim hound
# sterile flicker ```new BukkitRunnable() { @Override publ...
ForkJoinPool.commonPool().execute(() -> {
for (Chunk c : ChunkLoader.getChunks(player.getLocation(), 8)) {
    int chunkXStart = c.getX() << 4;
    int chunkZStart = c.getZ() << 4;
    for (int x = 0; x < 16; x++)
        for (int z = 0; z < 16; z++)
            c.getWorld().setBiome(chunkXStart + x, chunkZStart + z, Biome.SNOWY_TUNDRA);
}
});
#

this would be better

scenic onyx
#

@chrome beacon There are no errors

grim hound
scenic onyx
#

ah

grim hound
#

your maven

scenic onyx
#

yes

#

dont go

#

i have try 54151546 time @grim hound

grim hound
#

show your pom

chrome beacon
#

if that doesn't help send your maven log

scenic onyx
#

command?

grim hound
#

I have also once had this problem

#

dunno how I solved it tho, was long ago

scenic onyx
bronze monolith
chrome beacon
scenic onyx
#

nope

#

dont go

scenic onyx
#

i am crying

chrome beacon
#

You can either depend on Paper instead of Spigot or use NMS

scenic onyx
#

@grim hound Did it take you long to resolve?

scenic onyx
#

bruh

grim hound
#

like 2 days

scenic onyx
remote swallow
#

have you actually ran buildtools

grim hound
scenic onyx
sterile flicker