#help-development

1 messages ยท Page 261 of 1

muted crest
#

Does it exist a PDC on blocks ?

tender shard
#

yes and no

#

in spigot, no

#

but I wrote a library for that

#

google "CustomBlockData"

tender shard
sullen marlin
#

Uh idk why it doesnโ€™t link

muted crest
#

No thnx i'm making my own system ๐Ÿ˜‰ but i ask just to see if better way exist

sullen marlin
tender shard
sullen marlin
#

.playEffect

tender shard
#

oh ok

molten hearth
#

checkmate

tender shard
#

not that I'd ever need it, but good to know ๐Ÿ˜„

tender shard
molten hearth
#

shit

#

king to d8

faint sedge
# sullen marlin .playEffect

The fact is that when i type it it says


void org.bukkit.entity.Player.playEffect(Location arg0, Effect arg1, int arg2)
The method playEffect(Location, Effect, int) in the type Player is not applicable for the arguments (Location, Effect, int, int, float, float, float, float, int, int)Java(67108979)```
tender shard
faint sedge
#

But when i fill it like this

#

Deprecated

tender shard
#

you are supposed to use the generic method

#

this one

#

which particle are you trying to send?

#

try to use null for the data, it should work for most particles

faint sedge
#

Oooooh

#

Wait

#

Ok

#

i'm trying to send this

#

playEffect(new Location(player.getWorld(), x+x_, y, z+z_), Effect.COLOURED_DUST, 0);

tender shard
#

ok I see, one sec

#

are you using intelliJ?

faint sedge
#

Nah

#

I'm using VSCode

tender shard
#

hm ok can you open the Effect.COLORED_DUST thing in the decompiler? then check which data type it requires

faint sedge
#

How do we do that ? x)

#

COLOURED_DUST(0,null),

tender shard
#

idk in intellij it's ctrl+b when your curser is on COLOURED_DUST

faint sedge
#

COLOURED_DUST(0,null), is this wxhat u asked for ?

tender shard
#

naah

#

one sec

#

I'll decompile it myself

remote swallow
#

wheres @river oracle when you need him

tender shard
#

you just do player.playEffect(someLocation, Effect.COLOURED_DUST, null)

tender shard
remote swallow
#

is your boyfriend in the basement

tender shard
#

no I think he's at home

remote swallow
#

is home not your basement

tender shard
#

I DONT KNOW

#

all I know is that he'll show up here some time during this day

remote swallow
tender shard
#

and then he'll probably keep playing gta 5 the whole day

remote swallow
#

sounds like he loves ur computers more than you

tender shard
remote swallow
#

why

#

no

#

give

tender shard
#

well a desktop, a mac mini, and 3 macbooks lmao

remote swallow
#

macbooks are shit

tender shard
#

no

#

they are great

faint sedge
#

Like 0, 1

remote swallow
#

and they run macos

tender shard
#

you gotta replace it with the correct data type ๐Ÿ˜„ for example Material

remote swallow
#

so

#

bad

tender shard
#

some effects require a "Material", others require a "MaterialData", etc

faint sedge
#

Omg sorry i'm so annoying

#

Oh in the javadoc ?

tender shard
#

you can check it using Effect#getData()

#

I only added the correct datatypes to the javadocs in 1.18 or so

#

so in all older versions, they are not in the docs

faint sedge
#

Ok thanks a lot

tender shard
#

you should be able to open the Effect class from within VSCode

#

then you can just check what data class a given effect requires

#

but I have no clue how, I only use intellij

#

oh this shitty windows screen recording thing doesn't show the right-click-menu

remote swallow
#

Alex do you linux linux

tender shard
#

what a fucking jerk

tender shard
remote swallow
#

I typed linux twice on accident

#

But my linux mint just wont boot

tender shard
#

ok and you forgot to insert a verb

tender shard
remote swallow
#

Yeah

tender shard
#

and what happens then?

remote swallow
#

Its just on a black screen with the typing cursor flash thing

tender shard
#

it doesn't even prompt for login credentials?

remote swallow
#

Nope

tender shard
remote swallow
#

Its been like this for a minute or 2 by now

tender shard
#

can you actually enter anything there?

remote swallow
#

Nope

tender shard
#

then wait for another 5 minutes lol

remote swallow
#

Okay

summer agate
#

Try opening the terminal if you can, (ctrl alt T I believe?)

tender shard
#

if that still doesn't work, enable the debug output in grub

#

usually you get a prompt with Ctrl+X or F10

#

or you can go through all /dev/tty's with Ctrl+Alt+F1 etc

summer agate
#

I should probably update my mint, I am still on 19 or 20

tender shard
#

I still got a debian 7 VM running on proxmox ๐Ÿ˜„

summer agate
#

I just realized I haven't updated my server in over a year, well should be fine. It's runing ubuntu server 20.04

tender shard
#

damn I update my vms every other day

#

a year?!

summer agate
#

Think so ๐Ÿ˜…

tender shard
#

does it run openssh 3?

#

because if so, you should definitely update it RIGHT NOW

#

if you're still on openssh 2, then no problem

summer agate
#

Eh should be fineee

tender shard
#

do sshd -V

eternal night
#

Who even has their ssh open eyes_zoom

tender shard
#

people who want to connect to their servers?

eternal night
#

I mean, inside the virtual network yea

#

But to the public ??

summer agate
#

Will look later

tender shard
#

I got a 2.69โ‚ฌ vps as ssh jump host, and that's open to everyone ofc

#

well only with key file ofc

#

and all other servers are only open to the IP from the jump host

#

so I usually have to go through 3 logins to connect to a vm lol

#

ssh jump, ssh proxmox, ssh <someVm>

humble tulip
lament scroll
#

hello everyone, i'm altering a spigot plugin to include glow squids and i need help figuring out this error...
error is that it can't tell what are GlowSquid and GLOW_INK_SAC
even though glow squid is defined like this:
https://hub.spigotmc.org/javadocs/spigot/org/bukkit/entity/GlowSquid.html
and glow squid ink is defined like this:
https://hub.spigotmc.org/javadocs/spigot/org/bukkit/Material.html#GLOW_INK_SAC
i don't have a spigot account so i can't attach an image but i can provide more detail if necessary
please tell me why this error๐Ÿ™

peak depot
#

send your code

lament scroll
# peak depot send your code

it's an edit of this plugin: https://www.spigotmc.org/resources/milk-squid.84557/

public final class MilkSquid extends JavaPlugin implements Listener {

    @Override
    public void onEnable() {
        this.getServer().getPluginManager().registerEvents(this, this);
    }

    @EventHandler
    public void onInteract(PlayerInteractAtEntityEvent event) {
        //if entity is neither a glow squid nor a squid, return
        if (!(event.getRightClicked() instanceof GlowSquid)) {
            if(!(event.getRightClicked() instanceof Squid)){
                return;
            }
        }
        if (event.getHand() != EquipmentSlot.HAND) {
            return;
        }
        Player player = event.getPlayer();
        ItemStack item = player.getInventory().getItemInMainHand();
        if (item == null) {
            return;
        }
            if (item.getType() == Material.BOWL) {
                //if entity is a glow squid
                if(event.getRightClicked() instanceof GlowSquid){
                    if(player.hasPermission("milksquid.glowinkbowl")){
                        player.getInventory().addItem(new ItemStack(Material.GLOW_INK_SAC));
                        player.playSound(player.getLocation(), Sound.ENTITY_COW_MILK, 1f, 1f);
                    }
                //if entity is not a glow squid but is a squid
                }else if(event.getRightClicked() instanceof Squid){
                    if(player.hasPermission("milksquid.squidinkbowl")){
                        player.getInventory().addItem(new ItemStack(Material.INK_SAC));
                        player.playSound(player.getLocation(), Sound.ENTITY_COW_MILK, 1f, 1f);
                } else {
                        player.sendMessage("You do not have the glowinkbowl permission");
                }
                
            }
        }
    }
}   
#

and the errors:

16.12 11:09:25 [Server] [ERROR] Could not pass event PlayerInteractAtEntityEvent to MilkSquid v1.0
16.12 11:09:25 [Server] [INFO] java.lang.Error: Unresolved compilation problems: 
16.12 11:09:25 [Server] [INFO] GlowSquid cannot be resolved to a type
16.12 11:09:25 [Server] [INFO] GlowSquid cannot be resolved to a type
16.12 11:09:25 [Server] [INFO] GLOW_INK_SAC cannot be resolved or is not a field
echo basalt
#

It's a fucking pain :)

#

It's much easier to just send additional block packets

eternal night
echo basalt
#

and surprisingly more performant too

#

but it comes at the expense of an fps spike

lament scroll
#

we have found glow squids in the overworld

echo basalt
#

mans didn't put api-version on the plugin.yml

eternal night
#

That shouldn't fuck them up for the entity type tho

lament scroll
#

is there a way that what went wrong is in the original code of the plugin? i haven't altered the dependencies

eternal night
#

You are importing it yea ?

lament scroll
#

like it says this...

    <dependencies>
        <dependency>
            <groupId>org.spigotmc</groupId>
            <artifactId>spigot-api</artifactId>
            <version>1.16.3-R0.1-SNAPSHOT</version>
            <scope>provided</scope>
        </dependency>
    </dependencies>
</project>
eternal night
#

Is this one of those magical compiled eventhk it shouldn't

humble tulip
echo basalt
#

in a single chunk?~ยด

humble tulip
#

Yeah

echo basalt
#

my approach was like

#

wrapping chunks and rewriting the packet completely

#

but that took like 100ms

lament scroll
tardy delta
#

anyone who knows a site which explains how to properly use jmh?

echo basalt
#

It's just not performant enough

humble tulip
echo basalt
#

yeah

humble tulip
#

If it's possible can i see what you did?

#

Maybe I can optimize it

echo basalt
#

you can't :)

#

I've been making plugins for 6 years

#

I know the protocol inside out

lament scroll
echo basalt
#

the biggest performance hit was writing contents to the internal palette

eternal night
#

?paste

undone axleBOT
echo basalt
#

The way the packet works is like

humble tulip
echo basalt
#

get chunk -> loop through sections in bottom-top order, write the section's contents into the buffer

#

the section's contents are the palette's byte[]

eternal night
#

Actually bruh

humble tulip
echo basalt
#

Now, the section writes like

eternal night
#

@lament scroll you are coding against 1.16.3 ?

echo basalt
#

the amount of air blocks

#

and all

#

on top of the palette

eternal night
#

Glow squids were added in 1.17

echo basalt
#

calculating the air blocks is easy

eternal night
#

The API obviously does not include it

#

Your code should not even compile

echo basalt
#

but writing each block to the palette is often around 0.1ms

#

each section has 4096 blocks

humble tulip
quaint mantle
#

Do you guys know any plugin which works like dynamic light on a geyser server for a bedrock client?

echo basalt
#

it's all synchronized ยฏ_(ใƒ„)_/ยฏ

#

uses locks and all

#

pretty sure paper removes the locking part

#

but it's still slow

lament scroll
#

package & imports:

package me.redned.milksquid;

import org.bukkit.Material;
import org.bukkit.Sound;
import org.bukkit.entity.Player;
import org.bukkit.entity.Squid;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.player.PlayerInteractAtEntityEvent;
import org.bukkit.inventory.EquipmentSlot;
import org.bukkit.inventory.ItemStack;
import org.bukkit.plugin.java.JavaPlugin;
undone axleBOT
eternal night
#

Your code should not even compile

#

How are you compiling it

#

Eclipse ?

lament scroll
#

class:

    @Override
    public void onEnable() {
        this.getServer().getPluginManager().registerEvents(this, this);
    }

    @EventHandler
    public void onInteract(PlayerInteractAtEntityEvent event) {
        //if entity is neither a glow squid nor a squid, return
        if (!(event.getRightClicked() instanceof GlowSquid)) {
            if(!(event.getRightClicked() instanceof Squid)){
                return;
            }
        }
        if (event.getHand() != EquipmentSlot.HAND) {
            return;
        }
        Player player = event.getPlayer();
        ItemStack item = player.getInventory().getItemInMainHand();
        if (item == null) {
            return;
        }
            if (item.getType() == Material.BOWL) {
                //if entity is a glow squid
                if(event.getRightClicked() instanceof GlowSquid){
                    if(player.hasPermission("milksquid.glowinkbowl")){
                        player.getInventory().addItem(new ItemStack(Material.GLOW_INK_SAC));
                        player.playSound(player.getLocation(), Sound.ENTITY_COW_MILK, 1f, 1f);
                    }
                //if entity is not a glow squid but is a squid
                }else if(event.getRightClicked() instanceof Squid){
                    if(player.hasPermission("milksquid.squidinkbowl")){
                        player.getInventory().addItem(new ItemStack(Material.INK_SAC));
                        player.playSound(player.getLocation(), Sound.ENTITY_COW_MILK, 1f, 1f);
                } else {
                        player.sendMessage("You do not have the glowinkbowl permission");
                }
                
            }
        }
    }
}   

lament scroll
eternal night
quaint mantle
#

;-;

echo basalt
#

It's this method that's the performance issue

eternal night
#

Well, if you don't import a class

echo basalt
#

more specifically, the calls at the top

eternal night
#

It does not end up working

lament scroll
#

oh no, let's start by importing a class then

echo basalt
#

the lock field doesn't matter on paper btw, both methods do the same

eternal night
#

Bump your dependency version

#

You are on 1.16.3

#

Spigot API wise

#

That API did not have glow squids yet

lament scroll
echo basalt
#

It's still quicker to send 3k blocks with the MultiBlockChange packet

eternal night
#

You change the version in your pom.xnl

echo basalt
#

than intercepting the stuff

#

client spikes for a second tho

#

but still

lament scroll
echo basalt
#

I guess you can process the chunk packets async if you're really really concerned

eternal night
#

Should be fine yea

echo basalt
#

like make a processing queue and all

lament scroll
echo basalt
#

just like

lament scroll
echo basalt
#
CompletableFuture.supplyAsync(() -> {
  // process stuff
  return newPacket;
}).thenAccept(packet -> {
  // send packet
});

// cancel original packet
#

type deal

eternal night
lament scroll
#

so i need to keep R0.1-SNAPSHOT

echo basalt
#

ye

lament scroll
#

    <dependencies>
        <dependency>
            <groupId>org.spigotmc</groupId>
            <artifactId>spigot-api</artifactId>
            <version>1.19.2-R0.1-SNAPSHOT</version>
            <scope>provided</scope>
        </dependency>
    </dependencies>
</project>

#

thank you so much, it all compiles now!

echo basalt
#

ye just process async if you really want to

#

otherwise you're lagging the packet queue and that raises the player's ping

#

because packets will only be processed once the chunks go through

humble tulip
#

Might end up doing that

#

Are packets sync?

echo basalt
#

no

#

but they have their own dedicated thread

humble tulip
#

Has to be sent via that thread?

echo basalt
#

well

#

no

#

like

#

calling sendPacket adds the packet to a concurrent queue

#

Each player has its own dedicated thread

#

that just grab packets from the queue, sends them

humble tulip
#

Ah ok

#

Gotcha

#

Gonna look at minestom for a chunk "wrapper"

river oracle
tender shard
#

np np

river oracle
#

Its a very nice basement

#

10/10 would go there again

tender shard
#

it even has a keyboard

#

but there's no power outlet

#

so kinda useless

robust light
#

is there a way to keep track of something of a specific player? For example kills, deaths, etc.

round finch
#

i mean Storaging into database fx mysql or config (yaml or json)

#

@robust light

quaint mantle
#

yo

#

I am trying to make region selection like in worldeidt

round finch
#

do entities have PersistentDataContainer?

#

i forgor

quaint mantle
#

but idk what happes my for loop stops working when x is not x anymore

#

like pos1 is x 14 and pos2 is x 15 and just the for loop stops working

round finch
#

1 pos x y z
2 pos x y z

quaint mantle
#

all I want to do is search the blocks in that pos1 and pos2

round finch
#

it is 3d

quaint mantle
#

my for loop

#

the loopmin is pos1 and loopmax is pos2

tender shard
#

entities, worlds, and itemmeta all have a PDC

round finch
#

ahh

tender shard
#

world's PDC was added in 1.18.2 IIRC

eternal oxide
#

world and chunk]

tender shard
#

for chunks it was added in 1.16.3

quaint mantle
#

idk why it stops when x is not x

#

or y is not y or z is not z

round finch
#

seems about right

#

wait a <

#

you mean ==

#

not bigger then

tender shard
#

yeah ofc it never runs

round finch
#

so if the current x == x then it stops at the spot you want

tender shard
#

because loopxmin is always <= loopxmax

quaint mantle
#

oh shit

#

my bad

#

my calculations are wrong

tender shard
#

just pretend that you're drunk

quaint mantle
#

in the loop so thats why it stops

quaint mantle
tender shard
#

whut

#

not THAT drunk

round finch
#

i have done it before it is alright

#

human error

#

i did same issue

#

logic mistake

tardy delta
tender shard
#

why does it show two results in the first place lol

round finch
quaint mantle
#

is it a good Idea to put that into an async

tender shard
#

put what into an async?

tardy delta
#

testing two things

quaint mantle
#

cuz like its like 10x10x5 blocks and it does nothing

round finch
#

you could!

quaint mantle
tender shard
#

10x10x5 blocks is NOTHING

#

also you are not allowed to access the world async unless you made a ChunkSnapshot earlier

quaint mantle
#

yea I know thats why I want to thread it

round finch
#

you dont even need many loops

quaint mantle
#

it replaces like 20000000 blocks in 5 seconds

tender shard
#

you are talking about FAWE

quaint mantle
#

how can I do that ?

tender shard
#

FAWE simply splits up that stuff and runs it in a scheduler thingy

#

but you only have 500 blocks, that is NOTHING

round finch
quaint mantle
#

where I can get that ?

tender shard
#

just run it from the main thread

#

500 blocks is NOTHING

#

?scheduler

#

?scheduling

undone axleBOT
tender shard
#

but that's really not needed

#

it won't help you

quaint mantle
#

so what to do

tender shard
#

what's the issue

quaint mantle
tardy delta
#

ahh -0 is still 0, thats the issue

quaint mantle
#

classic non fawe worldedit

kind hatch
#

Classic WE used the main thread.

tender shard
#

the normal worldedit works on the main thread, that's why it lags the whole server when you do big stuff

kind hatch
#

Thatโ€™s why it crashes the server so much if you have large operations.

quaint mantle
#

will not run 24/7

tender shard
#

what's the issue you have

quaint mantle
#

it does shit when larger area is selected

tender shard
#

it's kinda hard to talk to you

tender shard
#

"it does shit" is not a very helpful explanation

quaint mantle
#

I am trying to convert blocks into code that I can paste and it generates the structure

tender shard
#

check ut the link that morice sent

quaint mantle
#

its very shitty explanation

eternal oxide
#

Use Bukkit Structures

tender shard
#

another thing that could help is using setBlock(..., false) to disable physics

quaint mantle
quaint mantle
tender shard
#

you save code in a config?!

#

whut

#

I think you are actually drunk

#

lol

tender shard
#

show one of those configs pls

quaint mantle
quaint mantle
quaint mantle
tender shard
#

if you don't share the config, noone here can help you

quaint mantle
#

but I think I willl log it in console

quaint mantle
#

its empty bro

tender shard
#

a minute ago, you said that you store "code" in a config

quaint mantle
#

fuck how can I explain what I mean by that

#

so

#

the plugins generates code to copy and paste it

#

for another my plugin

#

its like temp code I just need the block locations

kind hatch
tender shard
#

the whole description of the problem is pretty vague, I'm out

quaint mantle
#

nah I cant explain it

kind hatch
#

It sounds like it's a recreation of WorldEdit features.

quaint mantle
#

nope

#

its generates a structure

kind hatch
#

On load? On command?

quaint mantle
#

It generates code for other plugin to generate structure

round finch
#

if(x != selectx){
selectx++;
} else {
selectx = start point x
selecty =+1;
}

if(y != selecty){
selecty++;
} else {
selecty = start point y
selectz =+1;
}

if(z != selectz){
selectz++;
} else {
selectz = start point z
}

quaint mantle
#

I dont want to type every block so thats why I made this

quaint mantle
round finch
#

yes

#

lmao big oopsi

round finch
#

but this is continuation

round finch
quaint mantle
#

btw != is enough

kind hatch
# quaint mantle It generates code for other plugin to generate structure

Sorry, but this sounds really just sounds like WE clipboard functionality with some extra steps to me.
I get wanting to store a "selection", but I still don't understand what the issue is?

Is your selection fucking up? Is it not passing it to the other plugin properly? How is this structure supposed to be loaded? During worldgen or literally what WE does with it clipboard. (When you use a command)

quaint mantle
#

I have pos1 location and pos2 location I am looping that

#

in a function

#

and returning a hashmap

round finch
#

sounds similer to faw

round finch
#

the world already contains the blocks
why you wanting to store the blocks?

quaint mantle
#

I have a 3pos thats when I choose the block to build the structure from

kind hatch
#

Ok, still sounds like WE schematic files at this point.

quaint mantle
#

from x I subtract 3posX and I then have a add value

faint sedge
#

Do u guys know if there's a method to get all the classes that extends a certain class ? i've managed to find the .getSuperClass() but not what i'm looking for

quaint mantle
#

but the problem is the loop is canceled

#

the loop just stop

#

stops

round finch
#

that sounds more like programmer issue to me

quaint mantle
#

so the for loop looks like this:

#
public HashMap<Vector, Material> calc(World pW, int loopxmin, int loopxmax, int loopymin, int loopymax,
            int loopzmin, int loopzmax, int blockX, int blockY, int blockZ) {
        HashMap<Vector, Material> map = new HashMap<Vector, Material>();
        for (int x = loopxmin; x <= loopxmax; x++) {
            for (int y = loopymin; y <= loopymax; y++) {
                for (int z = loopzmin; z <= loopzmax; z++) {
                    map.put(new Vector(x - blockX, y - blockY, z - blockZ), pW.getBlockAt(x - blockX, y - blockY, z - blockZ).getType());
                }
            }
        }
        return map;
    }```
tender shard
#

use code blocks pls

#

?codeblock

undone axleBOT
#

You can use the discord code block format to display code or just text in a more pleasing way:
```java
public class MyPlugin extends JavaPlugin {
@Override
public void onEnable() {

}

}```
Becomes:

public class MyPlugin extends JavaPlugin {
    @Override
    public void onEnable() {

    }
}```
round finch
#

?paste even better

undone axleBOT
tender shard
round finch
#

it is discord formatting

#

like this
tender shard
#
public HashMap<Vector, Material> calc(World pW, int loopxmin, int loopxmax, int loopymin, int loopymax,
            int loopzmin, int loopzmax, int blockX, int blockY, int blockZ) {
        HashMap<Vector, Material> map = new HashMap<Vector, Material>();
        for (int x = loopxmin; x <= loopxmax; x++) {
            for (int y = loopymin; y <= loopymax; y++) {
                for (int z = loopzmin; z <= loopzmax; z++) {
                    map.put(new Vector(x - blockX, y - blockY, z - blockZ), pW.getBlockAt(x - blockX, y - blockY, z - blockZ).getType());
                }
            }
        }
        return map;
    }
#

like this

round finch
kind hatch
tender shard
#

noone would read it

#

I know that from experience

kind hatch
#

It's extremely short though.

tender shard
#

whenever someone does ?nms, people just ignore it

kind hatch
#

Unlike the actual markdown docs

kind hatch
#

?nms

quaint mantle
#

when I want to get values I broadcast them

quaint mantle
#

I can .add(x, y, z) do any block and get the block generated

round finch
#

vectors?

quaint mantle
#

the for loop just dont finish or how to say it

quaint mantle
tardy delta
#

ok fixed it

quaint mantle
tender shard
#

he's doing a math parser, it has nothing to do with your problem

tardy delta
#

-0 being ignored

#

aint lookin good tho

quaint mantle
#

i Do :

tardy delta
#

this is better

quaint mantle
#
Bukkit.getScheduler().runTaskAsynchronously(this, () -> {
                    for (Entry<Vector, Material> i : calc(e.getPlayer().getWorld(), pos1.getBlockX(), pos2.getBlockX(),
                            pos1.getBlockY(), pos2.getBlockY(), pos1.getBlockZ(), pos2.getBlockZ(),
                            mainBlock.getBlockX(), mainBlock.getBlockY(), mainBlock.getBlockZ()).entrySet()) {
                        e.getPlayer().sendMessage(i.getValue().toString() + i.getKey().toString());
                    }
                });```
tardy delta
#

thats a bunch of parameters lol

quaint mantle
#

yes

#

but it should work i guess

tardy delta
#

sign issues

round finch
#

you could use the doubles fx double x, double y, double z to get block at location

quaint mantle
#

so can somebody help me ?

round finch
#

it would be way cleaner

tardy delta
#

lmao adding () fixed it

#

never override record getters lol

quaint mantle
#

want to see work it

tender shard
tardy delta
tender shard
#

weird

round finch
#

inside the 3d loop
do stuff

tender shard
#

I don't like records anyway

tardy delta
#

id better make it a class cuz im exposing field actually now

tender shard
#

I just use lombok for records

tardy delta
#

internal class but whatever

tender shard
#

@Data

tardy delta
#

are those immutable?

round finch
tender shard
quaint mantle
#

I am doing

round finch
#

fx storing or set block your choose

tardy delta
#

oh lol

quaint mantle
tender shard
#
@Data
public class MyPartlyImmutableClass {
  final int valueX;
  int valueY;
}
#

now valueX would be immutable but Y is mutable

eternal night
#

lOmbOk

tender shard
#

lombok is nice, stop hating it

round finch
#

note: storaging every block into a list sounds like a lot of memory use

tardy delta
#

lombok hooks into the compiler right?

tender shard
tender shard
#

lombok can be very helpful

quaint mantle
round finch
#

I would recommend saving the data straight way

tender shard
quaint mantle
tardy delta
#

lol this one if controls the whole number constructing thing

#

i hope my number parsing is faster than Double.parseDouble lol

tender shard
#

so when people want to have a discussion about lombok, let them be

round finch
#

are you trying to figure out how many blocks there is as the same type?

tender shard
quaint mantle
round finch
quaint mantle
#

cuz I need the location of the blocks

round finch
#

it is world, x y z

#

doubles x y z

quaint mantle
#

no mate its not simple like that

quaint mantle
#

its fucking done but the loop just stops

round finch
#

that just event

quaint mantle
#

still dont get it ?

tardy delta
#

hmm would Files.newBufferedReader be more efficient than new BufferedReader(new FileReader("src/test/tests.txt"));?

round finch
quaint mantle
#

I am making a same thing like in worldedit you get pos1 pos2 and copy it and when you paste it it pastes below you

eternal night
#

What the fuck are you doing where creating a buffered reader needs to be optimised

tardy delta
#

nothing, just wondering why it exists

quaint mantle
eternal night
#

It is the path variant

eternal night
#

Most of the static Files methods are there for new path API

#

All the old constructor stuff is for file

tardy delta
#

hmm

quaint mantle
#

how can I pause the main thread ?

tardy delta
#

\๐Ÿค”

#

?scheduling

undone axleBOT
quaint mantle
#

to give more priorite to my loop ?

eternal night
#

Bukkit.shutdow()

tender shard
#

it actually does the same thing

quaint mantle
tardy delta
#

Unsafe#putInt better

tardy delta
eternal night
#

Mbmb

tender shard
quaint mantle
#

async

#

?

#

or what

tardy delta
#

im not understanding what youre saying mate

tender shard
#

you are supposed to read and understand it

#

and then you choose the method that you actually are looking for

quaint mantle
#

I am looking for asnyc

#

async

tender shard
#

BukkitScheduler#runTaskAsync

quaint mantle
#

but the async still doesnt work for my loop

tardy delta
#

ctrl f javadocs and search for async lol

tender shard
#

I still have no clue what your issue is

#

I have asked like 7 times what the issue is

eternal night
#

World edit but cursed ?

quaint mantle
#

but the loop doesnt work

#

its just doesnt work

#

or the async doesnt workk

tender shard
# eternal night World edit but cursed ?

yeah, they somehow have plugin A that generates some code / command that they wanna paste into plugin B, and plugin B is now supposed to generate some structure

#

don't ask me how or why

eternal oxide
#

you can't place blocks async

round finch
#

do output check

kind hatch
quaint mantle
tender shard
quaint mantle
#

did you read my code I sent ?

tender shard
tender shard
#

no worldedit is not magic

round finch
#

it just math

quaint mantle
kind hatch
muted crest
quaint mantle
#

but the problem is the loop

eternal oxide
#

FAWE runs async and jumps back to place a group of blocks sync

round finch
tender shard
#

the problem is that you don't properly try to debug your stuff

eternal oxide
#

ALL placing is sync

tender shard
#

print out your whole map

#

every key-> value pair

#

then you'll see what's wrong

quaint mantle
#

maybe I cant do async in block break event FUCK

#

thats the problem XD

#

fuck it

tardy delta
#

uh yes

tender shard
#

what the

#

"do async" what do you even mean by that

#

do async WHAT

quaint mantle
#

runTaskAsync

#

runTaskAsync print the map

tender shard
#

ofc you can create an async task in an event listener

round finch
#

that is cursed

quaint mantle
tender shard
#

you can always create a new task from the bukkitscheduler, unless the server is already in "shutdown" mode

round finch
#

then you run bukkitscheduler code

#

it just runs

tender shard
muted crest
tender shard
muted crest
#

Its my own list

tender shard
#

?paste your BlockDataManager class

undone axleBOT
quasi flint
#

well the list allows it

tender shard
#

no

quasi flint
#

but skyutils doenst want items in that list

tender shard
#

it doesn't

quasi flint
tender shard
#

AbstracList doesn't allow adding items

#

only certain classes that override this do allow adding stuff

#

e.g. ArrayList

quasi flint
#

oh i thought he was using an arraylist

#

and not an abstractlist

muted crest
tender shard
#

idk I haven't seen the code yet

#

what is "datas"?

#

or what is "loadServerData()"?

muted crest
#

All block with "custom meta data"

tender shard
#

aren't you the person who asked about block PDC a few hours ago?

eternal oxide
#

return this.datas = Arrays.asList(l);

quasi flint
#

they save the data in a file

#

load it

#

and put it in a list

tender shard
#

Arrays.asList returns an immutable list

#

you cannot add anything to that

muted crest
#

RIP

tender shard
#

but

eternal night
#

Ya gotta reinvent the wheel somehow

tender shard
#

you can just do:

muted crest
#

so tgat tge problem

tender shard
#

new ArrayList<>(myStuff.asList())

#

or sth like that

muted crest
#

Ok thnx

quasi flint
tender shard
#

basically just wrap your immutable list into the arraylist constructor

#

and next time, just use CustomBlockData instead of trying to reinvent the wheel

quaint mantle
#

fucking loop

#

finally found the problem

quaint mantle
#

somehow just loopedX - positionX doesnt work

tender shard
muted crest
#

But i need that data steel in block when server restart

tender shard
#

it's persistent

#

it works across restarts

quaint mantle
muted crest
#

Im not reinvinting the wheel im just making my own system

tender shard
#

you do reinvent the wheel

quasi flint
tardy delta
#

me having to write extra code to handle numbers like -0.3 lol

#

-0 doesnt seem to exist in java :(

tender shard
#

damn what the heck

#

I didnt know this stuff was that popular

round finch
#

takes note so i can use stupidty for lolz later

quaint mantle
#

so listen

tender shard
#

no

quaint mantle
#

map.put(new Vector(x, y, z), pW.getBlockAt(x - blockX, y - blockY, z - blockZ).getType());

#

that works

#

but that doesnt:

#

map.put(new Vector(x - blockX, y - blockY, z - blockZ), pW.getBlockAt(x - blockX, y - blockY, z - blockZ).getType());

round finch
#

learn to manage and code better and cleaner

quaint mantle
round finch
#

not trying to be dough

tender shard
#

both look like a mess tbh

round finch
#

yup

quaint mantle
#

doesnt matter now

#

focus on issue tf

round finch
#

because it goes against the programming practice rules

tender shard
#

if it wouldn't matter, then it'd be working

quaint mantle
#

Idk how to call you

tender shard
#

insulting me wont help you with your problem

round finch
#

break down your problem

quaint mantle
#

yes instead of telling me to write cleaner you can focus on issiu

round finch
#

investigate the problem figure what the causes

tender shard
tender shard
quaint mantle
#

so again

#

map.put(new Vector(x, y, z), pW.getBlockAt(x - blockX, y - blockY, z - blockZ).getType());
that works
but that doesnt:
map.put(new Vector(x - blockX, y - blockY, z - blockZ), pW.getBlockAt(x - blockX, y - blockY, z - blockZ).getType());

#

the new Vector()

#

is the issiu

tender shard
#

no

quaint mantle
#

I cant do X - blockx

tender shard
#

the issue is that x -blockX (etc) returns something else than what you expect

round finch
#

blockX = vaule

quaint mantle
#

it just crashes or tf is happening

round finch
#

bruh

#

just use vaules

quaint mantle
tender shard
#

your math is wrong

#

what even is "x" and "blockX"

quaint mantle
#

so blockX is the main block

#

it goes from

#

it calculates the distance from main block

tender shard
#

wouldn't you usually then ADD x instead of decucting it

quaint mantle
#

no ?

round finch
#

it is a cluster omg

tardy delta
#

why doesnt java have unsigned ints smh

tender shard
round finch
quaint mantle
#

if main block is x 15 and if looped block is 13 thats 15- 13 and that means its 2 away from X

round finch
#

0 = nothing

quaint mantle
#

but I need to switch values on this map.put(new Vector(x - blockX, y - blockY, z - blockZ), pW.getBlockAt(x - blockX, y - blockY, z - blockZ).getType()); brb

tardy delta
#

hehe mine faster

quaint mantle
#

Hey guys :), Can someone please give me an idea about how to add a string below a mob name, like in below name for a player? Thanks in advance.

tardy delta
#

i seem to heavily rely on the jit compiler lol, first call is like this

tender shard
quaint mantle
tall dragon
tender shard
#

then you need another entity

quaint mantle
#

wtf is happening my ram is 94%

round finch
#

if mobs could have scoreboard line below

tardy delta
#

it caches code that it often called

quaint mantle
#

like a mob health plugin

tardy delta
#

thereby makes it faster to run

tender shard
#

yeah you need to have two entities

quaint mantle
#

that have hearts below mob name

#

now its good

tender shard
#

e.g. you gotta add a passenger or sth to the original mob

round finch
#

please fix code cluster @quaint mantle

tender shard
#

otherwise it won't work

quaint mantle
#

as passenger so it adds this mob name?

tardy delta
#

smh my execution time is twice as big as a simple thing someone else wrote

tender shard
quaint mantle
#

ok thank you, gonna try that

#

idk but now it works

#

magic or smth

#

idk why it works

#

but now it perfectly works

tender shard
#

great

quaint mantle
tender shard
#

as I said many times already, your math was probably just fucked

quaint mantle
#

no it was like that before

#

then I tried to change the values

tender shard
#

no it wasn't

tardy delta
#

ok dude didnt handle multiple parentheses

tender shard
#

computers are very stupid

#

they do exactly what you tell them to

#

so if it didnt work but works now, then you changed sth

round finch
#

or just failed in compile (saves the changes)

quaint mantle
#

yes I changed the map print to block place event to get values

tardy delta
#

time to see how long a constructor takes

quaint mantle
#

WTF AGAIN NOT WORKING

#

how the fuck didnt changed nothing

tender shard
tardy delta
#

ok constructor invocation only takes 5ยตs and even less when the jit optimizes it

#

so that cant be the overhead

#

this looks a little bleh

quaint mantle
#

fuck it

#

I am going to rewrite

round finch
#

@quaint mantle man
you just not listening

#

int = getBlockX()

quaint mantle
#

nope that doesnt work tried it before

round finch
#

are you comparing integer to integer ?

quaint mantle
round finch
#

maybe dont use that then lol

quaint mantle
#

see the new vectors

tardy delta
#

ij pretty good

tender shard
#

Md uses netbeans :โ€˜)

tardy delta
#

i see i see

round finch
#

md5?

tender shard
#

Yes

tardy delta
#

is there a reason to call super.clone() if you can just call new X() cuz that class only has an int field

tardy delta
#

smh ij

quaint mantle
#

hey, is that really the way to add a string under the mob name? I got this and doesn't seems to work, the entity name doesn't apper, only the passenger name

        entity.getLocation().getWorld().spawn(entity.getLocation(), ArmorStand.class, armorStand -> {

            armorStand.setCustomName("passenger");
            armorStand.setCustomNameVisible(true);
            armorStand.setVisible(false);
            armorStand.setSmall(true);
            entity.addPassenger(armorStand);
            entity.setCustomNameVisible(true);
            entity.setCustomName("entity");
        });
#

I would like to use packets if needed

tardy delta
#

just came to the conclusion that '\u0000' isnt ' '

river oracle
#

I thought you did that already

opal wedge
#

Is there no other way to get the title of an inventory than via InventoryView?

river oracle
#

No

#

You could just make a wrapper object and use that granted it requires caching but that's not a huge deal

opal wedge
#

okay :/

round finch
#

but i were able to setTile

tardy delta
#

should probably use a long or throw an overflowexception

#

first parsing thing works cuz it doesnt seem to use ints

#

long can also have overflow \๐Ÿค”

river oracle
# round finch but i were able to setTile

Its fairly easy to set title on the go you just send the player a new inventory view packet with the same ID, but generally I'd reccomend not dipping into nms. Since the guy just wants to get the title I'd just opt for a wrapper object

round finch
#

sounds like a good idea

#

yeah i found out that setTitle was pack title change

river oracle
#

I got animated titles working fairly smoothly a week or so ago its super simple I just set up a queue

#

Though I stole the nms code form 7smile7

round finch
#

is nms better for title animation?

river oracle
#

Yea I'd think so seems rather inefficient to have to read all your items to the new inventory just to change the title

#

Sending a packet which are pretty light weight has no overhead like that

quaint mantle
#

yo the loop

#

I just outplayed it

#

but thx for help guys

worldly ingot
#

(I honestly think the latter is smarter)

#

I wish more people would realize that API for that sort of stuff can totally get implemented if they just write a PR ๐Ÿ˜›

hybrid spoke
#

and a Inventory#sendTitleUpdate(HumanEntity, String from, String to, TransitionType)

remote swallow
#

?contributing moment

#

?contribute

remote swallow
#

there we go

worldly ingot
#

Why would you need a from or transition type? What is a transition type?

#

Would a title update not just... change the title?

remote swallow
#

also why would you need a from to string

#

that just doesnt seem like it would be needed

eternal night
#

inventory title update API is 5head until the quirk it relies on breaks

worldly ingot
#

Unless you want CraftBukkit to do some weird transition from one string to another, which you can and should be doing in your plugin, not CB lol

hybrid spoke
#

animations

worldly ingot
#

Yeah that's something for the plugin to handle

#

API should just let you be able to change it

hybrid spoke
#

no official api

worldly ingot
#

I wish more people would realize that API for that sort of stuff can totally get implemented if they just write a PR

eternal night
#

throw it in unsave values

remote swallow
#

on a scale of 1-10 how hard do you think adding #sendTitleUpdate would be

#

to implement

worldly ingot
#

Pretty much 0

eternal night
#

iirc we still have a PR for that on paper but like, its a weird thing because the only difference to just re-opening the inventory is the fact that your cursor does not move which is not specified in the protocol or anywhere as actual logic

remote swallow
#

might pr it later

eternal night
#

unless I am mistaken

worldly ingot
#

You'd essentially copy/paste the same code you would write in a plugin, but do it in CraftBukkit behind an API method

eternal night
#

like vanilla does not use this behaviour so the API just, depends on a random quirk in the client in regards to menu id usage

worldly ingot
#

Mhmm

remote swallow
#

i haven got a clue

worldly ingot
#

I think doing Inventory#sendTitleUpdate(HumanEntity, String) is the best method signature for it

#

Maybe InventoryView

hybrid spoke
eternal night
#

oh ?

hybrid spoke
#

just overwrite the current with another openInventory call

kind hatch
eternal night
#

I mean, the issue right now is that you cannot change the title of the inventory post creation I presume

worldly ingot
#

Not on the server I don't believe, no

eternal night
#

if changing the title in an existing inventory instance does not allocate a new menuId and hence does not reset the cursor wouldn't it be smarter to allow changing the title of an inventory

#

instead of sending a title update

worldly ingot
#

Could probably remove final from it and push an update packet, yeah

#

Client-sided inventory names might be useful too though

#

Usernames and whatnot

eternal night
#

Hmm true, yea I guess. Tho then it would make more sense on the human entity wouldn't it, as part of the existing packet magic exposed in the API

#

sendBlockChange etc

worldly ingot
#

Yeah but what if they have no inventory open. Having it in InventoryView means it will be open

#

(more likely than on a Player anyways)

#

? what inventory

#

We're talking client-sided lol

eternal night
#

yea the paper PR ended up with it on inventory view too

kind hatch
#

Makes sense though.

eternal night
#

yea it does. would just be careful with not promising the "no cursor reset" anywhere in the docs

#

I don't think you can get more implementation quirk heavy than that behaviour

ionic dagger
#

How do I go at making a plug-in to display mcmmo levels in chat? I have no idea how to work with other apis along w spigot

kind hatch
#

Well if you're just re-sending the packet, then it shouldn't close the inventory, which shouldn't effect the cursor.

remote swallow
#

check there docs

eternal night
#

the point is that it reuses the menu id/ container id

kind hatch
eternal night
#

that is defined in the protocol ?

#

concerning there is no actual definition I usually just go by: what does vanilla actually use

#

as far as I know, they don't reuse menu ids in any settings do they ?

kind hatch
#

I don't know for sure, but I would assume since they are keeping track of them, when you access the ID, it'll grab the associated info. E.G. If you renamed a chest, it would have a custom name when you open the menu.

eternal night
#

I mean, yes they share the menu id for the actual inventory instance there but they don't resend an inventory open screen with the same menu id

#

e.g. what happens here

#

mostly because there is little to no reason to do so as they don't update the inventory like that

#

and items have their normal slot syncs

hybrid spoke
#

cant you just dig into it and look how its done

kind hatch
#

AFAIK, there are no menus that have updating titles. So it would really just come down to testing how it would function.

hybrid spoke
#

openInventory should respect that

eternal night
#

I mean, down the line it does not matter if it reopens the inventory or not tbh

#

as long as the method contract does not promise this behaviour it can still exist and just "change the title on the client side"

#

how exactly that plays out just, should not be specified in the method contract imho. It is just too specific to implementation quirks on client and server

hybrid spoke
#

well yeah since the public api should only promises that its done, not how. interfaces shouldnt presuppose specific impls anyways

eternal night
#

I mean one big reason why this also might exist is because it allows inventory title change without creating a new inventory with a new title but same items is the fact that it does not reset the cursor

#

like you could just change the title by creating a new inventory with the same items but the wanted title. But that resets the cursor as it is as new inventory.
So people will most likely use such a method for the "title change without cursor" ability and expect that method to provide that where as it may simply not in the future if the client changes.

kind hatch
#

Yea, that's the only potential problem with it. If any future update changes how the existing inventory system works, then it could cause issues.

hybrid spoke
#

but still, you dont have to specify that advantage. just that its done, thats all. no specific impl, no promises, no how, no disadvantages

eternal night
#

yea

#

I wonder if it is worth to mention said "non commitment" in the docs

hybrid spoke
#

thats also leaves the freedom of just changing the impl to what you like

eternal night
#

well it would be one of the most "hacky" sendX methods in the API

#

in regards to the cursor reset

#

so yea, don't define it at all

hybrid spoke
#

well but they wouldnt know without looking at the code

eternal night
#

or actively specify that the server cannot promise how the client handles such an update

#

in regards to cursor position or animation

hybrid spoke
#

and as an api user you should only code against the public api, not the impl

hybrid spoke
eternal night
#

yea presumably

#

but people like to interpret things

#

and then get grumpy when things don't work as they expect it to work

hybrid spoke
#

so let them do, not your beer

#

docs are clear

eternal night
#

if you design an API, protecting users from themselves is half the job ยฏ_(ใƒ„)_/ยฏ

hybrid spoke
#

if they overthink it its their problem

eternal night
#

Well anyway, another method to add a Component overload to ๐Ÿ˜

hybrid spoke
eternal night
#

I mean, its barely a limit, more of a warning ยฏ_(ใƒ„)_/ยฏ

#

but I digress

#

up to the contributor who ends up suggesting it

#

its packet magic in the API so its always fun

river oracle
#

So no I can't

eternal night
river oracle
#

I'll be more than happy to pr when the time comes

worldly ingot
#

You can with a parent or guardian!

eternal night
#

KEKW x2

river oracle
#

Only if my parents loved me Like that

eternal night
#

moom I wanna code on funny minecraft code

river oracle
#

Fr lol

hybrid spoke
hybrid spoke
river oracle
#

Honey just use the spigot we have

mighty pier
#

๐Ÿ’

ornate mantle
#

is there source code for minecraft's default world generation on spigot

eternal night
#

"no"

ornate mantle
#

oop its in nms nevermind

worldly ingot
#

?contribute

quaint mantle
#

how can i get the coordinates of a dead player ?

kind hatch
#

Listen for the PlayerDeathEvent and grab their coords.

quaint mantle
#

oh sry

#

thx

#

so guys

#

the loops I was developing

#

I just show you in second

#

what I made

quaint mantle
#

how can I play a song to all player ?

worn tundra
tame bay
#

This isnt really a coding but rather a understanding question.

lets say I have 2 accounts. MisterName and MisterMame.
When I autocomplete will it serve MisterMame first since, m is before n in the alphabet?

remote swallow
#

yes

quaint mantle
remote swallow
#

?learnjava

undone axleBOT
tender shard
#

wtf is allplayer

remote swallow
#

they were told to loop through all players

#

so ig they too that as all players = allplayer

tardy delta
#

\๐Ÿค”

karmic grove
#

hey so im currently checking if a raytrace will hit entity im trying to ignore any petrified oak slabs so i did if the result is oak slab still do the action but if it hits oak slab it completely ignores if theres any other blocks in the way which i dont want to ignore. so is there a better way to ignore a block without ignoring all blocks
heres some of my code

if world.rayTraceBlocks(cameralocation, entityloc, 10) == null
  do stuff
else if(world.rayTraceBlocks(cameralocation, entityloc, 10).getHitBlock().getType() == Material.PETRIFIED_OAK_SLAB
do same stuff as 1

but 2 always gets triggered if it hits oak slab first

tardy delta
#

uhh is 5%-3 2 or -1?

#

wouldnt even know how to put -3 in 5

tender shard
karmic grove
#

oh tysm

#

raytrace blocks right not just raytrace

tender shard
#

ughm

#

i dont know

#

lol

karmic grove
#

lol ok

remote swallow
#

didnt the petrified oak slab get removed in recent versions

karmic grove
remote swallow
tender shard
#

wtf even is a pterified oak slab

remote swallow
#

fire proof oak slab

tender shard
#

how does one get one?

karmic grove
#

item thats not in vanilla so im using for my custom block lol

karmic grove
remote swallow
#

/give @p petrified_oak_slab

tender shard
#

oh ok

remote swallow
#

it got removed from the gmc menu in 1.19.3

karmic grove
#

does it still exist

remote swallow
#

i think it does

karmic grove
#

for like give command

#

hope so

remote swallow
#

just only accessible through/give

karmic grove
#

i was too lazy to make actual custom block ๐Ÿ˜ฌ

#

heres ray trace params the only blocks i can ignore are passable ones from what i get

remote swallow
#

ill check if it still exists, give me a few min need to boot windows

tender shard
#

getTargetBlockExact or sth like that allows you to pass a Set of "ignored materials"

cinder karma
#

Clearly missing something obvious: are worlds from the Multiverse plugin tracked by calls to server.getWorlds() ? I'm having the most confounding error. It's trying to load a preferred world from config, worked perfectly in my test server, worked fine on first loading into the dev server, but upon setting it to the proper world name (worldP) it's going haywire, returning null while trying to find a world by that name. I tried to see if it was a capitalization thing, so I had it output to the Bukkit logger everything from:

for(World w : plugin.getServer().getWorlds()) Bukkit.getLogger().info("World name is " + w.getName());

And all it put out is overworld, nether, and end...though there are 100000% a bunch of other worlds there.

And I've used these same calls in another plugin, linked to a multiverse world, that has 0 issues. I'm stumped.

tender shard
#

does your plugin at least soft-depend on multiverse?

#

if no, it probably gets enabled before mv so you dont see the other worlds

cinder karma
#

that would make sense

#

though it's baffling that another plugin running on the same server, doing the exact same thing, doesn't have this issue

tender shard
#

the order of plugins being loaded is a bit random

cinder karma
#

that's probably the entire issue, I knew coming here would be the right choice

tender shard
#

add soft-depend: Multiverse-core or sth like that to your plugin..yml

tender shard
#

or just delay your stuff by one tick

#

both should work

remote swallow
karmic grove
#

๐Ÿ˜ญ

#

i wish it returned a list of hit blocks

#

i beliave ill have to do 2 rays one above the camera and one below and see if it dont hit anything

#

actually 6 one for each side technicly 12 so it detects entity head too

tardy delta
#

tf

tender shard
#

so it's -2.95

tardy delta
#

i mean 5%-3

#

modulo

tender shard
#

oh

#

that's 2

round finch
#

that is -1

tender shard
#

whut

round finch
#

says google

#

put it into the search

tardy delta
#

ye thats why im confused

#

dont even know how to calculate that myself

tender shard
#

it is 2

tardy delta
#

like how do you put -3 in 5