#dev-general

1 messages · Page 176 of 1

dusky drum
jovial warren
#

oh no not that

dusky drum
#

:P*

jovial warren
#

with it's hard-coded Premium class

dusky drum
#

not realy?=

#

its public

#

so you can bypass it?

jovial warren
#

it's still hard-coded though

jovial warren
#

and you have to manually go in and update the variable

dusky drum
#

well true

jovial warren
#

which can be a pain

dusky drum
#

but it uses NMS i think

jovial warren
#

yeah probably

dusky drum
#

we have to make new holograms plugin that runs on packets :3

onyx loom
#

Caused by: java.lang.NullPointerException using java be like peepoSad

dusky drum
#

i mean it already exists but watever

#

i want to make clickable holograms like CMI has so next/prev page

hot hull
#

Have you figured out how to detect the correct text?

dusky drum
#

nop

#

didnt even try yet

#

if i had cmi i could check if they use entities i guess?

#

or maybe if i check on hypixel they also have clickable holos

#

oh buts only

#

like no prev next

#

just click

jovial warren
#

also wtf

#

I just found a class named IScoreboardCriteria in NMS lol

dusky drum
#

?

hot hull
#

Cool?

dusky drum
#

if anyone wants to ever make clickable holos let me know i wanna help.

ocean quartz
dusky drum
#

lel

#

uuu did Matt change his PP?

hot hull
#

Nice pfp Matt

ocean quartz
#

Gotta take advantages of nitro xD

dusky drum
#

which anime is that? maybe Tokyo Ghoul?

ocean quartz
#

Yup

dusky drum
#

uu

#

Frosty i got idea how i could check which part of text player clicked

#

like you know pitch/yaw

#

i could check how far (angle) from holo player clicked XD

hot hull
#

Yea nah, 100% that'll break, if you even manage to make it

ocean quartz
#

Sounds like a very inconsistent method

dusky drum
#

well

#

i cant find any other way

ocean quartz
#

If they get too close the hologram moves which will break it

dusky drum
#

well

#

i have no other ideas?

old wyvern
#

You could

#

Thats mostly just pythagoras theorom right?

ocean quartz
#

Spawn an invisible entity where you want it to be clicked

old wyvern
#

^

#

bats ftw

dusky drum
#

matt but entiti moves?*

ocean quartz
#

baby bees

hot hull
#

rotation will stick cuck it up

dusky drum
#

like holo rotates?

old wyvern
#

no AI

hot hull
#

Yea but the hologram will rotate lol

old wyvern
#

o

dusky drum
#

holo text rotates.

hot hull
#

Meaning you'd still need some hella ass math to make the mob follow the hologram rotation

old wyvern
#

yea nvm did not consider that

dusky drum
#

yep

ocean quartz
#

Sounds like an almost impossible situation to deal with

dusky drum
#

CMI did it somehow?

old wyvern
#

Imma make a clickabla hologram lib maybe

ocean quartz
#

Because it'll rotate different for each client

dusky drum
#

yep

#

so gotta deal with packets

old wyvern
#

But wait

#

another issue

#

Clicking on air with nothing on hand doesnt send a packet to the server afaik

dusky drum
#

rly?

ocean quartz
#

Yeah

hot hull
#

nope :kek:

dusky drum
#

wtf

old wyvern
#

mhm

hot hull
#

But you'd be clicking on an entity

#

So fingerguns

dusky drum
#

math 100000

#

and imagine when players have fonts? text isnt on same place

#

HAHAH

old wyvern
#

It is quite possible if you atleast know when the player has clicked

dusky drum
#

theres another issue like if you have custom font text can be longer/shorter

old wyvern
#

🤷‍♂️

dusky drum
#

i realy have no idea how they do it.

ocean quartz
#

Also @quiet depot can I have one of my multi spins?

quiet depot
#

=multi

compact perchBOT
#
Your XP Multiplier:
quiet depot
#

no

dusky drum
#

uff

#

x9

ocean quartz
#

Oh

quiet depot
#

we still have one going

dusky drum
#

quite a big one

#

XD

ocean quartz
#

Time to talk then xD

old wyvern
#

is it cumulative?

dusky drum
#

i realy have no idea how i could check where the player clicked

quiet depot
#

no yugi

old wyvern
#

rip

ocean quartz
#

So you said CMI did it right?

dusky drum
#

ye

ocean quartz
#

Can you link me? I don't think i ever heard of it

dusky drum
hot hull
#

That's two entities

dusky drum
#

didnt copy the gif..

ocean quartz
#

Looks like two entities to me too
With a big hitbox

dusky drum
#

beee

hot hull
#

And you can see the text isn't uniform

dusky drum
#

i mean you get players pitch/yaw right

ocean quartz
#

Imma try making that

dusky drum
#

....

hot hull
#

That would actually be easy lol

dusky drum
#

its probably not that hard either

#

just some math to calc where on circle shoudl you put mob

#

righht

hot hull
#

What?

dusky drum
#

you alreadyx have players yaw

hot hull
#

Just check the display name of the mob lol

dusky drum
#

??

#

does it show rotation?

#

no

#

you need players rotation

hot hull
#

Why would you need rotation?

dusky drum
#

text ROTATES?

hot hull
#

But it's two seperate entities lol

dusky drum
#

ye

#

but you need to move them

#

cause if you rotate 90 degs

#

you are gonna be only able to hit 1 mob?

hot hull
#

That's how it works with CMI yes

dusky drum
#

they probably move mobs dont they?

hot hull
#

From my playing around in the past with the holograms on CMI, they were very unresponsive when it rotated, so I doubt it

dusky drum
#

oh

#

since if you like move mobs stay at wrong position

#

bad showcase but yeh

#

i mean it probably wouldnt be hard to just get players yaw

#

and just rotate mobs on centre of circle?

jovial warren
#

@ocean quartz wdym "whatcha doing"? lol

#

I created a fork of Matt's Framework

#

I wanna contribute to v2 lol

dusky drum
#

using circle math?

ocean quartz
#

@jovial warren I know but what are you planning on doing?
Don't want to just get a PR like for jda, at least not until it is fully done

static zealot
#

but what if there are multiple players in the area? Gasper?

dusky drum
#

thats why you use packets??

static zealot
#

well idk that's why I'm asking LOL xD

dusky drum
#

XD

#

like you can send armorstand packets i guess you can also send other mob packets

#

and give it custom name

#

then when player hits it you get stuf

#

bam

jovial warren
#

@ocean quartz I wanna do stuff, but at this early stage in the rewrite, my contributions would just kinda make it my project, and I don't want to do that

dusky drum
#

gonna try making that

#

thats accualy a good idea XD

jovial warren
#

also, please change your packages lol

#

me.mattstudios.mfcmd would probably look better as me.mattstudios.framework.command tbh

ocean quartz
#

No lol

static zealot
#

ok another idea. Have just one hologram and be able to add click areas in the hologram. and just add an invisible mob with no text. just so they're able to click it. it will rotate the same just it won't be named

#

@dusky drum

dusky drum
#

?

#

thats what we are doing?

#

invisible mob with name so you know which part player clicked

static zealot
#

ah

dusky drum
#

i mean you could check on pos

#

or which mob is it

#

but eh

static zealot
#

well I thought you were doing multiple holograms in a line

dusky drum
#

no

#

1 holo

static zealot
#

my bad then

dusky drum
#

with invisible mobs to click

static zealot
#

I'm just out here trying to at least look a bit smart even tho I'm dumb af

#

:)))

dusky drum
#

eh

#

im dumb to

#

so no need to worry

static zealot
#

btw how are you checking for like palyers?

#

like I assume you won't go thru all players and check their location right?

#

or is that the only way? xD

dusky drum
#

well

#

move event?

hot hull
#

Ah yes the good old, server go brrrrrr

static zealot
#

xD

dusky drum
#

?

static zealot
#

dk I was told player move event is a thing I should almost never use

jovial warren
#

@ocean quartz fair enough, you do you I guess lol

dusky drum
#

well

#

then just runnable=?

static zealot
#

I mean, I'm just trying to learn. not trying to teach you xD

#

that's why I'm asking

dusky drum
#

i mean i guess those are the only 2 ways to do it

static zealot
#

like I used to check player move event to check if they are in a location but turned out it wasn't that good

dusky drum
#

yeh

#

move even does a lot of like executions or how could we call it

#

like 20 times every 1 sec for each player

#

i guess

#

anyone has NMS for spawning mob with no AI?

hot hull
#

Yes

dusky drum
#

can i have it for testing ?

hot hull
#
final net.minecraft.server.v1_8_R3.Entity nmsEntity = ((CraftEntity) entity).getHandle();
final NBTTagCompound compound = new NBTTagCompound();

nmsEntity.c(compound);
compound.setByte("NoAI", (byte) 1);
nmsEntity.f(compound);
nmsEntity.b(true);
#

Should probably still work on latest, if it doesn't GWcmeisterPeepoShrug

dusky drum
#

okay

ocean quartz
#

I mean spigot has entity.setAI(false)

dusky drum
#

eh

#

does spigot have like public repo so i dont have to use buildtools for each ver of mc?

prisma wave
#

nope

#

they're illegal

dusky drum
#

?

quiet depot
#

Yes, but the repo only provides spigot api, not nms or craftbukkit

dusky drum
#

frik

#

any repo that has all stuff?

prisma wave
#

they're illegal

hot hull
#

@prisma wave Got any clue what this would be in groovy?

dependencies {
    val implementation by configurations
    implementation(kotlin("stdlib-jdk8"))
}
quiet depot
#

probably

prisma wave
#

¯_(ツ)_/¯

hot hull
#

Even google doesn't know -.-

prisma wave
#

wait

quiet depot
#

brister u ever done subprojects with gradle, groovy & kotlin?

prisma wave
#

isn't it just implementation 'blah'?

#

i've done something similar for pdm

#

check that I guess

quiet depot
#

no cuz kotlin plugin registers it’s own implementation configuration, which for some reason can’t be accessed in the subprojects block

prisma wave
#

uh

#

oh

#

oh

quiet depot
#

u can get around that in the kotlin dsl with the code frosty pasted before

prisma wave
#

I know what to do here

quiet depot
#

but idk how tf u do it in groovy

prisma wave
#

check the pdm base build.gradle, you add like apply false to the plugins block

#

and then use apply plugin or something

dusky drum
#

yey running build tools gotta wait another 1h now

hot hull
#

Holy shit I remember that

quiet depot
#

wew

#

gasper what ver

dusky drum
#

1.16.2

#

i need repo

#

so i can do NMS

quiet depot
#

o right

dusky drum
#

testing some stuff for holo

onyx loom
hot hull
#

Final issue, how do I exlude this?

w: Some JAR files in the classpath have the Kotlin Runtime library bundled into them. This may cause difficult to debug problems if there's a different version of the Kotlin Runtime library in the classpath. Consider removing these libraries from the classpath
w: C:\Users\Frosty\Desktop\Projects\IntelliJ\Kotlin\FrozenJoin\common\build\libs\common-3.0.0.jar: Library has Kotlin runtime bundled into it
prisma wave
#

not sure tbh

#

i had that problem

distant sun
#

@onyx loom just press on the expand button on left

ocean quartz
onyx loom
#

but i have to do that everytime i open IJ gaby peepoSad

dusky drum
#

but those are 2 holos

hot hull
#

Again, it's impossible with just 1 holo..

ocean quartz
#

I mean CMI has too as well

dusky drum
#

it is frosty

distant sun
#

how do you know

hot hull
#

Yes

dusky drum
#

cause im doing it right now

distant sun
#

different clicks?

hot hull
#

Gaby, because there's no way to detect what the user clicks lol, if you can manage to make it, then go ahead I'll be impressed

dusky drum
#

but i have no idea how to spawn mob with no AI im stupid.

distant sun
#

nbt 🤷

dusky drum
#

nms?

distant sun
#

I was talking to Gasper @hot hull

hot hull
#

how do you know
?

dusky drum
#

ow

distant sun
#

it is frosty

ocean quartz
#

Doubt you'll be able to make it functional with one holo only, but if you do props to you

distant sun
#

no ai it's just a nbt tag "NoAI": true

pastel imp
#

Maybe check for left or right click?

#

Left back right next

#

That could work with only one holo

dusky drum
ocean quartz
dusky drum
#

thanks matt

ocean quartz
#

Also it requires server world not world

distant sun
#

new NBTEntity(event.getEntity()).setInteger("NoAI", 1); if you dont use 1.16 or so

dusky drum
#

oke

jovial warren
#

wait... did I just read that @quiet depot is using Kotlin? xD

hot hull
#

no

jovial warren
#

Kotlin Masterrace lol

#

also why do I get https://en.wikipedia.org/wiki/Master_race this when I google "define master race" lol

The master race (German: Herrenrasse, also referred to as Herrenvolk (listen ) "master people") is a concept in Nazi ideology in which the putative Nordic or Aryan races, predominant among Germans and other northern European peoples, are deemed the highest in racial hierarchy....

hot hull
prisma wave
#

unlikely

hot hull
#

Yea all I'm seeing is in a case of transitive deps

#

Time to go find a kotlin plugin which uses modules I guess ,-,

dusky drum
#

lets see if what i made works

#

great i made fully working plugin.yml file

#

(i forgot it)

#

any idea why i cant update mobs location?

#

do i need to teleport it?

distant sun
#

why bees @ocean quartz ?

dusky drum
#

you mena me?

distant sun
#

didnt he suggest to use bees?

dusky drum
#

why bee cause thats what i rememberd of

#

ye

#

i mean slimes would be good to?

#

they are square and easy to change size of

distant sun
#

idk I'm just asking xd

dusky drum
#

so you can basicly change sizhe

ocean quartz
#

Oh, cuz the hitboxes seemed perfect for it

dusky drum
#

XD

#

so matt i made it work

ocean quartz
#

Does that work per player?

dusky drum
#

not yet

#

havent played with packets yes

ocean quartz
#

Also good luck making it invisible lmao

dusky drum
#

yet*

#

invisible = invisible effect with no particles lol?

ocean quartz
#

Yeah it's not that easy xD
I went with armorstands on my example

dusky drum
#

why not that easy?

#

i mean i could also use armorstands if i wanted to

#

thats just concept

ocean quartz
#

Idk, making entity invisible seems like a pretty ass thing from what I searched

hot hull
#

Use the entity hider fingerguns

#

(will link in a sec)

jovial warren
#

just stop it sending the packet about the entity being created, no?

#

actually it's never that easy

steel heart
#

Would String.class.isInstance(String.class) be true?

jovial warren
#

wat?

steel heart
#

yeah

hot hull
#

@dusky drum ^

dusky drum
#

howly

hot hull
#

It's a neat thing

jovial warren
#

@steel heart that method checks if a specific object is an instance of a specific class

ocean quartz
#

I'll throw a wild guess and say no @steel heart

steel heart
#

oh isAssignableFrom is what I'm looking for

jovial warren
#

wow Java reflection lol

steel heart
#

Idk I'm just casually writing some code in java which is kinda annoying

dusky drum
hot hull
#

Any reason as to why my module doesn't detect another modules methods, even though it should?

e: C:\Users\Frosty\Desktop\Projects\IntelliJ\Kotlin\FrozenJoin\spigot\src\main\kotlin\com\github\frcsty\command\admin\HelpCommand.kt: (5, 31): Unresolved reference: color
e: C:\Users\Frosty\Desktop\Projects\IntelliJ\Kotlin\FrozenJoin\spigot\src\main\kotlin\com\github\frcsty\command\admin\HelpCommand.kt: (6, 31): Unresolved reference: simpleColor
jovial warren
#

@steel heart it's Java code, no wonder it's annoying 😎

#

@hot hull wat?

#

does 1 module properly depend on another?

steel heart
#

yup but this will make my java code more kotliny

hot hull
#

Yes, implementation project(":common") I have this within my spigot module, and the methods I'm trying to access are in the common one

#

It worked before, doesn't now tho

jovial warren
#

can it find them before you compile it?

#

like is it just not finding them at runtime or what?

hot hull
#

It just shit itself when I try to compile

jovial warren
#

so if you actually go to HelpCommand.kt, it resolves the methods no problems?

hot hull
#

yup

dusky drum
#

how would i send like packet to player like mob got teleported?

jovial warren
#

are they extension functions btw?

#

just curious

hot hull
#

mhm

#

It's odd because I have another thing which is in my common module and that works as it should

jovial warren
#

that error usually only occurs when it actually can't find those methods, and IJ will tell you when it can't find them

hot hull
#

Well I mean is there a fix lol

jovial warren
#

good

dusky drum
#

where could i get list of all the packets?

jovial warren
#

nowhere lol

dusky drum
#

uff

#

what would be packet for entity move?

#

or teleport

jovial warren
#

actually I might be able to get you a list of packets

#

what version?

dusky drum
#

1.16.2 atm

#

testing for 1.16.2

jovial warren
#

I've only done 1.13 NMS so far lol

#

but the packet names haven't changed in yonks

dusky drum
#

eh

#

trying to send like mob spawn packet and mob move packet

jovial warren
#

PacketPlayOutEntity perhaps?

pearl birch
#

any1 here knows android app development (java)

jovial warren
#

^ I doubt it

#

also if you're using Android you should learn Kotlin 😎

pearl birch
#

i disagree 🤷‍♂️

jovial warren
#

why?

pearl birch
#

java is faster

jovial warren
#

eh, not by a lot

pearl birch
#

depends what u working on

jovial warren
#

if it was a significant difference, Google wouldn't've endorsed Kotlin as the official language for Android

#

also @dusky drum, PacketPlayOutEntityVelocity might be a contender

pearl birch
#

google endorsed it cuz they have law suits with oracle

jovial warren
#

I disagree

dusky drum
#

will check

pearl birch
#

you know what

#

i will try kotlin out

steel heart
#

gg

pearl birch
#

any1 knows that?

dusky drum
#

was this changed?
EntityZombie entityZombie = new EntityZombie(((CraftWorld) location.getWorld()).getHandle());

jovial warren
#

oh I know Kotlin like the back of my head @pearl birch

pearl birch
#

could u help me a bit

#

just to start

steel heart
#

Like this entire discord is filled of kotlin fanboys

jovial warren
#

yeah sure

pearl birch
#

or give me some tutorials that are trust worthy

jovial warren
#

Like this entire discord is filled of kotlin fanboys
yeah we're on a mission to convert everyone over lol

steel heart
jovial warren
#

@pearl birch if you want tutorials, I'd suggest reading the official documentation

#

there's a "Learn" tab at the top

dusky drum
#

owerplay are you the one from MH?

pearl birch
#

are you using intellij or android studio?

#

yes gasper thats me :3

dusky drum
#

omg

hot hull
#

Two Gasper's here eee

dusky drum
#

crazy

jovial warren
#

I use IntelliJ because I don't do Android development, but Android Studio is literally IntelliJ anyway so it doesn't matter @pearl birch

dusky drum
#

zombie works slime doesnt

jovial warren
#

you sure EntitySlime's constructor only takes that?

dusky drum
#

idk

jovial warren
#

lemme check

pearl birch
#

okay Bom thats great

#

now i have to learn all the shit xD

#

do you have any tips where to start?

#

i cant even do hello world in kotlin

#

i know c++ tho 🤣

jovial warren
#

hello world is pretty much this: ```kotlin
fun main() {
println("Hello World!")
}

ocean quartz
#

main() = println("hello world")

jovial warren
#

notice a few things there

#

yeah or that

dusky drum
#

it requires entitytipes bom

jovial warren
#

yeah I saw ^

dusky drum
#

wahts that?

#

nvm

jovial warren
#

read the code lol

prisma wave
#

Pff

#

Haskell jerking > kotlin jerking

jovial warren
#

good evening King Circle (Jerk) I

ocean quartz
#

No jerking > jerking

prisma wave
#

🙄

jovial warren
#

@ocean quartz it's not jerking, it's just stating facts 😎

prisma wave
#

add x y = x + y

#

Haskell good

#

I think that's valid syntax

#

Never used it tbh

ocean quartz
#

In other news, managed to do the most annoying part of the abstraction of the framework, the messaging system

jovial warren
#

yeah that's what I struggled with when I tried to abstract Octo

#

how did you do it?

ocean quartz
#

Pretty simple actually

MessageHandler<T>
send(final String id, final T sender)

MessageHandler<CommandSender>
MessageHandler<Member>
jovial warren
#

oh that's genius

#

why didn't I think of that xD

#

I bet you have a method in there that returns T so you can access the actual message

#

or whatever

ocean quartz
#

What do you mean?

jovial warren
#

actually I'm misinterpreting what this does I think

#

I thought you meant abstraction between JDA's Message and Bukkit's... well... fuck all

ocean quartz
#

I mean yeah it is

dusky drum
#

lets see if i did packet stuff correctly

jovial warren
#

do you mind if I steal it put something similar in Octo?

#

xD

ocean quartz
#

It's MIT do whatever

jovial warren
#

fair enough

dusky drum
#

ow my fucking god i made packets work

jovial warren
#

noice

dusky drum
#

now lets see if i use 2 players

jovial warren
#

the hardest part about NMS is knowing what each variable is and what it does and knowing what to replace it with

dusky drum
#

eh

#

those were simple for teleport

#

well will event like player hit entity still be triggered if that entity is actually just like client sided?

#

a bit to big

hot hull
#

Wait Gasper, could you use a fish?

#

Since it's not a square hitbox

dusky drum
#

why fish?

#

oh

#

i see what you mean

ocean quartz
#

I think slime is a good decision here

dusky drum
#

works !!!!

#

now i need to check when player hits the slime

#

i guess i'll have to like make new hologram plugin that works on packets?

#

and not like hd

steel heart
#

wtf is that skin

dusky drum
hot hull
#

Nice skin

dusky drum
#

any idea how i can get World and not CraftWorld?

hot hull
#

How did you even get a CraftWorld thonking

dusky drum
#

player.world as CraftWorld?

#

its not like palyer.world

hot hull
#

Is the player an nms one?

dusky drum
#

but like nms World

ocean quartz
#

(player.world as CraftWorld).handler

dusky drum
#

no

#

aaa

#

.handle?

hot hull
#

yes

ocean quartz
#

Yeah mb

dusky drum
#

it was so funny when i hit the mob and got disconnected XDDD

hot hull
#

Matt, can you add CommandSender shit to your msgs lib as well btw?

ocean quartz
#

What do you mean?

dusky drum
#

lel

hot hull
#

@kindred hatch 2+2 is 3 tho..

dusky drum
#

1+1 = 10

ocean quartz
#

Oi Frosty wdym command sender?

hot hull
#

component#sendMessage(Player)

dusky drum
#

now i gotta find how to get entity from PacketPlayInUseEntity

hot hull
#

Make a command sender one as well fingerguns

kindred hatch
#

Hmmmn

ocean quartz
#

That makes no sense, you can't send json to console

dusky drum
#

should i use my own packet handler or just use protocollib?

#

since idk how to make packets all version compatible

jovial warren
#

¯_(ツ)_/¯

dusky drum
#

eh

#

if i wanted to do this i would have to edit all the packet and ehehehhehe

#

eww

jovial warren
#

it's not that hard lol

dusky drum
#

make it 1.8 - 1.16 compatible

#

and you know what

jovial warren
#

I already told you how to do that

dusky drum
#

i figured out that enitity is gonna be null since its client sided only

#

so im ded

jovial warren
#

client-side only?

dusky drum
#

well

#

only that player sees the entity so it doesnt exist on server

#

and i get null

#

so how can i make it cross version compatible?

old wyvern
#

keep track of the entity ID you used for the interactive holograms

#

🤷‍♂️

dusky drum
#

= null

#

tried

#

it just returns null

#

since entity doesnt exist on server

old wyvern
#

Are you not using the packets?

jovial warren
#

oof

old wyvern
#

Bruh

#

I told you

#

Use the entity ID

dusky drum
#

how do i get entity ID?

old wyvern
#

There's a Integer field

old wyvern
#

Reflection mate

jovial warren
#

NMS is just one of those things that's kinda just "guess and hope for the best"

old wyvern
#

its private

jovial warren
#

^

dusky drum
#

idk how to use reflections on kotlin

old wyvern
#

You can use Java reflection just the same way

jovial warren
#
public void updateField(final @NotNull Object object, final @NotNull String name, final @NotNull Object value) {
    try {
        final Field declaredField = object.getClass().getDeclaredField(name);
        declaredField.setAccessible(true);
        declaredField.set(object, value);
    } catch (NoSuchFieldException | IllegalAccessException exception) {
        exception.printStackTrace();
    }
}
```this will do you
dusky drum
#

never used reflections btw

#

but that updates field bardy

#

oh

#

so i can get field

#

im stupid

#

im realy stupid

jovial warren
#

you can do the opposite of that to get fields

prisma wave
#

Bruh

#

Imagine not caching reflective lookup

#

And also

#

Try catch bad in kotlin

jovial warren
#
public Object retriveField(final Object object, final String name) {
    try {
        final Field declaredField = object.getClass().getDeclaredField(name);
        declaredField.setAccessible(true);
        return declaredField.get();
    } catch (NoSuchFieldException | IllegalAccessException exception) {
        exception.printStackTrace();
    }
}
```might do
#

also are you blind BM

#

does that look like Kotlin to you xD

dusky drum
#

em

jovial warren
#

declaredField.get(object);

dusky drum
#

aha

#

but

#

nvm

#

after that i need to make this all versions compatible

#

so i need like nms class grabber

jovial warren
#

just create an Adapter interface and make implementations for each one of the different adapters for each version

dusky drum
#

you know when you talk this im like WTF?

#

eh i just dont get any entity id..

jovial warren
#

I didn't come up with this idea anyway

#

it's actually @heady birch 's code

dusky drum
#

java.lang.NoSuchFieldException: Entity ID

jovial warren
#

oof

dusky drum
#

it says THERE IS

#

wtf

jovial warren
#

you think that's what it's called in fucking OBFUSCATED CODE?!?!

dusky drum
#

ow

#

so i need to look into class?

jovial warren
#

yes

prisma wave
#

Lol

#

Also

jovial warren
#

which class are you looking at btw?

prisma wave
#

That's for a packet

dusky drum
#

PacketPlayInUseEntity

prisma wave
#

Not EntityPlayer or wherever you're looking

dusky drum
#

its a

jovial warren
#

it's probably a then yeah

distant sun
jovial warren
#

what's that gaby?

distant sun
#

open it

dusky drum
#

crashed

#

for me

#

howly

distant sun
dusky drum
#

fucking is working

#

any idea how i could update entity metadata?

#

like name

jovial warren
#

well first, we gotta find out how it's stored

#

yeah the actual Entity isn't stored in the packet

dusky drum
#

ye

jovial warren
#

because the packet isn't world-specific, entities are

dusky drum
#

its just id

jovial warren
#

there is a nullable method called a() though which takes a World and will give you an Entity

dusky drum
#

?

jovial warren
#

in PacketPlayInUseEntity

dusky drum
#

nah

#

im now

#

at other class

#

"packet"

#

PacketPlayOutEntityMetadata

jovial warren
#

ah okay

dusky drum
#

so i gotta edit this:
private List<Item<?>> b;

#

and then update 0x20 at that list

jovial warren
#

you sure Item<T> is what you think it is?

dusky drum
#

idk

#

i need to get metadata

jovial warren
#

that variable is called packedItems apparently btw

dusky drum
#

wtf is taht

jovial warren
#

a is the ID, b is packed items

dusky drum
#

okay

#

so i need to get datawatcher

jovial warren
#

apparently the original name for DataWatcher$Item is SynchedEntityData$DataItem

dusky drum
#

some say i could use like invoke

jovial warren
#

but SynchedEntityData has a field that's obfuscated name is c that stores the Entity

dusky drum
#

okay so i have to get that data watcher as syncedtadwadawd and then get c?

jovial warren
#

not what I meant by my original message

#

SynchedEntityData is the original name

#

DataWatcher is the name given to the class by bukkit

#

they're the same class just different names

#

but yes, you need to get c I think

#

no idea how to get the data watcher though

dusky drum
jovial warren
#

wait you never told me you were using Kotlin lol

dusky drum
#

:?

jovial warren
#

I could've optimised that original retrieveField method I sent

dusky drum
#

.,.

jovial warren
#

lemme fix it up for ya

#
fun Any.retrieveField(name: String)
        = this::class.members.single { it.name == name }.apply { isAccessible = true }
#

don't even ask, it works lol

jovial warren
#

actually will that work for Java classes as well? @prisma wave you'd know this lol

#

@dusky drum are you depending on kotlin-reflect?

dusky drum
#

um?

jovial warren
#
implementation 'org.jetbrains.kotlin:kotlin-reflect'
```in groovy
#

if you hover over "member" it'll probably tell you to depend on reflect

dusky drum
#

aha

#

okay

#

is there anything simplier for updatefield to?

jovial warren
#

updatefield? gimme a min

#

also not sure if this will work on Java types yet or not

old wyvern
#

Why not just use Java reflection?

jovial warren
#

^ true

#

lemme modify this for Java reflection then

dusky drum
#

okay after that i im not completly sure how to make it cross version compatible

prisma wave
#

@jovial warren Java reflection will mostly work

dusky drum
#

eh i just hate reflections they are hard to work with, love how friking mc obfafafwefsa code.

jovial warren
#
fun Any.retrieveField(name: String): Any
        = this::class.java.getDeclaredField(name).apply { isAccessible = true }.get(this)
```maybe this? maybe that should return `Any?`
prisma wave
#

that is an abomination

jovial warren
#
fun Any.updateField(name: String, value: Any)
        = this::class.java.getDeclaredField(name).apply { isAccessible = true }.set(this, value)
hot hull
#

Anyone got any clue how to fix when a modules code get's imported fine, just can't be found when I try to compile a project?

jovial warren
#

^ that's one for BM lol

prisma wave
#

Sounds like you've imported it with IJ and are building with gradle

dusky drum
#

gotta love when you add kotlin reflect plugin size is already 4mb

prisma wave
#

p

jovial warren
#

just remove kotlin-reflect since you're now using Java reflection which is built-in anyway

#

though Kotlin reflection is better when you only wanna work with Kotlin stuff, since it supports everything that Kotlin has

dusky drum
#

okay

#

now i gotta check how to update armorstand name

#

its not hard to do it using protocollib

#

but

#

i dont want to depend on it

jovial warren
#

exactly

dusky drum
#

but cant find any good tutorial (text)

hot hull
#

So BM, the fix being what exactly?

prisma wave
#

No idea

#

Not enough context

#

Refresh dependencies

dusky drum
#

anyone has NMS util?

jovial warren
#

I might make one at some point just because of how much it looks like we all could do with one lol

#

but for now, idk

dusky drum
#

😭

#

i need to make my packets version independent

prisma wave
#

protocollib?

dusky drum
#

.,.

#

thats extra plugin to depend on

prisma wave
#

literally everyone has it installed

dusky drum
#

eh then

#

then i made my stuff for no reason oke.

#

at least now i know how to deal with crappy packets.

jovial warren
#

they're not actually that bad

dusky drum
#

you have to make them for every single version

#

...

jovial warren
#

if they weren't obfuscated, albeit it would still be a mess because Minecraft just is, but it would be better

#

also that's because Minecraft isn't backwards compat

dusky drum
#

yeh

jovial warren
#

treat every new version as a new major

dusky drum
#

i mean if there was explanation for what each obstufff in class is it would be nice.

#

but yeh

jovial warren
#

I think they also do some changing just to throw you off

dusky drum
#

great

#

so you have to have 200 classes to make it all ver compatible

jovial warren
#

because of course, they don't actually want you decompiling their shit

prisma wave
#

i mean

#

they released the obfuscation maps

#

as a company they don't but people like dinnerbone are pretty prevalent in the modding community

#

or were

jovial warren
#

@dusky drum Niall's KiteBoard supports (1.7 is deprecated but still there) 1.8 and 1.12-1.16 and that only has like 10-15 classes

dusky drum
#

10-15 cause there is 10-15 versions .

jovial warren
#

@prisma wave did they?

prisma wave
#

yes?

jovial warren
#

@dusky drum nope

dusky drum
#

yes

#

1_10r1
1_11R1
1_12R1
1_13R1
1_13R2
1_14R1
1_15R1
1_16R1
1_16R2
1_8R1
1_8R2
1_8R3
1_9R1
1_9R2

jovial warren
#

1 for the Adapter interface, 1 for the AdapterCapability enum which stores adapter capabilities like tablist header/footer, unlimited chars and hexadecimal, one for AdapterConstants, which is full of god knows what (I haven't deobfuscated them yet lol), one for the AdapterProvider which provides the appropriate Adapter implementation, 1 for the UnsupportedAdapter which does absolutely nothing, and then 10 adapters for the versions lol

dusky drum
#

and idk how you get acces to kiteboard if its private repo

jovial warren
#

I hope the adapter thingys is something that @heady birch chooses to open-source because it could get really handy

#

@dusky drum I'm deobfuscating it with Niall's permission

dusky drum
#

i hope someone makes HD packet based and implements what i made todasy

#

or i wasted 5h of my coding

jovial warren
#

^^^^

or i wasted 5h of my coding

dusky drum
#

.,.

jovial warren
#

I'm kidding lol

dusky drum
#

i mean at least my slime works

#

i just wish HD supported HEX properly.

hot hull
#

Gonna drop this question here, ping me with responses.

So let's say I have a bungee and a spigot version of my plugin, I handle the action firing through events, all fine and dandy. Now let's say I want to expose some stuff as an API, (adding custom actions, perhaps even events that get fired), should I expose it on the spigot version, or the bungee version? And if I do expose them, how would I make them communicate with each other? (ie. If someone was to add a custom action through a bungee plugin, how would I send that action to my spigot one so it can get triggered, vice versa?). I am guessing bungeecord channels, but that leaves me with another channels, those wouldn't work on Velocity or similar bungeecord alternatives would they? How would I handle that?

dusky drum
#

PluginMessagingChannel or what is it called?

#

is that what you use?

hot hull
#

I don't use anything right now, still considering stuff

jovial warren
#

@hot hull if you want to make an API, ideally it should be fully standalone (in this case especially), and should have no idea about the mere existence of the rest of the project

#

also the PMC is for plugins to communicate with BungeeCord and other plugins (including other instances of itself) across a BungeeCord network

#

and it's not very fast or efficient at doing that either

hot hull
#

Okay yea that's no problem to make it standalone, question still stands what I should use for them to communicate

jovial warren
#

why do they need to communicate?

hot hull
#

Well let's you have a spigot addon which adds a custom action, and then you try executing that action through bungee, the plugin won't know it exists will it

jovial warren
#

also apparently my new module button has just kinda taken a day off for some reason lol

#

I just restarted my PC and it still does nothing

dusky drum
#

module button?

jovial warren
#

the new -> module

dusky drum
#

aa

#

rip

jovial warren
#

I literally just enabled floating mode and moved it around to see if it's behind it and it's just not there lol

#

(if you wanna know what I mean by "enabled floating mode", I'm using a tiling window manager called "i3")

hot hull
#

Nono don't change subject angry_fingerguns

#

Answers I need

jovial warren
#

okay lemme read your damn question first

#

you realise your API is supposed to be abstract enough to work with both Bukkit and Bungee right?

#

meaning backend-specific features aren't meant to be possible to make use of

#

if you want support for backend-specific features (Bukkit features, like GUIs and other stuff), you'd need to add some extra stuff for a Bukkit API

hot hull
#

Don't worry about that, I'll worry about how it'll work when I get to it, just what I kinda need to know is how I could have the communicate

jovial warren
#

I like to go with an interface-only (I mean like 99% interfaces lol, this doesn't include anything like util classes or extension functions) policy for APIs

#

it still comes back to the question of: why?

#

actually I see why

#

but if you're making a backend-specific addon, you just make it work with the backend and the backend alone

#

unless you want mixed addon support

#

like addons that have backend-specific features but also use features that both support

hot hull
#

Okay Imma continue and worry about this when I actually get to it, danke for ur assistance so far

jovial warren
#

you're welcome

prisma wave
#

bruh haskell is near impossible to use

#

i've got about 30 files and 2 errors just for a hello world

#

i can't even ironically circlejerk about this

onyx loom
#

🌝

#

kotlin stay winning ig

prisma wave
#

eh

#

clojure

onyx loom
#

😠

dusky drum
#

anyone gonna join me making placeholder based holograms?

#

with clickable text

lunar cypress
#

bruh haskell is near impossible to use
Any objections @light leaf ?

prisma wave
#

oh dear

lunar cypress
#

:^)

jovial warren
#

is @NotNull Optional<@Nullable MyClass> a bit over the top as far as nullability annotations go

prisma wave
#

why would an optional be nullable

jovial warren
#

true

#

and why would it's parameter be non-null

lunar cypress
#

Optional<@Nullable ...> makes no sense whatsoever

prisma wave
#

^

jovial warren
#

if it's type param was non-null then the Optional would be redundant thinking about it

prisma wave
#

exactly

jovial warren
#

isn't Optional Java's attempt at introducing a decent nullability pattern in to the language btw?

prisma wave
#

unless you have 3 different states you need to express

#

which is gross

jovial warren
#

that like 95% of developers don't use lol

prisma wave
#

I wouldn't say optionals are a direct alternative to nullability

#

but to a degree

jovial warren
#

but they're a good alternative

prisma wave
#

they're a more declarative way of handling nullability

jovial warren
#

yeah

lunar cypress
#

You can fully replace your null handling with option types

#

Rust does that

prisma wave
#

indeed

jovial warren
#

isn't declarative programming that concept that people say is "really amazing" that literally 0 languages actually use?

prisma wave
#

although it would be a bit impractical

#

@jovial warren not in the slightest

#

loads of languages have support for declarative styles

#

functional languages are pretty much entirely declarative

jovial warren
#

I remember researching what declarative programming is after md_5 claimed it was the reason why "Maven wins"

lunar cypress
#

What

#

Lol

prisma wave
#

maven is imperative

lunar cypress
#

Maven is not a programming language

prisma wave
#

yea

#

which is even more dumb

#

but his point was that build tools should be imperative

#

which XML is

lunar cypress
#

Hold on

jovial warren
#

yeah, md_5 said this:

Imperative vs. Declarative

A build system should be the latter, therefore Maven wins

(also Maven is almost always faster than Gradle)
lunar cypress
#

Declarative you mean

prisma wave
#

wait

#

am I being dumb

#

oh ffs

jovial warren
#

yes he claimed that "Maven is faster than Gradle"

prisma wave
#

I always get the 2 confused

#

yeah

#

my bad

jovial warren
prisma wave
#

hold up

#

i am so confused rn lmao

lunar cypress
#

Ok but this specific instance isn't really about programming but about how you define your build

jovial warren
#

"(Also Gradle is almost invariably slower at actually building)"

prisma wave
#

imperative is for loop, declarative is forEach right? in a very basic sense

lunar cypress
#

Gradle is also declarative btw lol

#

No

prisma wave
#

is it the other way around

lunar cypress
#

No

jovial warren
#

"In computer science, declarative programming is a programming paradigm—a style of building the structure and elements of computer programs—that expresses the logic of a computation without describing its control flow."

lunar cypress
#

The idea of a loop is imperative

ocean quartz
#

(Also Gradle is almost invariably slower at actually building).

#

What

jovial warren
#

basically saying what you want to do without actually saying how to do it

lunar cypress
#

Right

onyx loom
#

obviously duh

prisma wave
#

right

onyx loom
#

maven >>>

jovial warren
#

@onyx loom get out

onyx loom
#

ok wait i take that back maven is ass

jovial warren
#

come back lol

onyx loom
#

i shouldnt joke about that 🌚

lunar cypress
#

Functional programming is declarative because your code is defined in terms of function composition

prisma wave
#

yeah I get it now

lunar cypress
#

Not do this then do that then do this other thing

prisma wave
#

I confuse the 2 so many times

#

anyway

#

declarative bad imperative good

jovial warren
#

not necessarily

lunar cypress
#

I think you confused it again

jovial warren
#

sometimes declarative programming can be useful, other times imperative can be the better option

prisma wave
#

omg

#

this is so embarassing lmao

jovial warren
#

one thing that we can all agree on though is that there is absolutely NO reason at all why a build system has to be declarative

lunar cypress
#

I agree with md5 here

#

But gradle is also declarative

jovial warren
#

so he's talking out of his ass then

prisma wave
#

so basically

#

imperative bad declarative good

#

I think

jovial warren
#

yeah

#

I personally much prefer Gradle since switching to it because of how fast it builds changes and how much less shit I have to write

#

but the latter point there is just because I'm a lazy shitbag

prisma wave
#

i am pretty sure everyone here prefers gradle except Niall

onyx loom
#

nialls opinion doesnt count

jovial warren
#

lol

onyx loom
#

so its just a huge W

jovial warren
#

technically he has a right to his own opinion

prisma wave
#

pff

#

not in dev-general

onyx loom
#

no 🌝

jovial warren
#

I remember speaking to my friend the other day, and he brought up a really interesting point where in Gradle you can't do this: ```kotlin
object Versions {
const val KOTLIN = "1.4.0"
}

plugins {
kotlin("jvm") version Versions.KOTLIN
}
```because the plugins block is initialised first for some weird reason, even though IntelliJ says that's totally fine

#

and having to create a buildSrc directory just to make that work is effort

prisma wave
#

dsl bad

jovial warren
#

it's not just DSL

prisma wave
#

gradle bad

#

wait

#

no

jovial warren
#

lol

#

one for the archives

lunar cypress
#

you can solve this with the buildscript block

jovial warren
#

let me just take a screenshot of that real quick

#

@lunar cypress I swear that was deprecated

lunar cypress
#

kinda

prisma wave
#

the use of it for plugins is deprecated i think

#

as a construct it isn't

jovial warren
#

unless you're one of those still using Gradle 4 @lunar cypress

dusky drum
#

anyone worked with protocollib, how do i spawn new entitiy?

jovial warren
#

sorry but you asked for that lol

dusky drum
#

i didnt ask for NMS i asked for protocollib

lunar cypress
#

??

#

this is not nms

jovial warren
#

it's ProtocolLib

lunar cypress
#

it's just the definition of the protocol

#

without any relation to any library

jovial warren
#

I just googled "protocollib wiki" and got that lol

dusky drum
#

if i use that i need Entity class for each version.,

jovial warren
#

probably what you're looking for

prisma wave
#

ok

#

progress report

#

haskell is kinda cool

#

scary tho

onyx loom
#

bruh haskell is near impossible to use
i've got about 30 files and 2 errors just for a hello world
i can't even ironically circlejerk about this

#

i've got about 30 files and 2 errors just for a hello world
🌝

prisma wave
#

i am using a repl

#

that problem is fixed for now

onyx loom
#

idk what that is nor do i care :)

prisma wave
#

[ [ x | x <- xs, even x ] | xs <- xxs] now this is readability

onyx loom
#

oh ya

#

readability at its finest

lunar cypress
#

I get it but what is xxs

prisma wave
#

oh that's a predefined function

#

in the tutorial i'm following

onyx loom
#

but what does it do

prisma wave
#

¯_(ツ)_/¯

onyx loom
#

lol

lunar cypress
#

so for every xs in xss create a list with every x in xs where x is even

prisma wave
#

what he said

lunar cypress
#

list comprehension

dusky drum
lunar cypress
#

[[x for x in filter(even, xs)] for xs in xss] that would be the same in python i think

distant sun
dusky drum
#

no

lunar cypress
#

why not lol

#

it literally explains what everything means

dusky drum
#

i need entity id idk where to get that?=

#

like type

distant sun
dusky drum
#

packet.getIntegers().write(6, 78);

#

like 78 is armorstand whats the slime then?

lunar cypress
#

should be on that wiki

dusky drum
#

idk since armor stands id there isnt the same

lunar cypress
dusky drum
#

how can then snowball and armorstand have 78 id?

distant sun
#

armorstand has id 78 under objects tab

#

Object IDs and Entity IDs are different. Most objects also have an entity ID, but should only ever be spawned via Spawn Object.

dusky drum
#

and apparently im spawning mob wrong even so the wiki said i did it correctly

#

i have no idea how to get field index...

onyx loom
#

using java, can u guess what all of these IJ warnings are for?!!?!

ocean quartz
onyx loom
soft remnant
#

xDD

#

The worst thing is when you format the pc, install the IDE and realize that you need the 20 external libraries that you installed.

onyx loom
#

isnt that what gradles for

#

🙂

soft remnant
#

u.u

#

I use maven normally, but many times I have to add dependencies forcibly ..

distant sun
#

Welp

soft remnant
#

xd

jovial warren
#

@ocean quartz lol

distant sun
#

Welcome to the life of rewriting
@ocean quartz welcome

ocean quartz
#

Welcome? I've been living in this life for years

distant sun
#

Smh

soft remnant
#

I could say the same, if not because every day I discover something new e.e

dusky drum
#

any idea why protocollib doesnt spawn slimes for me?

#

it spawns armorstands just fine

jovial warren
#

because u trash

dusky drum
jovial warren
#

wait why are you not using apply? lol

dusky drum
#

apply?

prisma wave
#

don't

jovial warren
#

lol

dusky drum
#

any idea why it doesnt spawn slimes?

jovial warren
#

@dusky drum apply allows you to return an instance of the object while applying stuff

#

like setting the ID

dusky drum
#

eh

#

i need to figure out why slime doesnt get spawned

#

do i need to specify UUID?

prisma wave
#

you'd need to specify all of the fields

jovial warren
#

I mean, that is what they use isn't it?

prisma wave
#

i imagine

dusky drum
#

i mean idk if you need to specify metadata

prisma wave
#

you'll probably need to fill all of the fields

dusky drum
#

will check, yeh uuid doesnt help

#

doesnt say like its required to specify

#

i think ids arent correct

#

eh i guess i'll edit ids manualy

fluid mural
#

Everyone in here that wants to start a career in plugin development DM ME. We will pay and will help you get into bigger servers. we need more staff because of the high demand for more mini games!

onyx loom
#

lol

ocean quartz
distant sun
jovial warren
#

wdym "temporarily remove part of the..." oh... right... I know exactly what you mean

#

@dusky drum seems legit

dusky drum
#

well i made it accept ints in wrapper so i use ints from wiki.vg

#

seems to work

#

i just dont get it why slime of size 1 has hitbox of the size 5 or 3 or what is it

jovial warren
#

wait what?

#

no it doesn't

dusky drum
#

yep

#

how nO?

jovial warren
#

if it did you would be able to hit it from inside that hitbox