#dev-general

1 messages Ā· Page 41 of 1

prisma wave
#

elara

static zealot
#

haskell of course

#

oh

#

thought he's talking about elara

half harness
#

uh

prisma wave
#

lol

#

idk

static zealot
#

what language is what in?

prisma wave
#

let chars = input |> stringToList |> map charToInt |> filter (\x -> x /= -1) i think this is fairly obvious though?

half harness
#

oh wait nevermind
I thought you were talking about elara

prisma wave
#

if you know what |> does

prisma wave
#

we are

#

i think

static zealot
#

🤣

prisma wave
#

idk bro

static zealot
#

I've got no clue what |> does

prisma wave
#

it's like | in bash

#

or even just like . in kotlin

steel heart
#

Has elara actually made any real progress ? :o

static zealot
#

ok. why |>? is there a specific reason? a mathematical notation maybe?

#

or was that what you thought is cool?

half harness
#

it looks kinda cool 🄲
but I feel like it'd slow down the typing a bit

static zealot
#

btw, I can't find the last commit. I'm not sure which repo I'm actually supposed to look at?

steel heart
#

Triangle |>

#

Looks kinda pretty :)

prisma wave
#

like actually works

#

with 1 very small catch

steel heart
#

lmao

prisma wave
static zealot
#

🤣 (just to make it clear, this was meant for the "with 1 very small catch" message)

static zealot
steel heart
prisma wave
#

you have to disable the jvm security verification lmao

steel heart
static zealot
#

elara == virus confirmed!

#

(you can probably tell I don't actually know what the security verification does, I just assumed from the name)

prisma wave
#

it's kinda virus protection

#

its mainly protection against stuff like buffer overflows

#

from malicious bytecode

#

or bad compilers like mine

steel heart
static zealot
#

nice

prisma wave
# prisma wave looks like a left to right arrow

as for why it's needed in the first place, the trick is that things like filter and map are all just top level functions rather than methods. so you could also do map charToInt ['1', '2', '3']. the |> just swaps the arguments - ['1', '2', '3'] |> map charToInt is the same

#

so you get something that looks kinda like OOP without actually needing objects

prisma wave
#

not settled on the idea, might change it

prisma wave
#

i think i will hopefully get a 1.0 release working by the end of this year

#

thats my new years resolution

static zealot
#

the thing about new year resolutions is that they usually don't come true (see PlaceholderAPI 3 for reference 🤣)

prisma wave
#

true...

#

but papi3 has higher expectations so it's easier to get burnt out

#

whereas im just making this for me

static zealot
#

True. Well, I understand almost nothing of your haskell code but that's because I've never used haskell

prisma wave
#

😌

#

almost nothing?

steel heart
#

Haskell is pure torture

prisma wave
#

😦

#

no

static zealot
prisma wave
#

its fun

steel heart
#

Na Alex u don’t understand the amount of theory and code we had to write in haskell

prisma wave
#

whats wrong with that!!

steel heart
#

you sound exactly like our teacher’s assistant lol, he just went nuts w it

#

I mean the basics are fine, I think what got most annoying was when we had to do actual projects and not just simple tasks

prisma wave
#

what kinda things did you do?

steel heart
#

parsers, raytracing, wait let me check the other stuff

static zealot
#

Well, at least you should thank your teacher for not making you do it in C#

prisma wave
#

like monadic parsers?

steel heart
#

Sorting as well

steel heart
prisma wave
#

does that count as an "actual project" lol

steel heart
#

well, we get a week to do these things

#

And they have to pass a set of unit tests and be… well… cleanly written

steel heart
#

Got everything Java does not have

prisma wave
#

its also fuck ugly

steel heart
#

lol

#

true

static zealot
#

yeah. I was moslty talking about aspect 🤣

#

it does have some nice features that java is missing such as operator overload

steel heart
#

fairs

#

Is operator overloading actually nice tho?

#

It can be hella confusing also

prisma wave
#

imagine not having custom operators

prisma wave
#

and compose them

#

rather than just writing a recursive descent or whatever

steel heart
#

static final BinaryOperator<Vector> MUL = (v1,v2) -> …;

Isn’t this just, enough? cshrug

#

Yeah alex, I kinda forgor almost everything since we moved on to rust

#

:ac_cat_smile:

prisma wave
#

NOOOO

#

u fell off

static zealot
#

ā¤ļø

steel heart
#

Lmao

prisma wave
#

rust is like when someone says your joke louder

#

takes all of haskells good ideas and makes them mid

steel heart
#

lol

#

Tbf haskell is really cool, esp how it works underneath with its gc and everything

prisma wave
#

yes!!!

steel heart
#

But its just… too pure

prisma wave
#

no!!!

steel heart
#

Lol, but !!! is just a triple negation, so u mean no!!!=no!=yes ? Funnying

prisma wave
#

no 😦

steel heart
#

😈

prisma wave
#

obviously it gets a bit silly when you need a whole monad stack for like logging

#

but the whole architecture of pure "core" surrounded by impure makes a lot of sense imo

#

in any language

steel heart
#

I think Java and all these other languages allows you to be ā€œlazyā€ with how you write your code, that is writing code that may cause code symptoms in the future, unlike haskell to some aspect

prisma wave
#

yup

steel heart
#

Yeah obviously you can write shit code in Haskell also, but like

#

its easier to not do it, if that makes sense, at least on the scale in which I touched it

prisma wave
#

yes

#

very much so

#

same with rust, in a different way. its a lot harder to learn & write, but in return, you get code thats much more maintainable, and much safer to run

#

refactoring pure functions is so easy it's basically impossible to break anything

steel heart
#

indeed

prisma wave
#

having to "tag" all side-effects with a monad means it's impossible to accidentally add some code that changes a variable at the wrong time

steel heart
#

The only bit I didn’t appreciate with Rust was multithreading, but maybe just since I’m used to Java and TS/JS

static zealot
#

I should probably put aside helpchat stuff and actually start learning rust. I've been saying I'll do it since last year ||funny, I know|| (for a few months now).

steel heart
#

Something like that

prisma wave
steel heart
#

well except u dont have the gc

static zealot
#

isn't that like one of rust's "features"?

prisma wave
#

yes

#

no GC and no memory leaks

prisma wave
#

idk ive not actually seen it

#

but async/await cant be too outlandish

steel heart
#

Ugh, I think its just cause I’m used to java async which is fairly rich and these high level langs with side effects where u can just dump everything when done w it

#

I mean its not that it was hard, just ran into a lot of issues quickly

prisma wave
#

rust isn’t pure lol

#

im guessing u more mean all the memory stuff was hard?

steel heart
#

yea

prisma wave
#

yeah that checks out

#

although i think it's still better than java's in a lot of ways

#

since the memory model means it's a lot harder to get race conditions or concurrent mutation or whatever

pastel imp
#

I just remembered, I forgot to update BetterJDocs lol

#

fk

ivory crow
#

How do servers like this one make their prefixes these images?

#

Dang

#

I can't post images

compact perchBOT
#
FAQ Answer:

You won't be able to upload images here directly to avoid spam, so please use https://imgur.com/upload to upload images/screenshots.
You can also use a screenshot service like gyazo or jinx and post those links here.

half harness
#

but idk how to do that

brittle leaf
#

resource pack

#

replacing a unicode character with png image

steel heart
timber obsidian
#

does anyone know a good plugin where you can use vault eco money to pay to create a private warp. You can have unlimited just costs money to create a warp

bronze ice
#

Guys, a small question if i can resolve this problem, i do now a cracked server for all players to can join, the problem is, i think because of launcher, someone with SKLauncher sees my design heads placed on ground like notch heads, its supposed to look like bedrock and other skins of npc looks different, its possible to resolve this or its launcher problems?

long dagger
gloomy anchor
#

can I somehow stop player from closing GUI

inner umbra
#

No. Can only reopen it.

gloomy anchor
#

its npc give it to him co claim item but if he closes it he cant claim it again sooo maybe with permissions ?

inner umbra
#

Probably your best bet.

distant sun
distant sun
#

Wrong channel @atomic kestrel don't spam every channel

atomic kestrel
#

what channel do i post it in

#

offtopic is fine?

distant sun
#

Wrong channel @gloomy anchor

agile galleon
#

I'm so confused

#

skullMeta.setOwningPlayer(Bukkit.getOfflinePlayer(someUUID)) doesn't work while skullMeta.setOwningPlayer(Bukkit.getOfflinePlayer(someName)) works??

surreal garnet
#

Yeahhhhh welcome to Minecraft lmao

sly sonnet
#

dont use cracked uuids

surreal garnet
#

Don’t think they’re intending it that way

#

Probably something like a island top gui where you need the players skull even if they’re offline

#

Unless I’m thinking of something totally different

agile galleon
surreal garnet
#

Yeah figured

#

Check if getOfflinePlayer accepts UUIDs

inner umbra
#

Is the offlineplayer from someUUID null?

surreal garnet
#

Just to be sure

agile galleon
#

it works when the player is online

#

pretty sure it doesnt work for other players is because it doesnt make that http request it would when passing a name

#

idk

inner umbra
#

Might be a bug on spigots end then.

agile galleon
#

one second

#

ah shit buildtools

agile galleon
#

how do i get access to the patched jars where i can take a look at the code

inner umbra
#

--remapped

agile galleon
brittle leaf
agile galleon
#

i tried

#

oh didnt check under versions

brittle leaf
#

the spigot, paper, etc jars are just small boot programs that dont actually provide the mojang jars

#

if its not found they download them and patch them on the fly and then the jar is stored under either versions or cache, dont rememeber which

agile galleon
#

just opened the file but

#

it doesnt have Bukkit.java?

#

nvm

#

CraftServer does the job

#

yeap

#

only gets all the important stuff if its a name

inner umbra
#

Open the jar with winrar (or your preferred) open META-INF then versions

agile galleon
#

tf

inner umbra
#

Otherwise go to your local git repo org/spigotmc/spigot

brittle leaf
#

it should be there

agile galleon
#

yea i got it

brittle leaf
#

tho in intellij if your using someething like paperweight you should have access to bukkit internals and you can just middle click to see its code

agile galleon
#

i am not

#

yeah so basically when you get the name, it does a request and creates a real GameProfile internally so that works

#

if you get the uuid, and it isn't cached yet, it just creates a game profile CraftGameProfile{UUID:Bla}

#

without all the important internal stuff attached so thats that

#

so thats stupid

brittle leaf
agile galleon
#

because Bukkit.getOfflinePlayer(playerUUID) != Bukkit.getOfflinePlayer(playerName)

brittle leaf
#

makes sense?

agile galleon
#

it should be the same player?

brittle leaf
#

it would be the same wouldnt it?

agile galleon
#

its not?

#

thats what i just said?

brittle leaf
#

from what i can tell they both would get the same profile

agile galleon
#

nope

#

i mean if its cached yes

brittle leaf
#

id assume they would cache all players that have played before

agile galleon
#

yes

#

they do

#

and those results are the same

brittle leaf
#

but if a player hasnt played before they arent the same? is that what youre trying to say?

#

that makes sense

agile galleon
#

exactly xD

#

i wouldn't mind if they weren't the same

#

they just had to include the same information

brittle leaf
#

from what i can tell the only thing that would be different is the uuid and player name, the rest is default data

#

because neither method would call the mojang api to get the correct other data, if you had uuid call for correct username, if you have username call for correct uuid

half harness
#

On spigot don't you run buildtools to get the server jar

crude cloud
#

yes

distant sun
bronze ice
#

Guys, do you know a plugin that is similar to Bungee Advanced Proxy ?

sour stag
#

hello i need help

#

can someone help me with sourcecode to jar file?

#

i tried maven install but it failed

distant sun
#

wrong chat @visual schooner

sour stag
#

@distant sun

#

can you help me with that please

distant sun
#

I dont got time

sour stag
#

its easy probably for u

#

to fix it please gaby

#

we have been friends for years now

#

@distant sun please man

distant sun
#

What have you tried and what happened?

sour stag
#

i tried maven build

#

and it failed

#

ill send u the github link okay?

#

to the sourcecode

#

check dms @distant sun

distant sun
#

with what error message?

sour stag
#

idk

#

it didnt show up

#

u got the sourcecode link in dms

distant sun
#

do mvn package

sour stag
#

how i do that

#

xd

distant sun
#

open a console and type it?

sour stag
#

it says mvn is not recognized

#

idk how to open an console

distant sun
#

download maven, google how to do that

sour stag
#

i have maven installed

distant sun
#

if mvn is not recognized, you don't / you didn't finish the install process

sour stag
#

i got an error

#

do you want to see the error message?

#

@distant sun

#

when i did mvn package

#

build failure

#
[ERROR] Please refer to dump files (if any exist) [date].dump, [date]-jvmRun[N].dump and [date].dumpstream.
[ERROR] There was an error in the forked process
[ERROR] TestEngine with ID 'junit-vintage' failed to discover tests
[ERROR] org.apache.maven.surefire.booter.SurefireBooterForkException: There was an error in the forked process
[ERROR] TestEngine with ID 'junit-vintage' failed to discover tests
[ERROR]         at org.apache.maven.plugin.surefire.booterclient.ForkStarter.fork(ForkStarter.java:631)
[ERROR]         at org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:285)
[ERROR]         at org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:250)
[ERROR]         at org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeProvider(AbstractSurefireMojo.java:1240)
[ERROR]         at org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeAfterPreconditionsChecked(AbstractSurefireMojo.java:1089)
[ERROR]         at org.apache.maven.plugin.surefire.AbstractSurefireMojo.execute(AbstractSurefireMojo.java:905)
[ERROR]         at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:126)
[ERROR]         at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2(MojoExecutor.java:328)
[ERROR]         at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute(MojoExecutor.java:316)
[ERROR]         at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:212)
[ERROR]         at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:174)
[ERROR]         at org.apache.maven.lifecycle.internal.MojoExecutor.access$000(MojoExecutor.java:75)
[ERROR]         at org.apache.maven.lifecycle.internal.MojoExecutor$1.run(MojoExecutor.java:162)
[ERROR]         at org.apache.maven.plugin.DefaultMojosExecutionStrategy.execute(DefaultMojosExecutionStrategy.java:39)
[ERROR]         at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:159)
[ERROR]         at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:105)
[ERROR]         at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:73)
[ERROR]         at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:53)
[ERROR]         at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:118)
[ERROR]         at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:261)
[ERROR]         at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:173)
[ERROR]         at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:101)
[ERROR]         at org.apache.maven.cli.MavenCli.execute(MavenCli.java:906)
[ERROR]         at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:283)
[ERROR]         at org.apache.maven.cli.MavenCli.main(MavenCli.java:206)
[ERROR]         at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
[ERROR]         at java.base/java.lang.reflect.Method.invoke(Method.java:580)
[ERROR]         at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:283)
[ERROR]         at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:226)
[ERROR]         at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:407)
[ERROR]         at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:348)
[ERROR]
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
#

this is the error

#

@distant sun

pastel imp
#

for god sake

#

if you are trying to compile a freemium plugin

#

then either learn how to properly do it

#

or just buy it.

#

don't expect other people to spoon feed you

wind patio
#

sheesh

#

blud just message posted entire log

wind patio
distant sun
#

+1

karmic beacon
#

package org.core.chunkloaders;

import me.clip.placeholderapi.expansion.PlaceholderExpansion;
import org.bukkit.entity.Player;

public class ChunkLoaderPlaceholder extends PlaceholderExpansion {

private ChunkLoaders plugin;

public ChunkLoaderPlaceholder(ChunkLoaders plugin) {
    this.plugin = plugin;
}

@Override
public boolean persist() {
    return true;
}

@Override
public boolean canRegister() {
    return true;
}

@Override
public String getIdentifier() {
    return "chunkloader";
}

@Override
public String getAuthor() {
    return "YourName";
}

@Override
public String getVersion() {
    return "1.0";
}

@Override
public String onRequest(Player player, String identifier) {
    if (identifier.equals("countdown")) {
        long expirationTime = plugin.getExpirationTime(player);
        if (expirationTime > 0) {
            long currentTime = System.currentTimeMillis();
            long remainingTime = expirationTime - currentTime;
            
            long remainingDays = remainingTime / (24 * 60 * 60 * 1000L);
            long remainingHours = (remainingTime % (24 * 60 * 60 * 1000L)) / (60 * 60 * 1000L);
            long remainingMinutes = (remainingTime % (60 * 60 * 1000L)) / (60 * 1000L);
            long remainingSeconds = (remainingTime % (60 * 1000L)) / 1000L;
            
            return remainingDays + "d " + remainingHours + "h " + remainingMinutes + "m " + remainingSeconds + "s";
        }
    }

    return null;
}

}

#

@Override
public String onRequest(Player player, String identifier) {
if (identifier.equals("countdown")) {
long expirationTime = plugin.getExpirationTime(player);
if (expirationTime > 0) {
long currentTime = System.currentTimeMillis();
long remainingTime = expirationTime - currentTime;

            long remainingDays = remainingTime / (24 * 60 * 60 * 1000L);
            long remainingHours = (remainingTime % (24 * 60 * 60 * 1000L)) / (60 * 60 * 1000L);
            long remainingMinutes = (remainingTime % (60 * 60 * 1000L)) / (60 * 1000L);
            long remainingSeconds = (remainingTime % (60 * 1000L)) / 1000L;

            return remainingDays + "d " + remainingHours + "h " + remainingMinutes + "m " + remainingSeconds + "s";
        }
    }

    return null;
}

} this method here @Override is underlined in red. Any idea how to fix?

pastel imp
karmic beacon
#

read it lol

pastel imp
# karmic beacon read it lol

too much work if you won't even properly send it. + 98% of the time it's user error, so check the IDE, I am not your parent and you are not a baby that needs to be spoon fed

distant sun
slate elk
#

anyone here worked on model language?

#

i work with foregin language

#

pretty good contract not sure where to start from how ever

#

i imagine

#

to just use the input and args in text for example if "what is a good present for a women" then build (what is good present for women) and return answers

slate elk
#

i found a person who will be translator

#

how ever

#

what do i need

#

PDF books

#

so it memorize ways words > words and etc

cerulean ibex
#

what the fuck are you saying tony

crude cloud
#

typical

wind patio
#

the fuck lmao

ornate nimbus
#

Tony is confusing me

cerulean ibex
#

Tony is confusing me

wind patio
#

how much of a difference can L3 Cache make when in comes to a minecraft server?

#

CPUs in question 7900 vs 7950x3d (64mb / 128mb)

humble prism
#

not exactly what youre looking for but the "most" information on the topic i have seen

#

in admincraft

potent nest
#

probably not noticeable

agile galleon
#

^

#

It is noticeable for very optimized apps with high data throughput but eh Minecraft isn't

inner umbra
#

Is it possible to set a limit of parameters provided when your method has method(Object... obj) {}
Ex; method(int[3]... values) Would require 3 ints.

Just preference. Its a bit cleaner than method(int i1, int i2, int i3).

potent nest
#

no

#

I also wouldn't say it's cleaner normally

inner umbra
#

Just preference.

potent nest
#

bad preference

inner umbra
#

I can say the same to you xD

#

Thats why its preference.

potent nest
#

well, I'm not using varargs in situations where vargargs shouldn't be used

inner umbra
#

🤷

steel heart
#

You lose the ability to name each parameter which sucks, weird preference :>

inner umbra
#

Didn't need the parameters to be named and the order only matters to me.

grave tiger
#

Can someone help me with something important about custome plugins? If yes dm me please

prisma wave
distant sun
#

FixedSizeList3<T>

wind patio
distant sun
potent nest
#

Tripel, oder Tuple3

wind patio
#

šŸ’€

wind patio
#

the level of abstraction 😩😩😩

#

creamy

solemn laurel
#

when do we get Tuple1

#

Tuples.singleton

remote goblet
#

oh this is beautiful

#

why stop at 22

#

we should have one for every letter of the alphabet

flint crow
remote goblet
#

it does you're right

#

find god

steel heart
#

lol

uneven stone
#

is there a way to convert 1.20.2 texturepack to 1.18?

stoic spear
#

@ocean quartz i sent a message on #1191515714033565738that i could make a free plugin.. but now i cant make a paid service, it should not let be friendly and do free things then ruin business.

#

i have deleted the post, can u open for me for a paid offer service?

agile galleon
#

I'm confused as well

stoic spear
#

i posted a free service, to be friendly, but that means I cannot earn money when being friendly.

pastel imp
pastel imp
sturdy zinc
#

I was just asked about the update needed on my plugin about Papi not supporting my placholder format by 2.13.0

#

come to find out the issue is Purpur most likely

ancient nova
#

Any where

#

To find a dev?

wind patio
#

bruh moment?

prisma wave
#

Update shadow plugin

#

it could be from library code

wind patio
#

ah true

#

now i remember updating to on my other project when I had this issue

#

also, anyone tried using JOOQ in minecraft plugins?

prisma wave
#

emily has i believe

#

@crude cloud can you confirm 🄺

candid turtle
#

anyone know how to change the mincraft version of a mod from 1.20 to 1.19.2?????

crude cloud
#

uh I don't think I've used it in mc? but, it's not like that really matters

wind patio
#

true

#

was just wondering if there are any caveats of integrating into a plugin, though I suppose thats kinda a dumb question

candid turtle
brittle leaf
slate elk
#

im back

#

šŸ˜„ šŸ˜„ ā¤ļø

crude cloud
#

that's unfortunate

flint crow
#

why i see everyone hating on tony šŸ’€

#

do i miss some helpchat lore?

pallid gale
#

Who knows

solid loom
#

hey

agile galleon
#

Maybe, just maybe

humble prism
flint crow
#

oh that? i ve even replied to those

#

v relatable ngl

#

Don't you talk to yourself too?

#

that's rly normal

humble prism
#

multiple times

flint crow
#

welp, ye mby, idk haven't happened to me yet

#

i only scream on my servers chat n talk alone there

gilded girder
#

Keeps us sane Kris

modern coral
#

Hello!

Could someone help me with a question?
My server is version 1.20.1 and when entering with 1.8, people sometimes do not load the chunks, the players and entities also become invisible.
Does anyone know how to solve it?


”Hola!

ĀæAlguien podrĆ­a ayudarme con una duda?
Mi servidor es versión 1.20.1 y al entrar con la 1.8 a la gente a veces no le cargan los chunks, se hacen invisibles los jugadores y las entidades tambien.
Alguno sabe como solucionarlo?

surreal garnet
#

Just for the soul fact of, that is 12 major versions different. So there’s bound to be compatibility issues.

modern coral
#

No solutionv

#

?

surreal garnet
#

Not really.

#

Either support less versions, or just take it at face value that there’s going to be issues between those versions.

#

ViaVer has fixed a lot of the issues, but some are core game mechanics that can’t be changed.

inner umbra
#

Wrong channel. Use #minecraft
Gonna assume you're using ViaVersion so I recommend asking there.

timber oak
#

Does someone know a good book about design patterns?

prisma wave
#

effective java

#

it doesnt necessarily discuss the Piss Poop Factory pattern but in my experience you dont actually need a lot of these patterns (hence the hilarious name)

timber oak
#

Oh I was actually going to try to learn the Factory pattern rn lol

prisma wave
#

i didnt actually mean Factory was bad, that's quite a common one

#

and a fairly easy one

#

but some of them get a bit silly

#

i have never used the Bridge pattern in my life and couldnt tell you what it is

timber oak
#

I'm about to setup a system of custom enchants for a prison server. Not sure what the most optimal way is, I usually just use a "manager" that handles everything and then something like an interface called CustomEnchants

prisma wave
#

though i probably have accidentally used it

timber oak
prisma wave
#

maybe they are useful but just niche

timber oak
static zealot
#

I believe he does

prisma wave
#

uhhh

static zealot
prisma wave
#

i mean it depends what specifically you want

timber oak
prisma wave
timber oak
prisma wave
#

yeah lol, i mean what advice you want

#

about which aspects of design

#

i think going into a project thinking "I'm going to use a Factory pattern and a Delegate pattern and a Proxy pattern" is a bit of a fallacy though. the patterns exist to solve particular problems, you shouldn't be reaching them until you get that problem

timber oak
prisma wave
#

yeah that seems fine tbh

timber oak
#

Without making it a mess lol

prisma wave
#

sure, which is where refactoring comes into play

#

because as you're designing the system unless you spend hours planning, you cant know specifically what issues you'll run into

#

so the best thing to do imo is design it badly first, then do a big refactor once you know all the constraints

static zealot
#

even when I try to plan a lot in advance I just end up spending more time on the initial mess and still refactoring

prisma wave
#

if u just want to make something simple that works i think my example will do you pretty well though

static zealot
#

so just having a fast POC is usually pretty good

timber oak
prisma wave
#

if you're doing that already then you probably dont even need to change much of your behaviour

timber oak
#

I just want to learn making "professional" code ig

static zealot
#

short for proof of concept

prisma wave
#

eventually you might get an intuition like "oh this would suit a factory" but i dont think it's strictly necessary outside of technical interviews

timber oak
timber oak
prisma wave
#

factory pattern is really useful when you

  1. want to hide exactly which implementation is being created to avoid leaking implementation details
  2. need to do a lot of complex logic for creating an object
  3. both of the above
prisma wave
#

i dont think so

#

i mean, yes, if you squint

static zealot
prisma wave
#

but these patterns are usually a lot more atomic in that they literally only do one thing, this is doing a lot more than just creating objects

timber oak
timber oak
prisma wave
#

yes, exclusively instance creation with maybe caching as a treat

prisma wave
#

you could turn this into 5 different classes and it might be more "well-designed" but it arguably wouldn't matter

static zealot
#

If you just want to understand what factory pattern is, there are some easy to google resources out there. You can also find common java patterns and what they are.

prisma wave
#

true

timber oak
#

At least not easier to understand for me lol

prisma wave
#

it's quite subjective

timber oak
prisma wave
#

the main benefit of enterprise-ing everything is futureproofing, in that making big changes later becomes a lot easier when you have clearly separated behaviour and lots of abstractions

#

though i think most plugins dont get big enough to matter

static zealot
#

True. Also, over "abstractisation" (is that the word?) is a thing

prisma wave
#

abstracting? perhaps

#

i'd just say over-engineering

#

and yeah it definitely is

#

theres a reason why theres the meme about AbstractProxyFactoryProviderBridgeBeanWrapper

static zealot
#

Oh Nial how I miss you

prisma wave
#

🄲

#

N.java was truly ahead of its time

timber oak
#

I hope

static zealot
#

That's what everyone that ended up in there said

timber oak
#

Hahha but in some cases it's probably not bad, when developing bigger projects

prisma wave
#

yes and no

#

i'd argue this is just an example of OOP actually not being very good, but we can't really change that

#

the comically long class names is just the endgame of enterprise-design

timber oak
#

What would be better than OOP? Not really sure what the options are lol

static zealot
#

You've just opened Pandora's box

prisma wave
#

given that we're using java, nothing

#

hahahah

static zealot
#

Oh. Nvm

prisma wave
#

dont worry dont worry

#

i just had to get a little dig in

static zealot
prisma wave
timber oak
#

I've only ever used java, c# and a little python

prisma wave
#

do you mean for plugins or in general

timber oak
#

In general for programming

prisma wave
#

hehe ok here we go

#

i am a big advocate of Functional Programming which is a totally different paradigm (i could write a whole essay on why I think it's better, but it's probably best not to do that)

a more conservative view, staying in the imperative world, is procedural programming (like C). a lot of modern languages like Rust and Zig are staying mostly procedural, with a few functional aspects incorporated

#

havent watched it in years, cant remember if it sucks or not

timber oak
#

Functional programming is for example Haskell right?

#

I remember looking at an example for it and the code just doesn't look right to me lol

#

It looks so damn confusing

timber oak
#

But it's probably (definitely) because I'm so used to OOP

prisma wave
#

though that's only partly true

#

if you've used streams or completable futures in java, they're like a free trial of what FP is like

static zealot
#

Streams 🤤

timber oak
#

But in functional programming do you not have methods etc? How can you run a section of code multiple times without just looping or statically writing it every time?

static zealot
#

You have functions

prisma wave
#

well, the functional paradigm is basically this: you dont have any mutable variables, you do all your work by combining pure (meaning they dont modify anything) functions on data. that's it.

#

you have functions yes

#

as for loops, that depends on the language

#

and how "deep" you wanna go

timber oak
#

Your language is based on Haskell isn't it? Can't remember

static zealot
prisma wave
# prisma wave well, the functional paradigm is basically this: you dont have any mutable varia...

so for example, let's make a very contrived example of adding together the first 10 even numbers. in imperative java we'd write it like this: ```java
int total = 0;
for (int i = 0; i < 10; i++) {
if (i % 2 == 0) {
total += i;
}
}

whereas with "functional java" using streams it's more like ```java
int total = 
  IntStream.ofRange(0, 10)
      .filter(i -> i % 2 == 0)
      .sum();

and then the haskell equivalent ```hs
total :: Int
total = sum (filter (\i -> i % 2 == 0) [0..10])

you can see that the last 2 are quite similar (excluding syntax), and I think they're a lot more obvious on what you're actually doing - there's no changing variables you have to keep track of, the code doesn't keep jumping up and down between blocks
#

the key difference is more general and it's between the Imperative paradgigms (which includes OOP) and the Declarative paradigms (which includes FP)

In imperative programming you write code which says how to do what you want
whereas in declarative programming you just write code which says what you want

timber oak
prisma wave
prisma wave
#

it's just a different style of expressing the same problem

timber oak
prisma wave
#

now take those ideas and apply them to the entire programmming language :))

timber oak
timber oak
prisma wave
#

The key difference is that the declarative style doesn’t really care about how the code actually works

timber oak
timber oak
prisma wave
prisma wave
#

again, there's no magic here, it's just a higher level of abstraction

#

just like in java you dont have to care about manual memory management because the language takes care of it for you

#

go 1 level up, and you dont have to care about the messy mutable implementations

timber oak
prisma wave
# timber oak Makes sense, but also seems like it makes it way more difficult to debug

thats an interesting answer, though i think it's usually the opposite. when you have pure, mathematical functions, they're a lot easier to test - so much so that you can often write tests which, for example, prove that the sum function always works for any combination of inputs. more complicated debugging is hard in haskell but for a different reason

prisma wave
timber oak
prisma wave
prisma wave
#

it's very hard to design a proper functional language without a gc for various reasons

#

but that's kinda not relevant

#

im more just talking about the principle of languages building abstractions

timber oak
prisma wave
#

thats when you do have to start looking at the implementation

#

theres no magic fix there (though a few languages attempt some)

timber oak
prisma wave
#

yes

#

C would be a better example since I think C++ does have some memory utilities now, though not a GC

#

you have to manually allocate and free memory

#

in java you don't

timber oak
prisma wave
#

yes, the code

timber oak
prisma wave
#

given that it's caused probably 90% of bugs in all software, you're probably right

#

or more generally, C not being memory-safe has caused 90% of all bugs

#

not just the manual management

timber oak
prisma wave
#

yeah it's really nice

timber oak
prisma wave
#

it was, originally

#

nowadays theyre so different there's not many similarities apart from main syntax

timber oak
#

Sorry most of these questions could probably be googled lol, you're just good at explaining :))

I appreciate you taking your time to help

prisma wave
#

the original elevator pitch for C++ was "C with classes"

#

nah it's cool, i enjoy talking about stuff like this anyway

compact perchBOT
timber oak
prisma wave
#

wheres the names lol

static zealot
prisma wave
#

which category? languages without gc's?

prisma wave
timber oak
prisma wave
#

yeah

timber oak
prisma wave
#

i think it's to prove that i clearly dont mind talking here lol

static zealot
#

As you can see, there's no one who likes talking more than me and BM :))

prisma wave
#

yep haha

timber oak
prisma wave
prisma wave
timber oak
#

Damn

prisma wave
#

dear god

timber oak
#

Hahahah

remote goblet
#

brister loves to just yap

prisma wave
#

true...

#

only when it's about programming languages

#

anything else is boring

onyx loom
#

covid be like

timber oak
prisma wave
#

uhh

#

im honestly not sure on the exact numbers

timber oak
#

Almost 200k tho

prisma wave
#

nvm C++ is more popular according to stackoverflow 2023

prisma wave
static zealot
prisma wave
#

of being the most obnoxious people imaginable

prisma wave
#

given that SO is probably biased to more modern projects it's probably safe to call them even

timber oak
prisma wave
#

it's hard to say about the exact details but for example Linux is still entirely C

timber oak
prisma wave
static zealot
#

There's also the fact that most of the gaming industry still uses c++

prisma wave
#

yup

#

windows is probably about 50/50 i think? though it's kinda impossible to say

timber oak
timber oak
prisma wave
static zealot
#

That is a big one. But also a lot of non public engines are still written and use c++

prisma wave
#

yeah

timber oak
prisma wave
timber oak
#

WSL?

prisma wave
#

windows subsystem for linux

#

lets you get a linux shell running "inside" windows

timber oak
#

Ohhh yeah I've heard of that before, never used it though

prisma wave
#

so you can use nice things like apt and vim and emacs without needing native windows binaries

timber oak
#

I once had a dual boot but got tired of swapping all the time

prisma wave
#

it's either a game-changer or wont affect you at all

#

mm

#

yeah it's not rly worth it imo

static zealot
#

vim 😭 šŸ˜ 😢

timber oak
static zealot
#

that is my relationship with vim

prisma wave
prisma wave
timber oak
#

But then run servers etc. in the linux shell?

prisma wave
#

yup

prisma wave
#

it's pretty cool yeah

static zealot
# static zealot that is my relationship with vim

I've tried multiple times to learn it but always gave up very very fast. Its just too much for me. I think the main issue is my lack of memory. I've always been very very bad at remembering keybinds

prisma wave
#

worth playing around with if you wanna kill some time, but only really useful if you're comfortable with the linux experience

prisma wave
#

which is probably very bad

#

but it's nicer to use than nano i think

static zealot
#

Probably. I've only ever used nano for simple text edits

timber oak
prisma wave
prisma wave
static zealot
#

Well, there's the performance difference.

prisma wave
#

true actually

timber oak
#

Is linux a lot faster?

prisma wave
#

not a lot but definitely faster than windows for a lot of things

prisma wave
#

in my experience at least

static zealot
prisma wave
#

oh yeah

#

definitely

static zealot
#

I used to have a laptop that barely runs windows 10 but on pop os it was like I had a new pc

#

also on ubuntu

prisma wave
#

yup

#

forgot about that

timber oak
#

Ah yeah ubuntu is what I used

prisma wave
#

classic

#

dead chat now 😦

timber oak
#

😦

#

Omw to bed

prisma wave
#

smh

timber oak
#

Waking up in 6 hours :))

prisma wave
#

im sorry

timber oak
#

Lmao

#

I could also skip sleep entirely

#

Hmm

prisma wave
#

dont do that

#

its not worth it

timber oak
#

True

#

Actually

#

Got one more question lol

prisma wave
#

yes... yes!!

static zealot
#

Not going to lie. I was hoping this conversation wasn't going to end so soon

prisma wave
#

me too

timber oak
#

Would you store the enchants like this
private final Map<String, CustomEnchant> enchants = new HashMap<>();
Or like this?
private final Map<Class<? extends CustomEnchant>, CustomEnchant> enchants = new HashMap<>();

prisma wave
#

but life gets in the way once again ā˜¹ļø

#

#2 probably

timber oak
timber oak
prisma wave
#

or actually, even better, just store it by the NamespacedKey

#

or an enum sure

timber oak
prisma wave
#

a bit more dynamic than the Class while not being as vague as a String

half harness
prisma wave
#

yeah but you have the namespacedkey already

half harness
#

oh

prisma wave
#

you know one exists, and you can access it from a lot of places

timber oak
#

Yeah I don't see how this is less vague than using a string hahah

prisma wave
#

it's only slightly less vague

#

but every Enchantment subclass has to have a NamespacedKey already

#

so it means you dont have to bikeshed about the string format, whether it should be allcaps or all lowercase, etc

timber oak
#

I don't see any reason to at least

prisma wave
#

you have to i believe

timber oak
#

I was thinking I'd just use BlockBreakEvent and handle it from there

prisma wave
#

actually that might not be true

#

if you want the glowing im pretty sure u have to register them

#

or just use a fake hidden enchant ig

timber oak
#

Ah yeah I usually just add a fake hidden enchant

#

Like power on a pickaxe or smth

#

And hide it

prisma wave
#

yea

#

if ur not using bukkit system then enum is probably the best bet

timber oak
#

But it also means more manual typing when adding a new enchant lol. I know it's pretty much nothing but if I use the class it's all automatic basically

prisma wave
#

thats true

#

it depends on your use case, i suppose

#

but my reasoning for the enum is mainly that it's easier to parse from a string

timber oak
#

I think I might start with Enum yeah, then if I see it fit I can always change to the class type instead

timber oak
prisma wave
#

yeah just depends on your priorities

#

you could justify any option

#

except String dont use that

timber oak
#

Yeah String is bad lol

#

I've got 15 enchants to create now so I really need to make a new interface or smth for them lol

#

Maybe I should separate effects and enchants, like haste, speed etc.?

prisma wave
#

theres only so much you can abstract out here, the bukkit Enchantment class is probably a good place to start

#

if you have enchants which just apply a constant effect, they could be an abstract class, or even just a single class

timber oak
timber oak
#

Actually when I should actually use an interface instead of just an abstract class? lol

#

This is probably something I should learn when I started on java but yeah

timber oak
prisma wave
timber oak
prisma wave
#

sure

static zealot
timber oak
static zealot
timber oak
#

Thanks for all the help / explanations everyone! Time for me to go sleep

prisma wave
#

np, gn

static zealot
#

So, how about that <insert controversial topic here>?

prisma wave
#

i hate object oriented programming

static zealot
#

Hate?

prisma wave
#

yes

static zealot
#

Hmm. One thing I don't understand about functional programming, is how do you actually store state? From the little research I've done, having state is something frowned upon. Do you read -> change -> write? That feels like a waste

prisma wave
#

it depends on the context, for a lot of things you dont need state at all

#

sometimes you do that loop yeah, but it's not quite as inefficient as you might think

#

removing the first element from a list is O(1) for example, and that covers most list processing functions

static zealot
#

I'm thinking more about the read/write parts

prisma wave
#

for more complex things the language usually allows actual mutable variables, either natively in impure languages or by pretending theyre not mutable using monads

static zealot
#

I don't know. The whole concept is a little too much for my small shiny brain

prisma wave
#

perhaps an example

cerulean ibex
static zealot
# prisma wave perhaps an example

I mean, I'm not exactly sure what I mean either but for example, I have a website and I store sessions in a table, what is usually recommended is that sessions are cached in memory but how I understand FP, you can't do that. You'd have to read the table every time you want a session.

prisma wave
prisma wave
#

i think the simplest and most versatile example of FP is the Elm Architecture

#

which is mainly for designing functional frontend apps, but handles state and things too

#

it's almost like MVC too, just immutable

static zealot
prisma wave
#

like in that video you linked, where you have const newIndex = index + 1

#

like that

#

tryna think of a good example where syntax wont matter too much

static zealot
prisma wave
#

mmm thats a bit more complex cuz it doesnt map quite as neatly

#

also http requests are inherently stateful & impure

#

most web frameworks would probably work fairly similarly to an imperative one under the hood, they just let you hook into it with mostly pure functions

compact perchBOT
static zealot
#

funnycube at work

pallid gale
#

hi yes

cerulean ibex
#

And how is it O(1)

#

Also whats cons

potent nest
#

Cons is "prepend an element to a list" basically

tender saffron
#

hello im looking for a dev that can make me a plugin Not payed dm for more info

potent nest
#

And as we all know the cons operator in Haskell does not evaluate its arguments

tender saffron
potent nest
#

So misbehaving is the solution to that?

tender saffron
#

ig

potent nest
#

gl with that mindset

ocean quartz
#

It's almost like no one likes to work for free lol

potent nest
# cerulean ibex And how is it O(1)

The reason is that a singly linked list is just an element in front of another singly linked list (with the special case of an empty list), so you just use that list behind the first element

distant sun
# tender saffron no one checks that

probably because everyone wants to make some income, and not even beginners can take the requests because people ask for entire servers to be made for free kek

remote goblet
#

personally i check those channels daily

#

mostly just to laugh at them but still

tender saffron
#

..

remote goblet
#

my personal favourites are when they want a "real quick plugin from <x> server" and its literally like

#

hypixel skyblock

distant sun
#

ye but they said "real quick" so that must be true, right?

remote goblet
#

TRUE

#

i also enjoy the super vague and varying price budgets $100->$3k

prisma wave
#

Even if it was a doubly linked list which i presume is what you thought, removing the nth element is definitely not O(1)

obtuse gale
#

Requests nowadays are kinda I want minecraft redeveloped in Rust, btw my budget is $5

prisma wave
#

Smartest rust fan

remote goblet
#

css minecraft

cerulean ibex
#

Anyway i was kinda just pointing out that saying smth is O(1) for n (where its constant) can be said abt a lota things cuz duh its constant

#

I mean its a technicality but its why i think conplexity isnt always the most important

cerulean ibex
prisma wave
#

Yeah i guess lmao

#

But i specifically said 1st element rather than nth for that reason

wind patio
#

what r yall bludding about

prisma wave
#

clever things

#

might be a bit too advanced for you šŸ¤“šŸ¤“

obtuse gale
#

hi guys can someone help me
?
i made /shop and i added my custome head id and when i open shop and i try to buy the item is not buyying is only taking my points but is not giving me the head
how to fix ?

obtuse gale
#

and no one helping check because i did

static zealot
#

Well, you are not going to get any help in this channel. I was just mentioning since I thought maybe you didn't know what channel to use.

obtuse gale
peak oak
#

Hello, my situation is the following, I have a menu that when you open it you can choose sanctions, and when you select it the command is executed which perfectly marks who to sanction with the arguments, but how can I make it say who was sanctioned? How do I get it to take the nickname of whoever put /punish and then mark it, since I use forward

wind patio
#

big o notation be crazy

pastel imp
distant sun
inner umbra
#

Lol

long dagger
#

I would actually code in that too

wind patio
humble prism
#

why just why

#

set xms to 16 xmx to 16, and if using pterodactyl set container size to like 18-20 gb (or whatever you want)

#

is protocollibs background compiler set to true?

#

if it is, try setting it to false

half harness
#

I feel like the main thing is it having a "cpu bottleneck" - too many players on the server so there's like a trillion events and stuff running

#

On phone tho so can't check much

humble prism
#

although a longer report would be nice

#

5 minutes, normal one

cobalt marlin
half harness
#

yeah plib itself isn't lagging, it's the plugins hooking onto it

wind patio
wind patio
humble prism
#

rn youre using 12.6

#

(and java tries to use what its allocated)

#

so no, you dont need more

#

16-18 gb tops

distant sun
wind patio
half harness
#

In plugins

#

Including file, network, database

wind patio
half harness
#

I mean your first report specifically measured ticks with over 50ms but not this one so that'd make sense (i think it only recorded 3 periods) - i think its better to only record >= 50ms ticks though

#

38ms isn't horrible

#

but yeah i think it's the same situation
lots of chunks/blocks and entities being loaded, and the players are resulting in a lot of events being called which all add up

#

but the average tps is 20+ here (and average mspt is < 50ms)

surreal garnet
#

Learning JS right now, ofc using discord as something to use. Took me too damn long for this:

https://i.imgur.com/j3Hz0Gj.png

Finally proud of myself but DAMN, took too long. But such simple code lmao. Just was over complicating it.

pallid gale
#

aye welcome to the dark side

surreal garnet
#

Lmfao

#

Wanting to eventually do a whole logging system similar to Dyno, but simplified. As well a leveling system kinda like yours and Mee6’s.

#

But that’s a bit further down the road haha.

pallid gale
#

Yes loggers are fun

surreal garnet
#

Yeee

#

Was messing with this as well as I want to mess with embeds now too, but started getting hungry lmfao.

pallid gale
#

Yeah getting the ban reasons is funky

#

Barry doesnt do it since it requres extra perms he doesnt have

surreal garnet
#

Rip

#

Yeah since it’s my own little discord idm just doing what I need, if I went crazier and put it in MCHub’s discord than maybe I’d optimize it a bit more and have more niche perms.

pallid gale
#

yeah fair

surreal garnet
#

Need to figure out what next tbh, not fully sure yet honestly tho.

pallid gale
#

Go play with canvas

surreal garnet
#

Oooh?

pallid gale
#

That's what barry uses to generate all the images

surreal garnet
#

Ah okay

#

Noted

pallid gale
#
#

Looks scarier than it is

surreal garnet
#

Yeah fair.

#

I learnt stuff isn’t always as scary, especially after learning MCHubs code space xD.

pallid gale
surreal garnet
wind patio
#

anyone knows where can I get 1.20.2 Folia build?

#

or any build for the sake of it

wind patio
#

the heap memory graph looks odd

#

jumps from 9g to 14g

wind patio
#

last 30d, 7d and 24 hours

pastel imp
wind patio
#

the dashboard layout itself is from UnifiedMetrics

#

the installation process, well, if you know what you're doing, about 15-20 minutes.

humble prism
#

thats how java works

brittle leaf
#

its allocated ram, rather thrn actually used ram more then likely

potent nest
potent nest
#

Yeah that’s fine then

slate elk
#

Good open source that uses custom nms mobs?

#

1.7

wintry plinth
humble prism
wintry plinth
humble prism
wintry plinth
humble prism
wintry plinth
ivory crow
#

Anyone know how websites do the "click to copy ip"? Ik its on tebex but I cant figure it out

ivory crow
#

Something like this?

button.addEventListener("click", writeClipboardText("<empty clipboard>"));

async function writeClipboardText(text) {
  try {
    await navigator.clipboard.writeText(text);
  } catch (error) {
    console.error(error.message);
  }
}
wintry plinth
#

Yup :)

#

Are you using Vue, React or anything of that sort?

ivory crow
long dagger
#

I have a plugin that does some cool stuff to the names of entities, and I only want to show the names if the player has a direct line of site not blocked by blocks. Should I use raytracing? And if I do, how often should I be checking? I dont want to lag the server, if anything, the opposite

slate elk
slate elk
#

how ever u got a bukkit method for that just saying

#

check can run every tick even server wont lag

#

i pretty often make lines on 3D dimensions and many calculations up to 10k a second 0 lag on a shared epyc 7502 theard

#

not a second a tick*

distant sun
slate elk
#

bigges betrayed of history

long dagger
slate elk
#

i told u

#

plane line calculation

#

and return collection instead of entity

#

work with an distancee limit oo

long dagger
#

which doesnt return a collection

real pagoda
#

hey guys, any1 know how to fix this? I update Intellij and it broke (also delete most of my import)

#

i tried to add the dependecies back but it keep saying same root cannot be added (also the dependencies tab is missing)

real pagoda
half harness
real pagoda
#

actually i just fix the import

#

but new problem

half harness
#

or is that what you did

#

thats an odd issue tho

#

šŸ¤”

real pagoda
# half harness what if you double click ctrl and type "gradle run"

ok so when the ide update, it decided that it should generate for me some iml file and change my main class
so it was Arsky.TheCellBeyond.Main then main class before and that is where i config it, but they decided to update it to TheCellBeyond.Main and spawn in some junk, which broke my entire project sdk and dependencies

#

like im extra confuse, like why they need to migrate my entire code off a predefined Main and make their own

real pagoda
real pagoda
#

duplicated texture spawned? wrong index perhaps ?

wind patio
#

anyone has a good tutorial for creating paper patches?

#

this shit be confusing fsr

#

I'm aware of the git patch system and all, but don't tell me you just look at existing code and write the patch yourself

cerulean ibex
real pagoda
#

mamaged to fix the texture indexing, but 1 if the imaged is not flipped by the stbi flip

    public Texture(String filepath) {
        this.filepath = filepath;

        // Generate texture on GPU
        texID = glGenTextures();
        glBindTexture(GL_TEXTURE_2D, texID);

        // Texture parameters

        //  Image repeater

        glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT);
        glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT);

        // Image style
        glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);

        // Downsize
        glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);

        IntBuffer width = BufferUtils.createIntBuffer(1);
        IntBuffer height = BufferUtils.createIntBuffer(1);
        IntBuffer channels = BufferUtils.createIntBuffer(1);
        ByteBuffer image = stbi_load(filepath, width, height, channels, 0);
        stbi_set_flip_vertically_on_load(true);

        if (image != null ) {
            if (channels.get(0) == 3) {
                glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, width.get(0), height.get(0),
                        0, GL_RGB, GL_UNSIGNED_BYTE, image);
            } else if (channels.get(0) == 4) {
                glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, width.get(0), height.get(0),
                        0, GL_RGBA, GL_UNSIGNED_BYTE, image);
            } else {
                assert false : "Error: Unknown texture channels '" + channels.get(0) + " '";
            }

        } else {
            assert false : "FATAL: Texture failed to load! '" + filepath + " '";
        }

        stbi_image_free(image); //Free memory and prevent memory leak
    }
#

ops stbi flip need to be before load 😭

wind patio
cerulean ibex
#

or you want like patch patches

#

like what paper does with spigot?

wind patio
#

I wasn't aware exactly how the paperweight build process works, somewhat figured it out

wintry plinth
#

But I want it for my own personal benefit

wind patio
#

yeah well we use purpur as our main software for server
the process is fairly simple (from what I understand, might be more to it)

fork the repo -> run applyPatches -> modify either purpur-api or purpur-server -> create commit -> run rebuildPatches -> a patch is automatically generated in patches dir -> either generate a jar or run dev

cerulean ibex
#

for me it doesnt even work lmao

pastel imp
#

patches won't be a thing anyways soon enough

#

once paper hard forks, patches will be made source

wind patio
#

sheesh

humble prism
wintry plinth
half harness
pastel imp
pastel imp
ocean quartz
#

For the API only

wintry plinth
agile galleon
#

Wen hardfork is the question tho

cerulean ibex
ocean quartz
pastel imp
pastel imp
agile galleon
#

Hohogho

pastel imp
#

lets phrase it like this, hard fork we are nearer than far from it, aka give it a year's time or so.

agile galleon
#

yuuup

wind patio
#

one thing I can tell for sure

#

minecraft (and everyones who contributed to paper/spigot/purpur/pufferfish) code is a fucking mess