#dev-general

1 messages · Page 297 of 1

forest pecan
#

then display it in a jframe

hot hull
#

uhhh

jovial warren
#

you're making your own world generation system? gl lol

hot hull
#

Don't question it Bardy

forest pecan
#

are the numberrs

#

the block ids?

hot hull
#

No, height mapping

forest pecan
#

Ah

hot hull
#

Was the easiest way to atleast visualize it a bit

forest pecan
#

im guessing you make some sort of random chance and floodfill out

#

or smthing

#

did you get the algorithm down

hot hull
#

No, that's why I don't want to move to mc yet

forest pecan
#

Ah

#

I see

#

well idk, this is just a starting point, but for each chunk you could have some sort of chance of spawning a mountain.

#

then find some points where it will be the highest. again it will be random

#

make a recursion out using floodfill

hot hull
#

ew no

forest pecan
#

for each of the floodfill operation

jovial warren
#

you should be using a perlin noise map

forest pecan
#

determine from the surrounding cells

#

if you wanted to

hot hull
#

I'm using perlin noise yea

#

I'm not a mad man

jovial warren
#

lol

forest pecan
#

then how do you not know the algorithm

jovial warren
#

you know what the best part I find about this is?

#

this is the exact pain me and BM are gonna go through with MineKraft lol

prisma wave
#

oh great

jovial warren
#

thanks for the insights

#

also, MineKraft has it worse

hot hull
#

I mean I'll os this so steal if you wish

prisma wave
#

I will probably steal it

jovial warren
#

it not only has to deal with generation, but loading, storing and rendering

hot hull
#

But I mean this is probably gonna take a while to get right

jovial warren
#

we gonna use the same world format as the notchian server or we making our own? lol

hot hull
#

ew imagine storing, just don't restart the server duh

jovial warren
#

imagine having to update to fix important security flaws though

#

and bugs

#

and add new features

#

imagine

hot hull
#

Making a visualizer right now

jovial warren
#

yeah I was gonna say

#

see how it actually looks first

hot hull
#

I mean the idea is to have 3d terrain, especially since 1.17 will increase the height limit

jovial warren
#

also, I swear perlin noise works between 1 and -1

hot hull
#

It does yea

#

It's 0 - 1 btw

jovial warren
#

that's the one

#

so why does yours have negative numbers and numbers greater than 1 in it then?

#

I'm confused lol

hot hull
#

math bardy, math

#

up scaling it cause seeing decimals would get confusing as fuck

#

plus, this would be represented by blocks so decimals aren't of much use

jovial warren
#

dare you to just go with the decimals anyway

#

screw the upscaling

hot hull
#

sec

#

Okay yea nah this is a fucking mess lmao

jovial warren
#

show me

hot hull
#

Also it's apparently negatives as well

#

So it's -1 to 1

jovial warren
#

told you

#

show

hot hull
jovial warren
#

also, if it wasn't negatives, how do you think you'd get negative numbers?

hot hull
#

0.5 < negative, 0.5 > positive ?

jovial warren
#

fair

#

also, me like dis

#

me like numbers

hot hull
#

It really makes it more distinct when you up scale it tho

#

Even with the decimals

jovial warren
#

eh, fair

jovial warren
#

trying to decide if I should work on adapters or MineKraft lol

#

MineKraft it is

prisma wave
#

Lol

#

Uh

#

I'd need to think about that

#

If you're gonna do something can you make it work with 1.16.5 protocol

#

K thx bye

jovial warren
#

it doesn't work with 1.16.5?

prisma wave
#

Nah it was written before 1.16 came out

#

only works with 1.15.2 atm iirc

#

I'm out so will be slow to reply btw

jovial warren
#

what ver you want this to work for btw?

#

just latest or the older ones too?

#

I suppose we can add the old ones afterwards

distant sun
#

Any idea why iij doesn't highlight a project?

ocean quartz
#

Try invalidate and restart

onyx loom
#

when in doubt, invalidate and restart

#

fixes all problems

obtuse pulsar
#

Do I use a special library for paper servers? Or just normal spigot?

#

I want to create a plugin for paper server, do I just use normal spigot dependency?

onyx loom
#

u can use the normal spigot dependency yea

#

but u wont get the upgraded features of paper ofc (if u need them)

hot hull
#

Anyone wanna choose some colors for this?

    DEEP_6(-6, 0),
    DEEP_5(-5, 0),
    DEEP_4(-4, 0),
    DEEP_3(-3, 0),
    DEEP_2(-2, 0),
    DEEP_1(-1, 0),
    DEFAULT(0, 0),
    HIGH_1(1, 0),
    HIGH_2(2, 0),
    HIGH_3(3, 0),
    HIGH_4(4, 0),
    HIGH_5(5, 0),
    HIGH_6(6, 0),

(second value, rgb color)

obtuse pulsar
half harness
#

paper dependency?

#

for gradle?

onyx loom
distant sun
winter iron
#

how do i check if someones jumps through an end portal

#

in the end

onyx loom
#

world change event possibly?

#

or maybe playerteleport, idk

ocean quartz
#

There is an even for that

winter iron
#

PlayerPortalEvent doesnt get fired

#

when they jump in the portal

#

from the end

ocean quartz
#

EntityPortalEnterEvent maybe?
Though i think world change event would probably be better

winter iron
#

how would i do it with world change

#

i need to check for a portal myself?

ocean quartz
#

Probably

ocean quartz
# distant sun nope 😦

Close the project, delete the .idea, go to IJ open new project, select the pom and open the project, then it'll be a maven project
Reason for that is eclipse

forest pecan
#

like in science

#

on of those

#

blue to red

hot hull
#

I just used the standard colors for height mappings

#

If I can get this whore to properly display it

obtuse pulsar
#

Hey, can someone help me with spigot?

forest pecan
#

we need ?main lol

#

don't name your class Main

obtuse pulsar
#

I know, Imma change it later on

hot hull
forest pecan
#

javafx or swing

hot hull
#

swing

forest pecan
#

nice ik that

hot hull
#
        final JFrame frame = new JFrame("Terrain Mapping");
        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        frame.setSize(WIDTH, HEIGHT);
        frame.add(new TerrainMapper(WIDTH, HEIGHT, SCALE, terrain));
        frame.setLocationByPlatform(true);
        frame.pack();
        frame.setVisible(true);

TerrainMapper: https://paste.helpch.at/vetemaqepu.java

forest pecan
#
            for (int x = 0; x < height / scale - 1; x++) {
                final int value = terrain[x][z];

                printout = printout.concat(String.format(" %s ", value));
                final ImageMapper mapper = ImageMapper.getValue(value);
                try {
                    image.setRGB(x, z, new Color(mapper.getR(), mapper.getG(), mapper.getB()).getRGB());

                } catch (final ArrayIndexOutOfBoundsException ignored) {  }
            }

sadge

hot hull
#

Ignore the catch

forest pecan
#

lol

hot hull
#

I got annoyed

forest pecan
#

set the panel visible?

ocean quartz
#

Will make your life much easier

forest pecan
#

unless they are using nms

#

but either then, you can use buildtools

ocean quartz
#

You can use NMS with gradle?

forest pecan
#

if you wanted to

hot hull
#

Same thing Pulse

forest pecan
#

nah the jars can be better than buildtools

unkempt tangle
#

It's happening

ocean quartz
#

Never lol

half harness
#

local maven repo 🙂

#

local maven repo > manually import jars

hot hull
unkempt tangle
#

it's not off topic

#

it's THE topic

half harness
#

yes it is

forest pecan
#

sometimes

#

portability

hot hull
#

Just use clip's repo

half harness
#

👀

#

copy and paste .m2 folder 🙂

forest pecan
#

i did that before

#

lmao

ocean quartz
#

Doesn't change anything lol
Maven local is still better than adding a jar

forest pecan
#

portability

#

idc if its better, setup is harder

#

especially supporting 1.8-1.16

ocean quartz
#

How is it harder? You run buildtools and it's done lol

forest pecan
#

yep how many times?

#

lmao

ocean quartz
#

Once

forest pecan
#

20

half harness
#

👀

half harness
forest pecan
#

1.8 - 1.16?

#

how do you run it once to get all versions?

half harness
#

is there some method to create all at once 👀

ocean quartz
#

The same amount of times you need to run build tools is the same amount of times you need to download and import the jars from all versions

hot hull
#

So any clue as to why nothing appears Pulse?

forest pecan
#

piggy or clip whatever hosts a zip

#

of jar files

#

lmao

#

idrc tho cause either way i just get it easier lol

ocean quartz
#

Lol

forest pecan
#

let me see frosty

ocean quartz
#

@prisma wave @frigid badge Any ORM recommendations? 🥺

half harness
#

pinging trusted 👀

hot hull
#

Hibernate?

frigid badge
#

language?

ocean quartz
#

Java/Kotlin

frigid badge
#

I rarely really use any ORMs in those languages but Hibernate or Exposed seems nice

forest pecan
#

@hot hull try setBackground(Color.BLACK); in the JPanel to make sure it exists first

frigid badge
#

rarely even use those langs 😭

prisma wave
#

Hibernate

#

Actually

ocean quartz
#

Exposed seems weird now that I look at it a bit more

prisma wave
#

Hibernate outside is spring is kinda

ocean quartz
prisma wave
#

I don't like the look of Exposed tbh

frigid badge
#

there's also that other one I mentioned the other day

#

I remember you asking before

hot hull
#

Seems to work

#

Just doesn't write jack shit

frigid badge
#

can't remember the ORM I found though lol

forest pecan
#

Yeah

prisma wave
#

Ebean, bukkit approved!

ocean quartz
#

Also Lemmo, managed to do a JWT authentication with HttpOnly cookies

frigid badge
#

why

#

Authentication header exists for a reason

ocean quartz
#

Saw a bunch of people yelling saying that this is the safest way to handle it, because saving the token to local storage was vulnerable or something like that

forest pecan
# hot hull Just doesn't write jack shit

image.setRGB(x, z, new Color(mapper.getR(), mapper.getG(), mapper.getB()).getRGB()); try setting the color to something like white and leave the black background

#

i want to make sure the imagemapper couldn't be causing the issue

hot hull
#

All black

forest pecan
#

if its still black, its probably something to do with mapper

obtuse pulsar
#

aaaal right

forest pecan
#

maybe print out what the rgb colors are

#

for the mapper

obtuse pulsar
#

I did what you said

half harness
#

no jetbrains toolbox 🤔

obtuse pulsar
#

huh?

half harness
#

nvm

#

anyways

#

lemme send u my build.gradle

#

or matt hi there

forest pecan
#

you need to add the spigot dependency

half harness
#

^

ocean quartz
#

Add compileOnly 'org.spigotmc:spigot-api:1.16.5-R0.1-SNAPSHOT' to your dependencies
And maven { url = 'https://hub.spigotmc.org/nexus/content/repositories/snapshots/' } to the repositories

half harness
#
plugins {
    id 'java'
}

group 'me.dkim19375'
version '1.0-SNAPSHOT'

repositories {
    mavenCentral()
    maven { url = 'https://oss.sonatype.org/content/repositories/snapshots' }
    maven { url = 'https://hub.spigotmc.org/nexus/content/repositories/snapshots/' }
}

dependencies {
    compileOnly 'org.spigotmc:spigot-api:1.16.5-R0.1-SNAPSHOT'
}

processResources {
    from(sourceSets.main.resources.srcDirs) {
        expand 'pluginVersion': version
    }
}
```This is mine 🤷
obtuse pulsar
#
dependencies {
    testImplementation 'org.junit.jupiter:junit-jupiter-api:5.6.0'
    testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine'
}
#

what is that ^

half harness
#

the processResources at the bottom let you put ${pluginVersion} in the version in plugin.yml instead of like 1.0 or something (it'll use the version in build.gradle)

ocean quartz
#

You can remove it, those are used for unit tests

obtuse pulsar
#

can i delete that test folder then too

half harness
#

you can if u want ye

ocean quartz
#

Dkim you don't have to always do that

half harness
#

sorry

#

😦

ocean quartz
#

Yeah you can delete the test folder

forest pecan
#

test folder is for what it stands for, tests. if you want tests you can keep it

#

but most cases you dont need it

half harness
obtuse gale
#

Matt

#

I have something for you to see

forest pecan
#

lol is it that image fefo

#

xD

ocean quartz
#

Not for me i can just click it lol

ocean quartz
obtuse pulsar
#

So I don't need to put spigot in External Libraries?

obtuse gale
half harness
#

my computer sucks

obtuse gale
#

I complain about people /reloading

#

But that

forest pecan
#

how tf do you use ctrl c to restart server

#

tho

#

lol

ocean quartz
#

That is much better, like perfect way to do it!

forest pecan
#

like get a new command prompt

#

and paste the command?

#

lmao

ocean quartz
#

That's the beauty of build tools

half harness
#

then do ctrl + shift + o i think

obtuse pulsar
half harness
#

is there any channel where I can post the image link?

forest pecan
#

you didnt run buildtools

ocean quartz
#

It should have been auto, did you refresh the gradle changes?

half harness
#

so that i dont make a wall in chat 🤷

ocean quartz
half harness
#

no image perms

#

probably no embed perms either, but ill try

#

yep no embed perms either

#

rip

hot hull
#

:why tho:

forest pecan
#

lmao

hot hull
#

Everything is out of bounds

#

The size is 40 tho

forest pecan
#

40x40 array

#

40x40 pixels

#

im guessing

#

right

hot hull
#

No

#

I think the 2d array is the issue

forest pecan
#

oh

hot hull
#

Idk what else to use tho

#

blue being lows, and green being highs

steel heart
#

o

jovial warren
#

noice

#

I'm currently writing NBT data lol

#

this DSL is so nice

#

phat oof

obtuse gale
#

imagine not using adventure-nbt

#

tsk tsk smh

jovial warren
#

didn't know that was a thing

hot hull
#

Fefo probs saved you a lot of time I'm imagining

jovial warren
#

don't think it's gonna be very different

#

since I still gotta write the same amount of data

hot hull
#

Sadge

obtuse gale
jovial warren
#

a fast and lightweight Minecraft server implementation in Kotlin

obtuse gale
#

the only thing you could change is the compression but yikes

jovial warren
#

basically me and BM are rewriting Minecraft server from scratch in Kotlin

half harness
#

wot

#

like recreating bukkit?

jovial warren
#

like recreating NMS

half harness
#

you're joking

jovial warren
#

nope

half harness
#

how tf r u going to do that

#

how

jovial warren
#

it all be documented 'ere matey

half harness
#

oh my

#

make the server not log ips fingerguns

frigid badge
#

you know this gets done a lot in many different languages lol

half harness
#

👀

jovial warren
#

you didn't know that DKIM?

half harness
#

nope

frigid badge
#

lmao

half harness
#

how

#

would you make

jovial warren
#

I think someone wrote one in PHP once xD

half harness
#

a whole mc server

jovial warren
#

it's actually not that hard

#

just packets

half harness
#

thats too much for my brain

frigid badge
#

all you need to do is send and receive packets

jovial warren
#

if this was the client from scratch, I'd be concerned

#

but the server is ez (compared with the client)

prisma wave
#

Servers aren't that complicated

half harness
#

so that the client doesn't go too fast or smth

jovial warren
#

yeah ofc

prisma wave
#

that's not that difficult

jovial warren
#

but that's also documented

prisma wave
#

Probably

half harness
#

oh my

prisma wave
#

yeah literally everything has been reverse engineered and documented

jovial warren
#

if anyone wants to join the project btw, feel free

#

more hands on deck would be useful

hot hull
#

Will we be getting multithreading or can we go fuck ourselves again?

jovial warren
#

oh we're getting coroutines lol

half harness
#

lol

jovial warren
#

better than multithreading™️

hot hull
#

Thank fuck

half harness
#

is using an nbt api worth if u just want to support 1 version

obtuse gale
half harness
#

and don't really need an entire api

hot hull
#

I want to be running a server with 50 players on latest on a microwave Bardy.

jovial warren
#

NBT API?

half harness
#

yes

#

=plugin nbtapi

compact perchBOT
#

v1.0.8 by galaxyoyo
Little NBT API

Downloads:

585

Likes:

0

Reviews:

1

half harness
#

=plugin nbt api

compact perchBOT
#

v2.7.1 by tr7zw
Add custom NBT tags or modify tags of Items/Entities/Tiles without NMS!

Downloads:

73,642

Likes:

75

Reviews:

65

half harness
#

this one

jovial warren
hot hull
#

Would be nice to see atleast some performance improvement

jovial warren
#

we haven't got to the part where everyone else generally just calls it quits yet

#

a.k.a chunks

hot hull
#

Chunks are ez

jovial warren
#

from what I've heard, chunk loading is a nightmare

hot hull
#

efficient chunk loading you mean*

jovial warren
#

I mean what I said

hot hull
#

Just load the entire world, ez claps

half harness
#

i was joking

#

but

#

i said that so ppl can't steal my ip >:)

ocean quartz
#

Lol

jovial warren
#

because running a Minecraft server on anything less than a datacentre-sized supercomputer is not allowed

hot hull
#

Kek

static zealot
#

hmm why am I so bad? I can't really figure how CompleteFor works 😦

hot hull
#

Blitz

winter iron
#

i am using kotlinx for serialization and im tryna serialize some UUID's, should I just convert them to strings then serialize that?

hot hull
#

command/user/PrivateVaultCommand

#

(dev branch)

stuck harbor
#

oops

#

i meant

winter iron
#

erm idk

#

there is a @Contextual annotation

#

i need to use

#

but idk what that does exactly

static zealot
prisma wave
#

Don't use @Contextual

static zealot
#

ty Frosty

winter iron
#

Ok, thats what i was thinking, no idea what contextual even is

prisma wave
#

Basically reflection

#

Like something like Gson would use

#

Whereas kotlinx usually functions by generating classes

#

Which is faster, obviously

winter iron
#

Ok

#

and by make ur own serializer

#

how would i go about that

#

actually

#

u know what

#

forget that

prisma wave
#

make an object extending Serializer<T>

#

Then u reference that in the Serializable annotation

winter iron
#

oh

#

ill just string it

#

🙂

prisma wave
#

lol

#

Ok

old wyvern
#

Gson

#

ez

stuck harbor
#

gson is good

#

slow but simple

prisma wave
#

improt elara/json

stuck harbor
#

lol

#

improt

old wyvern
prisma wave
#

let text = toJson(struct)

stuck harbor
#

bm is improt x the import syntax for elara?

#

i wonder what improt means

prisma wave
#

yup

old wyvern
#

improt

stuck harbor
#

we may never know the genius of bm

prisma wave
#

pakage main
improt main.mane

old wyvern
#

improt iwanio

iwanio.delete()

stuck harbor
#

aaaaaa

prisma wave
#

🥶

old wyvern
#

Reality bending powers

#

Elara is truely amazing

#

People be theorizing what happened in WandaVision

#

Little do they know...

prisma wave
#

Spoilers

#

yes

#

I'm sure elara did whatever happened

old wyvern
#

🪄

heady birch
prisma wave
#

amazing

heady birch
#

Thought you were british?

#

Amasing

prisma wave
#

Bloomin bloody brill mate

winter iron
#

Ok

#

bm

#

long story short

#

i wanna make my own serializer now

prisma wave
#

Ok

ocean quartz
#

I thought he was aussie

#

ƃuᴉzɐɯ∀

winter iron
#
object UUIDSerializer : KSerializer<UUID> {

    override val descriptor: SerialDescriptor = PrimitiveSerialDescriptor("UUID", PrimitiveKind.STRING)

    override fun serialize(encoder: Encoder, value: UUID) {
        encoder.encodeString(value.toString())
    }

    override fun deserialize(decoder: Decoder) : UUID {
        return UUID.fromString(decoder.decodeString())
    }
}
#

this is what i have

obtuse pulsar
#

How can I with meta.setDisplayName(); give item a colorful and bold name?

prisma wave
#

Looks fine

#

Oh yeah KSerializer*

obtuse pulsar
#

just &6?

prisma wave
#

Use the ChatColor enum

obtuse pulsar
#

ok wow thnks

#

Wait wat

prisma wave
#

You can't use &

ocean quartz
#

Lmao

prisma wave
#

Well

#

Either use ChatColor.COLOR or ChatColor.translate

#

Can someone else type it

#

I cba

half harness
#

d;spigot chatcolor#translate

ruby craterBOT
half harness
#

ez

#

oh

#

no ez

obtuse gale
#

lmao

winter iron
#
@Serializable(UUIDSerializer::class)

and i use this to use the serializer

prisma wave
#

Classic docdex

half harness
#

y not just use string to serialize uuid

winter iron
#

what if i want more tho

prisma wave
#

wdym

winter iron
#

like 2 different serializers

#

like

#

i have one for UUID

#

maybe some other object

#

or class

#

like

#

er

#

i can only use one

prisma wave
#

you can use @Serializable on a field / property / parameter

winter iron
#

OH

prisma wave
#

You use an empty annotation on the class

#

And then specify a Serializer for a property

winter iron
#
@Serializable
data class ChefSellRunnableData(@Serializable(UUIDSerializer::class) private val uuid: UUID,
                                private val timeRemaining: Int,
                                private val initialSellPrice: Double) {
#

big brain

prisma wave
#

massive brain

winter iron
#

🤯

old wyvern
#

🤢

winter iron
#

😮

#

😠

prisma wave
#

Ima be honest a struct would be a lot cleaner there

obtuse pulsar
#

I have an item, how can I add a certain "flag" or "meta data" to it?

winter iron
#

wus a struct

#

:?

obtuse pulsar
#

Which wont show ingame?

static zealot
#

why when I find a project to work on I don't feel like it but 2 days ago I was so border I didn't know what to work on.

static zealot
prisma wave
winter iron
#

ah

#

lol

#

i thought it was another kotlin concept, i was gonna be amazed

prisma wave
#

nah sadly not this time

winter iron
#

idk why but annotations make code look cool

#

¯_(ツ)_/¯

#

I think its the yellow

static zealot
#

no 😦

#

I hate annotations

winter iron
#

it hits different

prisma wave
#

annotations are monads for people with no imagination

obtuse pulsar
#

is addAttributeModifier nbt tags

#

or addItemFlags

static zealot
prisma wave
#

yeah i got one dw

#

the album's getting big now clojuremoon

hot hull
#

That's not getting removed

half harness
#

lol

prisma wave
#

the so called "not corrupt" mods

#

cant believe i have to change my lambda calculus username but this sort of thing is fine apparently

obtuse pulsar
#

How Do I Add an NTB tag to an item?

half harness
#

googleeeeee

obtuse pulsar
#

Is this the best way to later on check if right-click and with the stick with ntb tag = lol

half harness
#

there are like a billion tutorials and apis

obtuse pulsar
#

shouldnt i use addAttributeModifier or AddIItemFlag

hot hull
#

Neither are related

obtuse pulsar
#

I just need a way to later on identify that exact item.

hot hull
#

Google nbt api

pastel halo
#

anyone good at making plugins?

#

really need someone who can at least configure them

#

Working on a really big project

#

I need a team

obtuse pulsar
#

Like

/awesomestick

Later in code:
on RightCLick
if clicked with the awesomestick

hot hull
prisma wave
hot hull
#

Yes Enebz, set a custom nbt tag to the item and then check if the item they right clicked with contains that nbt tag

obtuse pulsar
#

This for example?

prisma wave
#

if you're on a sane version there's a built-in API

pastel halo
obtuse pulsar
#

I need 1.16.5

prisma wave
#

good

#

PersistentDataContainer then

obtuse pulsar
prisma wave
#

wait

#

actually

#

that might not work for itemstacks

#

i dont remember

obtuse pulsar
#

lemme get a can of fanta real quick

prisma wave
#

maybe just use nbt-api

obtuse pulsar
#

ok, i dont like adding whole api for such a feature

#

should be inbuilt

prisma wave
#

welcome to spigot 🙃

half harness
#

then use nms

prisma wave
#

you can shade the api

ocean quartz
#

PDC works for ItemStacks

obtuse pulsar
#

So what is PDC

ocean quartz
#

PersistentDataContainer is the API's access to NBT data, 1.14+

obtuse gale
#

Not quite full NBT access

#

you get your own namespace for your plugin and.. that's it, you can't access anything outside of it plugin scopes

hot hull
#

Well I mean you can get another plugins namespace

steel heart
#

spigot api moment

obtuse pulsar
lunar cypress
steel heart
#

I think I found orgasm

#

Using an interface to create a registry of constants

unkempt tangle
#

how is dis even possible

#

This is just a map

half harness
#

lol u just see me sneaking

unkempt tangle
#

"sneaking"

half harness
#

and bhopping

#

and killauring

#

since i only have 1.16 hack client

unkempt tangle
#

How did they add a working dialog system here.

half harness
#

🤷

golden gust
#

Any devs online that could help me update a plug-in from 1.12 to support 1.16+

steel heart
#

Shouldn’t be too complicated

oblique heath
#

hello humans

regal gale
#

Hi human

oblique heath
#

dont mind the messy code i threw this together in like 15 minutes

#

[note both below examples are running 10x less tests than my pastebin link has]
with 1 thread:

Thread-0 running 100000000 tests!
0% done on Thread-0
...
90% done on Thread-0
results: 
good: 16199/100000000
0.016199%
time: 2980ms

with 4 threads:

Thread-1 running 25000000 tests!
Thread-3 running 25000000 tests!
0% done on Thread-3
Thread-2 running 25000000 tests!
0% done on Thread-2
Thread-0 running 25000000 tests!
0% done on Thread-0
...
90% done on Thread-3
results: 
good: 16208/100000000
0.016208%
time: 16025ms
tranquil crane
#

Are you having to synchronize on something to increase that counter?

oblique heath
#

no, i have 4 futures that return integers representing the number of good rolls

tranquil crane
#

sorry I didn't even see you posted the code lol

oblique heath
#

it's all good lol

#
int total = 0;
for (Future<Integer> f : results) {
    total += f.get();
}

is what i use to get the final result - this runs on the main thread

oblique heath
#

ah, i found the reason this was so painfully slow

#

looks like there's a reason people use splittableRandoms instead of new Random() or Math.random()

#

🥲

obtuse gale
#

Eyup

#

It's sort of meant to be used in parallel computation

golden gust
#

Any devs good with NMS please message me. Need help updating a plug-in. Thanks to Mackenzie, I now know this 😂

half harness
#

NMS 😬

ocean quartz
golden gust
ocean quartz
#

It's better to ask your NMS question in #development than have someone specific message you

golden gust
#

Just need help updating a plug-in for 1.16+ since it's no longer under development. That's all it is. But I posted there.

half harness
#
*** The version you have requested to build requires Java versions between [Java 8, Java 10], but you are using Java 11
*** Please rerun BuildTools using an appropriate Java version. For obvious reasons outdated MC versions do not support Java versions that did not exist at their release.
```lmao
#

this is funny

#
@echo off
set /p version=What version?
java -jar BuildTools.jar --rev %version%
PAUSE
```just made my own batch script 😎
regal gale
#

Uhm... cool?

half harness
#

lol

regal gale
#

Anyone who used to be like me who just rigs all the variable of NMS PlayerInteractManager and EntityPlayer just to find the suitable one thonking

half harness
#

lol

oak raft
half harness
#

yes

#

it was

#

xD

half harness
#

ive never been on hypixel with it tho

oak raft
#

you've already been reported

half harness
#

i use it to test anticheats

#

i have like 10 anticheat test servers on my server list

#

and I have Matrix premium

#

and tested about every free anticheat out there i could find

#

btw what does the cap emoji mean?

oak raft
#

-.-

half harness
#

u keep replying with it

oak raft
#

it means lies

half harness
#

oh

#

-_-

oak raft
#

🚚 🧢 🧢 🧢

#

needed to bring in a new truckload of caps

half harness
#

-_-

oak raft
#

cuz ur sending too much cap

half harness
#

.....

#

🙄 im not lying

oak raft
#

hypixel himself is reviewing my report rn

half harness
#

link? >:)

oak raft
#

nope, cuz ur gonna reply and say its false and I cant have that

half harness
#

.-.

oak raft
#

enjoy the ban 🙄

half harness
#

🙂

burnt path
#

oi

obtuse gale
#

the whole cap emoji thing is the dumbest thing ever

#

hello i need help

#

how make thing same but different

#

Basically I want different pages, each page representing a table in a database,

#

which loads all the rows, etc, and lets me edit them, ive already got the rest api built up, i just dont know the best way to do tihs

hot hull
#

Why does gradle just break sometimes randomly lol

obtuse gale
#

tf is pascal

regal gale
#

?

#

A bit of g👀gle might help there

obtuse gale
#

it looks old

hot hull
#

wHeReS tHe WaTeR

old wyvern
#

What are you using to create the water streams?

hot hull
#

I fucked up the colors so water isn't visible

old wyvern
#

ah

hot hull
#

But I mean that looks really cool

old wyvern
#

Generate worlds using CBR fingerguns

hot hull
#

cbr?

old wyvern
#

Cosmic Background Radiation

hot hull
#

The fuck

old wyvern
#

Cosmic background radiation is electromagnetic radiation from the Big Bang. The origin of this radiation depends on the region of the spectrum that is observed. One component is the cosmic microwave background. This component is redshifted photons that have freely streamed from an epoch when the Universe became transparent for the first time to...

#

the 'k' was on my clipboard for some reason xD

#

I was pasting this

hot hull
#

lol

#

Same effect could be gotten with perlin tho would it not

old wyvern
#

But would the terrain generated be a direct outcome of the big bang? no xD

hot hull
#

Will add that as a preset

old wyvern
#

I was joking btw

#

I dont think you can get accurate reading of that

#

But its noise too

#

Like the static we get on old televisions are supposed to be CBR i think? not sure

hot hull
old wyvern
#

Whats wrong?

hot hull
#

Water not showing up, and I can't figure out why

old wyvern
#

As in the color?

hot hull
#

Yea

old wyvern
#

Show us your render function

hot hull
old wyvern
#

um wait

#

Why is your depths part of each other's intervals?

#

Deep_6 => [-20, -50]
Deep_5 => [-15, -19]

hot hull
#

values from to

old wyvern
#

No I meant the deptch

#

depth

hot hull
#

Just represents as what color it should be displayed

#

If it's from -15 to -19 it's DEEP_5

#

Unless I'm misunderstanding what you're trynna say

old wyvern
#

I mean as in is that not a misrepresentation of depth?

hot hull
#

It's just some basic visualization

#

It's not necesary for it to be accurrate completelly rn

old wyvern
#

That not what I mean frost

hot hull
#

Elaborate

old wyvern
#

Your noise map seems to be right but the depth ranges should be mutually exclusive afaik

hot hull
#

8:20am, no fancy words please

old wyvern
#

as in (-50, -20] could be depth 6
and the next range would be (-20, -10]
next being (-10, 0]
...ect...

hot hull
#

I guess

old wyvern
#

Yea but currently your ranges completely overlap one another

#

actually wait

hot hull
#

Still doesn't change the fact that negatives don't work :p

old wyvern
#

only the 1st one is off

#

DEEP_6

#

that one include all the others for some reason

hot hull
#

How tho

old wyvern
#

DEEP_6(-20, -50

#

oh wait no

#

xD

#

Kill me

hot hull
#

from is exclusive

old wyvern
#

my brain in the morning 😂

#

Which range is the grey color btw?

hot hull
#

gray color is 0 0

regal gale
#

0,0

old wyvern
#

DEFAULT?

hot hull
#

Yea

old wyvern
#

ok

hot hull
#

Lemme see if IJ displays colors properly

regal gale
#

Maybe the declared value was never negative?

hot hull
#

It was

regal gale
#

Did you debug that yet?

hot hull
hot hull
old wyvern
#

Try printing out value whenever mapper is null

hot hull
old wyvern
#

oh tea

#

found your issue

#

Your negative range should be inverted

#

switch from and to values for negative ones

hot hull
#

Okay yea that makes sense

#

world generation efe

jovial warren
#

Nice

#

Dis in Kotlin btw?

#

If so, makes it even better when we steal it for MineKraft

hot hull
#

No it's in java

#

java cleaner for testing imo

#

THis is new

prisma wave
#

I would say kotlin is better for hacking things together

#

Java's better for more robust stuff

#

Enterprise, you might say

hot hull
#

I find java a lot cleaner

obtuse gale
#

idk why but ive really been not liking kotlin recently

hot hull
#

(when you don't have everything already figured out)

#

FrozenJoin is the prime example of that, it's just stuff hacked up together and it looks like shit

prisma wave
#

obviously you can hack stuff in any language

#

But

#

I think kotlin's extra flexibility means it's much more hackable

old wyvern
#

No, we should hack stuff together in Prolog 🙂

prisma wave
#

I wanna learn Prolog

#

It sounds cool

old wyvern
#

😬

hot hull
#

now onto 3d generation, please do someone bring me a rope

#

Although lemme see if I can see how it looks like in mc rn

#

Oh I'm stoopid

obtuse gale
#

is pascal still used?

#

its been listed as like a suggested language for one of my classes, but google seems to tell me it outdated lol

hot hull
old wyvern
#

Show us your chunk gen class?

obtuse gale
#

tf is int[][]

#

is this some high level java i just never learnt or smthn lol

hot hull
#

2d array

obtuse gale
#

then what dimension is a normal array 🤔

hot hull
#

There's also int[][][]

#

Which is even more fun

#

Aj, ie:

array int[] -> array[x]
array int[][] -> array[x][z]
array int[][][] -> array[x][y][z]
obtuse gale
#

o so its like an array in an array or something? Like when you fetch something from the array you get an array back?

hot hull
#

normal array is 1d since only one position

#

Yes

regal gale
#

Aka: array tree 👀

obtuse gale
#

whats it look like in kotlin

hot hull
#

burn efe.

obtuse gale
#

is it equivilent to like Array<Array<Something>>

regal gale
#

Array<Array<Array<Object>>>

hot hull
#

disgusting

regal gale
#

2d arr in java is just like 2 arrays inside 1 array lol

#

Which, of course, looks ew

hot hull
#

So anyone got any clue as to why it generates only one chunk?

#

The provided heights are all valid so it's an issue with the chunk data, but I've no idea what

prisma wave
obtuse gale
#

This list also has ActionScripting for Flash on it

prisma wave
#

😩

#

sounds pretty ancient

obtuse gale
regal gale
#

Pascal is still being studied most commonly here

obtuse gale
#

also never heard of BASIC

regal gale
#

Grade 8 and 11 at school

lunar cypress
#

BASIC was a programming language for computers in the 80s and early 90s

#

It has essentially no use anymore

prisma wave
#

yeah BASIC is ancient

#

also the "Java Script" in 2 words kinda says a lot

regal gale
#

Lmao

obtuse gale
prisma wave
#

god

#

i dont think any of those languages are regularly used

lunar cypress
#

eh, VB is whatever

obtuse gale
#

the only one ive heard of on that list is vb

prisma wave
#

yeah VB and flash are probably the most common

lunar cypress
#

Delphi... well...

prisma wave
#

but they're both kinda

#

😐

lunar cypress
#

I think that's some derivative of Pascal

prisma wave
#

yeah

#

we're allowed to use "Pascal/Delphi" in our course

old wyvern
prisma wave
#

except nobody does

regal gale
#

I thought Adobe Flash has been cancelled by now? thonking

prisma wave
#

it has

#

it was deprecated for years

jovial warren
#

but like with Windows 7, no matter how many times you tell people to upgrade, people don't listen

obtuse gale
#

@ frosty

prisma wave
#

well flash has been removed since 2021

jovial warren
#

good

hot hull
jovial warren
#

also, whoever said chunk loading is ez btw, show me the ways senpais

obtuse gale
#

ooh fancy with pro

hot hull
#

kek Bardy

jovial warren
hot hull
#

Still noone was able to give me atleast an assumptions as to why it would only generate a single chunk

jovial warren
#

I got to heightmaps and just went

#

and now I'm at chunk data

old wyvern
old wyvern
#

Also try generating the noise for that location when needed rather than pregenerating a 2d array

hot hull
#

I'm gonna have to do that yea for infinite worlds, however it fucks stuff up so I'm just trying it out in a predefined area

#

can a 2d array not be negative values or am I stupid

lunar cypress
hot hull
#

Yes or No

lunar cypress
#

can a 2d array not be negative values
what does this mean

hot hull
#

Can an array index not be a negative value

lunar cypress
#

An array index cannot be a negative value

hot hull
#

Okay just read that back to myself

prisma wave
#

pretty sure it can in c

jovial warren
#

or am I getting confused

#

since the protocol page says it's a byte array, but that page says array of chunk section

prisma wave
#

you just write a short

lunar cypress
#

it's all bytes

prisma wave
#

yeah

lunar cypress
#

You encode it

prisma wave
#

a short is just multiple bytes afaik

jovial warren
#

yeah

#

I'm confused on 1. whether it means a byte array or a chunk section array and 2. how I can convert a chunk section array to raw bytes

prisma wave
#

the same as any array

#

you write the length, and then the elements

jovial warren
#

yeah ik that

#

but what are the elements meant to be?

#

I don't get how I'm supposed to write this

prisma wave
#

Chunk Sections

#

A Chunk Section is defined in terms of other data types.

lunar cypress
#

I think you might be confused by the fact that there are 2 "Data" fields

prisma wave
#

there are no "object headers" here

#

it's just the parts sequentially

jovial warren
#
byteArrayOf(
    blockCount,
    bitsPerBlock,
    palette,
    dataArrayLength,
    dataArray
)
```seems wrong to me
prisma wave
#

probably because that is wrong

lunar cypress
#

because it is

jovial warren
#

gimme an example

#

I learn by examples

prisma wave
#

writeLength()
for each section {
writeBlockCount
writeBitsPerBlock
etc
}

jovial warren
#

ah right

#

so ```kotlin
for (section in sections) {
buf.writeShort()
// etc.
}

prisma wave
#

mhm

jovial warren
#

alright, cheers

#

also, for the palette, if it says 14 bits per block means no fields, I just send nothing for the palette right?

prisma wave
#

where does it say that

hot hull
#

No errors no nothing, just only generates a single chunk

jovial warren
#

look under palettes

prisma wave
#

i am

#

where does it say 14 bits means no fields

#

nvm found it

jovial warren
#

direct

#

= 9 = no fields

prisma wave
#

yeah i think you'd write 14 for bits per block and then just send nothing for the palette

prisma wave
#

setBlock expects numbers of 0-15

#

so im guessing it's only setting when chunkX and chunkZ are 0 or 1

#

since

Setting blocks outside the chunk's bounds does nothing.

hot hull
#

oh yea forgot to change that from when I wasn't generating when it's called

jovial warren
#

also, if there's only 1 block, I only need to send data for one block right? lol

prisma wave
#

in the palette?

#

or in the data array

hot hull
jovial warren
hot hull
#

That's why pregening better pog

jovial warren
#

lol

prisma wave
hot hull
#

Oh I know why the pregening didn't work now..

#

Smh

prisma wave
#

i think

jovial warren
#

trying to figure out how I know what long to send for just grass

hot hull
prisma wave
#

that looks good

hot hull
#

It actually looks amazing

jovial warren
hot hull
#

kek

prisma wave
hot hull
#

holes

#

Only gening the grass layer rn

prisma wave
#

ahh nice

jovial warren
#

omg Microsoft are god tier

hot hull
#

Time to crash the server by generating a 10kx10k terrain

#

nvm it only took like 5 sec

old wyvern
#

Now time for perlin worms??

hot hull
#

Trying to get a more natural generation first

#

Cause it's too round rn

old wyvern
#

You'll need worms for cliffs and stuff afaik too

hot hull
#

mhm

oak coyote
#

Looking good nice to see people creating new generators

hot hull
#

the meaning of octaves confuses the shit out of me

#

What y does water generate at?

winter iron
#

ocean is 60 i think

hot hull
jovial warren
#

nice

static zealot
#

Minecraft terrain generation soon™️

quiet depot
distant sun
#

easy

#

what's that @hot hull

hot hull
#

huh Gaby

distant sun
hot hull
#

world generation

distant sun
#

ok

hot hull
#

"ok"

distant sun
#

ok

hot hull
#

Would it make sense to make it so if it's a positive value it has a chance to apply an amplitude (for easier mountain generation)

prisma wave
#

"In, say, Java, the JVM must check for null pointers and throw an exception if you deference one." Java's implicit null check is (mostly) costless. Java implementations can and do take advantage of virtual memory to map the null address to a missing page, so dereferencing a null pointer triggers a page fault at the CPU level, which Java catches and throws as a high-level exception. So most null checks get done by the memory mapping unit in the CPU, for free.
that's pretty interesting

hot hull
regal gale
#

Looks spikey in a way

hot hull
#

Cause it is :p

regal gale
#

Beautiful

hot hull
onyx loom
#

u ugly

hot hull
#

wow rude

distant sun
hot hull
#

Perhaps

#

"gui shit thing" wow

unkempt tangle
hot hull
#

It's a terrain visualizer, so I don't have to look at numbers to imagine how it would look like

#

good good

unkempt tangle
#

bad

distant sun
hot hull
#

Would having some kind of meshes which would represent chunks make sense? Using the logic that, that would significantly ease stuff like populating trees, setting biomes, caves, etc

#

Why wouldn't it run Gaby?

distant sun
#

users#get(uuid) is called on line 9

#

and then a null check on line 11

hot hull
#

Yea I mean that would run, so long it's present in the map

distant sun
#

right but if the uuid is present on the map at first it will stop there

#

then at the bottom it just does the same check

#

if (FlightUser is not null) do

#

anyways

hot hull
#

I see yea

#

That's kek

#

wait no

steel heart
#

OMG

hot hull
#

God my brain

steel heart
#

Functional programming is actually good lol

prisma wave
#

obviously

prisma wave
steel heart
#

Like side effects

#

cant relate