#help-development

1 messages ยท Page 181 of 1

raw prairie
#

i wanna see how this turns out

fluid river
#

gtg sleep

#

you can't stream in spigotmc voice chat tho

#

just send screenshots

raw prairie
#

kek

fluid river
#

true

raw prairie
#

starting up my test server

fading spindle
#

if im using spigot maven, for the class body do i have to add extends JavaPlugin, because when i try to do that it gives me an error

raw prairie
#

nah

#

i had 2 eat

#

@fluid river

#

doesnt work

#

spams this

#

@last temple

#

@fresh timber

#

pls

fresh timber
#

bro

#

at this point just use @ everyone

#

xD

raw prairie
#

@everyone

fresh timber
#

I wasnt keepin up with conversation hold on

raw prairie
fresh timber
#

ok im lookin

raw prairie
fresh timber
#

btw im kinda new too so I might not be able to solve everything, I started like a month ago

#

im lookin tho

#

yea idk

#

I cant read errors lol

#

I mean

raw prairie
fresh timber
#

I dont have enough experience with a lot of them to know what it means

raw prairie
#

how can i fix

#

shud i give u my source code/

#

then wut

#

im doin it anyway

#

yea its the operation

#

how fix

#

bruh

#

k

#

maybe cause reader is greyed out

#

theres a docs on it

#

lemme give it to u

#

btw

#

i tried that

#

?

#

o

#

im cofused

#

which try functin

#

k

#

errooor at format

#

this is wut i have now

#

v

#

where sud i put it

#

ok shud i try it ๐Ÿคž

#

show what once again

#
    public void chunkLoad(ChunkLoadEvent e) {
        if (e.isNewChunk()) {
            try (EditSession editSession = WorldEdit.getInstance().newEditSession(BukkitAdapter.adapt(e.getWorld()))) {
                Operation operation = new ClipboardHolder(clipboard)
                        .createPaste(editSession)
                        .to(BlockVector3.at(e.getChunk().getX() * 16, 40 ,e.getChunk().getZ() * 16))

                        .build();
                Operations.complete(operation);
            }
        }
    }```
#
    public void onEnable() {
        // Plugin startup logic
        System.out.println("Backrooms Plugin enabled");
        ClipboardFormat format = ClipboardFormats.findByFile(file);
        getServer().getPluginManager().registerEvents(this, this);
        try (ClipboardReader reader = format.getReader(new FileInputStream(file))) {
            // Stuff here
        } catch (FileNotFoundException ex) {
            Bukkit.getLogger().severe("Schematic file doesn't exist!");
            ex.printStackTrace();
        } catch (IOException ex) {
            Bukkit.getLogger().severe("Error reading schematic file!");
            ex.printStackTrace();
        }
    }

    File file = new File("Backrooms.schem");
    Clipboard clipboard;```
#
    public void onEnable() {
        // Plugin startup logic
        System.out.println("Backrooms Plugin enabled");
        ClipboardFormat format = ClipboardFormats.findByFile(file);
        getServer().getPluginManager().registerEvents(this, this);
        try (ClipboardReader reader = format.getReader(new FileInputStream(file))) {
            // Stuff here
        } catch (FileNotFoundException ex) {
            Bukkit.getLogger().severe("Schematic file doesn't exist!");
            ex.printStackTrace();
        } catch (IOException ex) {
            Bukkit.getLogger().severe("Error reading schematic file!");
            ex.printStackTrace();
        }
    }

    File file = new File("Backrooms.schem");
    Clipboard clipboard;
    clipboard = reader.read();```
#

theres an erroor tho

#

kinda stupid ๐Ÿ’€

#

ooooooooooo

#

yea

#

im confirmed idito

#

i thought u meant lke the wordledit command

#

//br

#

and shit

#

ong im not

#

๐Ÿ’€

#

ok

#

i built the plugin

#

testing time

undone axleBOT
raw prairie
#

why

#

@last temple

#

uhm

#

it crashed

#

kek

#

how 2 optimze

#

im not good at java

#

๐Ÿ’€

#

yea playerloaded

#

@last temple

#

how to make the world a flat world

#

pls telll

tranquil stump
#

where should I go to report that the javadocs are wrong?

remote swallow
#

?support prob

undone axleBOT
tranquil stump
#

temporary support?

hasty prawn
tranquil stump
#

in potion effect it says its in ticks but its really in milliseconds

torn oyster
#

is there a way to store a Consumer<> in PDC?

hybrid spoke
#

even if, potioneffect is not the one to blame

tranquil stump
#

Oh it might not be milliseconds actually

#

Either way when using it 100 is worth 1 second

#

Thatโ€™s what happened when I used it

chrome beacon
#

100 would be 5 seconds

fading spindle
#

can someone help me with a problem? so basically i am using spigot maven for a 1.19 project and my main class looks like this:

#

`package scribble2;

public class Main extends JavaPlugin{

public void onEnable (){
    
    
}

}
`

#

For some reason it gives me an error on the JavaPlugin

#

part

#

it says it cannot be resolved to a type

onyx fjord
#

Don't name your main class main btw

fading spindle
#

ok

onyx fjord
#

Did you import javaplugin?

fading spindle
#

No i used maven

#

spigot maven respitory

onyx fjord
#

What

#

๐Ÿคฆโ€โ™‚๏ธ

#

You must import the class

fading spindle
#

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>me.scribble2</groupId> <artifactId>scribble2</artifactId>
` <version>1</version>
<name>scribble2</name>
<description>A very scribbly project</description>

<repositories>
<!-- This adds the Spigot Maven repository to the build -->
<repository>
<id>spigot-repo</id>
<url>https://hub.spigotmc.org/nexus/content/repositories/snapshots/</url>
</repository>
</repositories>

<dependencies>
<!--This adds the Spigot API artifact to the build -->
<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>spigot-api</artifactId>
<version>1.19.2-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
</dependencies>
</project> `

my xml file looks like this

onyx fjord
#

I'm telling you what to do

fading spindle
#

oh ok

onyx fjord
#

Hover on it and IDE should help you importing

fading spindle
#

it gives me 2 options

#

1 Creat class JavaPlugin
2: fix project setup

frail gale
#

You need to import the JavaPlugin class in your Main class

#

Hey guys I have a question. You know that Minecraft have a World NBT where you can add data to the World and then get it etc. And my question is can we get this World NBT and edit it? Like in Minecraft modding this World NBT can be useful for saving blocks and many other things

crimson terrace
#

something like a PDC for a world?

#

it does inherit from PersistentDataHolder, so it has that

frail gale
#

yeah

hybrid spoke
#

otherwise chunks also have pdcs

#

which are probably just the worlds pdc with their own section

frail gale
#

oh wow

#

how I havenโ€™t seen that ๐Ÿคฃ

crimson terrace
#

whats the saying? even a seeing chicken misses seeds?

frail gale
#

Thanks guys for showing me

hybrid spoke
#

that makes 5โ‚ฌ

crimson terrace
#

5? thats cheap af

hybrid spoke
#

i am cheap

crimson terrace
#

I am refraining from saying something funny but insulting

#

sorry XD

hybrid spoke
#

weak

crimson terrace
frail gale
#

5โ‚ฌ for just showing a method that exists

hybrid spoke
#

maybe we made that method

#

and every use of it costs

crimson terrace
#

it mainly costs sanity and social life time usually

hybrid spoke
#

you just destroyed it

#

he would've payed for every use

crimson terrace
#

I destroy many things

hybrid spoke
#

destroy yourself please

crimson terrace
#

been doing that since day one

frail gale
#

imagine this existed everytime you use a method in Spigot and it charge you some money

hybrid spoke
#

good

crimson terrace
#

now its your turn on the destruction cipher

hybrid spoke
#

a god cant be destroyed

crimson terrace
#

let me show you

sterile axle
#

a god can be destroyed if no one believes in it

crimson terrace
#

a god without following is nothing but a person
and people can be destroyed

hybrid spoke
#

so as long as i believe in myself i will stay undestroyed

crimson terrace
#

whats the dnd rule for when someone becomes a god?

sterile axle
#

dont worry, the world will break that self belief at some point

hybrid spoke
#

but you are gladly invited to join the men religion

crimson terrace
#

๐Ÿ˜ฆ

hybrid spoke
crimson terrace
#

hold on, is this your super villain origin story?

sterile axle
#

i sent an image in #general but i meant it for here, but

#

well

#

whatever

hybrid spoke
#

every non-member of the men religion is our enemy

#

sounds kinda racist

#

its not racist if you arent racist

#

simple as that

crimson terrace
#

its not racist, its classist since not only men can join, right?

hybrid spoke
#

yeah, since also in woman is a man

#

pun intended

crimson terrace
#

request to rename religion to "man religion"

hybrid spoke
#

but we are many, so men ๐Ÿค”

crimson terrace
#

but we are also so many, so man

#

anywho, discourse should conclude

hybrid spoke
#

good point, man-y

crimson terrace
#

I hate the fact that theres no #offtopic channel

hybrid spoke
#

not anymore at least. there once was one

crimson terrace
#

goddamnit, who messed it up

hybrid spoke
crimson terrace
#

true

mighty pier
#

help me with homework ๐Ÿ‘

tardy flame
#

Jebaฤ‡ disa

raw prairie
#

Well I managed to create the backrooms

#

But

#

It needs serious optimization s

#

It crashes my 4 gb test server

#

Every 5 mins

eternal night
#

๐Ÿ‘€

raw prairie
#

And also

#

I'm planning 2 add more levels

#

So pls

#

Help

river oracle
#

No

raw prairie
eternal night
#

I mean, you did not provide anything concrete to help you with

raw prairie
eternal night
#

Eh, I mean what is your concrete issue

raw prairie
eternal night
#

That usually is somewhat hard to find. Have you run a spark profile ?

#

To figure out what is taking up most of your tick

raw prairie
#

But

eternal oxide
#

it will be fairly easy to find if it's crashing it every 5 minutes

raw prairie
#

I did not have a spark profuler

eternal night
#

Well yea if it crashes I'd presume you have an error

raw prairie
#

Well heres what I'm attempting to do with my plugin

raw prairie
#

No errors

#

Other than

eternal night
#

wtf are the backrooms xD

eternal oxide
#

its a memory leak#

raw prairie
#

Ran out memory

eternal night
#

ah

#

so yea

eternal oxide
#

you are creating sometrhign over and over

raw prairie
#

Yea

eternal night
#

probably adding to some list

#

and never removing

raw prairie
#

Pasting schematics in every loaded Chunk

#

Probably why its crashing

raw prairie
eternal night
#

I mean

#

that should not really go OOM

eternal oxide
#

then you are doing it too fast

raw prairie
eternal night
#

easiest would be to just have the jvm give you the heap dump

#

how would fast printing the schematic lead to an OOM

#

wouldn't that just end up in an angry watchdog

eternal oxide
#

pasting a schematic can force load adjacent chunks

raw prairie
#

Yea

#

I think

eternal night
#

oh lol

#

right I did forget about that

raw prairie
eternal oxide
#

Still, should not eat memory

raw prairie
#

Pastong thing

eternal oxide
#

There has to be somethign else too

raw prairie
#

@eternal night

wet breach
#

other then the other chunks loading

raw prairie
#

*is

eternal night
#

I mean, then you'd have the GC run aggressively

eternal oxide
#

The only obvious thing I see is, you should register your event listener after you have loaded your schematic

wet breach
#

use this if its suppose to be something for new chunks all the time

raw prairie
#

Well wbu this: paste schematics as far as only the player can see

wet breach
#

it will be more efficient then waiting on the chunk to generate first before adding in your change

raw prairie
#

K

wet breach
#

this will cause the chunk to generate with your changes already added in, then it shouldn't matter if adjacent chunks load

raw prairie
#

It says you need a custom chunk generator

#

Which i don't have

wet breach
#

it says you can use it with a custom chunk generator

#
 A BlockPopulator can be used in combination with a custom ChunkGenerator by returning it in the method ChunkGenerator.getDefaultPopulators(World) or by adding it manually to the worlds populator list returned by World.getPopulators().

When adding a BlockPopulator manually to a world it is recommended to do so during the WorldInitEvent.
raw prairie
#

Oh

#

Mbmb

raw prairie
#

Before I tyr to implement it

#

Where do I put it ๐Ÿ’€๐Ÿ’€

#

Anyway ty doe

#

@wet breach does blockpopulator also apply to 1.19 api?

wet breach
#

as it says above, worldinitevent

#

is the most ideal place

karmic mural
#

Hi. I'm trying to add an NBT tag to an item to store a value. I'm following "The complete guide to itemstack nbttags and attributes" at the moment. It requires CraftBukkit as a dependency. I am just wondering if there is a simpler way someone knows that I can do this with? I've discovered setLocalizedName but not sure if it would be correct to use it

wet breach
#

depending on your purpose you probably could just use the API ๐Ÿ™‚

karmic mural
#

I want to store a value that I can use for further work in my plugin, but that is not visible to players

wet breach
#

you can easily use the metadata api for that then

#

also players have persistent data as well

#

so you could even use PDC API

karmic mural
#

Same thing I'd use for setting item lore and such, I assume? How do I set data there that is not visible to player but useable in code?

wet breach
karmic mural
wet breach
#

kind of

#

but it is something that will let you do what you are wanting

#

and it doesn't require NMS, just all with the api ๐Ÿ˜„

karmic mural
#

Hmm... That's good to know for future plans, but for now I just need to store data in the item itself

raw prairie
#

What does the worldinit event docs mean by this

To get every world it is recommended to add following to the plugin.yml

wet breach
#

as you can see above, items are part of the subinterface of that api

karmic mural
#

I'll have to do some reading, I'm still a bit confused as to how I should use this.

eternal night
#

?pdc

karmic mural
#

Thank you, Lynx

eternal night
#

I just linked the thing, thank frostalf ๐Ÿ˜…

karmic mural
#

I was about to, but I will now, thank you @wet breach

#

confusing wording, regardless. Thank you both, this will help

midnight shore
#

how can i have an event of falling blocks placing themselves?

midnight shore
#

u sure?

karmic mural
#
NamespacedKey key = new NamespacedKey(pluginInstance, "our-custom-key");
ItemMeta itemMeta = itemStack.getItemMeta();
itemMeta.getPersistentDataContainer().set(key, PersistentDataType.DOUBLE, Math.PI);
itemStack.setItemMeta(itemMeta);``` 

So that "pluginInstance" it's looking for there, am I right to assume I need to give it my main class?
midnight shore
#

yes

rough drift
#

Does anyone know how to update a player's command tree? I was successfully able to register/unregister commands at runtime, I just need to figure out how to update the client's command tree

#

Is there any forum on spigot/bukkit websites about this?

river oracle
#

Didn't even know players had a command tree

rough drift
#

The server sends a list of all commands and arguments to the client upon joining, the client then stores this and uses it for auto completion or something

#

There is a client side command tree though

#

I am sure about that

drowsy helm
#

I think you can just send the packet

river oracle
#

Couldn't you just resend that packet ^

rough drift
#

I mean yeah, I guess

#

Time for NMS

river oracle
#

Idk why but I thought you were doing this for your fabric integration lol

rough drift
#

Eh no

#

Fabric integration is coming pretty slowly imo xD

river oracle
#

Give up on that yet xD

rough drift
#

Nope

river oracle
#

Aye maybe in a year or 2

rough drift
#

I am going in bursts

#

I do a lot of stuff really quickly but then I pause for a bit

river oracle
rough drift
#

Last "burst" I got plugins loading with dependencies and stuff

river oracle
#

Glad to see I'm not the only person with that arguably not very good work style lol

static ingot
#

Also not sure if that does exactly what you're looking for, manually modifying/sending the packet may be better if you need strict control over the result for any reason.

midnight shore
#

How can i raycast for multiple entities? I looked into World.rayCastEntities but the RaycastResult only supports one entity

karmic mural
#

Invalid key. Must be [a-z0-9/._-]: Does this mean the key must be lowercase?

eternal oxide
#

yes

rough drift
midnight shore
#

Please read the whole statement

static ingot
sterile token
#

What its the best way for coding, coding everything and testing or coding and testing each new feature?

static ingot
#

thonk

midnight shore
sterile token
midnight shore
#

i think i will make my own raycast system with entities

static ingot
sterile token
static ingot
sterile token
midnight shore
#

what should i do?

sterile token
#

I didnt understand raytraxing thing

midnight shore
#

Raycast for multiple entities

sterile token
#

What that!!

midnight shore
#

not only one like the World.raycastEntities method does

#

Like

static ingot
#

why are you trying to give advice if you don't even know what it is, lol

midnight shore
#

i have a raycast

sterile token
#

Hey maow you changed a lot

midnight shore
#

i want to get every entity it hits

sterile token
#

You werent like that

midnight shore
#

not just one

static ingot
#

I don't even know you ๐Ÿคจ

sterile token
ivory sleet
#

Verano, they're not the same person

sterile token
#

Oh that makes sense

ivory sleet
#

Maow still left this community

sterile token
#

I thought he was Mao

static ingot
#

rip

sterile token
#

What?

#

He left

#

I was looking him for ages

#

And i cannot find him

static ingot
#

ye. i'm just mauwh. formerly escad. lmao

sterile token
#

?paste

undone axleBOT
tardy delta
#

maow returned didnt he?

ivory sleet
#

dont think so?

tardy delta
#

hmm then hes gone again

#

he definitly did

remote swallow
#

we need a join message chanel

#

channel

static ingot
#

no good reason to imo, lol

#

just seems nosy in a community like this

#

or any community really

karmic mural
#

Would I need multiple keys if I want to store two different string values? java NamespacedKey testKey = new NamespacedKey(plugin, "testItem"); ItemStack testItem = new ItemStack(Material.DIRT, 1); ItemMeta testMeta = testItem.getItemMeta(); testMeta.getPersistentDataContainer().set(key, PersistentDataType.STRING, "String Value");

static ingot
karmic mural
#

Or could I theoretically store a json string in the persistent data container? Would it be better?

karmic mural
eternal night
#

Well you could store json for sure

#

tho like

#

for custom items, just have a single key for the item id

#

if that is what you are going for

karmic mural
#

Thanks for the answers :)

green prism
#

What are the best libraries for Java Spigot?

eternal oxide
#

none

#

you decide what plugin you are going to write, then decide if you need a library

echo basalt
#

^

#

I just have a set of utilities that I pick and choose across projects

#

so things like clean scheduling, menus, yml files, itemstacks

#

Some math for things like getting body parts and raycasting ig

humble sleet
#

Anyone knows how to serialize block data to base64?

echo basalt
#

base64 is just a way to represent binary data

green prism
humble sleet
#

Ik but when I try to serialize it, it throws an error

green prism
#

I want a clean code

echo basalt
#

then maek it

humble sleet
#

java.lang.RuntimeException: java.io.NotSerializableException

humble sleet
green prism
echo basalt
#

you could make your own wrapper class that copies all properties

#

or just gson it or something

humble sleet
#

I'm using a custom block object because I need to store additional data but could I make my own block data object that implements (or extend, always mix those two) block data then reference that class instead?

#

Also how would I go about doing the same for block state

quaint mantle
#

what's causing this error?

humble sleet
#

Like inventories, player heads, banners, spawners, etc...

quaint mantle
#

and yes if i run it outside of runnable still problem

worldly ingot
#

ArmorStand#remove() isn't a static method

#

Your instance is called "stand"

#

stand.remove();

quaint mantle
#

๐Ÿคฆโ€โ™‚๏ธ how am i that dumb

echo basalt
#

man should try reading his IDE's warnings

quaint mantle
#

i cant believe myself

worldly ingot
#

It would probably suggest making the method static, Illusion ;p

quaint mantle
#

intellij weird

#

sometimes

echo basalt
#

if he forked the spigot project

green prism
#

How can I insert a texture into a block with custommodeldata?

humble sleet
#

Blocks do not support CustomModelData

green prism
#

nice

humble sleet
tardy delta
#

take a look at rusts Optional<T> class

#

im basically recreating the same thing in java

worldly ingot
#

Just don't overuse Optional, or you end up like Sponge and you piss off anybody using your API

tardy delta
worldly ingot
#

There's a time and place to use Optional

tardy delta
#

Optional only nice for method chaining

worldly ingot
#

imho, if you fully expect to do some terminal operation with the result, or if you want to do something else if it's not present, then use an optional

#

("terminal operation" being some function you call at the end of another method)

#

If you use Optional for everything, you're going to end up with either unreadable chained code or nesting hell

tardy delta
#

๐Ÿฅฒ

#

fleet syntax highlighting be like:

zealous osprey
#

I was mainly concerned about error handling in api development, that's why I also created the Thread

worldly ingot
#
object.getSomething().ifPresent(something -> {
    something.getSomethingElse().ifPresent(somethingElse -> {
        somethingElse.getAnotherThing().ifPresent(anotherThing -> {
            anotherThing.foo();
        });
    });
});```
#

I will cry if you do this

#

Don't do this

tardy delta
#

map is a thing

worldly ingot
#

That's a bare-bones example, presumably you'd be doing other things lol

tardy delta
#

but i understand the point lol

zealous osprey
worldly ingot
#

Yeah, you can use Optionals, just use them sparingly and where it makes the most sense

#

If you end up writing code that looks like something above ^, you've used too many

tardy delta
#

my current code does things like this

#

formatting goes brr here

#

should probably be able to chain onSuccess().onFailure() but idk how to handle it in the class itself

#

have a Consumer<T> and Consumer<Exception> probably

tardy delta
#

meh i dont really

hazy parrot
#

It does

tardy delta
#

yes

#

just looks like ij with the new ui

#

too much white and blue

#

imagine not returning Collections.emptyList()

grim ice
#

why is onSuccess a consumer?

#

@tardy delta

#

it should be a function

#

since it shouldnt take any arguments

tardy delta
#

since it shouldnt return anything?

grim ice
#

my bad

#

i meant runnable

#

or Callable if it might throw exceptiosn

river oracle
#

Lol what the fuck

#

6 gigs of memory jesus christ

#

What cpu you got

#

Uhm idk ryzen lol

#

But is that goid

#

Ahh ok so fleet is like vscode but it's a resource hog has no plugins and it's by jetbrains

#

Hmmm yes ofcourse you do

#

I'm that one weird mf who uses vscode

#

Idk why I use vscode tbh every time I try to switch I'm back on vsc the next day

dire marsh
#

same thing happened to me lmao

brave trellis
#

Is there any reason why the [imgs] dont show up sometimes, they are showing within the edit description but not on the actual page when it appears? Its like its an on and off switch

#

for spigot plugin descriptions

chrome beacon
#

It happens at times

raw prairie
#

How to use the blockpopuqltor function

opal juniper
#

less memory

raw prairie
#

How do I use the Blockpopulator function

echo basalt
#

Arrays are usually fixed-length and support null elements

grim ice
#

still not worth it

echo basalt
#

Good for things like inventories

grim ice
#

in most cases

paper lily
#

where in minecraft's code is a block's correlating tool defined? i.e. pumpkins mine faster with axes, leaves mine faster with shears

echo basalt
#

ArrayLists are a list implementation based on arrays, which resizes the list etc

grim ice
#

yes

#
  1. public
  2. naming is bad
  3. why is a queue a map? use a Dequeue
worldly ingot
#

๐Ÿ‘ Multi ๐Ÿ‘ map ๐Ÿ‘

#

They have different queue types is all, but yeah I'd use a Deque instead too

#

fwiw, those queues should probably be separated into their own objects, but meh

raw prairie
#

Does anyone know how to use Blockpopulator -_-

tardy delta
#

let that enum hold a function to create that obj

opal juniper
echo basalt
#

oop I cut it a bit early

worldly ingot
#

I would really love to add a getDestroySpeed() method to Bukkit, but I'd rather types be interfaces first

echo basalt
# echo basalt

There's an internal registry (found in the game files themselves) that contains all the block keys for diggable stuff

worldly ingot
#

I don't want to route through UnsafeValues

echo basalt
#

Like mining fatigue, aqua affinity n all

paper lily
#

ty i must dig thru the classes and see if mc has something similar, im doing this in 1.7.2

worldly ingot
#

Sure, but getting the base mining speed is useful

paper lily
#

i found itemstack getdestroyspeed but its weird

echo basalt
#

True

opal juniper
# raw prairie Does anyone know how to use Blockpopulator -_-

you need to implement the abstract BlockPopulator class and then:

A BlockPopulator can be used in combination with a custom ChunkGenerator by returning it in the method ChunkGenerator.getDefaultPopulators(World) or by adding it manually to the worlds populator list returned by World.getPopulators().
raw prairie
#

Do i create a class

#

Or use worldinitevent

tardy delta
#

just have a method that adds on removes a game?

opal juniper
#

You need to create a class that implements BlockPopulator and then, if you arent doing complete custom generation, add it with the init event

#

World.getPopulators().add(WhateverCustomGenerator());

tardy delta
#

gimme code

raw prairie
#

Do i still add the plugin

#

To bukkit.yml

opal juniper
#

no

#

then you would need multiple deques, probably wrapped in a map

tardy delta
#

isnt a deque just an example of a queue?

opal juniper
#

u can insert at bothe ends

#

Yes.. kinda

tardy delta
#

thats what i thought, never used it actually

opal juniper
#

Use Deque<UUID>

raw prairie
#

Where do I add the worldinitevent

opal juniper
raw prairie
#

And then make the plugin laod before the world does?

opal juniper
raw prairie
#

Completely breaks down

opal juniper
#

mhm looks good

#

meh, player objects can go stale. Its better practice

bright cedar
#

Hi, does anyone know how I can create a new world with a roofted forest at the center each time I create a world ?

humble sleet
#

Hi, know I asked this before but is there a way to serialize block data and block state (detailed explanation would be appreciated)

opal juniper
#

what data do you need serialised

#

the block state is extremely complex

humble sleet
#

Exactly

#

I want to store a structure in a file (similar to schematics) but I want to inject my own information into the schematic. So far I'm making a file called name.struct which is a text file with base64 in it

humble sleet
opal juniper
#

yeah good luck then. Work out what data you need, work out a structure for serialization and then go from there. Anything more than just materials is hard

eternal night
#

gl

humble sleet
#

That ain't an answer

eternal night
#

Well, block data can be serialised into a string

#

that is API exposed iirc

#

block state, you are fucked

#

you'll need to save it into a CompoundTag internally

#

and then serialise that

humble sleet
#

Thats really helpful actually

eternal night
#

my advice would be to use world edit run

#

and then just store the extra data somewhere else

grim ice
#

except it's not really serializing, you can serialize it to the world's data file tho

#

take reference from my entity serializer library

#

use structures

#

if ur using 1.17.1+

#

basically,

steep hearth
grim ice
#

my entity serializer library, makes a structure of a 1x1x1 block

#

then saves it with a key

#

and then kills the entity

#

then whenever u spawn the entity u spawn the structure

#

eitherway

#

just use the same mechanic

#

but with blocks instead of entities

#

afaik state and such is saved with structures

steep hearth
#

can someone help me pls ?

opal juniper
#

its just flat terrain

grim ice
#

also jeez

#

that shit is fast

#

@opal juniper its exceptionally fast

#

thats probably not normal

opal juniper
#

yes. but its also using one file per chunk

#

the file size of that world is gonna be kinda astronomical

little wharf
bright cedar
#

Hi, does anyone know how I can create a new world with a roofted forest at the center each time I create a world ?

opal juniper
little wharf
#

I know the developer behind this project and no, he doesn't use one file per chunk

opal juniper
#

well im looking at one of his other videos and it says he does with the same code in the background

steep hearth
#

at the beginning of the video you can check the tps is very low

#

and after it is very fast

#

one file per chunk vs one file for a group of chunks

little wharf
opal juniper
#

repo they reference is here @steep hearth

#

Im just reading the blog post. If you know so much about it feel free to enlighten us

lime crater
#

how would i get the name of a created item in 1.16.5?

because of me creating the itemstack the getItemMeta is null,
so tried the itemfactory to get the meta of the material, but this also gave all null values

as it's a modded item i have, the gettype.name does start with mod_xxx , trying to cut it off wouldn't take care of special characters ( like รฉ ) as i want ofcourse

opal juniper
#

Thing is as well, you can load a chunk as fast as you want but the generation will still be slow

steep hearth
#

and its not really slow even if he has a potato pc

tardy delta
#

cuz it is

eternal night
#

the generation of the chunk is client side
kekw

tardy delta
#

ew no

opal juniper
eternal night
#

I mean, not much to say.

#

random private project that might be doing fuck what

#

ยฏ_(ใƒ„)_/ยฏ

steep hearth
#

I was talking about the rendering of the chunck

eternal night
#

the rending isn't the issue, the generation of the terrain is.

#

but again

#

private projects are pretty useless

tardy delta
#

what did we say about storing player objects

steep hearth
eternal night
#

you can claim a lot of things

#

if you don't provide code for people to replicate

little wharf
opal juniper
#

dm me the repo and then we talk

eternal night
#

those claims are useless

#

does the server do anything else ?

#

are the chunks ticking ?

opal juniper
#

like all the demos are on custom cheap chunks

steep hearth
#

it will do as much as spigot is doing

little wharf
#

You know "a private project" or no ?

eternal night
#

I mean, if that system is written into spigot then the world choice is weird

opal juniper
little wharf
opal juniper
#

u know you can make it not private

eternal night
#

if your project is private, its useless to ask "how to get that performance"

opal juniper
#

thats what i meant

eternal night
#

its a magical video no one can verify

tardy delta
#

copilot got some stuff in mind

eternal night
#

nor checkout what improvements were made

steep hearth
#

its a video to show improvements the message asking how to get that performance is a joke

eternal night
#

oh

little wharf
eternal night
#

that is a rather boring joke then

#

Well, GG enjoy your system then xD

#

and punching really fast in 1.8

opal juniper
#

oh wait was it 1.8

steep hearth
#

and ?

little wharf
#

For the moment yes

opal juniper
#

awww thats a shame

#

well 1.8 is already 20x faster than anything modern

steep hearth
#

spigot 1.8 is not that fast

little wharf
#

Okay so launch spigot and make this test please

eternal night
#

what is the point of this ๐Ÿ˜‚

opal juniper
#

it seems like they are trying to flex

eternal night
#

yea

#

pretty weird flex for a 1.8 private fork

opal juniper
#

but i literally am only a little interested in how it was implemented and they wont show me

steep hearth
#

and let's talk about libs to manipulate packets with spigot, just because no one got the idea to implement a system to manipulate packets because they are lazy to create wrappers for every version

little wharf
opal juniper
#

Hammer Conversation adjourned Hammer

eternal night
#

fml my generator settings were trashed when copying my worlds ๐Ÿ˜ญ

opal juniper
#

heheh

eternal oxide
#

I see nothing wrong. Normal Minecraft ๐Ÿ™‚

opal juniper
#

Lynx is at the far lands!!!!!

eternal night
#

๐Ÿ™ finally

#

beyond that

steep hearth
#

you can't implement it on spigot/paper

#

that's

eternal night
#

implement what ๐Ÿ˜‚

#

iTs a PrIvAt pRoJEcT

opal juniper
#

fax

tardy delta
#

copilot started writing reflections for me now

steep hearth
#

its not a server jar to make a server with 5 slots

eternal night
#

oh god

#

copilot is improving

opal juniper
#

about dam time!

tardy delta
#

the thing is smart lol

#

dunno if that method exists but anyways

steep hearth
#

spigot team should use copilot

opal juniper
#

i like the thing intellij does where you can control click to the method / field you are reflecting

tardy delta
#

it wrote this stuff for me to map a pojo to a table by using reflections

#

var lmao

opal juniper
#

:'(

eternal night
#

spigot should go private, upload a random video of them flying over terrain as basic as the music chosen and then join other discords asking if they can implement that

opal juniper
#

so like paper

steep hearth
opal juniper
#

open source is great?

eternal night
#

smh I always knew redhat is a dead company ๐Ÿ˜ญ

#

this open source stuff just

#

you cannot make money off it

opal juniper
#

omg true!!!

tardy delta
steep hearth
#

well its not a spigot fork, ofc the aim is to make something better and sell it

tardy delta
#

dunno if thats valid java lmao

eternal night
#

Yea if you wanna add yourself to the "selling 1.8 spigot forks" list

#

then gl

opal juniper
eternal night
#

also if isn't based on spigot, you are pretty fucked anyway

little wharf
eternal night
#

you are going to implement the entire bukkit API into a fresh project ? ๐Ÿ‘€

tardy delta
#

what the

eternal night
#

oh GOD

opal juniper
#

yeah lmao

eternal night
#

how will your server run plugins

steep hearth
eternal night
#

No ?

#

so you are implementing the spigot API ?

#

or are you actually a fork

steep hearth
#

spigot plugins will be supported on the project ofc

odd sleet
#

not a fork lmao

eternal oxide
#

If you are supporting Spigot plugins I'm 99.9% certain you are a fork

eternal night
#

^

steep hearth
#

its not a fork

opal juniper
#

aims to replace the entire Spigot that you all know, with a totally asynchronous and cross-language alternative.

eternal night
#

its literally printing spigot config values

#

lolol

eternal oxide
#

So you are not using ANY Spigot code in your project which is going to support Spigot plugins?

little wharf
eternal night
#

Well, I'll look forward to your project ๐Ÿ™‚

eternal night
#

glad you are using spigot to showcase your project

#

the project must be basically ready ๐Ÿ™

tranquil viper
#

Where can I learn about obfuscation?

little wharf
eternal night
#

but nah, tbh enough hate. If you are working on a cool new project that is not a fork of spigot but supports spigot plugins and has a lot of performance improvements

#

then I'll look forward to it ๐Ÿ™‚

chrome beacon
tranquil viper
steep hearth
eternal night
#

it is the future

#

smh

odd sleet
#

why ?

opal juniper
steep hearth
#

you did promote the github x)

eternal night
#

this is a spigot discord ?

quiet iron
#

I'm not contributors

opal juniper
quiet iron
#

I'm a graphics design

eternal night
#

I mean this just looks like you are advertising a competitor of spigot that is apparently going to be sold ?

odd sleet
#

who's talks about competitors ?

eternal night
#

I'd be interested to hear what the mods have to say to that ๐Ÿค”

#

your project aims to replace spigot does it not

odd sleet
#

nop

eternal night
#

i-

#

okay this is too stupid, gl with the project, whatever fork not fork, api not api, spigot replacement but not replacement but super fast and private it is

vagrant stratus
#

Lets keep it to spigot only

tardy delta
#

thank you copilot

#

me correcting its mistakes

opal juniper
#

i hate normalising databases

tardy delta
#

pojo mapper go brr

#

especially with reflections

steep hearth
tardy delta
#

i did it with suppliers before and that was way easier

steep hearth
#

paper and spigot are still based on that yk

tardy delta
#

wha the heck

vagrant stratus
odd sleet
#

bruh

vagrant stratus
#

Advertising competitors is not allowed ๐Ÿ™‚

tardy delta
#

ah looks like it can only handle one throws declaration

vagrant stratus
#

side note, keep it english only

tardy delta
#

wondering how to do that with a lambda

steep hearth
tardy delta
#

i seem to understand

#

wrong generic exception type

#

yessir

#

hmm legacy go brr

#

sorry for flooding the chat tho

vagrant stratus
eternal night
#

Yea me neither ๐Ÿ˜…

tardy delta
#

atleast were able to generate this based on a class' annotations

vagrant stratus
#

even I don't advertise my project here lmao

eternal night
#

just in paper general runpepe_hand_heart

vagrant stratus
#

Nah, not the Anti-Malware

tardy delta
eternal night
#

I mean thank god that existed

#

if more people asked how to run the one line grep command

#

I would have died

vagrant stratus
#

The one line's useless lmao

#

There's like 13 variants

eternal night
#

yee

vagrant stratus
#

also, if you're in the support server Lynx, you can see what project I was actually talking about in announcements

eternal night
#

I am not ๐Ÿ˜ญ

vagrant stratus
#

You can find a link on literally any of my resources then :p

eternal night
#

:>

vagrant stratus
#

the ask questions / get support one iirc

eternal night
#

Yea I see it

#

nice idea for sure ๐Ÿ™

vagrant stratus
#

Yee

eternal night
#

always been a fan of "do one thing and do it well" forks

#

well public ones that is

vagrant stratus
#

I have other plans, but I'm focusing on that part first and getting that as best as it can be before general things

eternal night
#

ye ๐Ÿ™ a nice integrated anti maleware thing sounds cool

#

I wonder how far one can go with that

vagrant stratus
#

Farther than I am currently lol

opal juniper
#

i mean if you have CI optic, there would be no reason to not use it over paper

#

on paper release -> patch urs

vagrant stratus
#

CI?

eternal night
#

continuous integration

opal juniper
#

jenkins / gh actions type stuff

eternal night
#

I wonder if you could also ship all of that in paperclip

#

instead of paper ๐Ÿค”

vagrant stratus
#

Help me set it up after I'm doing w/ Verdun and we can make that a reality lol
Pretty sure the repo will already auto-sync

#

iirc they have functionality for that

opal juniper
#

yeah... i mean it isnt the best idea to auto pull

#

noah might change some patches by hand again

eternal night
#

damn, my man isn't even here and you trash him ๐Ÿ˜ญ

vagrant stratus
#

Well, regardless it would still be useful lol

opal juniper
eternal night
#

and no, the fork landscape is good

vagrant stratus
#

I can always figure out something better

eternal night
#

giant projects become slow

vagrant stratus
#

Would be even better if I can get host support ๐Ÿ‘€

eternal night
#

I do wonder tho, what was your reasoning to shade it into paper instead of like, just running it in paperclip ?

#

e.g. before server start

opal juniper
eternal night
#

Hmm

#

maybe ?

vagrant stratus
#

I can always modify paperclip or whatever to use my repo anyways lol

eternal night
#

I guess if you want to change server impl and API down yea

#

again, things slow down too much

#

if you have 50 people working on a single thing

vagrant stratus
#

^ especially given the main focus is Anti-Malware related

#

Red-tape massively gets in the way

opal juniper
#

if every single person used one fork, imagine the amount of testing needed for each release

#

there are huge stakes

vagrant stratus
#

also, fuck paper. The less I need to use of theirs, the better

eternal night
#

I mean ehh- fixing later is not really a nice way to do things tbh

#

especially with rolling releases like spigot and paper do

#

exactly why you keep it small

#

and think a lot about changes

#

if 50 people work on paper

#

and someone just shoves in new API that they want

vagrant stratus
eternal night
#

and then everything breaks down the line because the API is garbage

#

now you are fucked because you have dead API

#

Yes and now you slowly start to notice how this is not a business

#

but open source software

#

that no one gets paid for

vagrant stratus
eternal night
#

I mean, imo you can have it open early just don't publish jars

#

dunno

#

but probably ?

#

they have a lot of infra structure to maintain

#

I presume md takes a cut ?

vagrant stratus
#

I'm doing a lot of changes, including a new DB. not really an option lol

eternal night
#

but like

#

dunno

#

Yea but like, again, open source software does not really work in motivated timelines imho

vagrant stratus
#

Easiest to get it right on first release and go from there, given the amount of sweeping changes I'm doing in terms of the merge

eternal night
#

if it isn't backed by a company

#

I mean, managing a giant group of contributors all with different goals in an OSS project that does not pay enough to survive off

#

just sounds like pain to happen

#

especially in rolling releases

#

when so many people depend on your work

#

that would kill it

#

instanly

vagrant stratus
#

^

river oracle
#

^

eternal night
#

you can do what pufferfish does

#

what

river oracle
#

What

eternal night
#

paper is based on spigot

#

if spigot requires you to pay to run it

#

it has to be closed source

#

else you just go ahead and compile it

#

and use it anyway

#

Well yea, for support

#

which, I guess spigot could do that ?

river oracle
#

๐Ÿ˜ณ

#

U sure bout that

eternal night
#

charge everyone in this discord neutral_gun

#

where is my money

#

gimme

quaint mantle
#

good I saw this

#

ima leave rn

#

bye

eternal night
#

but yea, I think things would work fine if we just shoot more stuff back upstream

#

after it lived long enough in downstream

#

but spigot is in a weird place there with their stash and CLA

eternal night
#

and then there is also just patches that don't have a place in upstream. E.g. optics malware shit pepe_hand_heart

#

or like purpurs gameplay changes

#

both of them are cool for certain users

river oracle
#

Or like papers everything

eternal night
#

but out of papers scope

vagrant stratus
eternal night
#

I mean, its fine no ?

#

they have their valid place in the community

river oracle
#

If it weren't true no one would use it ^

chrome beacon
#

Purpur is fine

vagrant stratus
#

And in my case, it would literally be drag & drop lol

eternal night
#

but yea, imo they all have their place

#

well not all

vagrant stratus
#

who needs base paper lmao

eternal night
vagrant stratus
#

๐Ÿ˜„

eternal night
#

I wonder where the world would be with spigot as a base

#

we would still be at bash scripts

#

lol

vagrant stratus
#

In my case? The project would be dead

fading spindle
#

go spigot

#

wait

#

is paper better?

eternal night
#

this is the spigot discord ๐Ÿ˜…

#

idk what answer you are expecting

vagrant stratus
eternal night
#

o.O

#

our entire tooling is gradle based neutral_gun

vagrant stratus
#

Fuck gradle

eternal night
#

well

#

we have bash scripts to update upstream

#

but most of the tooling is a gradle plugin (paperweight ๐Ÿ™)

vagrant stratus
#

So much stuff about paper that I don't like, but it's the most popular so i need to fork it ๐Ÿ˜

eternal night
#

I mean, always depends if we are talking API wise

#

or impl wise

#

I see how a lot of people dislike @Deprecated

#

or at least a few loud people

vagrant stratus
#

Regardless, if I forked spigot instead the project would be dead lmao

eternal night
#

probably

#

I mean, leafs chunk rewrite is pretty damn sexy

#

Well yes, bash has its place kekw

#

but doing everything needed to setup the spigot or paper workspace

#

in bash

#

is pretty painful

#

big W

vagrant stratus
#

Honestly Lynx the hard part's just gonna be getting server hosts to adopt it lmao

vocal cloud
#

Imagine not using a server manager and instead using a bash script

eternal night
vagrant stratus
#

I know certain hosts recommend my AV, so it's likely I can get them to adopt and recommend that as well lol

fading spindle
#

hey quick questions guys what was the syntax to sending a message to player chat again?

eternal night
#

player.sendMessage()

fading spindle
#

tysm

eternal night
#

|| player.sendMessage(Component.text("Message")); run ||

fading spindle
#

ok thx

eternal night
#

no that isn't it xD

#

thats why its in a spoiler

#

just "this is a message" or "ยง6This is gold"

vagrant stratus
#

but yea, it shouldn't be too difficult. Just gonna be a pain to write a bunch of emails lol

eternal night
#

who doesn't

#

yea the custom nbt thing in the recipe book is pretty meh

vagrant stratus
#

Regardless I highly doubt there'll be mass adoption quickly lol

mental sorrel
#

hey guys. any method of grabbing the owner (entity) of an inventory from a InventoryClickEvent ?

west quail
#

event.getWhoClicked() ?

#

or smth like that

mental sorrel
#

whoclick is the player,

west quail
#

yeye

#

wait

#

no clue, sr

kind hatch
sterile token
vagrant stratus
#

Honestly @eternal night like the only thing I really need to do is the new DB, the rest (excluding the XF site) is pretty much finished for a first release

sterile token
#

oh

#

I thought you need help

#

Also repesct please

#

Its the 2nd time i saw it to you in 1d

#

okay im not going to answer because its simple

#

๐Ÿคฃ

#

I mean i dont lost my time with this type of childs

eternal night
#

This has been a rather confusing conversation

sterile token
eternal night
#

Same kekw

river oracle
#

๐Ÿ˜ž

sterile token
#

Hey stop it law is here

vagrant stratus
#

oh and it's boring as fuck

mental sorrel
sinful rapids
#
Player giocatore = (Player) poliziotto.get(player.getName());

I tried to take the player via hashmap, but it marks it in red, how can I solve?

vagrant stratus
#

It should have a message telling you why it's red

sinful rapids
vagrant stratus
#

What's your HashMap storing?

sinful rapids
#

Ah, right, it contains strings

vagrant stratus
#

And it returns what exactly?

sinful rapids
#

string

vagrant stratus
#

That's why you're having issues.
A String cannot be a Player

sinful rapids
#

ok

vagrant stratus
#

What are you trying to do exactly?

sterile token
#

What is the best way for saving/loading a map from/to config?

river oracle
tardy delta
#

cant?

sinful rapids