#help-development

1 messages ยท Page 318 of 1

worldly ingot
#

Yes. It was intended to be the replacement for finalization

glossy venture
#

aight sick

lilac dagger
#

i want to shade an api in a project with a different package namespace, how do i make it so who uses the api has the package namespace changes also?

rotund ravine
#

Huh? Why?

lilac dagger
#

i have an engine which has an api, and i have multiple projects that uses the engine separately

#

i want people to be able to use multiple projects or just one easily

#

so i shade the engine in a subpackage of said project

#

along with the api

#

but if i add the dependency of the project to expand upon it, the api remains like before the shading

#

and i get class not found whenever i try to run the jar

rotund ravine
#

Are you relocating everything properly?

lilac dagger
#

yeah, up to the project itself gets relocated correctly

#

but if i try to create a miniproject that has the project as a dependency it gives me class not found issues

verbal slate
#

Tell me what's wrong, please

#

does it need to give it in lowercase?

hasty prawn
#

It wants lower case, yes.

verbal slate
#

okay, thx

hasty prawn
#

[a-z0-9/._-] just means the only valid characters are lower case letters, numbers, and those 4 symbols.

verbal slate
#

Yes, I understand, this is a regular

wet breach
#

how the API looks as a dependency is how it should look in the Jar that implements it

verbal slate
#

It still doesn't like something, although I have indicated it .toLowerCase(), maybe someone has a NamespacedKey list for enchantments?

wet breach
#

not sure what is with everyone using this method incorrectly

tardy delta
#

to remove the warning ๐Ÿ’€

wet breach
#

what warning?

hazy parrot
#

because intellij suggest

#

that value might be null

tardy delta
#

that smth might be null

verbal slate
#

By the way, this topic with requirenonnull appeared kind of recently, is it worth using it at all?

tardy delta
#

and people think lets just add req nonnnull so the warning is gone

#

as ijntellij suggests

tardy delta
wet breach
#

what that method is for is after something has been null checked or ensured that it can't be null

#

if it is null something serious happened

#

its also more useful in regards to testing

wet breach
verbal slate
#

Ah, that's it, got it

wet breach
#

that intelliJ suggests it

tardy delta
#

hmm since when is @java.lang.annotation.Native a thing?

tardy delta
#

hmm seems like 1.8, i didnt know it was in the public code

verbal slate
#

I don't understand.. Does anyone have an example of getting enchantment by name (via NamespacedKey)?

#

It's just that I get null if I use this:
EnchantmentWrapper.getByKey(NamespacedKey.minecraft(NAME.toLowerCase()))

wet breach
#

how about show some code

#

have no clue what NAME is

#

or where it comes from

verbal slate
#

okay, sec

humble tulip
#

i think you can do it with scoreboards

wet breach
verbal slate
#
for (String s : instance.getConfig().getConfigurationSection("enchantments").getKeys(false)) {
            if (EnchantmentWrapper.getByKey(NamespacedKey.minecraft(s.toLowerCase())).canEnchantItem(itemStack)) {
                enchants.add(EnchantmentWrapper.getByKey(NamespacedKey.minecraft(s.toLowerCase())));
            }
        }

Config:

tardy delta
#

ig impl calls this then

wet breach
#

if anyone is interested in that sort of thing

wet breach
#

if(instance.getConfig().getConfigurationSection("enchantments") != null) {

}
verbal slate
#

okay

humble tulip
#

yeah cuz ur doing it wrong

#

ur not supposed to add player.getName to npcs

#

you're supposed to add the npc

verbal slate
wet breach
#

only makes sense that team npc should have well npcs

humble tulip
#

?

#

what are foot particles?

wet breach
echo basalt
#

you'd probably end up calling getSection twice

wet breach
#

it is an example to them

#

how they decide to do their null checks is up to them

echo basalt
#

now, using the namespacedkey method

#

makes it so you need to pass lowercase, minecraft names

#

instead of the bukkit enum values

wet breach
#

lets see if they remove requirenonnull

echo basalt
#

for example

#

which wraps into

#

The error part is on the config, not on the code itself

#

and requireNonNull is honestly worthless because it just does a null check into a NullPointerException

#

EnchantmentWrapper.getByKey(NamespacedKey.minecraft(s.toLowerCase()))

verbal slate
echo basalt
#

passing sharpness works, passing DAMAGE_ALL returns null

wet breach
echo basalt
#

pointless code shouldn't exist in the first place

#

if java's garbage collector actually worked properly this code wouldn't even exist

tardy delta
#

Enchantment.getByKey if you want it shorter

echo basalt
wet breach
echo basalt
humble tulip
#

LMFAOOOO

wet breach
#

and checking for null or anything to do with null objects is because the Java developers implemented Null into the JVM which they regret

verbal slate
echo basalt
lavish hemlock
echo basalt
#

and not the minecraft namespaced name

verbal slate
#

In general, I can overwrite everything in lowercase in the configuration

lavish hemlock
#

Option OP!

echo basalt
#

I don't like optionals honestly

#

null checks make more sense to me

lavish hemlock
#

Optionals are nice just 'cause they're monads.

verbal slate
#

Where can I find minecraft names?

echo basalt
#

It's literally just the default names

tardy delta
#

someone explain me what monads are

echo basalt
#

sharpness and all

humble tulip
#

are those there constantly or just on spawn?

echo basalt
#

you can just... middle-click the enchant class

#

and see for yourself

lavish hemlock
echo basalt
#

or be fourteenbrush and go in the stash for every single line of code you'd like to see

tardy delta
#

ah

echo basalt
#

because middle clicking is too much effort

tardy delta
#

dont have a spigot project open

echo basalt
#

sounds like a you problem

#

I literally opened my IDE for this

tardy delta
#

stash is faster

echo basalt
#

that's caused by the npcs moving

echo basalt
humble tulip
#

weird. how do u spawn them and what do you do after?

echo basalt
#

or a literal toaster

lavish hemlock
#

He should just use Vim

#

Computer can't handle anything more

echo basalt
humble tulip
#

bro

wet breach
humble tulip
#

it doesnt matter if you spawn them with a command

#

how do you spawn them with code

echo basalt
#

just be an absolute unit and like

lavish hemlock
tardy delta
echo basalt
#

inject into the network channel and cancel out those packets

#

throwback to when I made a particle culler on the network thread because we were accidentally ddos'ing players

tardy delta
#

location is mutable tho

#

no need for reassignment

lavish hemlock
#

I still love how there's legit 3 representations of most types, from NMS to CraftBukkit to Bukkit.

humble tulip
#

what he's saying is location = location.add() can just be location.add();

#

or this.location = location.add();

#

do you do anything with this.npc after?

#

yep i have no idea why that happens

quaint mantle
#

Is it fine to make a BukkitRunnable that runs every tick so I can update the TPS of the server in a scoreboard?

humble tulip
#

yes

#

but if you're gonna update the scorebard maybe every 5 ticks

#

or even 10

quaint mantle
#

10 it is. Thanks

humble tulip
quaint mantle
#

No

humble tulip
#

ok yeah 10 ticks to update the scoreboard

#

how do u know which is the right particle?

radiant cedar
#

i just realised player.getInventory().getContents() doesn't give the item in the off hand

#

what can I do to get item in the off hand

#

and remov ethis item from inventory if necessary

radiant cedar
#

but i cant remove it

twilit roost
#

sup guys!
I'm creating Sumo MiniGame, but I need some Algorithm that creates Duos ( which fight each other )
Any ideas how it should look like?

tardy delta
#

place all the participating players in a list and choose two random ones?

twilit roost
#

what about if player size is 23?
should I let some random guy play twice?

tardy delta
#

arent they placed in a queue and teleported to the map when another oponent is found?

#

just let them wait if theres nobody

twilit roost
#

its different kind of "minigame"
I forgot to mention it

Its an Event.
So all those players that are present at the start will participate, those who join later won't

tardy delta
#

uhh hope someone plays twice?

twilit roost
#

ig so

lilac dagger
#

is there some tool that i can look at both the mappings between mojang and md5?

#

i know my way around md5's mappings

eternal night
#

screaming sandals has mappings overviews

#

if that is fine

#

not really a "diff" tho in the git sense

#

if that is what you are asking for

remote swallow
#

md5 has mappings? whebn did that happen

lilac dagger
#

the class names

#

i'm used to md5's nms class names

#

i'm using ?nms now

#

but for me it's as good as obfuscated

#

i have to relearn my way

remote swallow
#

md5? spigot mappings?

kind hatch
eternal night
#

Oh sick

#

TIL

kind hatch
#

They honestly should redo that page though. It loads the entire list at once and it is slow to navigate through.

warm light
#

Whats wrong in this method? its not removing item from drop

private void removeSeed(Player player, CropType cropType, BlockBreakEvent event) {
        Material seedMaterial = cropType.getSeedMaterial();
        if (seedMaterial == null) return;
            for (ItemStack drop : event.getBlock().getDrops()) {
                if (drop.getType() == seedMaterial) {
                    drop.setAmount(drop.getAmount() - 1);
                    return;
                }
            }
    }
tardy delta
#

dont you need to re set the drops?

warm light
#

you mean remove & create new drops?

tardy delta
#

event::setDrops

warm light
#

there is only setAmount method in BlockBreakEvent

tardy delta
#

uhh idk

remote swallow
#

block drop item event

humble tulip
verbal slate
#

PlayerChatTabCompleteEvent is deprecated, what can I use instead?

warm light
remote swallow
#

or impl TabExecutor

#

to handle tab complete and command in 1 location

verbal slate
#

I don't need this for commands

remote swallow
#

you would probably have to use that then

verbal slate
#

๐Ÿ˜ฆ

spare prism
#

?paste

undone axleBOT
spare prism
tender shard
#

did you register the listener?

spare prism
tender shard
#

erm yor event is getting called

#

I mean otherwise it wouldnt print "DATA: 0", right?

#

oh cancelled lmao

#

sorry I misread

tender shard
#

you cannot cancel the event in a task

#

you have to cancel it right now

spare prism
#

if I do it after the async task, then will it wait for this task to finish?

tender shard
#

no

spare prism
#

cause I don't want to deal with chunks sync

tender shard
#

no, not in the event listener

spare prism
#

ok, thank u

tender shard
#

what are you trying to do?

spare prism
#

I'm basically trying to limit the given blocks in a given chunk. Like, for example, u can limit players to place only 3 diamond blocks per 1 chunk, etc.

spare prism
tender shard
spare prism
#

And if the number of them exceeds the limit, then the event gets cancelled

tender shard
#

everytime a player places e.g. a diamond block, you get the current amount of diamonds in this chunk from PDC, add one, and save it again

spare prism
tender shard
#

then simply listen to ChunkLoadEvent and manally calculate it once for each chunk

spare prism
#

true

#

thank u

spare prism
tender shard
#
    private final NamespacedKey ALREADY_SCANNED = new NamespacedKey(this, "already-scanned");
    private final NamespacedKey NUMBER_OF_DIAMONDS = new NamespacedKey(this, "number-of-diamonds");
    private static final int MAX_NUMBER_OF_DIAMONDS = 10;

    @EventHandler
    public void onChunkLoad(ChunkLoadEvent event) {
        if(event.getChunk().getPersistentDataContainer().has(ALREADY_SCANNED, PersistentDataType.BYTE)) {
            return; 
        }
        event.getChunk().getPersistentDataContainer().set(ALREADY_SCANNED, PersistentDataType.BYTE, (byte) 1);
        event.getChunk().getPersistentDataContainer().set(NUMBER_OF_DIAMONDS, PersistentDataType.INTEGER, getNumberOfDiamonds(event.getChunk()));
    }

    private int getNumberOfDiamonds(Chunk chunk) {
        int numberOfDiamonds = 0;
        for(int x = 0; x < 16; x++) {
            for(int y = chunk.getWorld().getMinHeight(); y < chunk.getWorld().getMaxHeight(); y++) {
                for(int z = 0; z < 16; z++) {
                    if(chunk.getBlock(x, y, z).getType() == Material.DIAMOND_BLOCK) {
                        numberOfDiamonds++;
                    }
                }
            }
        }
        return numberOfDiamonds;
    }

    @EventHandler
    public void onDiamondPlace(BlockPlaceEvent event) {
        if(event.getBlockPlaced().getType() != Material.DIAMOND_BLOCK) return;
        int alreadyPlacedDiamonds = event.getBlock().getChunk().getPersistentDataContainer().getOrDefault(NUMBER_OF_DIAMONDS, PersistentDataType.INTEGER, 0) + 1;
        if(alreadyPlacedDiamonds >= MAX_NUMBER_OF_DIAMONDS) {
            event.setCancelled(true);
            event.getPlayer().sendMessage("You cannot place any more diamond blocks in this chunk, you fucking imbecile piece of shit.");
            return;
        }
        event.getBlock().getChunk().getPersistentDataContainer().set(NUMBER_OF_DIAMONDS, PersistentDataType.INTEGER, alreadyPlacedDiamonds);
    }
    
    @EventHandler
    public void onDiamondRemove(BlockBreakEvent event) {
        if(event.getBlock().getType() != Material.DIAMOND_BLOCK) return;
        int alreadyPlacedDiamonds = event.getBlock().getChunk().getPersistentDataContainer().getOrDefault(NUMBER_OF_DIAMONDS, PersistentDataType.INTEGER, 0) - 1;
        if(alreadyPlacedDiamonds >= 0) {
            event.getBlock().getChunk().getPersistentDataContainer().set(NUMBER_OF_DIAMONDS, PersistentDataType.INTEGER, alreadyPlacedDiamonds);
        }
    }

}

#

here's how I'd do it

tender shard
#

hm then I'd use an SQLite database where y usave the amount per chunk

#

you definitely should not recalculate it on every block place, but only parse it once and then keep track of it in memory or sth

spare prism
tender shard
#

np

#

well you could just change the whole PDC stuff to a Map<Chunk,Integer> or something, and then either save it to a database, or in theory you could also just use YAML

#

then you load that map on startup and save it async every 10 minutes or so

spare prism
#

if you have many chunks

#

for example

radiant cedar
#

how can i remove an item in the off hand

kind hatch
radiant cedar
#

player.getInventory().getItemInOffHand().remove();

#

would this not work

kind hatch
#

It would not work because there is no #remove() method on the ItemStack class.

tender shard
#

e.g. to identify chunks, I'd create a tiny data class with chunk coords

#
public class ChunkCoordinates {
  public int x, int z;
}
#

sth like that

#

then you can have a Map<ChunkCoordinates, Integer>

spare prism
tender shard
#

is the paperweight readme outdated?

tardy delta
#

and remove that actually returns smth

radiant cedar
#

in oredr to remove it

tender shard
#

null

tardy delta
#

i would be happy if it was possible to declare a Map<record(int, int), Integer>

tender shard
tardy delta
#

how that

#

if they keep the old methods

tender shard
#

because when you change the return type, then existing bytecode won't work

buoyant viper
tardy delta
#

sighs

tender shard
#

I am here

buoyant viper
tardy delta
#

i found you on yt

buoyant viper
#

Whomstdve

tender shard
#

I'm a chicken nugget

tardy delta
#

that can only be one person

tender shard
#

that dude looks like a crack pipe

buoyant viper
#

damn

#

for a second i thought u meant Me

tardy delta
#

green hill tails

tender shard
#

anyone here using jetbrains sync?

buoyant viper
#

gotta go fast

#

jetbrains what now

tender shard
#

to have the same plugins, settings, themes etc on all computers

#

e.g. code style settings

#

bla bal

tardy delta
#

ye

buoyant viper
#

wtf

#

is that an enterprise version thing

tardy delta
#

whats the problem

tender shard
#

I wonder what happens if I do this:

#
  1. Enable sync on windows
  2. Enable sync on mac

what now?

#

does it now throw away the settings I had on mac and use the windows ones?

tardy delta
#

uhh one of them had to push settings to the server

#

and i believe it overwrites settings ye

kind hatch
#

Depends on how the sync works.

tender shard
kind hatch
#

What does it even sync?

buoyant viper
#

plugins , settings, etc

#

i think

tardy delta
#

well ig

tardy delta
kind hatch
#

Ah, it's setup so that you pull changes if you ever push them.

#

If you setup on Windows first, it'll save those settings.

#

Then you can pull them down onto your mac

tardy delta
#

you have to push them to the server first yes

buoyant viper
#

oh god

#

git commit -m "update jetbrains settings"

kind hatch
#

Point is, it's tied to your jetbrains account.

tardy delta
#

ye

#

got so many themes now

tender shard
#

whoa I didnt know you dont need a space between annotations

buoyant viper
#

@thick moonOnly

#

WHO

tender shard
#

I am implementing PersistentDataContainer and paper has a few methods that I need to override because paper users expect to have them

#

e.g. readFromBytes(byte[]) or has(NamespacedKey)(

echo basalt
#

Is there a better way of comparing 2 images instead of just... getting colors and comparing the bytes individually?

#

Assuming they're always the same dimensions

#

right now I just...

tender shard
#

what kind of images?

#

couldnt you just use image.equals(...) ?

echo basalt
#

well

#

maps and itemframes

#

or well in this case it's a buffered image

tender shard
#

anyone ever seen this weird message in test scope? D:

tender shard
echo basalt
#

thing is, Image#equals(OtherImage) might be heavier

#

than just converting it all to a minecraft color array

#

and checking that array

#

as my method of getting colors is quite optimized

#

I mean it might be making a few too many colors

tender shard
#

you could also extend bufferedimage and add some kind of hash that you generate when the image is created.

#

then just return false in equals(AnotherImage) when the hash is different

twilit roost
#

How can I spawn "Barrier" Particle?

verbal slate
#

Guys, what do you think is the best version for the mini-games server? (In terms of version features, mechanics, plugin development capabilities, gameplay, etc.)

twilit roost
tender shard
twilit roost
#

ty

verbal slate
tardy delta
#

if you dont need 1.8 features, dont use it

tender shard
# twilit roost ty

e.g. like this

world.spawnParticle(Particle.BLOCK_MARKER, loc, 1, Material.BARREL.createBlockData());
twilit roost
#

just did it like so ๐Ÿ˜„
thx

tender shard
#

the answer is basically always latsts

verbal slate
#

A difficult choice, however

#

Although plugins (public) are being updated quickly now..

paper falcon
#
Arrow a = (Arrow) e.getProjectile();
```I've got the arrow that's shot by a custom mob. Is it possible to change the arrow's speed? (preferably without using NMS)
tender shard
#

e.g. to make it twice as fast:

arrow.setVelocity(arrow.getVelocity().multiply(2.0));
paper falcon
tender shard
#

no, that makes it twice as fast

paper falcon
#

so I thought it just changed directions

#

thanks once again mfnalxe

tender shard
#

np

#

anyone got any idea why my unit tests don't run?

POM: https://paste.jeff-media.com/?56566e60e347b851#G8EnaFTSRXjqNjjz62kBuLJrSyfjf7BiQsqnqGJ74L6D

[INFO] --- maven-surefire-plugin:3.0.0-M5:test (default-test) @ CustomBlockData ---
[INFO] 
[INFO] -------------------------------------------------------
[INFO]  T E S T S
[INFO] -------------------------------------------------------
[INFO] 
[INFO] Results:
[INFO] 
[INFO] Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
[INFO] 
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  3.843 s
[INFO] Finished at: 2023-01-19T19:51:29+01:00
[INFO] ------------------------------------------------------------------------

Project layout & test:

#

in theory it's infinite

eternal night
#

I mean, concurrently you'll hit the port limit lol

#

or I guess open file descriptors

#

dunno which you'll hit first

#

the JVM doesn't limit you tho

#

the OS does

#

either 65536 or your open file descriptor limit

tender shard
eternal night
#

you should never do that tho

#

that is to the same target tho

#

oh

#

that is what they are doing

#

idk, you should never be hitting this tho ?

tender shard
#

WHY DO MY FUCKING TESTS NOT RUN D:

eternal night
#

did you name the test SomethinSeomthingTest

#

like the class

tender shard
eternal night
#

java 11+ has a pretty nice http client

#

can just use that if you want to

#

you'll never hit the limit xD

#

tho pls cache shit

#

cache the response from the network if possible ?

#

if 100 people request https://enka.network/u/0/something_data.json

#

no need to get that 100 times

#

idk, depends a lot on your application

#

and expected usage

#

it would not be

#

maybe your proxy is clever enough to cache the result ?

#

I mean, that is also a public API

#

you'll have to think about rate limits

tender shard
#

they dont explain AT ALL on how to use this

pseudo hazel
#

whats enka data

#

im sure there are a ton of json libraries you could use

tardy delta
#

gson

#

why skull

#

its just about writing typeadapters

opal juniper
#

HOW the FUCK does this work

#

The sea lantern is there though!

chrome beacon
#

Have you tried removing that poppy

opal juniper
#

I tried with the normal TreeType.TREE first

fervent robin
#

I keep getting this error in pom: [WARNING] Could not transfer metadata org.bukkit:bukkit:1.9.4-R0.1-SNAPSHOT/maven-metadata.xml from/to maven-default-http-blocker (http://0.0.0.0/): transfer failed for http://0.0.0.0/org/bukkit/bukkit/1.9.4-R0.1-SNAPSHOT/maven-metadata.xml [WARNING] org.bukkit:bukkit:1.9.4-R0.1-SNAPSHOT/maven-metadata.xmlfailed to transfer from http://0.0.0.0/ during a previous attempt. This failure was cached in the local repository and resolution will not be reattempted until the update interval of maven-default-http-blocker has elapsed or updates are forced. Original error: Could not transfer metadata org.bukkit:bukkit:1.9.4-R0.1-SNAPSHOT/maven-metadata.xml from/to maven-default-http-blocker (http://0.0.0.0/): transfer failed for http://0.0.0.0/org/bukkit/bukkit/1.9.4-R0.1-SNAPSHOT/maven-metadata.xml

#

?paste

undone axleBOT
fervent robin
eternal night
#

http kekw

#

just

#

don't depend on bukkit

#

there is no point

chrome beacon
#

^^

eternal night
#

remove both the bukkit dependency and repository

fervent robin
#

nms?

tender shard
#

?nms

tender shard
#

nms

eternal night
#

that is nms ?

tender shard
#

oh 1.8.8 lol

fervent robin
#

yes

eternal night
#

people hosting minecraft source code online ๐Ÿ™ƒ

chrome beacon
#

nms still comes in the spigot artifact though

fervent robin
#

yah

chrome beacon
#

No need to depend on bukkit

fervent robin
chrome beacon
#

or craft bukkit

opal juniper
# opal juniper

the method works in other places, it is failing silently though...

eternal night
#

I do love redistributing unlicensed code

fervent robin
#

same

tender shard
fervent robin
#

How do you access it because if i removed the dependency it wouldnt work

chrome beacon
undone axleBOT
fervent robin
chrome beacon
#

Now depend on Spigot

#

and remove bukkit and craftbukkit

fervent robin
#

im just doing that now

opal juniper
chrome beacon
#

Mojmaps are new

fervent robin
#

i see

fervent robin
chrome beacon
#

No

#

You're not

fervent robin
#

In the maven you get from the spigot website it includes bukkit

chrome beacon
#

You depend on Spigot when working with Spigot

#

Spigot already includes the bukkit api

fervent robin
#

Ok thanks that doesnt really make sense why they would combine them then

chrome beacon
#

Spigot is a fork of bukkit

#

Well craftbukkit

#

and Bukkit is the API

fervent robin
#

I see I wasnt aware of that relation

fervent robin
# chrome beacon Now depend on Spigot
<repository>
            <id>spigot-repo</id>
            <url>https://hub.spigotmc.org/nexus/content/repositories/snapshots/</url>
</repository>
<dependency>
            <groupId>org.spigotmc</groupId>
            <artifactId>spigot-api</artifactId>
            <version>1.8.8-R0.1-SNAPSHOT</version>
            <scope>provided</scope>
</dependency>
``` Did that and the packet classes aren't getting recognized Im assuming I need to change something with the repository?
chrome beacon
#

spigot-api only includes the api and not nms

fervent robin
#

Ight thanks

#

works

humble tulip
#

Dod you solve this?

#

I cant remember offhand how to do it

chrome beacon
#

Make your own class loader

humble tulip
#

When i get home

chrome beacon
#

or you know use the libraries feature that's included since 1.17.1

#

Reflection

#

That's not how you're supposed to do it

#

Don't try to force it to load like that

#

Use your own class loader

#

Like I said

humble tulip
#

That won't work

remote swallow
#

It happens

humble tulip
#

You'll need a childfirsturlclassloader

#

Wait no

#

When i get home

#

I'll check

quiet ice
#

Uses the sun Unsafe to make everything accessible again

tender shard
#

why the heck does SLF4J's Logger inter not have any info method o0

#

only debug and warn

quiet ice
#

what logger?

#

Deencapsulation.deencapsulate(ClassloaderClass.class) (or Deencapsulation.deencapsulate(classloader.getClass())) and then do your .setAccessible() thing

#

Simple as that

#

It has a jitpack, but if dearly needed on another way I'd just include the Deencapsulation class file - it's just a small single file anyways

tender shard
#

Basically SLF4J's LoggerFactory.getLogger(MyClass.class)

quiet ice
tender shard
#

that's the only thing I got on my classpath though lol

quiet ice
#

Eclipse hides those packages anyways by default

tender shard
#

oh lmao I'm stupid, I removed SLF4J dependency

quiet ice
#

Yep

#

Also fix your IDE settings, in 99% of circumstances you don't want to have sun internals (outside of the Sun unsafe)

tender shard
#

damn I didnt know Lombok had an @Slf4j annotation

quiet ice
#

Nah that was regarding @tender shard

tender shard
#

yeah I just used Lombok's @Slf4j now and use that

#

with lombok:```java
@Slf4j
public class LogExampleOther {

public static void main(String... args) {
log.error("Something else is wrong here");
}
}

Without Lombok:
```java
public class LogExampleOther {
  private static final org.slf4j.Logger log = org.slf4j.LoggerFactory.getLogger(LogExampleOther.class);
  
  public static void main(String... args) {
    log.error("Something else is wrong here");
  }
}
eternal night
#

saving a single line by adding a single line

quiet ice
#

Myeah, not completely useful

tender shard
#

I find it useful

#

If I wanna e.g. swithc to COmmonsLog, i can just replace the annotation

eternal night
#

I just have an intellij live template

#

I just type .logger

#

and it creates exactly that xD

buoyant viper
#

one was called Overlord i think

quiet ice
buoyant viper
eternal night
#

commons log kekw

tender shard
eternal night
#

no

#

Its a custom oine

tender shard
quiet ice
eternal night
#

log4j implement slf4j

#

you dont use log4j in code

quiet ice
#

Yeah, everything supports SLF4J

undone axleBOT
tender shard
#

idk I find @Slf4j easier than creating the logger manually

quiet ice
tender shard
#

i never understood why people hate lombok so much

eternal night
#

only useful part is @Delegate

tender shard
#

I think @ Data, Getter, Setter, RequiredArgsConstructor, AllARgsConstructor etc useful too

eternal night
#

records

quiet ice
eternal night
#

sneaky throws is meh

tender shard
#

SneakyThrows can also make sense

#

e.g. if you read a file and you already checked whether it exists, so it can not throw FileNotFoundEx

#

but tbh that's the only reason I can think of where it makes sense

#

or maybe for Class.forName if I know that this class exists

#

that's also useful

remote swallow
#

i dont think @util class is worth using on most projects

#

only like public libs like jefflib

tender shard
#

that too

eternal night
#

records

tender shard
#

records are not mutable

eternal night
#

yes

tender shard
#

or are they?

eternal night
#

that is great

#

mutability is bleh

tender shard
#

why that? if I have a Person data class, I wanna be able to adjust the name, weight, age, ...

#

also records have a weird syntax and they are not available in java 8 and 11

#

all fields are final

eternal night
#

you create a new instance if needed

#

side effects on methods are just

#

meh

tender shard
eternal night
#

see Location.add

#

lol

tender shard
#

yeah well for Location I agree

#

but not for Person

quiet ice
eternal night
#

separate your data from the logic and you are fine

tender shard
quiet ice
#

Then don't complain about outdated java versions

eternal night
#

you can re-create the data if you need changes and mutate wherever you keep it

tender shard
eternal night
#

until that class ends in API kekw

#

and now you don't have javadocs

#

and some other instance mutates your person type

tender shard
#

yeah for API I'd ofc not use that

eternal night
#

so now you have to clone the person before returning

tender shard
#

but for a tiny data class I only use myself, why not

eternal night
#

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

lilac dagger
#

do you guys have this error?

buoyant viper
#

string without a terminator ? idk

remote swallow
tender shard
#

it adds getters, setters and constructors

lilac dagger
#

hi

tender shard
lilac dagger
quiet ice
humble tulip
#

Gimme a minigame idea

lilac dagger
#

do you know how? i try one already

tender shard
#

with lombok:

@Data public class DataExample {
  private final String name;
  @Setter(AccessLevel.PACKAGE) private int age;
  private double score;
  private String[] tags;
  
  @ToString(includeFieldNames=true)
  @Data(staticConstructor="of")
  public static class Exercise<T> {
    private final String name;
    private final T value;
  }
}

without lombok:

public class DataExample {
  private final String name;
  private int age;
  private double score;
  private String[] tags;
  
  public DataExample(String name) {
    this.name = name;
  }
  
  public String getName() {
    return this.name;
  }
  
  void setAge(int age) {
    this.age = age;
  }
  
  public int getAge() {
    return this.age;
  }
  
  public void setScore(double score) {
    this.score = score;
  }
  
  public double getScore() {
    return this.score;
  }
  
  public String[] getTags() {
    return this.tags;
  }
  
  public void setTags(String[] tags) {
    this.tags = tags;
  }
  
  @Override public String toString() {
    return "DataExample(" + this.getName() + ", " + this.getAge() + ", " + this.getScore() + ", " + Arrays.deepToString(this.getTags()) + ")";
  }
  
  protected boolean canEqual(Object other) {
    return other instanceof DataExample;
  }
  
  @Override public boolean equals(Object o) {
    if (o == this) return true;
    if (!(o instanceof DataExample)) return false;
    DataExample other = (DataExample) o;
    if (!other.canEqual((Object)this)) return false;
    if (this.getName() == null ? other.getName() != null : !this.getName().equals(other.getName())) return false;
    if (this.getAge() != other.getAge()) return false;
    if (Double.compare(this.getScore(), other.getScore()) != 0) return false;
    if (!Arrays.deepEquals(this.getTags(), other.getTags())) return false;
    return true;
  }
  
  @Override public int hashCode() {
    final int PRIME = 59;
    int result = 1;
    final long temp1 = Double.doubleToLongBits(this.getScore());
    result = (result*PRIME) + (this.getName() == null ? 43 : this.getName().hashCode());
    result = (result*PRIME) + this.getAge();
    result = (result*PRIME) + (int)(temp1 ^ (temp1 >>> 32));
    result = (result*PRIME) + Arrays.deepHashCode(this.getTags());
    return result;
  }
  
  public static class Exercise<T> {
    private final String name;
    private final T value;
    
    private Exercise(String name, T value) {
      this.name = name;
      this.value = value;
    }
    
    public static <T> Exercise<T> of(String name, T value) {
      return new Exercise<T>(name, value);
    }
    
    public String getName() {
      return this.name;
    }
    
    public T getValue() {
      return this.value;
    }
    
    @Override public String toString() {
      return "Exercise(name=" + this.getName() + ", value=" + this.getValue() + ")";
    }
    
    protected boolean canEqual(Object other) {
      return other instanceof Exercise;
    }
    
    @Override public boolean equals(Object o) {
      if (o == this) return true;
      if (!(o instanceof Exercise)) return false;
      Exercise<?> other = (Exercise<?>) o;
      if (!other.canEqual((Object)this)) return false;
      if (this.getName() == null ? other.getValue() != null : !this.getName().equals(other.getName())) return false;
      if (this.getValue() == null ? other.getValue() != null : !this.getValue().equals(other.getValue())) return false;
      return true;
    }
    
    @Override public int hashCode() {
      final int PRIME = 59;
      int result = 1;
      result = (result*PRIME) + (this.getName() == null ? 43 : this.getName().hashCode());
      result = (result*PRIME) + (this.getValue() == null ? 43 : this.getValue().hashCode());
      return result;
    }
  }
}```
humble tulip
#

Lmfao

quiet ice
#

Lemme find a project where I did that

remote swallow
#

AH

humble tulip
#

Not bedwars

eternal night
#

thanks for that spam xD

undone axleBOT
eternal night
#

hastebin is trash

remote swallow
tender shard
buoyant viper
#

personally i prefer the non-lombok way

tender shard
eternal night
#

sucks

#

xd

remote swallow
tardy delta
#

what happened here

tender shard
quiet ice
buoyant viper
#

thats just the typical .equals

#

proguard sunglasses

river oracle
tender shard
tardy delta
#

first two lines can be one already

tender shard
#

none. the free ones are all shit

tardy delta
#

Objects.equals

lilac dagger
#

i'll try @quiet ice thank you

tardy delta
#

instanceof T t

quiet ice
eternal night
#

one less method call

#

lightspeed

tender shard
#

proguard is quite useless, all it does is rename things

lilac dagger
#

@quiet ice it worked!! thank you

tender shard
#

only thing it's useful for is to lower your .jar file size if you're near the upload limit

lilac dagger
#

yo, don't call proguard useless

#

it does the important part

#

without slowing down the project

buoyant viper
remote swallow
#

running

tardy delta
quiet ice
#

Proguard is neat at deobfuscation

lilac dagger
#

it makes jars smaller

quiet ice
#

However as someone that is modding a game obfuscated with proguard (not minecraft), I can tell you that proguard is not that good of an obfuscator

#

It's just a small fence - keeps the script kiddos out but anyone more experienced will bring over the bulldozer

lilac dagger
#

how would you mod a game obfuscated with a more advanced plugin then?

quiet ice
#

Having never done it I cannot tell for sure

buoyant viper
quiet ice
buoyant viper
#

skidsuite made by the same genericexception person i linked to earlier, but its a former version :v

quiet ice
tardy delta
#

thats a long file ๐Ÿ’€

quiet ice
#

Nah lol, it just does stuff no other comercial deobfuscator can do.

quiet ice
tardy delta
#

BITMAP_STAR_GENERATOR_GET_RESOURCES_LIST_METHOD_CONTENTS heehee

quiet ice
#

Okay, just a bit less than a 1000 lines longer, but then I also haven't worked on it that much

tardy delta
#

what distro is that?

quiet ice
#

Fedora with Gnome

tardy delta
#

๐Ÿ‘€

buoyant viper
#

gnome :(

quiet ice
#

Did you flush the output stream?

sterile token
#

Dont obf, you will just lost time

quiet ice
hazy parrot
#

Send your json

buoyant viper
quiet ice
#

I'd rather take broken alt-tab over broken sound output

tardy delta
#

i like kde โค๏ธโ€๐Ÿ”ฅ

buoyant viper
#

true

hazy parrot
#

Code block pls

buoyant viper
#

maybe give XFCE a try

#

personal favourite of mine

quiet ice
remote swallow
#

discord formats json?

quiet ice
remote swallow
#

when did they do that

buoyant viper
#

but sometimes the original is just better

#

like ubuntu vs debian ;^)

quiet ice
#

Then I wouldn't expect it to be much different

tardy delta
#

im now using xfce and the defaults just looks terrible

buoyant viper
#

i forget if xfce ever modernized its look but ig its a bit dated sadcat

#

nothin wronmg with that...

remote swallow
#

linux mint xfce

quiet ice
#

Are you sure that you can use ' for keys?

buoyant viper
#

or cinnamon

#

idr

quiet ice
#

If nothing else, try set it (the GSON parser) to be lenient

remote swallow
#

theres 3

buoyant viper
#

oh its literally hte 3 they shipl ol

tardy delta
#

whats the dif between those lol

remote swallow
#

i woner which is more customizable

feral swallow
#

For some reason when I send a block chance to a player and the player aims a bow at that said block it doesnt show the block anymore

remote swallow
#

i might try mater dual boot

hazy parrot
#

Online linter also shows that json as invalid

sterile token
#

Please ppl is being helped move to #general

remote swallow
#

when i can figure out how to remove my old min from eufi boot menu

hazy parrot
#

Are you sure you can nest another json object just like that

#

Player data

buoyant viper
remote swallow
#

windows atm

hazy parrot
#

It shows that error is there

buoyant viper
#

bcdedit to remove pesky installs

remote swallow
#

thanks

gleaming grove
#

nesting is fine, just ' need to be replaced with "

remote swallow
#

can i not run bcdedit in cmd

feral swallow
#

For some reason when I send a block chance to a player and the player aims a bow at that said block it doesnt show the block anymore

buoyant viper
#

also yeah run bcdedit as admin in cmd

#

copy the whole identifier btw

#

like {xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}

remote swallow
#

im gonan guess its this one

buoyant viper
#

yeah

remote swallow
#

its gone

tardy delta
#

learnt that from frost

remote swallow
buoyant viper
#

and then a really convoluted way that i get it out of the boot partition is using uh

#

diskpart

remote swallow
#

already removed that

buoyant viper
#

oh

remote swallow
#

i just deleted the partition it was on

buoyant viper
#

what

#

oh

buoyant viper
#

oh the ubuntu partition not ur EFI boot partition

#

ok

remote swallow
#

im not that dumb

#

it might seem like it

gleaming grove
#

Have any framework/tool/library been made for plugin Integration tests?

remote swallow
#

mockbukkit

gleaming grove
#

I mean integration tests, not the unit one

tardy delta
buoyant viper
#

or if u do itd be like deleting System32 on a live system

tardy delta
#

i better hope not

remote swallow
#

windows boot manager doesnt have a guid

tender shard
#

ugh this isnt working as expected lol

remote swallow
#

null

lethal knoll
#

Hey everyone, I remember there was a way upon EntityType to define whether they are like a Water mob or not. Does anyone remember? Can't find it atm

remote swallow
#

i think, its time to install chrome and get my book marks onto it

#

and extensions

buoyant viper
tardy delta
buoyant viper
remote swallow
#

if i install mate i then have 3 linux versions

buoyant viper
#

bc i had already uninstalled it

#

so i had to look up how to remove

remote swallow
#

i did attempt to google it

#

but couldnt find anything

#

my googling skills arent the best

buoyant viper
#

idr what i even looked up

#

and i dont even remember how i made the diskpart solution that i use

#

bc i know i didnt look that up

remote swallow
buoyant viper
#

i think i was like messing around with it and was like oh damn

pseudo hazel
#

is it possible to set the display name of an item to a json string

#

so i can use text, translate etc with it

#

I found Bukkit.getUnsafe().modifyItemStack() but that seems to overwrite the whole itemmeta

#

or atleast the pdc I have on it as well

remote swallow
#

iirc you have to format the json yourself

pseudo hazel
#

and afaik I dont think you can use pdc to set the display name

chrome beacon
#

Paper API or nms

pseudo hazel
#

are those the only ways?

lethal knoll
remote swallow
#

you could probably use minimessage legacy serializer and format that back

quiet ice
#

But then the last time I have seen use of that method were years ago

tender shard
quiet ice
#

The Bukkit unsafe is very very arcane

remote swallow
pseudo hazel
#

yeah I would rather not use a method from teh stone age lmao

pseudo hazel
#

do you have an example epic?

gleaming grove
remote swallow
#

oh did i tell you that i got all the chat colours added

remote swallow
lethal knoll
#

that's it!

#

Thanks!

chrome beacon
chrome beacon
#

Legacy text is just a string which you could write without json in the first place

pseudo hazel
#

and how do I put taht stuff on an itemstack

remote swallow
#

well without using paper api or some jank there idk of any better way to format json to its string to add to items with spigotapi

pseudo hazel
#

like actually making the json string is not the issue for me

remote swallow
chrome beacon
#

Which is why I've been saying it won't work

pseudo hazel
#

yes but taht method just rerutns a string

#

okasy

#

sad

#

i was so close

#

I guess I can just use teh unsafe stuff first and then add my custom data to it so the item doesnt get wiped

remote swallow
#

oh olivo how does clx or blueslime core handle minimessage stuff and retain spigot support

chrome beacon
#

No item names

eternal night
#

you can convert adventure components to bungee ones

chrome beacon
#

Just chat messages

eternal night
#

and then unsafe

remote swallow
#

ah

pallid patio
#

How can I verify which potion effect type was added in the EntityPotionEffectEvent in the ADDED action?

eternal night
#

getNewEffect

pallid patio
#

It does not work

chrome beacon
#

??

tender shard
#

yay it works

remote swallow
#

why do you have mctest stuff on c

pallid patio
#

not work

remote swallow
#

switch statements be like

gleaming grove
tender shard
pallid patio
tender shard
#

on D: ?

remote swallow
#

documents

tender shard
#

naaah

#

cd /c/mctest

#

is faster

pallid patio
gleaming grove
remote swallow
#

and i can just pick what server version

tender shard
#

my desktop looks like this lol

#

but usually all things are hidden

pallid patio
remote swallow
tender shard
#

i dont know, every thing I install decides to put a useless shortcut there

#

tbh nobody uses the desktop to start anything

#

you press the windows key and enter whatever you wanna start

#

on mac, no app ever creates a shortcut

remote swallow
#

most things you can toggle

#

i just have this

#

i can click minecraft servers then my startserver bat

regal scaffold
#

Any personal recommendations on GUI library?

#

IF, ObliviateInvs?

#

I have too many choices, mind saying any reason

#

Do you know if one is able to allow the user to add a item from their inventory/get what the item in X,Y slot is?

#

All in triumph docs?

#

Alright I thought so

#

Great, I'm gonna give that a go. Thanks

#

Alright gonna go with triumph then

tall dragon
#

ive used that before, and it works kinda weird yea

tender shard
#

why cant I access that method lmao

regal scaffold
#

2-0 triumph defo going for that

tall dragon
tender shard
#

what a useless error message

tall dragon
#

or not

tender shard
#

why doesnt it say "cant access method bc class it not public"

remote swallow
#

i just thought

tall dragon
#

yea. thats odd

remote swallow
#

we probably should have a command to show the colours that we have pre-set alex

tender shard
#

arent the builtin colors the normal chat colors?

#

e.g. &f &a &b etc

#

?

remote swallow
#

yeah

regal scaffold
#

Little noob question

remote swallow
#

but most have a different hex

#

because they look ugly

regal scaffold
#

How can I know what the latest version of a dependecy is on maven

#

If the plugin doesn't specify

remote swallow
regal scaffold
#

Diff repo

tender shard
#

yeah then add a command to display them :3

remote swallow
tender shard
#

did you use ACF for the command?

#

or did I?

remote swallow
#

yeah you did

regal scaffold
#

Not for intelliJ it seems @remote swallow

tender shard
#

there should be a nice tab completer for the builtin colors

remote swallow
#

how do i do that

#

also ill probabl yneed to make something to replace the dupes

tender shard
regal scaffold
#

That's what I mean, how can I find the latest version

#

On the repo

remote swallow
#

because im lazy and i just make it replace colour with col_our

regal scaffold
#

So I can specify that version

remote swallow
#

because it works

hazy parrot
remote swallow
hazy parrot
#

It's like file explorer

regal scaffold
#

Tiumph

regal scaffold
remote swallow
#

"3.1.4"

tender shard
#

you can just use any version that you know exists, then do mvn versions:use-latest-releases

regal scaffold
#

yeah just found up

tender shard
#

looks like this

remote swallow
#

or just look at the github lol

regal scaffold
remote swallow
#

i founded a conclure

regal scaffold
#

{Use latest here}

remote swallow
#

look at the buildfile

tender shard
#

yeah when they say "use latest", open the pom.xml or build.gradle and check the latest version there

#

although in gradle it could also be in gradle.properties

regal scaffold
#

Gotcha gotcha

#

Thanks guys

remote swallow
#

conlure is swedish?

ornate heart
#

yea

remote swallow
#

okay so conclure is now called ikea

regal scaffold
#
                        <configuration>
                            <createDependencyReducedPom>false</createDependencyReducedPom>
                            <relocations>
                                <relocation>
                                    <pattern>com.jeff_media.morepersistentdatatypes</pattern>
                                    <shadedPattern>me.tomisanhues2.deepstorage.morepersistentdatatypes</shadedPattern>
                                </relocation>
                            </relocations>
                        </configuration>

First time shading 2 lib together, I assume I can have multiple <relocation> groups

remote swallow
#

yeah

tender shard
gleaming grove
#

are you loading to json or from json?

tender shard
#

you can have as many relocations as you like

gleaming grove
#

so In case of arrays json should looks like that ```{

"myarray":[{"name":"bob"},{"name":"mark"}]

}```

#
{"name":"bob"},
{"name":"mark"}

]``` or like this
#

send me this as text pls

#

ye this is huge, do you need to conveter all content from this json to objects or only some parts?

remote swallow
#

with is enka and why are they a network

regal scaffold
#

Are the best ways of checking if a user clicks a chest using PlayerInteractEvent and then to check clicks inside InventoryClickEvent?

remote swallow
#

hmm

#

morice plays genshin impact confirmed

gleaming grove
#
                "1001": {
                    "type": 1001,
                    "ival": "0"
                },
                "1002": {
                    "type": 1002,
                    "ival": "6",
                    "val": "6"
                },
                "1003": {
                    "type": 1003,
                    "ival": "0"
                },
                "1004": {
                    "type": 1004,
                    "ival": "0"
                },
                "4001": {
                    "type": 4001,
                    "ival": "90",
                    "val": "90"
                },
                "10010": {
                    "type": 10010,
                    "ival": "24000",
                    "val": "24000"
                }
            },.``` So basically this is not array but object with properties inside
#

or Hashmap<String,PropertValue>

livid dove
#

So packet limits for players are proccing even when ive set the paper yml to "drop"

rancid hare
austere cove
#

if I have some set of POJOs, and I want an efficient getBySomeProperty(property), I can store the POJOs in a map keyed by my property.
What do I do if I also want an efficient getBySomeOtherProperty(other_property) (i.e. not iterating over all entries until I find a matching one), is there some gigachad datastructure or do I just have two maps pointing to the same instance

rancid hare
remote swallow
#

do you use gradle

rancid hare
#

No

#

It worked before but I don't know which libraries I used to import

eternal oxide
#

?bootstrap

undone axleBOT
#

Bootstrap Jar
The main spigot-1.18.jar is now a bootstrap jar which contains all libraries. You cannot directly depend on this jar. You should depend on Spigot/Spigot-API/target/spigot-api-1.18-R0.1-SNAPSHOT-shaded.jar, or the entire contents of the bundler directory from your server, or use a dependency manager such as Maven or Gradle to handle this automatically.

Please read the release notes for further information: https://www.spigotmc.org/threads/9-years-of-spigotmc-spigot-bungeecord-1-18-1-18-1-release.534760/#post-4305163

rancid hare
#

Yeah that worked

What's the way to send a packet then? CraftPLayer.getHandle().b.a(packet) does not work

wary topaz
#

hey guys im back lol, found this in one of my projects (LOL)

public void openTradeMenuForPlayer (UUID uuid, Player player, UUID uuid2, Player player2) {
        if (player.getUniqueId() == uuid && player2.getUniqueId() == uuid2) {
            
        }
    }

please laugh at me ;0

remote swallow
pallid patio
#

How to check if an item type is consumable

wary topaz
#

isnt it a bool?

wary topaz
#

or you can make a strnig of every consumable item and see if it's in it

hasty prawn
#

What does any of that even have to do with opening a trade menu

wary topaz
#

idfk

hasty prawn
pallid patio
#

thx

remote swallow
#

do you have it on literal mode or whatever its called

#

and are they static

hasty prawn
#

The solution to that problem is to delete Lombok

remote swallow
#

do you have any annotation on the class

#

dafuq

#

are they lombok getters

#

im gonna guess that its saying avatarInfo isnt that class or some bs thing

wary topaz
#

can someone do something for me while I finish my code, could you tell me what the slot number is of all these items

remote swallow
#

4, 13, 22, 31, 40, 49

#

i think my brain brained there

#

dont quote me

wary topaz
#

tysm

remote swallow
#

what joke

hasty prawn
#

Now this is a good solution

#

what KEKW

hasty prawn
#

You did add the getters after removing lombok right?

#

Might restart IntelliJ, maybe it's suggestions are just broken

#

Invalidate and Restart perhaps?

echo basalt
#

ehh

echo basalt
#

It's why I made something in my menu engine

hasty prawn
#

What it do

echo basalt
#

I can either

paper viper
#

only the 45 is wrong placed

wary topaz
#

tysm

echo basalt
#
layer.applySelection(new RectangularSelection(new Point(5, 1), new Point(5, 6)), new DecorationItem(itemStack));
wary topaz
#

im having trouble creating the menu (i've been gone frmo spigot for like 2 months)

#

im forgetting how to make it lol

#

Inventory tradeMenu = ;

    ItemStack e = new ItemStack(Material.STAINED_GLASS_PANE)
    tradeMenu.setItem(4, );
#

trying to make it gray stained glass pane

remote swallow
#

Black_stained_glass_pane

hasty prawn
#

I assume the points are x y coordinates not slots

wary topaz
#

not a thing

hasty prawn
#

What version are you using

wary topaz
#

1.8.8

#

spigot

hasty prawn
#

Gross no wonder

paper viper
#

Material.ORANGE_STAINED_GLASS_PANE

wary topaz
#

it has the item ingame

#

what is it named

#

also its a gray stained glass pane

echo basalt
#

or use a pattern mask, such as

PatternMask mask = new PatternMask(
  "1...|...2",
  "....|....",
  "....|....",
  "....|....",
  "....|....",
  "...L|R..."
);

layer.applySelection(mask.selection("|"), new DecorationItem(itemStack));
layer.applySelection(mask.selection("L"), new MultiSwitch<Boolean>(
  Map.of(
         true, item1,
         false, item2
  )
);
wary topaz
echo basalt
#

:)

wary topaz
#

imillusion thats what I was going to do

hasty prawn
#

I'm guessing in 1.8 stained glass has the Material has STAINED_GLASS_PANE and you have to use the magic numbers to change the color

echo basalt
#

yeah sure

paper viper
#

GRAY_STAINED_GLASS_PANE

echo basalt
#

STAINED_GLASS_PANE

#

and the magic value was like

#

9

#

or 11

#

or 13

#

one of those 3

#

you can just see it in-game with advanced tooltips

wary topaz
#

alr

#

ty

hasty prawn
echo basalt
#

where each character represents a lot in the inv

hasty prawn
#

Yes I got that

#

But you didn't define those 3

wary topaz
#

it doesnt show with ADVT

echo basalt
#

the character can be whatever you want

#

Then you can make selections of those slots

#

and apply elements to them

#

such as decoration items, buttons or multiswitches

#

or whatever you want

hasty prawn
#

Ok so you just didn't do that for those 3 lol

echo basalt
#

yeah I couldn't bother

wary topaz
hasty prawn
#

I don't blame you

#

That's pretty shmancy

echo basalt
#

lots of funky stuff going on the back

#

I was tired of taking 2 hours to make a paginable menu that hooks into a database

#

and into a config at the same time