#dev-general

1 messages · Page 69 of 1

distant sun
#

and soul

hot hull
#

so destroyed liver, and a dark soul mk

#

@floral basin aNsWeR mE

floral basin
#

send pictures

hot hull
#

cheeky

#

@floral basin this is the list of em

    DH_17(8, "&bBlaster", Material.WOODEN_HOE),
    A_280(14, "&bBlaster Rifle", Material.WOODEN_HOE),
    DL_44(4, "&bHeavy Blaster", Material.WOODEN_HOE),
    T_21(12, "&bSporting Blaster", Material.WOODEN_HOE),

    EMPEROR_4(2, "&cBeam Tube", Material.WOODEN_HOE),
    ION_BLASTER(2, "&cIonization Blaster", Material.WOODEN_HOE),
    BOW_CASTER(1, "&cBow Caster", Material.WOODEN_HOE),

    DX_2(6, "&6Disruptor Pistol", Material.WOODEN_HOE),
    DXR_6(18, "&6Disruptor Rifle", Material.WOODEN_HOE),
    SD_77(10, "&6Sonic Pistol", Material.WOODEN_HOE),
    SG_82(3, "&6Sonic Rifle", Material.WOODEN_HOE),

    C_22(10, "&5Flame Carbine", Material.WOODEN_HOE),
    CR_24(10, "&5Flame Rifle", Material.WOODEN_HOE),
    PLX_2M(1, "&5Missile Launcher", Material.WOODEN_HOE);
floral basin
#

oh boy give me a sec

obtuse gale
#

Why everything is a wooden hoe 😂

floral basin
#

They're using damage values

hot hull
#

^

floral basin
#

its how people take advantage of resource packs while not disturbing vanilla items

hot hull
#

Also, how do I download shit from sketchfab

#

Like found this, but can I even download it?

floral basin
#

You can't unless they allow it to be downloaded

hot hull
#

I see

floral basin
#

I've only looked through half but I would just assume its safe to say $75 for 14 full models mixed between large and small

#

@hot hull

hot hull
#

Ok ya keine danke

floral basin
#

huh

hot hull
#

Not trynna go bankrupt for models which I'm gonna use once so gonna download from the interwebs :p

floral basin
#

what are you even using them for

hot hull
#

Got a clue how to conver the .obj to a json model?

It's for a contest :p

#

Making laser tag and I need some models

floral basin
#

Yeah I can convert obj to a model but its sketchy

distant sun
#

Pretty sure you can use Blockbench or smth

hot hull
#

lemme try

floral basin
#

It makes the models messy and I have to color them myself still

hot hull
#

Ah, that's kinda lame

distant sun
hot hull
#

Doesn't even detect the .obj GWseremePeepoThink

floral basin
#

I'll show you an example

hot hull
#

I'd appreciate that, still waiting for the invoice :p

floral basin
#

oh fuck

#

you didn't remind me

#

what is it for again? the other 2 months, yeah?

hot hull
#

ye

floral basin
#

The only thing I dont like about blockbench is that its element based

distant sun
#

I mean, that's an object, they can do whatever they want

floral basin
#

Element based models look nice if you spend the hours on it

distant sun
#

while on minecraft you are limited to dumb rotations and shit

floral basin
#

but voxel models are much easier and can be much more detailed, and less blocky

distant sun
#

do you have rotations?

hot hull
#

22 degreess increments

floral basin
#

wdym

distant sun
#

Angle shit like blockbench

floral basin
#

oh

#

idk

#

Its all voxels so yeah

distant sun
#

you are gonna tell me that someone even made that engine on bird's chest?? https://sketchfab.com/3d-models/mechanical-graboid-ass-blaster-firebreathing-cb4dcf3080924f119632ef7c3225da13

Hard surface practice based on Hard Surface Modeling In Blender course by Aidy Burrows & Gleb Alexandrov. Also fan-art for Tremors 3 and those wonderful beasts called Graboids.
Blender and Substance Painter.
https://www.artstation.com/artwork/QzmWeL - Mechanical Graboid Ass ...

▶ Play video
floral basin
#

@hot hull Before and after the convert

#

okay this was a terrible example

#

it actually doesn't look that bad but....

distant sun
#

what do you expect Drew

floral basin
#

if I lower the voxel resolution

hot hull
#

Yea I get what you mean

floral basin
hot hull
#

Mind explaining to me how I can open the .obj format inside blockbench?

floral basin
#

Holy fuck

#

This looks great at x128

#

Idk how block bench works

distant sun
#

@floral basin what's your sketchfab profile?

floral basin
#

drewmagic21 I think

hot hull
#

If I find a few models mind converting them? :p

floral basin
#

I mean sure but coloring them costs me time you know

hot hull
#

pure black

distant sun
#

I really wish I knew how to do art stuff tbh

#

looks good btw drew

floral basin
#

I cant do art for the life of me

#

models are different

distant sun
#

I mean, anything art related xd

pallid gale
#

just find a model with colour

#

ez

distant sun
#

Drawings, models etc.

pallid gale
#

That's what pigs one was

floral basin
#

The rocket?

pallid gale
#

Yeah

floral basin
#

That was made for MC

#

100%

distant sun
#

yes, fc just took the rocket from SpaceX and turned it into voxels ez

floral basin
#

Thats why it had color, cause it was a json

pallid gale
#

it was a .obj

floral basin
#

how did you import the mtl with it?

pallid gale
#

pro hacks

floral basin
distant sun
#

"Open .obj" hacks

pallid gale
#

also cause i have a licence to cubix which does all the hard work

floral basin
#

Cubik

pallid gale
#

shh

floral basin
pallid gale
#

k ur just trash

floral basin
#

no u

#

I love cubik

topaz bay
#

I'm going to kms

floral basin
#

best one out there

#

Oh for fuck sakes

topaz bay
#

fix it

#

FIX IT

obtuse gale
#

Haha

topaz bay
#

NOW

floral basin
#

How the fuck are you the first one to notice that

#

when its been up for like a year

topaz bay
#

published 2 years ago

#

dear god

#

My brain

#

it hurts

distant sun
#

sxtanna discovered OCD

#

That's how

topaz bay
#

I been discovered OCD

floral basin
#

idfk what I named the rocket in my models folder

distant sun
#

btw your google website is so slow drew

topaz bay
#

google.... website?

#

👀

distant sun
hot hull
#

Drew, so how do I open an obj file?

topaz bay
#

why though?

#

👀

floral basin
#

Gaby thats because its loading a million model previews

topaz bay
#

You can host sites on google's servers for free

#

with your own domain

#

:)

floral basin
#

Frosty if you're using blockbench idk

hot hull
#

yt it is

floral basin
#

just dm me your obj things and ill convert it

#

if you want the models to just be one color thats easy

hot hull
#

Yea not going for anything fancy

#

gimme a few

distant sun
#

good old bucket tool

floral basin
#

Hell yeah

distant sun
#

that reminds me of paint

#

and all my artworks

floral basin
#

paint

#

Paint.

distant sun
#

Gaby thats because its loading a million model previews
@floral basin well idc, I want to see your stuff not loading bars

#

The tool 🤦‍♂️ not the interface

hot hull
#

What's with some having a .fbx thonking

floral basin
#

idk

#

just use some online mesh converter

#

Gaby what page are you complaining about

distant sun
#

ALL

floral basin
#

I think thats ur internet speed chief

distant sun
#

can be

#

cant wait to buy a new router and highest internet plan

hot hull
#

ah yes paying 300$ a month for good download speed

distant sun
#

no lol

floral basin
#

I don't have good download speed at this house

distant sun
#

10$ for 1GBp/s

floral basin
#

I get like 10 down and 0.5 up

distant sun
#

0.5 uhh

floral basin
distant sun
#

a little too square

floral basin
#

its minecraft

#

and you're telling me something is too square

distant sun
#

smh

floral basin
#

:dead

#

wth

#

I cant use external emojis here

distant sun
#

are the shades from the website or?

floral basin
#

yeah

#

Sketchfab tries to do it to make some models look better

distant sun
floral basin
#

a little too round

#

:lul:

distant sun
#

lmao

signal tinsel
#

ima make my own holograms api

obtuse gale
#

Uh.. good luck 😂

signal tinsel
#

yes

#

ty

#

will need lol

#

I have no clue how this shit works

#

I've only ever used holodisplays api

#

LOL

proper patio
#

What is people developing today?

hot hull
#

Flying rockets

proper patio
#

With armor stands?

hot hull
proper patio
#

Huh?

proper patio
#

Ok

steel heart
#

@prisma wave it’s ok Kotlin is gonna save you anyways

prisma wave
#

always

steel heart
#

But for the record you’re above averege when it comes to short humans (:

prisma wave
#

I'm gonna take that as a compliment

#

it probably isn't

#

but being an above average short person is something i can live with

steel heart
#

makeCompliment()

hot hull
#

!makeCompliment()

topaz bay
#

Hes literally 5'2

#

Hes below average at best

steel heart
#

Haha

prisma wave
#

D:

#

y'all are cruel

steel heart
#

Its ok, only being that is actually long is Hagrid

topaz bay
#

HELLO!?!?

prisma wave
#

he is very long

topaz bay
#

Madame Maxine

#

You SWINE

steel heart
#

Haha oh I forgot

topaz bay
#

Shes taller than him

prisma wave
#

aha

steel heart
#

Well Sxt you’re like doby

topaz bay
#

Im ok with this

quiet depot
distant sun
#

makeCompliment()
@steel heart dev talk @quiet depot

#

sry bro

topaz bay
#

@quiet depot its only off topic if there was already a topic

#

😉

prisma wave
steel heart
#

Yes

#

Looks like script tbh

prisma wave
#

I'm considering DSLing it

hot hull
#

I mean it looks kinda neat..

prisma wave
#

thank you

quiet depot
#

DSLing?

steel heart
#

Too big tabs

prisma wave
#

yeah

quiet depot
#

do you mean DELETing

prisma wave
#

making it into a dsl

#

D:

topaz bay
#

meh

hot hull
#

Although that color = Color.RED looks meh

topaz bay
#

Looks about right

hot hull
#

Yucky

prisma wave
#

that looks worse imo

#

i will try with a dsl

#

can't be too much effort

topaz bay
#

wow...

#

fucking hater

prisma wave
#

soz

quiet depot
#

sx is kotlin the best language?

topaz bay
#

Subjectively. Yes.

quiet depot
#

why’d u make ur server in go then?

prisma wave
#

it fast

topaz bay
#

Because the language isnt everything

quiet depot
#

kotlin can be fast

prisma wave
#

true

topaz bay
#

plus Ive already made a server in kotlin

quiet depot
#

why da hek does forge not request the client to download mods yet

#

they’ve had years

topaz bay
#

Probably because they dont use kotlin

distant sun
#

That would be perfect

topaz bay
#

And extremely insecure

prisma wave
#
        response {
          version {
            name = "1.15.2"
            protocol = 578
          }
          players {
            max = 100
            online = 2
            sample = setOf(PlayerInfo("Hello"), PlayerInfo("World"))
          }
          description = chat {
            message = "Welcome to my server"
            bold = true
            color = Color.RED
          }
        }```
hypothetically would this be nicer do you think?
#

version I can bring into an enum at some point

distant sun
#

question, why does the format looks the same?

prisma wave
#

wdym?

distant sun
#

Is that smth from minecraft?

#

yours and sx's

prisma wave
#

oh

#

yeah it's the structure of the status response packet

distant sun
#

I see

prisma wave
#
{
    "version": {
        "name": "1.8.7",
        "protocol": 47
    },
    "players": {
        "max": 100,
        "online": 5,
        "sample": [
            {
                "name": "thinkofdeath",
                "id": "4566e69f-c907-48ee-8d71-d7ba5aa00d20"
            }
        ]
    },    
    "description": {
        "text": "Hello world"
    },
    "favicon": "data:image/png;base64,<data>"
}``` @distant sun the actual data that the client uses looks like this
topaz bay
#
version {
  name: "1.15.2"
  protocol: 578
}
players {
  max: 100
  online: 2
  sample: [{name: "Hello"}, {name: "World"}]
}
description {
  message: "Welcome to my server"
  bold: true
  color: RED
}
#

Would be better in korm

#

JUST saying

prisma wave
#

perhaps

distant sun
#

do you guys plan to do smth with this or just for fun?

prisma wave
#

mine is just for fun

topaz bay
#

Mine is going to change the wooorrrrrlllldddd

#

smile

prisma wave
#

it will make the world worse

distant sun
#

SxtannaChangeWorldEvent

prisma wave
#

e.setCancelled(true)

distant sun
#

I wanted to do that but .. :)))

topaz bay
#

@prisma wave you fucking HATER

prisma wave
#

yess

topaz bay
#

LMFAO

distant sun
#

@prisma wave true*

prisma wave
#

oh yeah mb

#

haven't updated yet

hot hull
#

Instead of debating here, can someone give me a hand in #development

#

Thanks

modern trench
#

@hot hull A little question, how can I make a 24 hour timer that executes an action, but in turn when I need the remaining time of this, I can use it?

quiet depot
modern trench
#

Sorry

hot hull
#

Imagine asking me a development question, eee

prisma wave
obtuse gale
#

Thought it was json for a while 😂

hot hull
#

Why color

prisma wave
#

wdym?

#

it looks similar to json

hot hull
#

Implement color into the text itself and it'll be neat

prisma wave
#

hm

#

like what

#

with &c and things?

frail glade
#

What's the use for this?

hot hull
#

ya

prisma wave
#

making a minecraft server in kotlin

#

seems to work well

#

@hot hull I'll give support for & codes but I'd prefer a more clear reference to what colour it is

hot hull
#

&blue ?

prisma wave
#

I mean from an outsider perspective

hot hull
#

or something like that, cuz being able to define only one is iffy

prisma wave
#

that's how it's done in MC

hot hull
#

MC is shit

prisma wave
#

it serializes to a JSON message

#

and then you can use extra for other colours

hot hull
#

extra?

prisma wave
#

yeah

#

for things like json chat messages and the server list it's done with json

#

rather than with the fancy S code

hot hull
prisma wave
#

ew 1.8

frail glade
#

Oh you're building a server from scratch?

prisma wave
#

Yep

#

I've only got the server list stuff so far

#

but still

#

it's cool

frail glade
#

Interesting.

#

20 tps 1.15

prisma wave
#

hopefully more

hot hull
prisma wave
#

my focuses are on speed and all of the api being thread safe

hot hull
#

How does that even happen

frail glade
#

So are you cutting out the extra stuff?

distant sun
#

hopefully more
@prisma wave lol xd

prisma wave
#

you can have more than 20tps

#

it's just hardcoded in craftbukkit

distant sun
#

Whats the difference

prisma wave
#

not much practically

hot hull
#

Ultimate power

prisma wave
#

although

#

depending on how you've implemented the server

#

the mobs can go really fast and things

distant sun
#

Do you use the normal client?

prisma wave
#

yep

#

that all works fine

distant sun
#

Can you optimize it even more than paper (for private use)?

prisma wave
#

in theory

#

bear in mind this has absolutely no connection to spigot

distant sun
#

I dont like that xd

prisma wave
#

the code is completely different

distant sun
#

in theory
@prisma wave .

hot hull
#

It's better that way BM

prisma wave
#

@frail glade my plan is to cut out a lot of clutter, but also I want to integrate with coroutines for some speedy processing of events and things

#

wdym?

hot hull
#

I wanna give you a neat idea of what you should try, but I know someone is working on that so I don't wanna spoil it ;c

prisma wave
#

I won't tell anyone

frail glade
#

Idk what corutines are

prisma wave
#

i'm not 100% sure myself tbh

#

but they are a form of lightweight thread

#

kind of a mix of the bukkit scheduler and taskchain

#

but as part of the language

#

so you can switch between sync and async very quickly with little effort

hot hull
#

That sounds interesting

prisma wave
#

yeah it's fancy stuff

#

confusing though lol

quiet depot
#

brister, are you planning on supporting the entire minecraft protocol?

prisma wave
#

I hope to yeah

distant sun
#

MineKraft protocol

quiet depot
#

aight well

#

api wise

#

sponge

#

not spigot

prisma wave
#

ofc ofc

#

I will try and forget spigot exists so it doesn't influence me

quiet depot
#

👍

hot hull
#

Imagine having the choice of not making it spigot but still make it spigot

quiet depot
#

nms?

#

LOL LIKE NUKKIT

#

brister, will it use nms?

#

correct answer is no btw

prisma wave
#

absolutely not

#

it's fully from scratch so nms doesn't even expect

quiet depot
#

good

prisma wave
#

exist*

quiet depot
#

glowstone is an excellent project for inspiration regarding nms-less minecraft logic implementations in that case

prisma wave
#

this is kinda anti climactic but currently i've hit the roadblock of getting slf4j working lol

#

yeah I've had a look at glowstone for some good examples

quiet depot
#

slf4j is super trivial

prisma wave
#

I know lol

quiet depot
#

you add the api

prisma wave
#

but the log level won't change to debug

quiet depot
#

you add an implementation

#

you add a config

#

and you're done

#

I vouch for logback

prisma wave
#

alright

#

system properties don't seem to work so i'll try with a config

quiet depot
#

it supports debugs

prisma wave
#

pretty clean

#

it's xml tho

quiet depot
#

a config is a config

#

I'm pretty sure slf4j has a wrapper around these configs anyway, you should be able to implement it in code

prisma wave
#

from my research it can be done with system properties

#

although those don't seem to work

quiet depot
#

well you're not entirely wrong

#

the config file location can be set by system properties lol

#

still a file

#

regardless, it seems logback has a code-based config system built in

distant sun
#

konfig.kt

quiet depot
#

I wonder what slf4j.LoggerFactory looks like

#

it must be aweful

prisma wave
#

those docs out here with windows xp screenshots lol

#

I might put logging to the side for now

#

not sure it's high priority atm

quiet depot
#

again, it's incredibly trivial to setup

#

do you have any idea on api design yet?

distant sun
#

I have a feeling that pig will learn kt for this

prisma wave
#

no clear plan so far

distant sun
#

I tell you a plan

prisma wave
#

probably should have one lol

#

ok

distant sun
#

Make it gud

quiet depot
#

I had two general concepts when I started my api revision for rpf

#

clear separation between immutability and mutability

#

and keys over abundant getters

#

and, I've achieved it so far, while in the constraints of SOLID

prisma wave
#

the first one is partially done for you just with kotlin

#

wdym by keys?

quiet depot
#

sponge has a Key system, which is sort of comparable to a map

#

sponge has a giant class, an effective enum, but not a literal enum

#

called Keys

#

it contains constants for every type of value retrievable from any sort of entity (not to be confused with minecraft entities, think software engineering)

#

i.e.

prisma wave
#

that's an interesting way of doing it

quiet depot
#

now while I didn't copy sponge's implementation of this function, I did copy it's functionality

#

now, regarding mutability

#

I've decided to have protected (documented to ensure the access modifier isn't upped) methods in my entity classes handling mutable operations

prisma wave
#

got logging working

#

netty is quite verbose

#

protected accessors

#

interesting

quiet depot
#

e.g. my Inventory class has a protected abstract method

prisma wave
#

how would the api function?

quiet depot
#

handleUpdate(int slot, Item item)

#

oh

#

my mistake

#

it's not abstract

#

mutability is optional in my framework

#

if an implementation wishes to have mutability, I have a sort of mixin interface

#

like what Cloneable was meant to be, except mine is implemented properly

prisma wave
#

lmao

quiet depot
#

I have an abstract PlayerInventory, which contains purely immutable methods

#

this doesn't touch on mutability at all

#

the implementation would be called BukkitPlayerInventory for example

#

if it wishes to be mutable, it would also implement MutableInventory

#

api users would use PlayerInventory

prisma wave
#

that seems like a good call

quiet depot
#

that way, mutability is possible, but isn't directly exposed

#

the user would have to explicitly cast to MutableInventory

frail glade
#

Brister help him finish it so we can finish PAPI3

prisma wave
#

I'll bear that in mind

#

Hmm

#

I'm a little busy

#

But I will help by giving a motivational speech

#

piggy work faster so you can finish papi 3

quiet depot
#

I've got a contest to do

distant sun
#

"We must do it for the people that count on us"

prisma wave
#

we are all relying on you

#

also

#

why is logback in debug by default

quiet depot
#

fucked if i know

prisma wave
#

netty's giving me an e

quiet depot
#

the reason I told you all about that shit, is because I think you should do a similar design on your api

prisma wave
#

entire paragraph every time

#

Yeah I gathered

#

I like the idea on mutability

frail glade
#

Okay but what about having a finish API

prisma wave
#

directly exposing things seems like a recipe for disaster

frail glade
#

🥺

prisma wave
#

it could also make thread safety easier

quiet depot
#

you know what else is nice

#

it's a mixin system in java that doesn't require instrumentation

#

cough sponge

#

brister, quick question. In my API, I'm extensively using generics for handles

#

handles being, the implementation

#

like bukkit implementations have getHandle for their nms correspondants

#

all my api classes have a getHandle method

#

except the return type is stored as a generic

#

what's your opinion on this?

#

bad or meh

#

and incase you need an example

#
public final class SpigotPlayer extends Player<org.bukkit.Player> {
  @Override
  public org.bukkit.Player getHandle() {
    return handle;
  }
}```
prisma wave
#

I'm no expert but I'd say that's fine

#

as long as you're not experiencing any problems that generics can sometimes bring I don't think that's a problem at all

#

and it's better than having to consult docs to see what Object it returns for instance

quiet depot
#

ideally handle would only be used by people who are targetting a specific platform

#

any normal user would just use the wildcard generic

prisma wave
#

yeah

#

otherwise it defeats the point of the cross platform stuff

quiet depot
#

yep

#

btw, start with the hard stuff

#

i.e. world generation

#

good luck

#

and for gods sake multi thread the fuck out of it

prisma wave
#

the whole thing has been hard lmao

#

but thanks

#

so far

#

I've got a rainbow status

#

and that's about it

quiet depot
#

better than nothing

prisma wave
#

very true

#

it's a start

quiet depot
#

suggestion

#

implement your own transfer packet

#

obviously vanilla minecraft doesn't support such a thing, but you can easily emulate it

#

a perfect example is bungeecord

prisma wave
#

with plugin messages?

quiet depot
#

no

#

/server factions

#

/server skyblock

prisma wave
#

oh transfer yeah

#

that would probably be possible

quiet depot
#

the minecraft protocol doesn't technically support such a thing

#

it's impossible to move player from x to z

prisma wave
#

you'd probably need some sort of proxy like bungee though

quiet depot
#

yes, but maybe no

distant sun
#

Bungeekord

quiet depot
#

obviously you can't just go changing the ip on them

#

but that's basically the only thing you can't change

#

the rest can simply be forwarded on to whichever server your transfer "packet" says

prisma wave
#

I'll do some research into that

#

it would be cool to be able to have native support for multiple servers and switching between them

quiet depot
#

precisely

prisma wave
#

might even give some incentive for people to use it

topaz bay
#

hey!

#

stop stealing my ideas

quiet depot
#

wat

topaz bay
#

I was going to implement a master slave system into my server

quiet depot
#

i actually got the idea of a transfer packet from gian

#

I think it was gian

#

on a spigot post somewhere

topaz bay
#

what would be the purpose of a "transfer" packet?

prisma wave
#

to switch servers

#

like bungee does

quiet depot
#

without bungee

prisma wave
#

^^

quiet depot
#

and less interference

topaz bay
#

But... what would it do?

quiet depot
#

yes

prisma wave
#

the same thing bungee does?

quiet depot
#

sx, it's not actually a packet

#

I used "transfer packet", because that's what the concept is called in other games, which actually have a transfer packet in their protocol

topaz bay
#

oh

prisma wave
#

what's the overhead like with guice?

quiet depot
#

tiny

prisma wave
#

wondering if it's worth using that

topaz bay
#

The fun part about go, I could technically just make a single server run multiple servers

quiet depot
#

it definitely is

prisma wave
#

flex

frail glade
#

Doesn't Sponge use Guide?

prisma wave
#

alright

frail glade
#

Guice

prisma wave
#

yeah it does

quiet depot
#

yeah it does

#

o

prisma wave
#

well I'm thinking

frail glade
#

yeah it does

quiet depot
#

somewhat poorly though

prisma wave
#

for example

quiet depot
#

well, not necessarily poorly

#

it just doesn't fully use it

#

I feel like whoever implemented guice into sponge at the beginning, didn't fully understand it's capabilities

#

or maybe they just didn't like some parts, and chose not to use them

prisma wave
#

possibly not

quiet depot
#

or didn't see it's possibilities

#

who knows

#

guice usage in sponge is fairly minimal, that's the point

prisma wave
#

in my case some of the packet classes need things like Gson instances, wondering if it's worth using Guice to instantiate them

#

they could be instantiated a lot of times per second bearing in mind

quiet depot
#

ah I can tell you it's not lol

#

gson should, and can be constant

prisma wave
#

I mean instantiating the packets

#

injecting them with the Gson instance

topaz bay
prisma wave
#

(which is actually a JsonService since i'm debating moving from gson to moshi)

topaz bay
#

ez pz

#

5 servers

prisma wave
#

flex

quiet depot
#

using guice to initialize them would be faster than reflection

#

I can say that much

topaz bay
#

well 4

#

because math

prisma wave
#

I could probably do it statically

#

but it could get messy

quiet depot
#

don't

topaz bay
quiet depot
#

you don't need to use reflection or guice actually

#

or static

prisma wave
#

no?

quiet depot
#

simply get the packets to provide a method of initializing themselves

prisma wave
#

that would still make them need a static reference to a JsonService

quiet depot
#

is JsonService equivalent to a Gson instance?

#

you don't need to use reflection or guice actually
you should still use guice everywhere else though

prisma wave
#

At the moment it's equivalent yeah

quiet depot
#

then make it a constant

prisma wave
#

But I've not settled between gson and Moshi yet

topaz bay
#

tf is moshi

quiet depot
#

moshi monsters

prisma wave
#

apparently the fastest JSON lib

quiet depot
#

yet it'll still be the thing slowing you down

prisma wave
#

Hm

topaz bay
#

what do you need json for?

prisma wave
#

Very philosophical

quiet depot
#

no, I mean it quite literally

#

do the speed tests yourself

prisma wave
#

the server list response, chat messages

quiet depot
#

it'll be the slow part

prisma wave
#

any reflective serialization will be slow

#

I'm just trying to minimize the damages

topaz bay
#

This is a micro optimization

quiet depot
#

I already told you how you can avoid reflection

topaz bay
#

Youre on the JVM

#

Everything is slow

#

In the grand scheme of things, this is a negligible aspect of the program

prisma wave
#

micro optimizations are fun

#

but I have 2 separate points here

lunar cypress
#

Avoiding reflection is not really a micro optimisation

#

Gson and Jackson can do that too

forest whale
#

How make a menu that can display the duration of the temporary permission granted to a player(
%luckperms_inherited_expiry_time_essentials.keepinv%) doesn't work tho , please help

topaz bay
#

Except it is

quiet depot
prisma wave
#

my main point is what I should be using for instantiating packets and injection

#

the json was just an example

lunar cypress
#

If you a lot of serialisation, it does have an impact

topaz bay
#

Except its not

quiet depot
#

I'd recommend getting the packets to provide a method of initialization

topaz bay
#

Injection on packets?

prisma wave
#

yes

topaz bay
#

for what??

prisma wave
#

class PacketOutStatusResponse(private val value: StatusResponse) : Packet this needs a StatusResponse from the incoming packet, but also some sort of Gson/Moshi/Blah instance

#

assisted injection seems like the obvious choice

#

but i'm aware that there's a certain amount of overhead with that

quiet depot
#

not as much as you'd think

#

guice generates classes at runtime (similar to what dagger does at compile time) which create your instances, presumably via new

prisma wave
#

perhaps not

#

maybe I'm overthinking

quiet depot
#

the overhead would only be at startup, not effective run time

topaz bay
#

wdym by "statusresponse from the incoming packet"?

prisma wave
#

misworded that

#

PacketInStatusRequest comes in
gets handled
handler replies with a new PacketOutStatusResponse + a StatusResponse
PacketOutStatusResponse serializes StatusResponse and writes json to the client

#

that last step seems like a problem

topaz bay
#

I mean... that kinda depends on how you write your serializer?

#

Technically, this could be completely decoupled from the packet itself

prisma wave
#

that's what I was thinking

#

and have it just take a String

topaz bay
#

Say your statusresponse and chat objects implement some sort of marker interface like "JsonType"

#

Your serializer could just have a writeJson(JsonType)

#

And that would handle the conversion and writing

prisma wave
#

that's an option

#

at the moment I'm just using the netty ByteBuf to write

#
  • a few extension functions
topaz bay
#

Yeah... so make an extension of bytebuf

#

easy

prisma wave
#

don't extension functions have to be stateless?

topaz bay
#

?

prisma wave
#

where would the json serializer come from?

topaz bay
#

no?

prisma wave
#

like

#

oh

topaz bay
#

Also, thats not state

prisma wave
#

I mean

#

making ByteBuf.writeJson would mean that ByteBufs.kt needs something to serialize the json somewhere

#

at the moment there's no class at all

#

it's just extension functions

topaz bay
#

So?

prisma wave
#

where would it get the Gson or whatever from

topaz bay
#

you can define a top level gson instance

prisma wave
#

oh yeah

#

idk it seems like the gson instance shouldn't be part of ByteBufs

#

and rather held somewhere else

#

i'm definitely overthinking this lol

topaz bay
#

Having it somewhere else implies its used for something else

prisma wave
#

which it could be

topaz bay
#

Which would be bad design

#

outside factors could modify the behaviour

prisma wave
#

true

#

but for example

#

a certain JsonType might need a specific TypeAdapter

#

it doesn't seem like that should be part of ByteBufs

topaz bay
#

That doesnt mean it should be a part of something else though

#

Nor do you even really need to enforce the contract of that marker interface

#

You could technically just have that function defined on any

prisma wave
#

writeJson?

topaz bay
#

yes

#

Sorry, not defined on any

#

but take any

prisma wave
#

yeah I was thinking how would that work lol

#

hm ok

#

however

#

for an example

#

I need a type adapter for the Color enum to make it mc client friendly

#

how would I go about registering that?

#

just inside ByteBufs?

topaz bay
#

Client friendly how?

prisma wave
#

in that the client expects "dark_purple" when the enum is named PURPLE

#

for an example

topaz bay
#

Did you consider renaming the enum to match the actual protocol?

prisma wave
#

even if I did

#

it's still case sensitive I think

#

and that was just an example

#

I have other things

topaz bay
#

This is honestly why Go is better

#

You can define directly on the type how it handles marshaling

#

WITHOUT tight coupling

hot hull
#

That's ugly

prisma wave
#

I suppose

quiet depot
#

sx i'm scared

prisma wave
#

doesn't really solve my problem though

quiet depot
#

someone just presented a legit reason why maven is better than gradle

prisma wave
#

oh god

quiet depot
#

"parent poms"

prisma wave
#

what's the reason?

#

not worth it

topaz bay
#

Uhh...

#

Gradle has inheritance?

quiet depot
#

in separate projects

#

not gradle's subprojects

#

hang on I don't know what I'm talking about

#

I need to do more research on parent poms

topaz bay
#

Its been a gradle feature since 4.6

#

Were on 6.3 now, for reference

quiet depot
#

that's dependencies only

#

parent poms in maven can set things like plugin configurations

topaz bay
#

Which is a mess

#

Once youre 20k lines in, and you cant figure out why a behaviour that you cant see is occurring

quiet depot
#

lel

topaz bay
#

...

quiet depot
#

sx u heard about cloudflare spectrum on pro & business plans?

topaz bay
#

Im.... so confused...

#

IM SO CONFUSED

#

Literally 0 cost

#

And they just turned my fucking VM off

#

For no reason

quiet depot
#

could be 0.001

topaz bay
#

Its not...

#

Google is very anal about this

quiet depot
#

why do you have a google vm anyway?

topaz bay
#

There has never been a charge on my account

#

Literally fucking never

#

I host a bot on a micro instance

#

And I host my website on app engine

prisma wave
#

damn the mc chat colors are case sensitive

#

type adapter time

topaz bay
#

I cant even zoom out far enough to see all of the fucking zeroes

prisma wave
#

lmao

topaz bay
#

This is clearly racism

#

LOL

frail glade
#

Clearly.

hot hull
#

two mentions of racism in two channels at aprox the same time

#

What sorcery is this

obtuse gale
#

Helpchats obviously just very racist

ocean quartz
#

@hot hull So what would be the uses of the @SubPermission?
Like what should the framework do with it

hot hull
#

Just ignore it, probably not worth the hastle since it would be used like once or twice

ocean quartz
#

Alright but if you need it just let me know i don't mind adding

distant sun
#

If you feel so generous I have a request xd

ocean quartz
#

Go on xD

distant sun
#

Use plugin.yml for aliases 🥺

ocean quartz
#

That one is too complicated >.<
I can make it so you can add an option where you can add aliases through the command manager if you want

hot hull
#

Add that yea, the lib I was using let's me assign commands using the command manager, so would be nice to have that so I can convert over, gotta keep that 100% customisability tag :p

ocean quartz
distant sun
#

wo 😮

ocean quartz
#

Should I make the permissions multiple?
Like @Permission({"permission.node", "permission.node.2"}) and it would require both?

#

Or sound useless?

prisma wave
#

I can't see why you'd ever need 2 permissions for 1 command

distant sun
#

then only 1

ocean quartz
#

I don't see why either
I might just leave it the way it is

#

But I don't think I can make that work

distant sun
#

help me fix actions not being executed in order xd

signal tinsel
#

@distant sun :sendcode:

#

oh that's no emote

ocean quartz
distant sun
#

might be because i take then one by one I D k

#

but I can't find a better way to do it

topaz bay
#

@distant sun open terminal at the root of that project

#

gradlew wrapper --gradle-version 6.3

distant sun
#

Why

topaz bay
#

Because youre using 5.2.1

#

And latest is 6.3

distant sun
#

Oh well

#

When did they released so many versions bruh

topaz bay
#

Also, this is now how you install to local

#

not*

distant sun
#

Thats the only thing I have found on google

#

I know I use some outdated stuff but Im not a fan of gradle docs

topaz bay
#

...

#

The install task is from the maven plugin

#

Which you should not be using, because it is deprecated

#

There is this plugin now

#

which has the publishToMavenLocal task

distant sun
#

Ou the scm thing

#

Couldnt find anythig about it bruh

#

Thanks

topaz bay
#

Thats a maven thing, not a gradle thing

distant sun
#

Aight

toxic rapids
#

you need to get section.

modern trench
#

@toxic rapids how do i do it?

toxic rapids
#

use getConfigrationSection()

#

and you can iterate through its key using .getKeys()

sweet apex
#

Hey I am a brand new developer and I am trying to make a simple /heal plugin. I think I mostly have it done except for this one bit, can someone please tell me why there is a red squiggle under line 22?

quiet depot
#

Hovering over the line will tell you why

sweet apex
#

It says this method must result in a type of boolean

#

idk what that means

quiet depot
#

it means somewhere in your logic, the function ends, but a boolean result isn't returned

#

also, considering you're new, I'd recommend making the switch to intellij

#

It's much better for beginners

sweet apex
#

alright

#

would a cause of this be forgetting to put a return statement?

quiet depot
#

yes

#

Intellij for example, would've simply told you that

sweet apex
#

could you look at the picture and tell me where I am missing it

#

yeah Ill install intellij

quiet depot
#

the picture doesn't include the whole method

#

also consider using a paste service instead of pictures, for code

#

=paste

compact perchBOT
#
HelpChat Paste

Please use a paste service to share configs, errors, code and long logs.
HelpChat Paste

sweet apex
#

how do I send you the link to my paste using that

quiet depot
#

paste the code in, press the save button, and copy the link

sweet apex
quiet depot
#

There's no benefit of me spoon feeding you, so I want you to logically deconstruct this

#

You have 2 return statements currently

#

but you've got more than 2 possible conditions

#

meaning any conditions that aren't explicitly handled here with a return statement, will indeed end the function, but aren't returning anything

#

you need to handle those extra conditions

sweet apex
#

alright

#

hm i think i know

quiet depot
#

Where are you learning spigot dev from btw?

sweet apex
#

Youtube tutorials, any recommendations?

quiet depot
#

Yes, avoid youtube at all cost

sweet apex
#

alright

#

how do you recommend me learning

quiet depot
#

the javadocs won't be comprehensible till you have a basic grasp of java however, which you will acquire from oracle's docs

sweet apex
#

alright I will check those out

quiet depot
#

There's courses on thing's like udemy if you need something more visual, I can't say if they're any good though

#

avoid any minecraft related courses, they're generally terrible

sweet apex
#

alright sounds good

#

thank you!

quiet depot
#

just one more

#

or not necessarily that course, but the author

sweet apex
#

alright

#

so I put a return statement for each condition

quiet depot
#

no you haven't

#

there's still a condition left

#

speaking of which, you've actually got a useless condition in there

#

you're checking if label equals "heal" twice?

#

which isn't even necessary in the first place, assuming you only plan on using this executor for a single command (which is what you should be doing)

sweet apex
#

okay so I remove the second label equals heal

quiet depot
#

remove both

sweet apex
#

alright

#

then what?

quiet depot
#

should work now, since you've removed the redundant conditions

rotund egret
#

Commands in spigot are weird

quiet depot
#

zod, you use sponge, do you know if there's actually any demand for a placeholderapi plugin?

rotund egret
#

Oh very much.
The existing one sucks

quiet depot
#

the existing one is also abandoned afaik

rotund egret
#

Mhm

sweet apex
#

I might be totally off here, but since I removed both of the label equals heal, how will it know that i am trying to do /heal

quiet depot
#

aight, cool

#

look forward to one soon™️

rotund egret
#

😮 I'm excited

quiet depot
#

with papi v3, we're adding support for nukkit & sponge

#

and later down the track bungee & velocity

#

@sweet apex you register your command executor to your command, and not any other command

rotund egret
#

I assume papi is a free plugin?

quiet depot
#

your command executor will never be ran for a command that isn't /heal

#

yes zod

rotund egret
#

UwU

quiet depot
#

papi = placeholderapi

#

just incase you didn't know

sweet apex
#

alright thanks for the help!

rotund egret
#

Ye

quiet depot
#

speaking of which derms

#

this isn't a support channel

sweet apex
#

oh sorry

fleet glade
#

Is spigot down for everyone?

pallid gale
#

I wouldn't exactly call it "happy"

obtuse gale
#

it doesnt let me get on the page whatsoever

frail glade
#

It's up and down.

pallid gale
#

When is spigot never up and down

#

lets be honest

fleet glade
#

haha

#

I cant buy plugins now 😦

frail glade
#

:(

#

It's the end of the world then

charred pendant
#

may i ask a question about the @quick lava bot?

pallid gale
#

Sure

charred pendant
#

how does the bot check the premium plugin that user has purchased

#

SpigotBuyerChecker seems broken for me

obtuse gale
#

It doesn't have to be always Java though

pallid gale
#

So yeah we have our own in house program that pulls down the buyerlists into our mysql db

#

then the BS bot checks the discord listed on the profile the user is requesting to link

#

if it matches we link then check the db for any entries with that spigot username

#

if there is we just add the roles

#

We actually use to use SpigotBuyerChecker

charred pendant
#

pull down the buyerlists from spigot?

pallid gale
#

Sorta, that doesn't really pull them down

#

It just caches them

#

We pull them down so if spigot goes offline we still have a list of buyers to check against

charred pendant
#

So you use SpigotBuyerChecker get the user and store them into db. Then when the user come to discord and veirfy, the bot check from db

frail glade
#

We got rid of SBC

#

We have a custom in-house system that caches it all.

pallid gale
#

^

#

stores/caches it

#

SBC breaks with cloudflare and wildfly is less then ideal

frail glade
#

And doesn't cache

#

I think our in-house system uses like 50MB of RAM max.

charred pendant
#

where do you pull the data from what source?

quiet depot
#

spigot

frail glade
#

Our accounts.

#

Each morning, I login and I check names and make sure they are in the database.

charred pendant
#

so is it manually adding new buyer to db?

frail glade
#

I am, yes.

#

Only difference is that it's cached now.

charred pendant
#

but how you know if there's a new buyer? is there a button on premium resouce page to let you see the buyer list?

frail glade
#

Yes

charred pendant
#

oh! Thanks for answering my question 🙂

frail glade
#

Yup!

quiet depot
#

I never realised how challenging it would be to use the youtube api

#

because every time you google a problem with the keyword youtube in it, youtube tutorials just pop up on a general topic somewhat related to your search

distant sun
#

😂 😂

#

Indians ftw

obtuse gale
#

It's horrible to watch an indian teaches tutorial for me

hot hull
#

I mean ngl sometimes they can help you

obtuse gale
#

"sometimes"

#

I have to literally search for like 20-25 minutes to finally found the best tutorial made by an indian

distant sun
quiet depot
#

don't set a target compat unless that's actually the only version it's compatible with

#

also groovy repositories { maven { url = "file://C:/Users/dumit/.m2/repository" } }

#

mavenLocal()

distant sun
#

idk what I'm doing

quiet depot
#

yeah idk what's going on there

#

I use a deploy script, I don't do it through gradle atm

distant sun
#

it keep saying "Cannot assign 'String' to 'Publications'"

prisma wave
#

It might be safe to ignore that

#

Groovy and gradle are weird sometimes

distant sun
#

though shouldnt my pom look different?

prisma wave
#

Idk

#

Maybe

distant sun
#

Im lost 👀

#

now the files doesn't go to my repo ..

signal tinsel
#

nice, math chapter "statistic and chance"

#

this is literally "40% this 30% that 20% another thing, which one has the highest chance of being picked"

#

what the fuck this is so easy

hot hull
#

I say 30% has the best chance of being picked

signal tinsel
#

yes

#

I agree

#

I gotta convert 110/1000 into 11%

#

that's

#

not hard

#

I already knew how to calculate a % its not hard lmao

signal tinsel
#

POGGGGGGGGGGGGGGGG

#

IT FUCKING WORKS

#

the command framework

#

Spoke too soon xD

#

Almost done

pallid gale
#

Finished hangman yet @obtuse gale ?

obtuse gale
#

nope lol, i stopped working on it cos i had to do something else, im gonna start back now tho

pallid gale
#

neato

obtuse gale
#

i was having an issue i think with defining the arrays as arrays of chars

#

Is it gonna mess things up if i cast guess to a Char?

#

will that be all good if it is actually a char

#

Lol its almost like its speaking about me as a person.... This life can never succeed

#

I guess I can try add hangman to my bot too 😂

#

Would this work in theory?

#

val guess = event.message.contentRaw.toLowerCase().toCharArray()[0]

#

gotta copy all of cube's code first

#

converting the string to a char arrray then getting the first thing in the char array

#

I don't think that's a theory actually