#help-development

1 messages Β· Page 645 of 1

flint coyote
#

no for the bundle item

#
Minecraft Wiki

A bundle is an item that can store up to a stack's worth of mixed item types within itself in a single inventory slot. Items that stack to 16 occupy more space within the bundle, and items that do...

remote swallow
#

bc they still havent added it

flint coyote
#

probably never will with all those issues lol

quaint mantle
#

What is vanilla then?

remote swallow
#

regardless of the hundreds of community made ways to craft it

#

the bundle item

#

its literally called bundle

quaint mantle
#

Ah

remote swallow
#

it stored up to 64 items

#

like 1 poppy 42 oak sapings, 9 diamonds, 4 netherite, 8 oakplanks

wet breach
flint coyote
#

It is a planned item for like 3(?) versions now. They got plenty of duping issues (that even allowed to create stacks exceeding 64 and whatnot). Still did not manage to fix all of them so it never really got added

wet breach
#

like they just introduce the base thing

#

let the community flesh it out πŸ˜›

flint coyote
#

At this point it would be kinda embarrassing to do that. "We can't fix it, help pls"

lost matrix
#

What exactly, while looking at all the code you see on spigot, makes you think this a good idea

quaint mantle
#

do I need to store an entity ID and or entity UUID ?

wet breach
flint coyote
#

Yes. Serverside books

lost matrix
flint coyote
#

or another reasonable way to put in lots of text

lost matrix
#

Yes in that case the ID

wet breach
#

but yeah like 7smile7 said. I mean we already handle fixes for many dupe problems

#

the only times we can't is because it involves the protocol in some way

flint coyote
#

Although optional packages would be fine. Just like plugins basically

lost matrix
#

I mean the "community" is huge and there are a ton of different groups that all
want different things in the game. Im fine with what we have rn. But i would really
like a server side way to introduce new mobs, blocks and UI elements.

flint coyote
#

new mobs would be a huge step already

#

or even custom skins for current mobs without losing the "normal" mob

quaint mantle
#

Last question, what are angles called in protocollib?

PacketContainer#getAngles() isnt a thing

lost matrix
#

Arent angles just floats?

#

Or shorts

#

depending

wet breach
#

typically angles are floats

#

either a float or double

quaint mantle
#

so how do I know which one to write to in a protocollib packet

remote swallow
#

you dont need to download sources

#

just add the dependencies

wet breach
remote swallow
#

or if you arent using maven/gradle download the jar manually and add it as a api

wet breach
remote swallow
#

you get it from jitpack

simple schooner
#
Player p = Bukkit.getPlayer(e.getInventory().getHolder());
``` Hi! How do I get the player who interacted with the custom gui? (I'm sorry I'm kinda new to this, it hasn't been 1 day since I started.)
simple schooner
#

InventoryClickEvent

#

my code is soo garbage

#

it's nested

drowsy helm
#

getWhoClicked()

simple schooner
#

thank you!

#

I can finally make a simple kitpvp plugin

#

eyy

#

not bad progress

simple schooner
#
incompatible types: org.bukkit.entity.HumanEntity cannot be converted to org.bukkit.entity.Player```
#

am I dumb or am I dumb

drowsy helm
#

should be able to cast it

#
Player player = (Player)event.getWhoClicked();
simple schooner
#

OHHH

#

Right type check

#

thats what its called right

drowsy helm
#

huh

#

not sure what youre talking abt lol

simple schooner
#

nvm we call it type checking in lua

drowsy helm
#

java is stricly typed if thats what oyu mean

simple schooner
#

finally thank you

#
getServer().getPluginManager().registerEvents(new XPBottleBreakListener(), this);
        getServer().getPluginManager().registerEvents(new ShearSheepListener(), this);
        getServer().getPluginManager().registerEvents(new OnPlayerJoin(this), this);
        getServer().getPluginManager().registerEvents(new MenuListener(), this);```
#

also is there a way to shorten this?

drowsy helm
#

yes

#

gimmie one sec

#
public void onEnable(){
  registerEvents(
    new XPBottleBreakListener(), 
    new ShearSheepListener(), 
    new OnPlayerJoin(), 
    new MenuListener());
}


public void registerEvents(Listener... listeners){
  for(Listener listener : listeners){
    getServer().getPluginManager().registerEvents(listener , this);
  }
}```
#

thats how i do mine

#

some people would argue its more messy but its up to you

simple schooner
#

Thank you

quaint mantle
#

Is there a way to create a new instance of a packet without having the paramater to pass in.

Ex. ClientboundTeleportEntityPacket requires an entity, I would really prefer not to use reflection to keep this as speedy as possible, I also don't have an Entity on hand

hazy parrot
#

You can't create object without parameters if default constructor doesn't exist, even with reflection

quaint mantle
#

In an old project I just made a dummy entity for all packete

hazy parrot
quaint mantle
#

but I dont really want to do that

lost matrix
#

you can do an unsafe allocation and create an instance of a class that has no default constructor

quaint mantle
#

Is that slow?

hazy parrot
#

Also I might be misunderstanding packets as I never worked with them, but why u use EntityTeleport packet without entity

lost matrix
quaint mantle
#

Yeah I think I tried that at one point

lost matrix
#

Why do you need that anyways?

quaint mantle
#

I am trying to send ClientboundTeleportEntityPacket for an armorstand

#

packet armorstand

lost matrix
#

And what prevents you from just creating one using the constructor?

quaint mantle
#

actually I can prob use a FriendlyByteBuf

lost matrix
#

Then pass an entity... You should have an ArmorStand instance for your packet entity.

quaint mantle
#

Ig I can switch to that

lost matrix
#

Then rewrite your system to keep track of them.
Write a HologramManager or whatever and keep track with a Map<Integer, ArmorStand>

lost matrix
quaint mantle
#

Nah

#

Making some larger animations with spinning blocks for custom tools

lost matrix
#

Display entities are also something to consider

quaint mantle
#

I agree I run the server on 1.20.1 but I want to have support for 1.17+ players and I've had issues with display entities and viaversion

sterile breach
#

HI, i made a skyblock plugin. How to create an small world "islande"? juste create a normal world? or i use an api like worldedit?

remote swallow
#

you would have 1 world and use either schematics and worldedit or the structure api and per player world borders

shadow night
#

Per player world borders?

shadow night
#

Wait, what?

sterile breach
remote swallow
#

add an empty island betwen them

steady rapids
#

Hi, is there a method to get the block a player is looking at? I have the Vector rayTraceResult. Are there already existing methods or should I create one that checks all the blocks passed by the vector?

sullen marlin
#

getTargetBlock or .rayTraceBlocks

sterile breach
#

Hello

        new BukkitRunnable() {
            @Override
            public void run() {
                PlacedSpawner spawner = Database.getPlacedSpawner(location);
            }
        }.runTaskAsynchronously(plugin);
        return spawner;
    }

this code have a probleme (can't return spawner because async)

so what is can use? completablefutur?

eternal oxide
#

no

#

Do not wait for responses from a database

tender shard
#

i thougth you wanted to use block PDC for that

shadow night
#

what the heck is that

tender shard
#

what?

#

block pdc or their naive "async" code?

shadow night
#

I'm talking about the code

#

ik block pdc, as I've used it myself

#

(even tho I don't really remember lol)

tender shard
#

it's the naive idea of just being able to throw something into "async" and make it work like magic

#

as if it wasn't async

eternal oxide
#

he's expecting everything to wait for him to get teh spawner before it returns.

shadow night
#

._.

eternal oxide
#

he doesn;t understand tasks

shadow night
#

but isn't that what async will not do?

tender shard
#

typically people then get told to use a future and then they use CompletableFuture.supplyAsync and somewhere else they call get() or join() on that

eternal oxide
#

yep, its magic

tender shard
shadow night
#

._.

#

making async code was always confusing to me

#

in js you can just put async and await everywhere but not in java lol

tender shard
#

ofc you can do

#

you just do whenCompete on the future

#

or however it's called

eternal oxide
#

in java you never wait for anything async. Imagin it's a completely different worker

#

You tell it to do somethign and it goes off and does it

shadow night
#

oh my testing server is already online

eternal oxide
#

if you try to wait you lockup your own thread. Workers sitting around waiting

shadow night
#

locking up the own thread sounds like a very bad thing to do

eternal oxide
#

very

simple schooner
#

How do you make dictionaries in java

eternal oxide
#

seeing as the server is basically a single thread

tender shard
simple schooner
#

ohhh

tender shard
#

new HashMap

shadow night
eternal oxide
#

its a fork so best not to

tender shard
# simple schooner ohhh
Map<String,Integer> myMap = new HashMap<>();
myMap.put("mfnalex", 28);
myMap.get("mfnalex") // returns 28
sterile breach
tender shard
#

pretty weird idea to store your data twice

shadow night
sterile breach
eternal oxide
#

once you pass something off async you are giving up all control over it.

sterile breach
#

i can't get it with combletablefutur?

eternal oxide
#

you must allow your new async task the responsibility of dealing with everything from that point

#

ie, when it gets that spawner it's the async tasks job to handle it

sterile breach
tender shard
#

is this supposed to be one sentence

#

because I am confused by this grammar

eternal oxide
#

Is yoru database an ACTUAL database or it is block PDC?

tender shard
#

they have both

eternal oxide
#

nice and confusing πŸ™‚

sterile breach
sterile breach
eternal oxide
#

no, once you went async you are no longer IN your event

tender shard
#

good luck with that elgar, I'll go to sleep lol

eternal oxide
#

πŸ™‚

sterile breach
eternal oxide
#

Your Async code does not run the instant you call run. It executes the next tick, after the event ends

#

if you pass any work off async you have to deal with everything that happens after in the task

quaint mantle
#
SUtil.delay(() -> {
                        Bukkit.broadcastMessage(DUtil.trans("&7Saving..."));
                        Bukkit.dispatchCommand((CommandSender)Bukkit.getConsoleSender(), "fsd");
                        Bukkit.dispatchCommand((CommandSender)Bukkit.getConsoleSender(), "kickall &cThe Server is restarting!");
                        Bukkit.dispatchCommand((CommandSender)Bukkit.getConsoleSender(), "stop");
                    }
                }
            }```
im getting error expression ";" or "," expected
eternal oxide
#

does yoru delay need another argument?

quaint mantle
#

10L

#

I think after the "stop"

eternal oxide
#

nope, it goes outside the }

#

"stop");
}, 10L}}

quaint mantle
#

yeah I mean like

#

o

#

so its not }10L);

#

?

eternal oxide
#

I'm only guessing as it's your util class, but a delay would need a value so another arg

#

which would be , 10L

sterile breach
eternal oxide
#

no

#

think of two people...

#

one is your main server thread (the event)

#

the second is your async task

quaint mantle
#

is that correct?

eternal oxide
#

spam

quaint mantle
#

mb

#

?paste

undone axleBOT
quaint mantle
eternal oxide
#

once person 1 asks your second person to do the async stuff, he can;t sit around and wait for the other chap to finish

quaint mantle
#

alr ig ill wait

eternal oxide
#

both people go and do their work

quaint mantle
#

but

#

that doesnt fix the issue

#

not its saying class expected

eternal oxide
#

what is SUtil.delay ?

quaint mantle
#

o wait

#

figured it out forgot about it in SUtil

buoyant viper
#

DUtil.trans

buoyant viper
lilac dagger
#

does it even matter to use nano time when you're dividing by such a number?

lost matrix
simple schooner
#
ItemStack ironHelmet = new ItemStack(Material[plugin.getConfig().getItemStack("warrior.helmet")], 1);``` Am I doing this right?
remote swallow
#

no

simple schooner
#

sorry java is harder than I thought

#

oh

remote swallow
#

ItemStack ironHelmet = plugin.getConfig().getItemStack("warrior.helmet")

remote swallow
#

oh thats a material

simple schooner
#

and it would look like that in the config right?

remote swallow
#

ItemStack ironHelmet = new ItemStack(Material.getMaterial(plugin.getConfig().getString("warrior.helmet"), 1);

#

are you using vault api

#

send it according to the response

lost matrix
# quaint mantle https://paste.md-5.net/urikohekup.cs

This is how your code would look refactored:

    Server server = Bukkit.getServer();
    Map<Server, Integer> smap = RebootServerCommand.secondMap; // This is bad practice btw
    Integer current = smap.get(server);
    int currentVal = current == null ? 0 : current.intValue();
    smap.put(server, currentVal - 1));
    
    if (currentVal <= 5 && currentVal > 0) {
        Bukkit.broadcastMessage(DUtil.trans("&c[Important] &eThe server will restart soon: &b" + reason));
        Bukkit.broadcastMessage(DUtil.trans("&eServer closing down in &c" + smap.get(server) + " &eseconds"));
    } else if (currentVal <= 0) {
        Bukkit.broadcastMessage(DUtil.trans("&c[Important] &eThe server will restart soon: &b" + reason));
        Bukkit.broadcastMessage(DUtil.trans("&eServer is &cshutting down&e!"));
        cancel();
        SUtil.delay(() -> {
            Bukkit.broadcastMessage(DUtil.trans("&7Saving..."));
            Bukkit.dispatchCommand((CommandSender)Bukkit.getConsoleSender(), "fsd");
            Bukkit.dispatchCommand((CommandSender)Bukkit.getConsoleSender(), "kickall &cThe Server is restarting!");
            Bukkit.dispatchCommand((CommandSender)Bukkit.getConsoleSender(), "stop");
        }, 10L}
    ...
remote swallow
#

you would just overwrite essentials commands

quaint mantle
#

oh hey smile

#

o/

remote swallow
# simple schooner thanks

been as ur new to java, id recommened doing some coding, learning stuff in/about java that can help you with making the plugin

lost matrix
remote swallow
#

you either have to modify essentials' message configs, or make ur own command to handle it all

simple schooner
#

lol

remote swallow
lost matrix
#

What do you mean? You can just create a /bal <player> command and request the balance from vault, then print it in chat

simple schooner
#

i'm just relying on my common sense rn I mean every function seems understandable if you know english

#

lol

remote swallow
#

yeah

silver robin
lost matrix
remote swallow
#

you are probasbly one of the few people that is actually learning java, instead of just begging for help here being sent the learnjava command every few messages

simple schooner
#

e my code is garbage rn

remote swallow
simple schooner
#

it's nested

#

Its hurting my eyes

remote swallow
#

you learnt early returns yet?

simple schooner
#

🧌

lost matrix
remote swallow
simple schooner
remote swallow
simple schooner
#

it breaks the code

#

I've used that alot in lua

remote swallow
#

lol

simple schooner
#

damn they exist here

remote swallow
#

very useful for making code more readable

lost matrix
sterile breach
eternal oxide
#

you are not in an async chat event though

lost matrix
# simple schooner it breaks the code
  @EventHandler
  public void onDamage(EntityDamageByEntityEvent event) {
    Entity attacker = event.getDamager();
    Entity defender = event.getEntity();
    if(attacker instanceof Player) {
      Player attackerPlayer = (Player) attacker;
      if(defender instanceof Player) {
        Player defenderPlayer = (Player) defender;
        if(!CombatUtils.areEnemies(attackerPlayer, defenderPlayer)) {
          event.setCancelled(true);
        }
      }
    }
  }
  @EventHandler
  public void onDamage(EntityDamageByEntityEvent event) {
    Entity attacker = event.getDamager();
    Entity defender = event.getEntity();

    if(!(attacker instanceof Player)) {
      return;
    }
    Player attackerPlayer = (Player) attacker;

    if(!(defender instanceof Player)) {
      return;
    }
    Player defenderPlayer = (Player) defender;

    if(CombatUtils.areEnemies(attackerPlayer, defenderPlayer)) {
      return;
    }
    
    event.setCancelled(true);
  }

You simply return early if a critical condition is not met

wet breach
lost matrix
simple schooner
#
getServer().getPluginManager().registerEvents(new XPBottleBreakListener(), this);
        getServer().getPluginManager().registerEvents(new ShearSheepListener(), this);
        getServer().getPluginManager().registerEvents(new OnPlayerJoin(this), this);
        getServer().getPluginManager().registerEvents(new MenuListener(), this);
        getServer().getPluginManager().registerEvents(new KitMenuListener(), this);```
#

I still dont know how to make this shorter 😭

remote swallow
#

vararg method

simple schooner
#

could I iterate through the class folder and register each class

#

😭

lost matrix
#

In theory yes. But thats meta programming and can lead to problems quickly.

simple schooner
#

damn

remote swallow
#

public void registerListeners(Listener... listeners) {
    for (Listener listener : listeners) { 
        Bukkit.getPluginManager().registerEvents(listener, this);
    }
}
simple schooner
#

alr i'll figure it out on my own

#

aaa no more spoonfeeding

#

i'll figure it out eventually

remote swallow
simple schooner
#

I mean it ruins the fun when someone does the work for you

sterile breach
lost matrix
#

Nope

sterile breach
#

sorry

simple schooner
lost matrix
#

All good

remote swallow
simple schooner
#

or maybe i'm mistaken

remote swallow
#

probably multiple names

trim lake
#

Sorry for late reply I fall a sleep. πŸ˜„ Thanks that will be realy awesome. Most of the time I just take a look on what methods IDE suggest or just google it.

twin venture
#

hi , did anyone work with LocaleDateTime before?

#

weird problem .. i set the diamond sword to have 1 hour usage :
https://prnt.sc/nb02BEKG2-FC

but its not making a custom timed items , i already have the structure ready , only the time problem ..

Lightshot

Captured with Lightshot

#

any idea where could be wrong?

glossy venture
#

broo imagine how fast java could be if the std library was implemented as primitives in the jvm

#

actually maybe the JIT sort of does that already but it prob still has some overhead

sterile breach
#

hi, if I need to do something asynchronous in a synchronous event so that the event waits for the end of my asynchronous task without blocking the main thread I have to use a CompletableFuture right?

ivory sleet
#

Na

#

But why if I may ask?

eternal oxide
#

I already told you, you can NOT wait for a response to an async task in an Event without hanging that event

sterile breach
#

for example, if I have to query the database in an event, do I have to do it in async?

ivory sleet
#

I mean

#

You don’t have to

#

But its recommended

#

Since a query might take really long to execute

#

And then if its sync, it means code flow will wait for it to finish and then as elgar said you hang the server

#

Since every mob, every chunk and so on has to wait for ur query

sterile breach
#

yes, that's why I wanted to do it in async, but it doesn't seem to work.

remote swallow
#

show ur code then

eternal oxide
#

get ready for the same code

sterile breach
#

what?

ivory sleet
#

Just send it

eternal oxide
#

I and others have told you, You can NOT wait in an Event for your database response. Your event has to continue. Your Async task can not return a value to be used IN your Event without haanging your server

remote swallow
#

time to learn about completeable futures for him then

sterile breach
#

so I have to find a way not to have to query the database when an event occurs.

ivory sleet
#

Na bro

eternal oxide
#

You need to either pre-load whatever data you need, OR pass off all code you would normally do based upon the response to your async task to perform.

ivory sleet
#

Send code

remote swallow
#

id say this data should be cached

ivory sleet
#

Either u cache the data in an earlier stage, or you use some sort of polling design

sterile breach
#

polling? what do you mean by that?

#

the cache problem. I have to load my whole table on startup, and I guess that's not a good thing either?

ivory sleet
#

Send the code

#

Just send it

sterile breach
#

it's divided into several files, so I think it'll be easier to explain it to you (if you really want the code because you didn't understand it, let me know).

then.
When a block is broken, if it's a spawner, I have to check whether it belongs to a player. To do this, I make a select request to the db, sending the block's location. At first, I loaded my entire db into a cache, but I realized that this was a bad thing.

ivory sleet
#

Na

#

Put it on github or sth

eternal oxide
#

you don;t need to load any data on a block break

#

You pre-load the data for all blocks in a chunk you have data on in the ChunkLoadEvent.

#

discard it in ChunkUnloadEvent

twin venture
#

runnable to set item lore each 1 second , what's the way to do it?

eternal oxide
#

all you need to do is add a two colums to yoru tables for world and chunk x,z

twin venture
#

each 1 second the lore is changed :p

ivory sleet
twin venture
#

when i do weird bug appear

ivory sleet
#

ItemStack is far from performant in the first place

twin venture
#

it get the item back , and then get it fword

#

idk how to explain the bug ..

ivory sleet
#

If you want the best performance, like going to the extremities then you wanna use nms all the way probably but (almost) no one does that

twin venture
#

nms items hmm

#

do you have minecraft open:?

ivory sleet
#

Na

#

Im on my phone

twin venture
#

i have a bug i don't know how to describe it ..

ivory sleet
#

Can u record it

twin venture
#

i will try with my phone

ivory sleet
#

Oh yeah

#

That’s just the client

#

Not a bug

twin venture
#

there is nothing i can do to fix it?

ivory sleet
#

I dont think so

#

Maybe with resource packs

twin venture
#

oh no ..

tender shard
#

?notworking

undone axleBOT
#

"Does not working" is a useless statement. Please describe what exactly is not working, what you expect it to do, and what actually happens. If you get any console errors, also ?paste the entire stacktrace.

eternal oxide
# twin venture

Thats client side, no way to stop it. When you change meta on an item teh client replaces the current item in your hand.

twin venture
eternal oxide
#

nope

#

Not that I know

twin venture
#

do you recommend another way?

#

for the thing iam doing?

eternal oxide
#

There is no way that I know of

twin venture
#

alright thanks ..

#

explain your problem

#

show a part of code related to your problem so we can know what's accutlly wrong

undone axleBOT
eternal oxide
#

you can;t getPlayer for an offlinePlayer

twin venture
#

i would use OfflinePlayer

#

Bukkit.getOfflinePlayer(name);

#

alright

sterile breach
eternal oxide
#

no

#

What exactly are you checking for if a spawner is broken?

undone axleBOT
sterile breach
sterile breach
tender shard
#

and why can't you just load a set of locations during onEnable

eternal oxide
tender shard
#

or check whether that block is a "registered block" using CustomBlockData

eternal oxide
#

if someone pushes a spawner with a piston, your database is now broken

sterile breach
tender shard
#

do you expect to have more than 20 thousand spawners?

ivory sleet
#

Only so much we can do w/o it

twin venture
#

no , i dont think you need to do that :

just do return Bukket.getOfflinePlayer(name).getuuid();

eternal oxide
remote swallow
#

oh god no dont loop all offline players

#

if you wanna check if they've actually played just use #hasPlayedBefore

vast ledge
#

yea

ivory sleet
#

Especially since they updated their code

remote swallow
#

why arent they just saving the players data when they leave and loading it on joi n

#

if you do that and get thousands of players join intotal you will loop them all

#

thats very resource heavy

sterile breach
sterile breach
remote swallow
#

literally all you need to do is ```java

private UUID getOFflineUUID(String name) {
OfflinePlayer offlinePlayer = Bukkit.getOfflinePlayer(name);
if (offinePlayer.hasPlayedBefore()) return offlinePlayer.getUniqueId();
return null;
}

tender shard
tender shard
remote swallow
#

update it periodically and when they leave

sterile breach
#

ah yes

tender shard
remote swallow
tender shard
#

where

remote swallow
#

above my code

sterile breach
remote swallow
#

so dont use pdc then

tender shard
#

then there's no problem in just loading a Set<Location> or whatever in onEnable

remote swallow
#

jsut store it in a map, you dont need to instantly update the db

#

add it to the map then update it every 30-60 minutes

twin venture
sterile breach
remote swallow
tender shard
#

I'd highly suggest you to use ACF, then you don't have to do all this command parsing

vast ledge
#

yea

#

ACF for the win

tender shard
#

in ACF all you'd need is this @quaint mantle

@CommandAlias("balance")
public class BalanceCommand extends BaseCommand {
    
    @Default
    public void onBalanceSelf(Player sender) {
        sender.sendMessage("Your balance is " + getBalance(sender));
    }

    @Default
    public void onBalanceAnother(CommandSender sender, OnlinePlayer anotherPlayer) {
        sender.sendMessage("Balance of " + anotherPlayer.getPlayer().getName() + " is " + getBalance(anotherPlayer.getPlayer()));
    }

    private String getBalance(Player sender) {
        double balance = getBalanceFromDatabaseOrSomething(...);
        return String.format("%.2f", balance);
    }
    
}
#

it automatically does stuff like "Can only be executed by players" or "Player not found or online" etc

vast ledge
#

You dont need CommandSender

#

you can just use Player player

#

there

remote swallow
#

what about console

vast ledge
#

oh

tender shard
#

why would you disallow the console to check player's balance

remote swallow
#

there you would want console

vast ledge
#

if you want console

#

ye

#

soz

#

forgor that console does that

tender shard
#

console's a creep and checks balances all day

remote swallow
#

trying to find someone to sugar parent

vast ledge
#

What

#

sugar parent??

tender shard
#

console needs a sugar daddy

vast ledge
#

true

#

@warped gulch

#

oh soembody actually has that name

icy beacon
#

you just pinged a random person

remote swallow
icy beacon
#

so it can be a daddy if you want

remote swallow
#

you can be a daddy if you want

icy beacon
#

in russian console is female, i bet in some language it's male, so it probably has gender dysphoria

icy beacon
remote swallow
#

no one said sugar daddy

icy beacon
remote swallow
#

being called daddy doesnt always mean being a parent

icy beacon
#

and i'm too young for being called a daddy by anybody adequate

simple schooner
#
public class Messages {
    public static void msg(Player p){
        HashMap<String, String> messages = new HashMap<>();
        messages.put("welcome", "&6&lSCEPLIX: &1&lWELCOME " + p.getName());
        messages.put("warrior-kit", "&2&lSUCCESSFULLY EQUIPPED WARRIOR KIT!");
    }

}
#

will this work lol

tender shard
#

sure but it's 100% useless

#

you create a hashmap that gets GCed without being used once

simple schooner
#

I thought storing messages in another class would make my code more cleaner

remote swallow
#

use an enum or public static final stuff

sterile breach
icy beacon
#

and you are not even using it

simple schooner
#

oh damn

remote swallow
simple schooner
#

cant i inherit those in another class

icy beacon
#

if you want to use something like player's name just use a placeholder like %player% that you replace when using the message

remote swallow
#

make it a global map and add a getter

sterile breach
simple schooner
#

okay I don't know those stuff yet, it's only been day 1

icy beacon
#

even better, fetch your messages from a configuration

icy beacon
#

start with something that's not too hard

simple schooner
#

welp time to make more crazy stuff till I learn new stuffs

remote swallow
# remote swallow no you wouldnt

there isnt really ever a need to instantly update a database, you should update the data stored periodically and update it when they leave

icy beacon
#

and make sure to be at least knowledgable of java before coding plugins, because it's going to be very problematic and difficult if you are not familiar with the language

sterile breach
remote swallow
#

yeah

#

you can store it in amap

#

either a multi map or a Map<UUID, List<>>

#

then every 30-60 min you use workdistro to save all the data

sterile breach
#

but in this case I can't just load the connected players, I have to load all the players.

remote swallow
#

can 1 player see another players spawners

sterile breach
#

no, but let's imagine that x is connected, if x breaks a spawner that belongs to y. y's data won't be loaded, or else y's data won't be loaded.

simple schooner
#

i'm proud of it, I didn't copy anyones code πŸ₯³

remote swallow
#

you dont nseed to fully load their data

simple schooner
#

and the kits are fully customizable in the config file

icy beacon
remote swallow
#

the player isnt online it doesnt matter when their data is updated

icy beacon
#

in that case it shouldn't be too difficult for you to load messages from a file

#

i think you can do that

simple schooner
#

yeah I just need to know how to inherit stuff from other classes

tender shard
# simple schooner ```java public class Messages { public static void msg(Player p){ Ha...

I'd do it sth like this

public class Messages {
    
    private final Plugin myPlugin;

    public final Message WELCOME;
    public final Message RELOADED;

    public Messages(Plugin myPlugin) {
        this.myPlugin = myPlugin;
        
         this.WELCOME = new Message("welcome", "Welcome to the server, %1$s!");
         this.RELOADED = new Message("reloaded", "Reloaded config.yml.");
    }

    public class Message {

        private final String text;

        Message(String path, String defaultMessage) {
            this.text = myPlugin.getConfig().getString("messages." + path, defaultMessage);
        }

        public String getText() {
            return text;
        }
    }

}
icy beacon
#

wdym?

icy beacon
simple schooner
remote swallow
icy beacon
undone axleBOT
remote swallow
#

static or instanced

sterile breach
simple schooner
#

oh I'll read about those

#

ty

remote swallow
#

wait why are you cancelling the event

#

can a player break someone elses spawner

sterile breach
#

I don't cancel it

simple schooner
remote swallow
#

so use a completeable future to update the db

tender shard
simple schooner
#

okay I don't know what im saying

tender shard
#

it's pretty straightforward

sterile breach
remote swallow
#

okay so, update it in the db

#

you still dont need all their data loaded

simple schooner
#

i'm not familiar with those stuff

sterile breach
remote swallow
#

yeah

#

or an update

sterile breach
#

yes

tender shard
sterile breach
simple schooner
#

man lua is far more easier than java

remote swallow
#

you do it async

sterile breach
#

i can in async

tender shard
#

e.g. what the heck is the difference between : and . in lua

rotund ravine
#

idk ask chatgpt

tender shard
#

I know the difference, it's just confusing

rotund ravine
#

Well

#

I asked anyway

#

In Lua, the colon (:) and dot (.) are used for accessing fields (members or methods) of a table. The main difference between these two notations is how they handle the self parameter when calling a method.

  1. Dot Notation (.):
    In the dot notation, you explicitly need to pass the self parameter when calling a method. This means that you have to manually include the reference to the table as the first argument of the method.

Example:

local myTable = {
    value = 42,
    func = function(self)
        print("Value:", self.value)
    end
}

myTable.func(myTable)  -- Output: Value: 42
  1. Colon Notation (:):
    The colon notation is a shorthand in Lua for method calls that automatically passes the table itself as the first argument (self) to the method. When using the colon notation, you don't need to explicitly pass the self parameter; it's implicitly added.

Example:

local myTable = {
    value = 42,
    func = function(self)
        print("Value:", self.value)
    end
}

myTable:func()  -- Output: Value: 42

So, using the colon notation is just a convenient way of calling methods on tables when you want the table itself to be automatically passed as the first argument. It is commonly used in object-oriented programming in Lua to represent objects and their methods. If you use the dot notation, you have to provide the self parameter manually.

tender shard
#

yeah it's a bit like the "receiver parameter" in java

sterile breach
# remote swallow no you dont

another question. Maybe I didn't understand what was explained to me about async in events. But isn't it possible to make a future completable in an event, for example, in order to make a request in the event without cluttering up the main?

remote swallow
#

you use whenComplete if you need to do something when its done

simple schooner
#

im gonna call this a day

remote swallow
#

if you call .join or .get that blocks the main thread

simple schooner
#

yey i've accomplished alot today, I made my very first plugin (a shitty kitpvp with nested code)

sterile breach
remote swallow
#

you would have to finish the event in whenComplete but most likely

#

you cant cancel the event or uncancel it but other stuff you can do

sterile breach
#

and practising this kind of method is a bad thing, I suppose.

remote swallow
#

running code after a future is normal

sterile breach
#

and in my current case, making a future claim when a block is broken is not as good as doing what you advised?

remote swallow
#

what

#

what is a future claim

sterile breach
#

ups

#

completable futur

remote swallow
#

yeah i know what a completeable future, whats a future claim

sterile breach
#

I made a mistake, I meant completeable future

remote swallow
#

okay then, if you makea future and run it async on a block break to update something in a db thats fine in most cases

#

but making one in every block break is the issue

sterile breach
#

but every broken spawner in itself isn't so bad?

remote swallow
#

why for every spawner

#

you shouldnt only need to update the db for players that arent online

#

you store the player its owned by on the spawners pdc, and use that to update the db

sterile breach
#

yes yes, I'm asking for information to better understand when and how to use completables future . I know that the pdc method is better. But in theory I could also make a completables future on each broken spawner and see if it's in the db (I don't plan to do it).

remote swallow
#

yeah you could but you in 99% of cases would never ever need to query the db directly for something

sterile breach
#

okay, thanks for all the clarification anyway.

silver robin
#

How can I "register" something into the server physics engine? What I mean is let's say there is a point, in mid air, and then it gets affected by gravity (serverside), moved by water, etc. Similar to how dropped items work but that is mostly clientside . Maybe experience orbs too, they get a force when near a player. Is there a interface such object should implement too?

ivory sleet
#

well the system just ticks it basically

#

checking for collisions, intersections and so on and then performing movement

silver robin
#

Yeah, is there a way to let the server do it instead of writing code for it?

livid dove
silver robin
#

wdym "in the same way"? Mobs use ai for pathfinding, orbs just get a force like a magnet

undone axleBOT
remote swallow
#

do this after the arg check

livid dove
tender shard
sullen canyon
#

this is eclipse

icy beacon
#

this looks like md5 pastebin

remote swallow
#

it is md hastebin

sullen canyon
tender shard
#

but why does it not use monospaced font

icy beacon
#

ok good lmao

remote swallow
#

i changed my font

tender shard
#

wtf

remote swallow
#

illusion doesnt like my smooth font

icy beacon
#

yeah it does

tender shard
#

yeah that looks correct

#

who uses a normal font for code lol

#

i could understand coding in comic sans

icy beacon
#

what the fuck alex

tender shard
#

yo guys what's wrong with mah code it no workings

icy beacon
#

i would refuse to provide any help at all

shadow night
icy beacon
#

lmao

#

accurate

remote swallow
#

my phone font looks nothing like that

icy beacon
#

on older samsung phones it looks basically like comic sans

shadow night
#

Well, an average samsung user sets their font to that scribbly weird font

#

I have a samsung and I use a normal font too lol

icy beacon
#

but like 4 years ago it was there

shadow night
#

I remember a guy who would flex with his samsung phone and his font lmao

icy beacon
#

well samsung does not come cheap

#

nice flex

shadow night
#

Eh

#

I got my s8 for free

icy beacon
#

??

#

elaborate

shadow night
#

From my mom tbh, but doesn't matter lol

icy beacon
#

oh

#

well not exactly free in that case

shadow night
#

Well, yeah

icy beacon
#

my dream phone is a samsung but they are so fucking pricey

river dirge
#

buy referb πŸ˜›

icy beacon
#

oh

river dirge
#

referbished

icy beacon
#

yeah

#

perhaps maybe

#

but i'm currently running on 45$

shadow night
#

I want a good samsung mobile device setup but bro samsung tablets are so trash
Cpu supports 64-bits, can fit 8gb of ram, gets a 32-bit os and 3 gigs of ram

river dirge
#

got my note 10 + 3 years ago and did replace my charging port yesterday myself πŸ™‚

remote swallow
#

i need a new battery

#

and more storage

icy beacon
tender shard
remote swallow
#

its actual capacity is like 70% now probaby

icy beacon
tender shard
#

yeah it was a joke, you know

icy beacon
#

works like a charm

shadow night
remote swallow
#

yr

tender shard
fast merlin
#

is there any easy way of changing players name above head like maybe using protocol lib? just tryna add a bit of colour

river dirge
icy beacon
shadow night
icy beacon
#

F

shadow night
#

Because for some fucking reason it comes with a 64-bit supporting cpu and a 32-bit os

river dirge
sullen canyon
icy beacon
#

i want a tablet for notewriting, i take a lot of notes especially when learning a language, and it's my dream to actually have a device where i can keep handwritten notes organized

sullen canyon
#

we cook this in russia

#

πŸ€—πŸ€—πŸ€—πŸ€—

icy beacon
#

Ρ‡Π΅ это

fast merlin
#

is there any easy way of changing players name above head like maybe using protocol lib? just tryna add a bit of colour

remote swallow
shadow night
icy beacon
# sullen canyon

Ρ‚Ρ‹ Π·Π°ΠΏΠ΅ΠΊ сливу Π² сырС?

remote swallow
#

was that cooked in a fire box

river dirge
sullen canyon
icy beacon
sullen canyon
#

это Π»Π΅Π³Π΅Π½Π΄Π°Ρ€Π½Π΅ΠΉΡˆΠ°Ρ Π΄ΡƒΡ…ΠΎΠ²ΠΊΠ°

river dirge
shadow night
#

About the iPad thing tho, a lot of my stuff I do either requires jailbreak for apple systems or isn't available there at all

shadow night
river dirge
sullen canyon
icy beacon
#

oh right, makes sense

icy beacon
#

Π½Ρƒ Π»Π°Π΄Π½ΠΎ

#

Π°Ρ…Π°Ρ…

#

i'll go on coding

#

cya everyone

#

have fun

river dirge
#

bye

fluid river
#

freejava

onyx fjord
#

English only @icy beacon @sullen canyon

rain night
#

Is there any convenient way to regnerate a world at server runtime?

sullen canyon
#

if thats what you are looking for

rain night
#

Can i only delete a world with deleting the dir?

quaint mantle
#

I'm making some block animations where a block spins and stuff at an angle, would I want to use an armorstand's hand or helmet?

quaint mantle
shadow night
#

what formula does minecraft use to calculate the jump height with a jump boost pot?

warm mica
sullen canyon
#

it is

shadow night
#

pitsa be like

remote swallow
#

pitsa?

#

pizza

shadow night
#

that wasn't a mistake

#

don't worry

#

I know how to spell pizza lol

remote swallow
#

are you sure

shadow night
#

yes

remote swallow
austere cove
#

actually that's wrong

#

0.0308354 * level^2 + 0.744631 * level + 1.836131

#

:)

shadow night
#

what are all those numbers

#

or why

chrome beacon
#

We love magic values

shadow night
#

and why did my copilot die

#

okay I think restarting IJ fixed it

#

what was the thing to check if a player is allowed to fly?

quaint mantle
#

what is OfflinePlayer supposed to mean? A player that's offline?

chrome beacon
#

Yes

quaint mantle
#

then shouldn't PlayerQuitEvent.getPlayer() return an OfflinePlayer?

chrome beacon
#

The event fires before the player is removed

quaint mantle
#

ahh alright ty

shadow night
#

is there any way to detect if the player is currently climbing a vine, ladder of a scaffolding?

opal carbon
quaint mantle
#

hm

opal carbon
#

Player extends OfflinePlayer

shadow night
#

Player extends like 4 classes or something

opal carbon
#

well

#

yeah 4 interfaces

shadow night
#

Well, idk lol

#

What are interfaces even for, I don't really get those

opal carbon
#

basically a class can only extend 1 class

#

abstract or not

#

but they can implement multiple interfaces

#

however an interface can extend interfaces

#

an interface is basically just a template for a class though

shadow night
#

Hm

#

If I had some classes and I had a function that would only accept certain classes of those, I could make it accept all classes that implement the interface, right?

opal carbon
#

yup

#

spigot api heavily uses interfaces since they let them hide nms code

shadow night
#

Lol

#

There's no nms here

opal carbon
#

wdym

shadow night
#

I don't mean anything

mortal badge
#

Hey, does anyone here with some experience making Spigot Plugins have a minute to help with somethin?

opal carbon
#

whats that website again

#

dont ask to ask

shadow night
#

Yeah

opal carbon
#

or just ask or smthn

shadow night
#

Thought of that too

#

Just ask, don't ask to ask

mortal badge
#

Fair enough, though it doesn't hurt to be polite does it

#

Alright so

shadow night
#

Β―_(ツ)_/Β―

opal carbon
#

that one

mortal badge
#

There's this Plugin that I used a while back and I tried coding in some functionality but I couldn't figure it out since I don't do plugin dev. Essentially the only thing I needed to do was to make something configurable in the config file. Here's the repo: https://github.com/ericyoondotcom/MinecraftManhunt
In the TrackManager.java there is a list of songs, and I'd like to move that to the config

tender shard
shadow night
#

what does it use then

tender shard
#

oh wait, it does. the pom is inside the directory

shadow night
#

Oh

#

Lol

mortal badge
#

How so? I'm pretty sure I compiled it succesfully a few times

eternal oxide
#

it has a pom so shoudl be maven

mortal badge
#

Yep it does use Maven

tender shard
#

yeah it's confusing, there's an IJ project file at the root but a pom in a subdirectory

#

weird layout

vast ledge
#

Weird

shadow night
#

Modules

vast ledge
#

Weird is a weird word to write

#

it doesnt sound anything like weird

shadow night
#

Kinda

tender shard
#

the "trackURLs" is a map that's created in the field declaration. you could just remove all the put statements, and then in the constructor loop over the config and add them manually or sth

shadow night
vast ledge
#

yea

#

that looks like dutch tho

shadow night
#

we eerd?

#

it kinda does lol

#

Oh and schnitzel

vast ledge
#

schnitzel Conclube forbayed the schnitzel

#

whats the past of forbidd

shadow night
#

for biden

vast ledge
#

U forbiden the use of schnitzel?

#

no

#

that sounds wrong

shadow night
#

Lol

#

But I've made a server for schnitzel, even tho temporary

vast ledge
#

No advertising

shadow night
#

Got no hosting rn anyways lol

vast ledge
#

Look at this tho, isnt it nice

tender shard
mortal badge
vast ledge
#

Mfnalex, how can i make a block face somebody, do i need to get the Furnace Meta?

tender shard
#

i haven't tested it btw, i dont even know what that plugin does

mortal badge
tender shard
#

so you'd get the BlockState, cast it to Directional, and update it accordingly

vast ledge
#

Got it

shadow night
#

Mfnalex, is there anything you do not know about spigot or bukkit?

vast ledge
#

Its Furnace furnace = (Furnace) block;
block.setFacing();

tender shard
#

no

#

the BlockState

#

you cannot just cast a block to a blockstate

#
Directional directional = (Directional) block.getState();
#

if you already have a Furnace object, you can also just use that

#

Furnace extends Directional

tender shard
#

and many other things

shadow night
tender shard
#

i cannot give examples of things I don't know because if I could, then I'd knew them

dry hazel
#

πŸ˜‚

shadow night
#

Hmm lol

tender shard
#

ok here's a thing I didnt know

#

there's a class called "FurnaceAndDispenser"

shadow night
tender shard
#

wtf is that

shadow night
tender shard
#

probably some 1.8 shit

shadow night
#

Dispefurnace

tender shard
#

yeah it's extending MaterialData

#

it's 1.8 shit so no wonder I didnt know it

#

if you ever see "MaterialData" somewhere, run away fast

shadow night
#

I have an idea

#

Lets make a furnace that would be able to look it any direction and spit out the item when it cooks and also emit a redstone signal

native bramble
#

https://pastebin.com/fngvUSbL
The second if(DiscordCodeHandler.isPlayerHasCode(playerUUID) and getCode function works but for some reason e.dissalow does not work. The player calmly logs on to the server.
No errors in the console

tender shard
#

quick trivia question out of my discord quiz bot's "spigot api" category:

#

Which enum class defines the fields \"Highest\", \"High\", \"Normal\", \"Low\" and \"Lowest\"?

echo basalt
#

ACtually that's not EventPriority

#

because MONITOR is lacking

tender shard
#

the question doesnt state that it ONLY defines those fields

lilac dagger
#

^

echo basalt
#

fuck you

lilac dagger
#

he's right tho

tender shard
#

however it's obviously not EventPriority

#

notice the weird Upperlowercase spelling

lilac dagger
#

yeah

worldly ingot
#

ServicePriority

lilac dagger
#

uh
?

tender shard
#

correct. that's unfair choco, you probably PRed that yourself 20 years ago

worldly ingot
#

Was added back in like 2011 by sk89q

#

WorldEdit guy

lilac dagger
#

where?

tender shard
#

how does an enum with such weird names got merged lol

#

i mean why is not HIGHEST

worldly ingot
#

Bukkit's standards weren't well established back then

echo basalt
#

Man this fucking plugin

worldly ingot
#

I mean they weren't really well established until we took over

echo basalt
#

I'm meant to hook into

#

Using guice to dependency inject everything

tender shard
#

i always thought it was a general java rule to use ENUM_NAMES

#

like ClassNames and STATIC_FINAL_FIELDS

worldly ingot
#

It is. Not in C++ though. Some people come from different languages. Like I said, there were no standards on the Bukkit project back then

echo basalt
#

but for some reason this mf used a custom classpath system grr

#

what is this shit

lilac dagger
#

it's nice knowing that even the world edit guy was a noob once

worldly ingot
#

Don't think he was a noob. Just probably worked with C++ before Java

lilac dagger
#

that explains it too

worldly ingot
#

In C++, uppercase enum names aren't standard because it conflicts with the naming conventions of preprocessor macro definitions

tender shard
#

but this FurnaceAndDispenser thing is funny, I added that to my quiz as well

#

hm... what can be a furnace or dispenser? Of course: a FurnaceAndDispenser

shadow night
#

I'm gona memorize that

worldly ingot
#

PES_Giggle There weren't many types that adhered to the byte data of furnaces and dispensers then

young knoll
#

Isn’t that just what we call rotatable now

#

Or orientable

#

Idk

worldly ingot
#

Directional, yes

tender shard
#

quick, who knows this:

How many PrimitivePersistentDataTypes does the Bukkit API provide?

young knoll
#

Back in Ye old days when dispensers could only face 4 directions smh

worldly ingot
#

Off rip? lol

#

Probably like 12 or something

worldly ingot
#

6 primitives, 3 arrays, 3 container types

#

I don't remember

tender shard
#

oh fuck off choco. I thought someone would look it up and say 13

worldly ingot
#

Is it actually 12? KEKW

tender shard
#

yes. and then I could be like "no, you boon. boolean is not a PrimitivePersistentDataType"

worldly ingot
#

Well now it is!

tender shard
#

it's 12 primitive datatypes, 13 with boolean

young knoll
#

Is string primitive?

#

And container?

tender shard
#

string is a PrimitivePersistentDataType

#

they all are PrimitivePersistentDataType except boolean, which is BooleanPersistentDataType

#

a "primitive" persistentdatatype has the same T and Z types

lilac dagger
#

do we include the boxed primitives or no?

young knoll
#

Ah

#

Primitive is just a weird name then

worldly ingot
#

You're a weird name

young knoll
#

Okay β€œchoco”

worldly ingot
#

Okay "Coll1234567"

echo basalt
#

okay gamers

worldly ingot
tender shard
young knoll
#

Oh yeah my name is still bad on here

#

F

orchid trout
tender shard
shadow night
#

I wanted to change my name here, but now that I'm known as Raydan by too many people (more than 6) I think I shouldn't lol

lilac dagger
#

okay russian youtube

#

why did you choose that username?

#

weirdest one ever

shadow night
#

"Fr-thirthy-three-styler"

lilac dagger
#

i like my username πŸ˜„

#

but your username doesn't identify you as a person

shadow night
#

Well it does not

#

It's a combination of two random words

#

I gotta change my name from RaydanOMG to RaydanOMS (Oh my Schnitzel)

zenith gate
#

When I set a players walk speed will that stay consistent over a relog or a server restart? or do I have to set there walk speed every time they join.

tender shard
#

i'm pretty sure that it's an attribute so it stays

zenith gate
#

alrighty.

shadow night
#

What is Player#isFlying()? Does it indicate the player is currently flying (like in creative) or that the player can fly?

worldly ingot
#

Flight is enabled

#

e.g. they've tapped space twice

shadow night
#

So, currently flying?

worldly ingot
#

Yes

#

isFlyingEnabled() is whether or not they're allowed to fly

tender shard
#

isFlying means is actually flying

shadow night
worldly ingot
#

Yes

shadow night
#

How long has this been a thing

tender shard
#

the other is get/setAllowFlight

worldly ingot
#

Right, sorry

#

That method name lol

shadow night
#

Oh

worldly ingot
shadow night
#

I didn't see it because I did ...is

worldly ingot
#

Yeah, sort of a meh method name

shadow night
#

ehh bukkit was always weird

#

I'm waiting for a full rewrite

worldly ingot
#

You're gonna be waiting a long time

#

Sponge is the rewrite lol

shadow night
#

Is it?

worldly ingot
#

Effectively, yeah

shadow night
#

Wait, do sponge got mixins?

worldly ingot
#

They invented mixins

shadow night
#

Ik

#

So

#

Bye

#

Jk I'm too lazy

worldly ingot
#

Completely different API than Bukkit. Much more difficult to use

shadow night
#

I have expected exactly that

wet siren
#

is there is a plugin that makes certian mobs doesn't wander too far and tp them back to there defined spawn location?

twin venture
#

hi , uhh in 1.18.2 , how i can send a packet that use nms ?

worldly ingot
#

Gonna need to be more specific. What are you trying to send to the player?

carmine mica
#

@sinful kiln this is you with the structure PR right?

worldly ingot
#

Yes that's them

carmine mica
#

ok, just wanted to ask then, why is it needed to create a block state with a specific location? I think all the methods surrounding that take a location or x, y, z coords? Since they are unplaced with no world handle or world, I think them having a location just seems weird

eternal oxide
#

a BlockState is a snapshot of a Block and a Block can only have one location

carmine mica
#

I have no idea what relevance that has

#

BlockState's are no longer just snapshots of blocks

#

Material.STONE.createBlockData().createBlockState() isn't a snapshot of a block

#

the location returned will have no world, and be 0, 0, 0

eternal oxide
#

thats an experimental method for later use in things like Schematics

river oracle
carmine mica
#

well the methods that are being added in the async structure PR aren't marked as experimental, and I was wondering what is the point of creating it with a location? the location's world isn't applied to the block state, only the x, y, z coords of the Location object

#

ther'es also Server#createBlockState(int, int, int, BlockData), that doesn't have a world either

eternal oxide
#

because Schematics are not locked to a world

carmine mica
#

but for the async structure PR, what is the point of adding it. I understand the theoretical point, but where in the structure event PR would such a state be used?

eternal oxide
#

Probably in saving. I've not looked at the PR

carmine mica
#

well tbf, that's why I asked the author directly

twin venture
river oracle
sinful kiln
#

That's why a BlockState was needed in that case

#

And just BlockData would not have been enough for my use case

carmine mica
#

oh so it supports changing the position of the transformed block?

torn shuttle
#

today is the day boys

#

today I'm releasing it

twin venture
river oracle
#

use mojmaps

twin venture
sinful kiln
river oracle
#

remove the api

#

having both dependencies is destructive

carmine mica
#

right, but all the chunk methods take an x, y, z or Location when setting a block state

twin venture
sinful kiln
#

So changing the position would be supported

river oracle
#

use a mapper

carmine mica
#

there is no setBlockState(BlockState) method is there? on LimitedRegion

river oracle
twin venture
#

mapper?

#

iam new to 1.18+ i was only devolping for 1.8.8

river oracle
#

Spigot maps are trash anyways they don't cover everything

twin venture
#

so its kind new to me

carmine mica
#

also, the position from the block state returned by the transformer isn't used anywhere, it still uses the original position

#

but that's beside the point, I think the block state returned should also be placed at the same position as the x, y, z in the parameters

sinful kiln
#

Tbh I don't really remember why it the methods have a location value in the first place

carmine mica
#

as mentioned earlier when I was talking with ElgarL, there is a use case for creating structures and what not, but that's not what this PR is, so I'm not sure they need to be added here

sinful kiln
#

I think it was something that I talked about with DerFrZocker about being able to move block states and stuff but then I decided against implementing that so yeah

sinful kiln
quaint mantle
#

mfalex ishere ?

sinful kiln
#

and since the BlockState is not placed until after the transformation that's why I needed the createBlockState method

carmine mica
#

I agree, but there already is a method for that on BlockData right? since the positino doesn't matter, why can't that one be used?

shadow night
sinful kiln
carmine mica
#

oh right ok

sinful kiln
#

My PR was started on 3rd of March

quaint mantle
#

how can i create custom clickable messages in chat ?