#help-development

1 messages · Page 708 of 1

analog igloo
#

is there a way to change the default theme of interllij ?

#

intellijIDea ,

young knoll
#

From a few hundered kilobytes in those big floppy disks to 1tb in a microSD

smoky oak
#

for loop or lambda, and why?
shape.forEach(e->world.spawnParticle(type,e,1));
for(Vector v : shape) world.spawnParticle(type,v,1);

sterile token
echo basalt
#

forEach is just a for loop wrapper

#

except that it limits you to final variables

analog igloo
echo basalt
#

and forces you to create an anon class

#

so just go with the good ol' loop

smoky oak
#

k

analog igloo
#

is it a best plugin ?

smoky oak
#

was more asking along 'which is faster' lol

hybrid spoke
#

for loop for performance

sterile token
young knoll
#

That's a micro optimization

hybrid spoke
#

dont care

young knoll
#

But the standard loop will be faster

sterile token
smoky oak
hybrid spoke
#

stream api generally slow af

young knoll
#

I don't think it's that bad in modern jvms

#

You'd have to properly profile it tho

hybrid spoke
#

it is

#

pulls on your performance strings like hell

echo basalt
#

just write basic code

#

no need to be fancy and use optionals and streams everywhere

#

they're useful in some cases

hybrid spoke
#

nah i dont say to avoid them

#

but in terms of performance they are worse

#

but ideally you shouldnt care

smoky oak
#

is there some bunch of 'this basically does the same but this is faster'

#

like i do remember that collection overwiew

quaint mantle
young knoll
#

I still want to see a benchmark of stream vs loop

#

Someone get alex on that

quaint mantle
#

also you can optimize optional tho

hybrid spoke
#

most performance issues are stupidity

quaint mantle
#

stream works great in other languages so

hybrid spoke
#

just do it yourself

#

im specialized on performance and can tell you that it spikes on your performance

smoky oak
#

@echo basalt is your cubig arc ting just a complicated way of saying 'multiple chained beizer arcs'? i cant make heads or tails off your math

analog igloo
#

sorry to reask something, how can i see the workspaces files ?

smoky oak
analog igloo
#

tx

round finch
#

👍

analog igloo
#

now i have intellij how can i start coding ?

round finch
#

Is that git?

#

🤨

analog igloo
#

i mean how can i downlaod spigot api

analog igloo
#

tx

analog igloo
eternal oxide
#

of course, this is Spigot dev

analog igloo
#

okay

eternal oxide
#

what plugin are you wanting to write?

analog igloo
#

but in the link u send me there is nothing about minecraft

analog igloo
eternal oxide
#

Spigot plugins are for Spigot Minecraft servers

analog igloo
#

yeah

#

and ?

eternal oxide
#

and?

#

Thats what you asked for

analog igloo
#

but i have not downoad anything for intellij

hybrid spoke
#

do you know what maven is

analog igloo
#

must i downlaod spigot or not ?

analog igloo
eternal oxide
#

no

#

Follow the tutorial

analog igloo
#

what ??

eternal oxide
#

stop jumping the gun

analog igloo
#

ok

#

but i m not english native ...

#

i dont really understand the tuto

#

there is not a french version ?

hybrid spoke
#

learn english then

#

you will need it as a dev

eternal oxide
#

Sorry thats a you issue

analog igloo
#

im only 16

hybrid spoke
#

i learnt it in kindergarten

analog igloo
#

ive found a french tuto but it s for eclipse and not intellij

analog igloo
slender elbow
#

lower is better, broadly speaking they're basically the same in terms of throughput, ever so slightly slower but it is not going to be the cause your plugin decimates the server unless you are using them in really hot spots

young knoll
#

Kotlin collections not feeling too good on the big collections

smoky oak
#

theres no spawn dust method

#

how the f

#

i know i did this beforehand

young knoll
#

what?

smoky oak
#

how do i spawn a dust transition particle

analog igloo
#

hey what must i change in the pom.xml file ?

hybrid spoke
#

dust shit comes later

smoky oak
#

oooh i see

#

its the data arg

#

gotcha

slender elbow
# young knoll Kotlin collections not feeling too good on the big collections

yeah well, they are the opposite of streams, each operation is evaluated eagerly, so something like list.map(idk).filter(idk).map() will create a new collection for the first map, then a new collection for the filter, then a new collection for the last map, you can see how that isn't great on large collections with many operations

glad prawn
#

bUt ClEaN 💀

smoky oak
#

@echo basalt apologies for annoying you again but do you by chance know why putting this through your code only results in a three-quarter circle?

List.of(
           new Vector(0,0,1),
           new Vector(1,0,0),
           new Vector(0,0,-1),
           new Vector(-1,0,0),
           new Vector(0,0,1)
        )
echo basalt
#

You could try replacing the i += 3 to i++ in the cubic bezier method

echo basalt
#

+= 2?

#

there's some trial and error

#

or just ask the original author

#

chatgpt

smoky oak
#

its a parabola now

native bramble
#

what is the best way te safely restart server with plugin?

livid dove
#

Plugin that restarts the server ? Seems a bit odd

native bramble
#

why?

livid dove
#

What's it for?

native bramble
#

i need to make autorestarts every 6 hours for my server with info for players, like after 5 min server will be restarted

smoky oak
#

start the server with a looping script. Call system.exit in ur plugin

livid dove
smoky oak
#

no

slender elbow
#

me when Bukkit.shutdown exists

proven jay
#

Who here is good with Gradle?

smoky oak
#

alex

young knoll
#

lol yeah just have a looping start script and use Bukkit.shutdown

#

Or you can make use of the restart script but meh, looping start is easier

smoky oak
#

Aint there Bukkit#shutdown

#

yea thats what you meant im dumb

small current
#

i might answer

muted dirge
#

whats necssecery for a good authentication plugin?

slender elbow
#

online-mode=true 👍

#

best auth

proven jay
# small current ask your question

I'm getting this error when I try to build a plugin I'm changing something in

:classes
\--- :compileJava
     \--- :jar
          \--- :classes (*)```
small current
#

you are using multi module?

proven jay
#

The problem is most likely in the build.gradle, but I don't know

muted dirge
small current
small current
muted dirge
small current
#

sha256

#

and ...

proven jay
muted dirge
#

its not enough?

proven jay
small current
small current
proven jay
#

I'm adding an addition into the WildLoaders plugin

small current
#

md5, sha256 and ...

muted dirge
small current
small current
proven jay
small current
young knoll
#

Isn't md5 outdated

muted dirge
proven jay
#

I use Maven, but the plugin I'm editing uses Gradle

unreal quartz
#

I hope you’re not suggesting md5 for passwords

muted dirge
unreal quartz
#

No bcrypt is good

small current
proven jay
slender elbow
#

you shouldn't generate a new salt for every single time you want to hash a password, but rather generate one for each user and store it, then use that every time you want to get the user's password hash

small current
muted dirge
young knoll
#

sha512

unreal quartz
#

I use bcrypt

young knoll
#

Go big or go home

proven jay
# small current What you modified

I added this

    paperweightDevelopmentBundle("io.papermc.paper:dev-bundle:1.20.1-R0.1-SNAPSHOT")
    compileOnly project(":API")
    compileOnly rootProject
}```

```if (project.hasProperty('nms.compile_v1_20') && !Boolean.valueOf(project.findProperty("nms.compile_v1_20").toString())) {
    project.tasks.all { task -> task.enabled = false }
}```
small current
#

You are circulating depends

slender elbow
#

i mean, that jar task configuration is stinky af

small current
#

search the error

proven jay
#

That's what the error says

#

I don't know how to fix it lol

small current
#

search it

proven jay
#

And that's why I'm here

#

Because I don't know how to fix it

eternal oxide
#

your project design is wrong

#

whats your pom?

#

oh paper

proven jay
eternal oxide
#

?whereami

slender elbow
#

i mean it isn't anything to do with paper specifically, that gradle script makes me wanna unalive

proven jay
small current
#

@proven jay circulating depends means that Task A depends on Task B, and Task B depends on Task A creating a cycle

#

you need to restructure your build script

#

so they both dont depend on each other

proven jay
#

Do you know what do I have to move around in it?

small current
#

compileOnly project(":API")

you added this right?

small current
#

remove it

#

thats the fix

#

if the API depends on it

proven jay
#

Let me see

small current
#

i guess the rootProject

#

has the same issue too

#

you need to restructure your code too i guess

proven jay
small current
#

try and see what happens

#

i dont know the entire structure of your code

onyx fjord
small current
#

Yes ik

#

I gave an example

young knoll
#

poor md5

hasty prawn
#

:( why booly md5

livid dove
echo basalt
#

Reward you mean

#

Recompense sounds like a translation mistake

muted dirge
#

why can't i create a package named "enum"?

austere cove
#

because it's a reserved name

muted dirge
#

i want a package named enum

#

:(

hasty prawn
#

Just name it enums if you want it to be called that

#

enum is a keyword so you can't use it

young knoll
#

num

#

nums

muted dirge
quiet ice
hasty prawn
#

or

#

alternatively

#

name it something that java source allows pausecham

tender shard
# muted dirge

because package names are hierarchical identifiers, § 6 JSL, and identifiers (§ 3.8 JSL) cannot be keywords, § 3.9 JSL

#

and enum is a keyword as of java 1.5+

muted dirge
#

i understand

muted dirge
#

right?

tender shard
#

there is little sense to have a package for enums anyway

muted dirge
tender shard
#

I mean you also don't have one for "classes" or "interfaces" and for "abstract classes" or "records" right?

#

so why is there one for enums

muted dirge
#

im very neat

tender shard
#

what is the purpose of having a separate package only for enum classes

worldly ingot
#

Best to organize by concept, not by types

haughty granite
#

have any of you already integrated websocket react to link a site to a minecraft server?

slender elbow
#

those are words

#

you mean connecting a plugin to the web server or ..?

#

the most popular example of doing that with ws is probably a discord bot

#

but like for discord you're most likely gonna use a library than handle the connection yourself

haughty granite
#

but I can't find a tutorial that explains how to establish the react connection

chrome beacon
#

It's just like any websocket connection

#

You don't have to find a Minecraft specific tutorial

haughty granite
#

i'm not looking for a minecraft tuto i'm looking for an understandable react websocket tuto

timid hedge
#

How do i set a skull in the center of a end portal frame in 1.8?

haughty granite
#

I've never used websocket

smoky oak
#

Is overflow considered a feature or a bug?

#

I'm considering doing int = 1 i ++ if int = 0 return

smoky oak
#

like the skull and the frame occupying the same space? invisible armor stands

chrome beacon
slender elbow
lost matrix
tender shard
#
  1. ???
  2. Profit
lost matrix
#

Ye

topaz cape
#

guys, i need mathematical help since my brain sucks ass atm

public static long convertDurationToMs(String durationString) {
        if ("permanent".equalsIgnoreCase(durationString)) {
            return -1;
        }

        long milliseconds = 0;
        Pattern pattern = Pattern.compile("(\\d+)\\s*(\\w+)");
        Matcher matcher = pattern.matcher(durationString);

        while (matcher.find()) {
            int value = Integer.parseInt(matcher.group(1));
            String unit = matcher.group(2).toLowerCase();

            switch (unit) {
                case "y":
                case "year":
                case "years":
                    milliseconds += TimeUnit.DAYS.toMillis((long) 365 * value);
                    break;
                case "m":
                case "month":
                case "months":
                    milliseconds += TimeUnit.DAYS.toMillis(30L * value);
                    break;
                case "d":
                case "day":
                case "days":
                    milliseconds += TimeUnit.DAYS.toMillis(value);
                    break;
                case "h":
                case "hour":
                case "hours":
                    milliseconds += TimeUnit.HOURS.toMillis(value);
                    break;
                case "s":
                case "second":
                case "seconds":
                    milliseconds += TimeUnit.SECONDS.toMillis(value);
                    break;
                default:
                    throw new IllegalArgumentException("Invalid time unit: " + unit);
            }
        }
        return milliseconds;
    }```

I use this to convert the value "1y" to milliseconds

```java
public static String calculateTimeLeft(long timeLeftMs) {
        if (timeLeftMs == -1) {
            return "Permanent";
        }

        if (timeLeftMs < 1000) { // Less than a second
            return "Now";
        }

        long years = TimeUnit.MILLISECONDS.toDays(timeLeftMs) / 365;
        long months = (TimeUnit.MILLISECONDS.toDays(timeLeftMs) % 365) / 30;
        long days = TimeUnit.MILLISECONDS.toDays(timeLeftMs) % 30;
        long hours = TimeUnit.MILLISECONDS.toHours(timeLeftMs) % 24;
        long minutes = TimeUnit.MILLISECONDS.toMinutes(timeLeftMs) % 60;
        long seconds = TimeUnit.MILLISECONDS.toSeconds(timeLeftMs) % 60;

        StringBuilder result = new StringBuilder();

        if (years > 0) {
            result.append(years).append(" year");
            if (years > 1) {
                result.append("s");
            }
        }

        if (months > 0) {
            if (!result.toString().isEmpty()) {
                result.append(", ");
            }
            result.append(months).append(" month");
            if (months > 1) {
                result.append("s");
            }
        }

        if (days > 0) {
            if (!result.toString().isEmpty()) {
                result.append(", ");
            }
            result.append(days).append(" day");
            if (days > 1) {
                result.append("s");
            }
        }

        if (hours > 0) {
            if (!result.toString().isEmpty()) {
                result.append(", ");
            }
            result.append(hours).append(" hour");
            if (hours > 1) {
                result.append("s");
            }
        }

        if (minutes > 0) {
            if (!result.toString().isEmpty()) {
                result.append(", ");
            }
            result.append(minutes).append(" minute");
            if (minutes > 1) {
                result.append("s");
            }
        }

        if (seconds > 0) {
            if (!result.toString().isEmpty()) {
                result.append(", ");
            }
            result.append(seconds).append(" second");
            if (seconds > 1) {
                result.append("s");
            }
        }
        return result.toString();
    }```
#

And im using this to make it return back "1 year" but instead it returns "1 year, 5 days"

do you know what could have caused it?

tender shard
#

because you don't return after the years part?

topaz cape
#

wdym

tender shard
#

I mean, you don't return after the "if(years > 0)" part and hence obviously it does the following logic too

ivory sleet
#

buddy

#

why are you writing that logic yourself

topaz cape
#

better idea? xd

ivory sleet
#

DateTimeFormatter lol

kindred sentinel
#

I'm trying to add custom tag to item but there is an error

topaz cape
#

DateTimeFormatter? wait let me GOOGLE DAT

kindred sentinel
#

i can't understand how to solve it

ivory sleet
#

so u cant invoke/call it

kindred sentinel
#

But how to do it

kindred sentinel
#

thx

smoky oak
#

why does my IJ freeze when i try to f4 Material?

ivory sleet
kindred thicket
#

I need help

eternal oxide
#

disable auto decompiler in IJ

smoky oak
lost matrix
ivory sleet
smoky oak
#

isnt the stash just a bunch of patches?

young knoll
#

not for the material enum

ivory sleet
#

the api source is still there

young knoll
#

It's part of bukkit

ivory sleet
#

and material enum is api

lost matrix
smoky oak
#

material isnt an enum anymore though

lost matrix
#

*Decompiled ones

smoky oak
#

wait it still is

young knoll
#

mhm

ivory sleet
opal juniper
#

for now ™️

quiet ice
#

Any eclipse + gradle fanatics out there? Probably not as this is a ridiculous combination, but I'll ask anyways: How do I make the gradle classpath container modular? That is how can I have following piece of code in my .classpath:

    <classpathentry kind="con" path="org.eclipse.buildship.core.gradleclasspathcontainer">
        <attributes>
            <attribute name="module" value="true"/>
        </attributes>
        </classpathentry>

Doing

eclipse {
    classpath {
        file {
            whenMerged {
                entries.each {
                    if (it.kind == 'con') {
                        it.entryAttributes['module'] = 'true'
                    }
                }
            }
        }
    }
}

only marks the JRE as modular, but not the gradle classpath.

echo basalt
#

you can middle click instead of f4

lost matrix
clear elm
#

What’s the Item name for an Netherite Chefplaner with prot 4 and mending in shopguiplus

echo basalt
quiet ice
#

Chefplaner? You mean Chestplate?

clear elm
#

Yeah

lost matrix
quiet ice
#

I could, at which point I could just get rid of my Java 9 source set which is probably the better approach

tender shard
#

no clue why the default settings have 3 buttons for one thing

brazen badge
#

I need help.

i have this function:

List<String> lines = plugin.getConfig().getStringList("scoreboard.fields");
        int size = lines.size()+1;
        for (String linestring : lines) {
            size--;
            objective.getScore(plugin.getKotlUtils().translate(linestring, plugin)).setScore(size);
        }

but the empty strings are not showed in sb.

how can I fix it?

here the translate function:

 public String translate(String message, KOTL plugin) {
            Pattern pattern = Pattern.compile("#[a-fA-F0-9]{6}");
            Matcher matcher = pattern.matcher(message);

            while (matcher.find()) {
                String color = message.substring(matcher.start(), matcher.end());
                message = message.replace(color, net.md_5.bungee.api.ChatColor.of(color) + "");
                matcher = pattern.matcher(message);
            }

        return ChatColor.translateAlternateColorCodes('&', message);
    }
scenic onyx
#

How i can add and remove heart of player?

#

like lifesteal

shadow night
kindred sentinel
#

maximum hearts or health?

scenic onyx
analog igloo
#

concretely whats the probleme ?

upper hazel
#

?Paste

#

?paste

undone axleBOT
upper hazel
small current
#

what should be in the config so config.getColor wont return null

tender shard
#

a serialized color

small current
#

how should it be

#

how is a serialized color

tender shard
small current
tender shard
#

only with reflection

#

idk I'd just write something like this, then keep it around somewhere

/**
 * A simple cache to access class constants by name for "pseudo-enums" like {@link org.bukkit.Color}
 * @param <T> The type of the constants
 */
public class PseudoEnum<T> {

    @NotNull
    private final Map<@NotNull String, @NotNull T> elements;
    
    private PseudoEnum(@NotNull Map<@NotNull String, @NotNull T> elements) {
        this.elements = elements;
    }

    /**
     * Creates a new {@link PseudoEnum} for the given class
     * @param clazz The class
     * @return The {@link PseudoEnum}
     * @param <T> The type of the constants
     */
    @SuppressWarnings("unchecked")
    @NotNull
    public static <T> PseudoEnum<T> of(@NotNull final Class<T> clazz) {
        notNull(clazz, "clazz");
        final Map<String,T> elements = new HashMap<>();
        for (Field field : clazz.getDeclaredFields()) {
            if (clazz.isAssignableFrom(field.getType())) {
                if (Modifier.isStatic(field.getModifiers())
                        && Modifier.isPublic(field.getModifiers())) {
                    try {
                        final String name = field.getName();
                        T element = (T) field.get(null);
                        if(element != null) {
                            elements.put(name,element);
                        }
                    } catch (ReflectiveOperationException exception) {
                        throw new RuntimeException(exception);
                    }
                }
            }
        }
        return new PseudoEnum<>(Collections.unmodifiableMap(elements));
    }

    /**
     * Returns the constant with the given name or null if it doesn't exist
     * @param name The name
     * @return The constant or null
     */
    @Nullable
    public T valueOf(@NotNull String name) {
        notNull(name, "name");
        return elements.get(name);
    }

    /**
     * Returns an unmodifiable map of all constants
     * @return The map
     */
    @NotNull
    public Map<@NotNull String, @NotNull T> getElements() {
        return elements;
    }

}

#

yeah it works fine

topaz cape
kindred sentinel
#

how to get name of the barrel/chest/other using InventoryOpenEvent?

topaz cape
#

that doesnt make sense

#

im just trying with 1 year

#

if i enter 5 years it gives me 5years 25 days

tender shard
kindred sentinel
tender shard
kindred sentinel
small current
#

but a question

#

armor-color:
RED: 0
GREEN: 0
BLUE: 0

#

shouldnt this work ?

#

(alpha is not here in 1.12.2)

tender shard
#

or just directly check if the inventoryholder is a barrel or container (which both extend Nameable)

kindred sentinel
#

InventoryHolder could be instanceof Nameable???

brazen badge
#

I need help

kindred sentinel
#

oh ok

#

thanks

tender shard
#

every Container is Nameable

kindred sentinel
tender shard
#

intellij

kindred sentinel
#

how to do it??

tender shard
kindred sentinel
#

Oh thanks! I didn't know about that

remote swallow
#

intellij ultimate feature

tender shard
#

let's suppose I have a class with a Map<String,T> and this class implements Iterable<Constant<T>> where Constant is just a class that has a name() and a value().

Which would be better, returning a new Iterator() { ... } or just return a stream().map(...).iterator() of the underlying map? In this example, I'm using a new Iterator for the Iterator and the mapped stream for the spliterator, I wonder which is smarter/better?

@NotNull
    @Override
    public Iterator<Constant<T>> iterator() {
        return new Iterator<Constant<T>>() {

            private final Iterator<Map.Entry<String, T>> iterator = elements.entrySet().iterator();

            @Override
            public boolean hasNext() {
                return iterator.hasNext();
            }

            @Override
            public Constant<T> next() {
                final Map.Entry<String, T> entry = iterator.next();
                return Constant.<T>of(entry.getKey(), entry.getValue());
            }
        };
    }

    @Override
    public Spliterator<Constant<T>> spliterator() {
        return elements.entrySet().stream().map(entry -> Constant.<T>of(entry.getKey(), entry.getValue())).spliterator();
    }
small current
#

@tender shard

#

armor-color:
RED: 0
GREEN: 0
BLUE: 0

#

why this is still null

#

(alpha doesnt exist)

remote swallow
#

no ==:

#

it doesnt know what class to deserialize it with so cant

small current
#

org.bukkit.Color

remote swallow
#

yes, it doesnt know that

#

it needs the value to tell it that

small current
#

wdym

#

what should i do now

remote swallow
#

bukkit conifg serialization, saves a value with the class it gets serialized as, eg for item stack it looks like this

#

it uses ==: org.bukkit.inventory.ItemStack to use that to deserialize it

#

without it, its just a map<String, Object>

small current
#

==: org.bukkit.Color

remote swallow
#

if thats its path yeah

tender shard
small current
#

==: org.bukkit.Color
RED: 0
GREEN: 119
BLUE: 255

#

fixed

tender shard
#

why don't you just write your own method to get RGB and turn that into a color

small current
#

that makes since

#

sence

#

scense

#

whatever tf

tender shard
#
    public static Color ofSection(ConfigurationSection section) {
        return Color.fromRGB(section.getInt("RED"), section.getInt("GREEN"), section.getInt("BLUE"));
    }
remote swallow
#

how is this not a config section?

eternal oxide
#

a : in the key?

tender shard
remote swallow
#

nop

tender shard
#

then print out get("pdc").getClass()

remote swallow
eternal oxide
#

without "cool:key": 0b it won;t be a valid entry

remote swallow
remote swallow
#

tf

#

this probably explains it

#

i would've thought that would just become a config section

eternal oxide
tender shard
remote swallow
#

whats the format look like

eternal oxide
#

When using set to insert a Map into a config it does not get converted to a ConfigurationSection until it's saved/loaded

drowsy pawn
#

hello something can help with ((CraftWorld)b.getWorld()).getHandle().playBlockAction(new BlockPosition(b.getX(), b.getY(), b.getZ()), CraftMagicNumbers.getBlock((MaterialData) b), 1, this.open ? 0 : 1);

remote swallow
tender shard
#
pdc:
- key: "myplugin:somekey"
  type: BYTE
  value: 1
- key: "myplugin:something_else"
  type: TAG_CONTAINER_ARRAY
  value:
  - key: "myplugin:something_else2"
    type: TAG_CONTAINER
    value:
    - key: ...
eternal oxide
#

it can't be a Map if it's been saved/reloaded. It would be a MemorySection

tender shard
remote swallow
#

no more nms, for this atleast PES_Happy

small current
#

guys quick question why tf when i set the spawn location of a player in PlayerSpawnLocationEvent (1.12.2)
the player gets hardcore hearts?

remote swallow
#

alex ur docs are outdated

small current
#

ok what i've asked is probably a ?whereami situation

quaint mantle
#

Guys what happens to a thread when it's not stored anywhere

remote swallow
#

its still saying #fromMapList(context, map) while its #fromMapList(map, context)

quaint mantle
#

and it like

#

Expires

#

Does the gc collect the thread

kindred sentinel
#

how to get block of inventory?

remote swallow
tender shard
#

Its a static method there

remote swallow
#

how do i loop over a pdc container values, it only has key set

tender shard
#

?blockpdc

undone axleBOT
remote swallow
#

but its not a block

tender shard
#

Check out the static copy method ^

#

Its static

#

Unrelated to blocks

#

You can use it or copy it

quaint mantle
#

mfnalex

upper hazel
#

bruh wth

tender shard
worldly ingot
#

You set the message to include the player name

upper hazel
#

i need clear this?

#

name

worldly ingot
#

Ideally you'd use the message format. By default the message format is <%s> %s, so if you want your message to look like the one you have, you probably want your format to look like yourRankInfo &f%s: %s

upper hazel
#

yea

#

oh i see

#

need to remake text

#

wait

#

but

worldly ingot
#
String rank = rank.getRankData().getColor() + rank.getRankData().getName();
event.setFormat(TextUtil.getColorText(rank + " &f%s: %s"));```
#

That's probably what you want

upper hazel
#

oh thenks

tender shard
# remote swallow how do i loop over a pdc container values, it only has key set
    private static final PersistentDataType<?, ?>[] PRIMITIVE_DATA_TYPES = new PersistentDataType<?, ?>[]{
            PersistentDataType.BYTE,
            PersistentDataType.SHORT,
            PersistentDataType.INTEGER,
            PersistentDataType.LONG,
            PersistentDataType.FLOAT,
            PersistentDataType.DOUBLE,
            PersistentDataType.STRING,
            PersistentDataType.BYTE_ARRAY,
            PersistentDataType.INTEGER_ARRAY,
            PersistentDataType.LONG_ARRAY,
            PersistentDataType.TAG_CONTAINER_ARRAY,
            PersistentDataType.TAG_CONTAINER};

    public static PersistentDataType<?, ?> getDataType(PersistentDataContainer pdc, NamespacedKey key) {
        for (PersistentDataType<?, ?> dataType : PRIMITIVE_DATA_TYPES) {
            if (pdc.has(key, dataType)) return dataType;
        }
        return null;
    }

    @SuppressWarnings({"rawtypes", "unchecked"})
    public static void copyFromTo(PersistentDataContainer source, PersistentDataContainer target) {
        source.getKeys().forEach(key -> {
            PersistentDataType dataType = getDataType(source, key);
            if (dataType == null) return;
            target.set(key, dataType, Objects.requireNonNull(source.get(key, dataType)));
        });
    }
worldly ingot
#

The first %s is the player's display name, the second one is the message. It's just a formatted string

slender elbow
#

too complicated choco :(:(

worldly ingot
#

no u

upper hazel
#

what the %f

slender elbow
#

wh

kindred sentinel
#

how to get block of inventory?

#

like i have inventory of barrel

tender shard
kindred sentinel
#

and i need to get this barrel

worldly ingot
#

I put &f because you had a white colour in your original string. You can edit that if you'd like

#

That's all I was doing there was using a text color

tender shard
slender elbow
#

Inventory#getLocation

#

or that ig

upper hazel
#

oh yes

kindred sentinel
tender shard
quaint mantle
#

What's TextDisplay?

tender shard
#
Minecraft Wiki

Display entities are entities useful for map or data pack creators to display various things. There are Block Display, Item Display and Text Display, which are used to display blocks, items and...

#

it's a text display

#

like a hologram with text

quaint mantle
#

Is it an entity?

#

For real?

#

An entity just for displaying text

tender shard
quaint mantle
#

funi

tender shard
#

displays are like an invisible armor stand without the armor stand + extra features

quaint mantle
#

Can I make it rotate for each player? Or I would have to setup a customName for that?

tender shard
quaint mantle
#

For example Billboard#CENTER?

tender shard
#

yes

quaint mantle
#

Uhm

#

Very, very interesting

#

Guess it's time to make my plugins only work for +1.19

tender shard
#

displays were added in 1.19.4 btw

quaint mantle
#

anyone know how i can change the archive name on build time, i want a dynamically changing version lol

#

(in gradle)

tender shard
#

in the jar task you can change basically anything

#

archiveFileName is the exact filename

#

otherwise there's appendix, which is added between basename and classifier/version

tender shard
#

then youd have myproject-2023-09-05-21-32-07-1.0-SNAPSHOT.jar

#

you could also just use archiveFilename.set("myproject-" + version + "-" + myTimestamp + ".jar") or whatever

rare rover
#

a plugin or something

tender shard
#

no, that's IJ's builtin diagram feature

rare rover
#

woah

#

never knew that existed

tender shard
#

right click on any class name -> diagrams

#

some say it's only available in IJ ultimate, idk

rare rover
#

oh damn

#

this is useful

tender shard
# round finch this code looks crazy!! 😮

more fancy version to get the data types

    private static final PersistentDataType<?, ?>[] PRIMITIVE_DATA_TYPES = ConstantsCache.of(PersistentDataType.class)
            .getElements()
            .values()
            .stream()
            .filter(type -> type instanceof PersistentDataType.PrimitivePersistentDataType)
            .toArray(PersistentDataType<?, ?>[]::new);
#

in case they ever add new primitive types lmao

round finch
#

me 😵

quaint mantle
#

i have this

tasks.jar {
    val currentDate = Date()
    val dateFormat = SimpleDateFormat("yyyy-MM-dd-HH-mm-ss")
    archiveAppendix.set(dateFormat.format(currentDate))
    println("Archives name: ${this.archiveFileName.get()}")
}```
however it doesnt actually change the file name
round finch
#

it is insane

quaint mantle
#

uh

tender shard
#

If so you‘d have to change it in the shadow task

#

Otherwise paste your whole build file

round finch
#

it reminds me of compiler instruction code

#

which is crazy too

quaint mantle
#
val currentDate = Date()
val dateFormat = SimpleDateFormat("yyyy-MM-dd-HH-mm-ss")

tasks.withType<AbstractArchiveTask>().configureEach {
    archiveAppendix.set(dateFormat.format(currentDate))
}``` works lol
tender shard
#

disgusting

ivory sleet
#

SimpleDateFormat

tender shard
#

the much more disgusting thing is that they chose to set the archive name for every single archive task instead of the one they need lol

quaint mantle
#

i want to do it for every jar task lol

#

i have 4 of them

quaint mantle
#

yeah

#

gradle kotlin dsl

#

Ugh

#

Ugly

#

no you

#

why kotlin?

tender shard
#

yeah kotlin really is ugly, I agree

quaint mantle
#

also whats so ugly?

ivory sleet
#

well im just discussed u used SDF

#

but kotlin dsl is better than groovy dsl at least

#

which is all that matters

tender shard
quaint mantle
#

groovy is dynamic typed

tender shard
#

yeah that sucks

slender elbow
#

gross

quaint mantle
slender elbow
#

ever seen the groovy runtime?

tender shard
#

I don't like kotlin myself but it's definitely better than groovy

quaint mantle
#

i love kotlin

quaint mantle
#

???

tender shard
#

anyone remember this person here who used make instead of maven or gradle?

#

make

#

for java

quaint mantle
#

go write some data structures

#

in assembly

quaint mantle
#

AssemblyCraft

#

My idea still exists

tender shard
#

it's a long list of imports

quaint mantle
#

Just finding someone to make it

#

there is many ideas

#

like using magic, but who is gonna do it tho

#

If I manage to learn assembly, I swear, I will make a playable version of minecraft

#

Now hopefully, I won't never learn assembly

ivory sleet
#

i mean it has prob alr been done, tho Id assume not fully

fossil lily
#

Is there any good way to update the items in an invetory for the player on a different thread?

quaint mantle
#

Not on bukkit

fossil lily
#

Even when I create the Inventory object in that thread client still doesn't see

quaint mantle
quaint mantle
#

And ram

#

Like, it's pretty easy tho

#

learn memory then

#

Maybe a bit confusing at the first? But is still easy

quaint mantle
#

I mean, the only thing its stopping me from doing it, is that assembly works directly with memory

#

And for so, I must write everything by myself

#

Which is like, bruh

quaint mantle
#

but it is sooooo fun learning how matrix works

worldly ingot
quaint mantle
#

and then making it work on memory pointers in assembly

#

No, I already discarded the idea, it already exists 😔

#

also assembly is kinda the simplest language you can get imo, it just list of instractions which goes up to down, and jump and shit

#

It's not simple, but native, like, it's the "most close" language to the hardware

tender shard
#

why is there ThreadLocalRandom#nextBoolean() but not previousBoolean()? What if I forget the last "next" boolean

quaint mantle
#

you are fucked up

#

then

tender shard
#

oh no

quaint mantle
#

should have saved it

quaint mantle
tender shard
#

for alzheimer, or against alzheimer?

quaint mantle
#

wtf is going on in general btw?

quaint mantle
round finch
#

HUH

#

discord "haxs"

#

similar to this

#

lol

fervent robin
#

?paste

undone axleBOT
fervent robin
remote swallow
#

the result set is closed before the runnable runs

fervent robin
#

Yeah ik why just dont know how to fix it

opal juniper
#

what he said^

#

extract the data first

fervent robin
#

alright thx

tender shard
fervent robin
#

💀

opal juniper
#

TRUE

remote swallow
fervent robin
#

i wonder how many ppl actually pay for winrar

remote swallow
#

corps

fervent robin
#

cant be more than 1% of users

tender shard
remote swallow
#

real

#

i decided to remove the premium scream bc i was bored

#

i didnt pay for it either

round finch
#

glad my language doesn't have gender like germen

remote swallow
#

@worldly ingot what gender is discord in france

round finch
#

mfnalex can approve germen have gender

worldly ingot
#

Idk. But the actual adjective (noun?) is probably “discorde” which would be feminine

round finch
#

shet we all feminie

#

fem boys lets go

remote swallow
worldly ingot
#

It’s discordance. So yeah, I’d say feminine most likely

round finch
#

programming socks

#

bring them out

remote swallow
#

femboys can be programmers

#

with there programmer socks

#

choco do you have programmer socks

round finch
#

i bet

remote swallow
#

choco seems like the person to have a maid outfit too

worldly ingot
round finch
#

tigh high

#

socks

remote swallow
#

thigh highs are real programmer socks

worldly ingot
#

No thigh highs but I’d bet they’re comfy af

remote swallow
#

@young knoll buy choco some thigh highs for christmas

round finch
tender shard
round finch
#

got the meme from vedal987 stream

zealous osprey
#

Wtf did I just walk into XD

muted dirge
#

What the fuck is programming socks

remote swallow
#

new villager change

opal carbon
round finch
#

chat teasing him with tellin him... he is a femboy

zealous osprey
#

Who

round finch
#

no 1 asked

muted dirge
round finch
#

all they do is breed, eat, sleep and trade

remote swallow
#

probably realism or something

round finch
#

like what you expect

#

😂

opal carbon
#

wonder how long itl take before someone makes a jar to undo all these changes

round finch
#

they could add more life to villagers

muted dirge
round finch
#

but just pixels art

muted dirge
#

Imagine dying by a villager

opal carbon
round finch
#

so you trade with pillagers lmao

muted dirge
#

😐

#

I've seen steve to ghast one

round finch
#

the everything is steve texture pack

#

xd

muted dirge
#

a ghast with steve skull and 6 human hands

#

really scary

round finch
#

😱

#

hmm

#

random jumpscares datapack

tribal quarry
round finch
#

i wanna make the villagers wear programmer socks

#

next plugin idea

kindred sentinel
#

how to run method using runTask?

#

with arguments

quiet ice
#

So basically a delayed method call?

kindred sentinel
#

yeah but i can't replace bukkit Runnable with method

tender shard
#

Lambdas and Method references can be used to make your code way shorter, and (sometimes) more readable by getting rid of anonymous classes. What are Anonymous Classes? Anonymous classes are like local classes without a name. Imagine you have the following code: We hereby declare and instantiate a class implementing java.lang.Runnable that just p...

kindred sentinel
#

only using lambda?

#

like this

#

?

tender shard
#

you can also use an anonymous class or directly extend Runnable

#

it's all the same, more or less

kindred sentinel
#

oh ok

river oracle
#

anonymous classes look icky

sullen marlin
remote swallow
#

lets make alexs blog the new forums

wet breach
#

not sure about forums

#

but it could be used as the place for tutorials or more info

#

be cool if some of us here created articles for the blog too 🙂

tender shard
#

sure, if someone wants to write a post, just send it to me

quiet ice
kindred sentinel
#

I'm trying to get barrel block using it's inventory but i have problems with it, when i'm trying to do like

BlockInventoryHolder barrelBlockHolder = (BlockInventoryHolder) event.getInventory().getHolder();
Barrel barrel = (Barrel) barrelBlockHolder.getBlock();

but i'm getting an error

class org.bukkit.craftbukkit.v1_19_R3.block.CraftBlock cannot be cast to class org.bukkit.block.Barrel
near mason
#

i think you should get the block state

kindred sentinel
#

But how???

near mason
#

Barrel b = (Barrel) Block.GetState();

kindred sentinel
#

I don't have block i have only inventory event.getInventory()

eternal oxide
#

yes you do

near mason
#

doenst barrelBlockHolder.getBlock() returns the block?

kindred sentinel
#

oh

#

yeah

#

oh god i can't do this, all this time i'm trying to get when player adds an item to barrel

#

but how

#

i cannn't

#

How in Brewery it works???

lost matrix
#

Wtf i was scrolling from up and just saw a bunch of guys in skirts and knee sock pics...

remote swallow
#

programmer socks

echo basalt
#

you better have yours on

kindred sentinel
kindred sentinel
near mason
#

listens to inventory drag / click event

kindred sentinel
#

i did simple test

public class events implements Listener {
    private WarCustomItems plugin;
    public events (WarCustomItems plugin){
        this.plugin = plugin;
    }
    @EventHandler
    public void onBarrelClick(InventoryInteractEvent event){
        System.out.println("A");
    }
public final class WarCustomItems extends JavaPlugin {

    @Override
    public void onEnable() {
        Bukkit.getPluginManager().registerEvents(new events(this), this);
    }
#

But nothing happened

#

something strange is going on

#

oh lol

#

InventoryInteractEvent is abstract class

#

._.

#

i still don't know how to track adding items to the barrel

#

I tried to use InventoryClickEvent

#

But i couldn't do this

#

Because of swap item, on swap item action i can't change the item in cursor

#

And because of removing item

#

I need to track removing item too

#

Oh shit it too hard for me

kindred sentinel
brazen badge
#

I need help.

i have this function:

List<String> lines = plugin.getConfig().getStringList("scoreboard.fields");
        int size = lines.size()+1;
        for (String linestring : lines) {
            size--;
            objective.getScore(plugin.getKotlUtils().translate(linestring, plugin)).setScore(size);
        }

but the empty strings are not showed in sb.

how can I fix it?

here the translate function:

 public String translate(String message, KOTL plugin) {
            Pattern pattern = Pattern.compile("#[a-fA-F0-9]{6}");
            Matcher matcher = pattern.matcher(message);

            while (matcher.find()) {
                String color = message.substring(matcher.start(), matcher.end());
                message = message.replace(color, net.md_5.bungee.api.ChatColor.of(color) + "");
                matcher = pattern.matcher(message);
            }

        return ChatColor.translateAlternateColorCodes('&', message);
    }
lost matrix
echo basalt
#
SimpleBoard board = new SimpleBoard();
board.display(player);

board.displayList(List.of(  
  "One"
  "Two"
  " "
  "Three!"
));
#

gl have fun

kindred sentinel
remote swallow
#

keep track of the block then

kindred sentinel
#

Like what??

remote swallow
#

map or something

kindred sentinel
#

._.

#

Ok

sterile sapphire
#

Do I need to get the spigot api to use IntelliJ

#

The shadow.jar 1?

lost matrix
sterile sapphire
#

For a plug-in would I need it?

lost matrix
sterile sapphire
#

I feel like you mean something else

river oracle
#

no

#

he means notepad you can write java in anything that supports writing text

quaint mantle
#

what version of netty does minecraft use?

river oracle
#

you can even write a spigot plugin using emacs

sterile sapphire
#

But if I used IntelliJ to make a spigot plug-in would I need the spigot api?

remote swallow
#

yes

#

intellij is the ide, spigot is the api

next zinc
#

Anyone know any resources to make more complicated particles?

opal carbon
#

you need it no matter what

#

one way or another

sullen marlin
quaint mantle
#

mm

#

1.16 + ?

barren tinsel
#

Anyone knows cocoa's material block name? I tried using COCOA COCOA_SEEDS COCOA_TREE COCOAPLANT, so my plugin prevents you from breaking or placing Cocoa without a permission.

#

For COCOA_SEEDS, cocoa placement prevention works, but the break event doesn't.

tender shard
#

how can you have tried "COCOAPLANT" and or "COCOA_TREE" or "COCOA_SEEDS"? That wouldn'T even compile?

#

why didnt you just look at the javadocs

barren tinsel
#

COCOA is working now properly, and I stupidly forgot to reload my plugin.

#

🤦

#

Thank you

upper hazel
#

why when i tried to prefix the player name it doesn't show up in the game

hybrid spoke
upper hazel
#

this will not worked

#

player.setDisplayName(prefix.get(rank) + player.getName());
player.setPlayerListName(prefix.get(rank) + player.getName());

#

?

round finch
#

what is the way to go about when "respawning an entity"

#

i want to remove an entity and make it appear later on from gui

#

alot of mns?

hybrid spoke
#

storing its metadata and spawning the same type with the same data

#

so not exactly respawning but removing the old and spawning a new

round finch
#

why couldn't it be easier bruh like Entity getMetaData

#

💀

hybrid spoke
#

pr it

round finch
#

i'm forced to do mns?

#

😵‍💫

hybrid spoke
#

what

#

no

round finch
#

what options is there?

hybrid spoke
#

to store the entities relevant data and apply it to the new one?

round finch
#

yes

#

Oh

hybrid spoke
#

what do you need nms for

round finch
#

i see

hybrid spoke
#

its only the health, name, effects or shit

round finch
#

i want all the info

hybrid spoke
#

custom stuff with pdc maybe

#

but for gods sake you dont need nms for that

round finch
#

for pets and animals + monsters

hybrid spoke
#

then you know what you gotta do

round finch
#

copy entity data?

upper hazel
pastel juniper
#

I m tring to make a custom item plugin and I have a question can I store 2 different keys in the same item's PersistentDataContainer

round finch
pastel juniper
#

I don't know if I m stupid or not because I ve spent more than 4 hours trying to store a second key and I get only null value for the second value

#

While the first works

eternal night
#

you certainly can

#

can you share some of your code

pastel juniper
#
ItemStack item = CustomItemManager.getCustomItemById("test").toItemStack().clone();
            ItemMeta itemMeta = item.getItemMeta();
            itemMeta.setDisplayName("worked
");
            PersistentDataContainer pdc = itemMeta.getPersistentDataContainer();
            pdc.set(new NamespacedKey(Plugin.getPlugin(Plugin.class), "test2"), PersistentDataType.STRING, "test");
            item.setItemMeta(itemMeta);
            player.getInventory().addItem(item);
#

I get the item it works, but when I try to get the pdc I get only null

#

When I get the custom item it already has a pdc key (ItemStack item = CustomItemManager.getCustomItemById("test").toItemStack().clone();)

eternal night
#

How do you read the PDC

pastel juniper
#

itemStack.getItemMeta().getPersistentDataContainer().get(new NamespacedKey(Plugin.getPlugin(Plugin.class), "test2"), PersistentDataType.STRING)

eternal night
#

Well, quick check would be holding the item in game and running /data get entity @s SelectedItem

#

(I think)

#

to print the SNBT of the item

pastel juniper
#

wait

eternal night
#

but generally, if I had to guess, your itemStack when you read is just wrong

pastel juniper
#

I checked it like 50 times and I rewrote it 4 times

eternal night
#

I mean, the PDC certainly works with multiple keys 😅

#

so something is wrong in your code

#

the write to the PDC looks fine, so I presume your read logic is incorrect somewhere

pastel juniper
#

you are right the second key is stored

#

but for some reason I only get the first one

eternal night
#

well, share the read logic

#

like, the context around the read

#

where does itemStack come from

pastel juniper
#

I think there's a problem with my listener

eternal night
#

yea, hence why I asked for its code 😅

pastel juniper
#

I think I fixed

#

I deleted this line and rewrote them and is work
if (pdc.has(new NamespacedKey(Plugin.getPlugin(Plugin.class), "test2"), PersistentDataType.STRING)) {

abstract spindle
#

If I want to register a FurnaceRecipe I have the choice between RecipeChoice.ExactChoice or RecipeChoice.MaterialChoice
If I chose RecipeChoice.MaterialChoice I only have limited options for possible recipes so I looked into RecipeChoice.ExactChoice but It dose only work as it says with exact Items, but I want that all Items of a type with a specific CustomModelData, ignoring the Displayname and Lore.
Is there a way to do that?
The Events of a Furnace are not helpful since the FurnaceStartSmeltEvent can not be canceled and if I would cancel the FurnaceSmeltEvent it would lead to the non stop burning of the fuel in the furnace.

#

If you reply pls tag me 🙂

ivory sleet
#

Hmm sounds hard, I can think of 1 wat which would be to use nms

#

But not sure u wanna go to such lengths

abstract spindle
#

okay what would be the nms way ?

upper hazel
#

how connect my api with another my plugin in maven?

abstract spindle
wet breach
#

probably didn't see that there was another method for creating a furnace recipe that avoids needing to make a choice between the type of recipe for the constructor

#

and then once you have a Furnace recipe you can then use addRecipe method to register it with the server

#

so that should solve that first part

abstract spindle
#

That dose not help since it dose not solve the problem

wet breach
#

then for cancelling you probably could use the BlockCookEvent instead since Furnace smelt extends that

abstract spindle
#

The Problem is that If I use FurnaceRecipe(NamespacedKey key, ItemStack result, Material source, float experience, int cookingTime) it is the same as FurnaceRecipe(NamespacedKey key, ItemStack result, RecipeChoice input, float experience, int cookingTime)with RecipeChoice.MaterialChoice

wet breach
#

and for resolving the fuel continiously burning you could just remove the fuel and add data to the block PDC how much fuel its suppose to have

#

then when re-accessed re add the fuel back

wet breach
abstract spindle
# wet breach the first doesn't require a RecipeChoice
  1. FurnaceRecipe(NamespacedKey key, ItemStack result, RecipeChoice input, float experience, int cookingTime)
  2. FurnaceRecipe(NamespacedKey key, ItemStack result, Material source, float experience, int cookingTime)
    The rest is @Deprecated
wet breach
#

just fyi, deprecated doesn't always mean unusable or can't be used

abstract spindle
wet breach
#

not sure what the issue with the amount of events, but really its like just 1 event

abstract spindle
abstract spindle
wet breach
#

there is interact event to click on the block, then there is an inventory event for opening the inventory of the block

#

and those two events one of them you would use for removing and adding fuel

abstract spindle
wet breach
#

also complexrecipes exist too

#

if you didn't know

abstract spindle
#

It dose not solve my Problem

#

My Problem is that I do not know how to register a FurnaceRecipe where only the Type and CustomModelData are checked.
If I register a Material I could do that only once, since the overwrite each other

wet breach
#

then use the inventory event for when they are placing the item, if it matches reset the item stack to match the recipe

#

the itemstack doesn't matter since it will be destroyed anyways after the smelting proces so all you have to do is just make it match if it matches your conditions you are wanting

abstract spindle
#

okay that could work

limber owl
#

is there any way to make neutral mobs hostile?

tall dragon
#

yea

drowsy helm
#

Yeah you can change their pathfinding

#

Requires a bit of nms

tall dragon
#

just change their goals

limber owl
#

how would I go about doing this

tender shard
#

you get the NMS entity and then you get the goalselector and add whatever existing vanilla goal you wanna add

#

e.g. look at the decompiled NMS zombie class, then you'll see which goals those use

wet breach
#

just note if I recall on some neutral mobs I believe it causes them to glitch out.

#

on some of them that is, or at least that is what I remembered just don't know which ones that would be so make sure to test your stuff lol

smoky oak
#

Can't recall or find in the search bar the answer to this question; someome (I think Illusion) mentioned you can tell a client to 'render this particle even though its further than 31 blocks away'. How do you do that again?

#

wait theres apparantly a method with a bool in there

#

but its not showing up

#

ah yes arg cutoff of course

#

bleh

echo basalt
#

Never said anything about the beyond 31 block

#

you might be able to do it with offsets

abstract spindle
#

force – allows the particle to be seen further away from the player and shows to players using any vanilla client particle settings

smoky oak
#

no

#

its the very long method at the bottom

#

which refuses to display the force arg

#

im on latest

abstract spindle
#

okay than sorry I have no Idea

hasty prawn
#

What does IntelliJ not giving you all the args have anything to do with what the method actually does

#

It sounds to me like that's exactly what you want.

onyx fjord
#

the argument names are weird too

tender shard
#

using spigot instead of spigot-api

smoky oak
#

?

#

im running spigot-api

#

?paste

undone axleBOT
tender shard
#

then idk why you don't have javadocs in IJ

smoky oak
tender shard
#

you don't have to add the javadocs to maven, and <type> is also not needed

#

press shift twice quickly and enter "download documentation"

smoky oak
tender shard
#

do you have the mcdev plugin installed/enabled?

smoky oak
#

of course i dont

tender shard
#

ok good

#

then no clue why you don't have javadocs

onyx fjord
#

dont you need sources

opal carbon
#

?

remote swallow
#

for var names, im pretty sure you need sources

opal carbon
#

thats possible

smoky oak
tender shard
#

Shift+Shift + Download sources

#

but why would you need sources? the javadocs include that

smoky oak
#

do i need to restart or smth

#

cuz its still v v1 v2 v3

#

huh you cant loop with a for loop over an empty list

tender shard
#

ofc you can

#

I mean the code wouldn't even know if it's empty or not

glad prawn
#

If !list.isEmpty() 😮

smoky oak
eternal night
#

that certainly works if vertexList is empty

smoky oak
#

works my ass

remote swallow
#

is it null

#

or empty

smoky oak
#

Caused by: java.lang.IndexOutOfBoundsException: Index 0 out of bounds for length 0
at jdk.internal.util.Preconditions.outOfBounds(Preconditions.java:64) ~[?:?]
at jdk.internal.util.Preconditions.outOfBoundsCheckIndex(Preconditions.java:70) ~[?:?]
at jdk.internal.util.Preconditions.checkIndex(Preconditions.java:266) ~[?:?]
at java.util.Objects.checkIndex(Objects.java:359) ~[?:?]
at java.util.ArrayList.get(ArrayList.java:427) ~[?:?]
at io.github.moterius.VectorParticleLib.Shape.SimpleShape.project(SimpleShape.java:57) ~[?:?]

eternal night
#

Yea

smoky oak
#

its empty

remote swallow
#

show code

eternal night
#

that is not that for loop

#

that is an index based access without an iterator

smoky oak
#

for(Location l : vertexList)

remote swallow
#

more code

eternal night
smoky oak
#

thats the error

#

and the spot causing it

remote swallow
#

specifically line 57 of SimpleShape

smoky oak
#

yea

#

thats it

eternal night
#

you are 100% not running that code

remote swallow
#

^^

smoky oak
eternal night
#

pls make sure you are running the latest version of your source code

smoky oak
#

im pretty sure i am

eternal night
#

I am pretty sure you are not

remote swallow
#

clean package it

smoky oak
#

so apparantly i lost a line somewhere

eternal night
#

Sadge the poor line

tender shard
#

obviously works fine

eternal night
#

naming convention straight from hell

smoky oak
eternal night
#

no I was reffering to alex with the loop_empty_line xD

tender shard
#

better? D:

eternal night
#

Yes, perfect 🙏

tender shard
#

tbh who cares how a test is called if it doesn't fail lol

smoky oak
#

oh by the way, can you build a remapped server?

eternal night
#

checkstyle KEKW

#

build ?

smoky oak
#
 at net.minecraft.network.EnumProtocol$a.a(SourceFile:458) ~[spigot-1.20.1-R0.1-SNAPSHOT.jar:3859-Spigot-94e187b-f70a7b6]
        at net.minecraft.network.EnumProtocol.a(SourceFile:522) ~[spigot-1.20.1-R0.1-SNAPSHOT.jar:3859-Spigot-94e187b-f70a7b6]
#

this doesnt exactly tell you anything

eternal night
#

oh, I mean sure, it just will explode with any third party NMS plugin

tender shard
remote swallow
#

also you cant obsfucate ur plugin

smoky oak
#

im not doing squat

#

my server is just like 'have a nms error'

remote swallow
#

?paste the full thing then

undone axleBOT
smoky oak
tender shard
smoky oak
#

na i meant the method names

tender shard
#

does proguard not have a stacktrace translator? allatori does have one but mojang only gives us a proguard file

smoky oak
#

im not running that, is it an external thing?

limber owl
smoky oak
#

yo wtf
my code... works... first try?

#

something aint right here yall

floral drum
#

I fucking hate how ClientboundBlockChangedAckPacket now exists....

knotty locust
#

How do I create a config reload plugin? I think I have it all right but I don't actually reload all the data there.

#

Btw ping me when you answer please

eternal valve
#

how to turn off the water from falling or flowing

#

is there an in-game command block or command?

smoky oak