#dev-general

1 messages ยท Page 579 of 1

brave atlas
#

@empty flint

empty flint
#

Yeah that's the wrong channel my dude. Try contacting the author of Skywars?

brave atlas
#

where exactly

empty flint
#

I don't know the guy, find out what discords he is on or check out his spigotmc page for clues on how to contact him

half harness
#

sry, no ๐Ÿ˜•

empty flint
#

What't the proper way to prevent code duplication when using an interface?

#

I have two abstract classes that both implement an interface and both do it in the same way. What's the best way to handle this when I want those implementations to be final?

half harness
empty flint
#

I can't put the implementation in the interface because it does not allow final methods and I can't make the interface abstract either.

half harness
#

or why not just use an abstract class instead of an interface?

empty flint
#

because both abstract classes already implement another class that I cannot change

old wyvern
#

Lmao

half harness
#

๐Ÿ’€

ocean quartz
#

From what i heard it's buggy
SlimJar isn't though ๐Ÿ˜Œ

empty flint
#

Is SlimJar that project of Brister Mitten's ?

distant sun
#

Thats PDM, SlimJar is made by Yugi with Matt's help

empty flint
#

Gotcha

#

Yeah, slimjar won't work for me I don't think

#

at least not for kotlin, right?

half harness
#

it works for me

#

ยฏ_(ใƒ„)_/ยฏ

empty flint
#

Because

// this needs to be ran before you reference your dependencies
ApplicationBuilder.appending("MyApplicationName").build()
half harness
#

well i don't slim kotlin

#

but my jar is still under the spigot limit

empty flint
#

Hmm

#

Oh do you guys know how to pass a common function from the root project to all its subprojects in Kotlin DSL?

half harness
# empty flint Hmm

for ex my Bedwars plugin, which is 8131 lines of code (since i dont think comments affect jar size), which shades in a scoreboard lib due to it not having a maven repo, shading my own lib since I need it the same time I run ApplicationBuilder.appending("MyApplicationName").build(), and also kotlin, which is only 2.5mb

#

kotlin appears to take 1.5mb

empty flint
ocean quartz
#

"Kotlin" isn't shaded, it's compiled to bytecode what you shade is the std lib
So if you do it in the begging without using std functions it's fine

#

It works the same way as spigot's feature but we actually proxy things like you're supposed to

half harness
#

ye
but theres also the intrinsics thingy that always throws the errors

#

idk the exact name

ocean quartz
#

Intrinsics is part of the std lib

empty flint
#

@old wyvern Do you happen to know how passing functions to subprojects works in Kotlin DSL? There's tons of examples in Groovy but I can't find anything for Kotlin

steel heart
#

cant u just use a property or ext or whatever its called

#

ye

#

or else maybe a companion object

prisma wave
#

I'm very proud of it

steel heart
#

yeah poor pdm made by yugi

prisma wave
#

it's much better than pdm which is buggy and shit

#

I'd hate to be a pdm author

forest pecan
#

Yeah PDM is dog

steel heart
#

๐Ÿฅฒ

forest pecan
#

PDM more like

#

Paper Dead Man

#

idek

#

its hard to think of something for P lmao

steel heart
#

plugin derp malfunctioner

empty flint
ocean quartz
#

SlimJar

hot hull
#

JarSlim

empty flint
#

What was that config management api called again?

#

Turns out I do need it, Bungee doesn't seem to use YamlConfiguration ๐Ÿ˜ฆ

empty flint
#

yep thanks

sweet cipher
#

With placeholder API, should I not use database queries if the data is unloaded?

#

Oh wait nvm

unreal kiln
#

guys, how to do falling blocks in java plugin?

old wyvern
#

Then in subproject

val myProperty by extra
#

With the same name as the set property

empty flint
#

How is it called from the subproject?

old wyvern
#

Then use myProperty or whatever you named it

#

@empty flint

sweet cipher
#

I'm trying to upload a 1.19 MB Gif, and it still says the file is too large, do you know why?

empty flint
#

also, project.extraProperties.set doesn't exist either

lavish notch
sweet cipher
#

How do I embed it?

ocean quartz
#

[IMG]url[/IMG]

sweet cipher
#

I tried that

#

It just shows an image icon

ocean quartz
#

send me the gif link

old wyvern
sweet cipher
ocean quartz
#

Here

empty flint
old wyvern
#
val someFunction: (T) -> A by extra
#
val varOfTypeA = someFunction(varOfTypeT)
ocean quartz
sweet cipher
obtuse gale
#

A gif of a gif

ocean quartz
#

Your gif .. on the spigot page?

old wyvern
#

Also seems it was project.extra.set

empty flint
#

and to set in rootProject, I can just go extra.set("someFunction", ::someFunction)?

sweet cipher
old wyvern
#

Yes

ocean quartz
#

the spigot page not yours, how would I access yours? lol

sweet cipher
#

I have no clue

#

How did you add it?
With [IMG]https://imgur.com/a/sElAj4h[/IMG]?

distant sun
#

direct link

ocean quartz
old wyvern
#

Spigot's wysiwyg editor has an image option, just use that, it inserts the image for you

obtuse gale
old wyvern
distant sun
sweet cipher
#

Oh

#

Thank you everyone

#

It worked

#

I haven't used imgur before this

empty flint
#

@old wyvern
Am I doing this right then?

fun deployToPluginsFolders(proj: Project, serversLocation: String) {
  val deployToServers: (Project, String, String) -> Unit by proj.extra
  val isBukkitPlugin: Boolean by proj.extra
  val isBungeePlugin: Boolean by proj.extra
  if(isBukkitPlugin) deployToServers(proj, serversLocation, "bukkitServers")
  if(isBungeePlugin) deployToServers(proj, serversLocation, "bungeeServer")
}

I am declaring the deployToPluginsFolders function in rootProject and adding it to extra, then in the subproject, I have properties called isBukkitPlugin and isBungeePlugin and such, so to get those from the rootProject function, I need to pass the project in the proj parameter.

#

Is there a better way to do this?

#

Can I tell the root project that these properties exist in every subproject, so I don't have to pass the project object as a paramter?

old shore
#

@obtuse gale im willing to try the plugin that you are requesting in #882530561141375026 but you will need to add me, i cant send you messages or even sending a friend request

#

please dm me when you are available

humble silo
#

@half harness Do you know if theres a way to publish multiple modules from one project? Like if i have a gradle api and base module can i publish those both from one project?

half harness
#

the main issue was the nexus publish plugin

#

but without the plugin, I have to release & close it manually

humble silo
#

oh dang, its not that easy?

half harness
#

ยฏ_(ใƒ„)_/ยฏ

#

btw this is what im talking aobut

humble silo
#

ya i got it from context ๐Ÿ‘

half harness
#

alr
it throws an error when applied in a module

#

which means it only works in the base module

#

but that means that you need to run the gradle tasks in the base module

#

so unless you can find out how to set the jar being built while publishing, it won't be posisble

#

but again, u can also just do it manually

humble silo
#

ugh

half harness
#

via the dashboard and 2 clicks

humble silo
#

thats really really dumb

#

no

half harness
#

mhm โ˜น๏ธ

#

but I can't find out how to change the artifacts being published :/

#

hm

#

@humble silo ๐Ÿ‘€

#

altho im still confused

#

lol

#
publishing {
  publications {
    maven(MavenPublication) {
      artifact sourceJar // Publish the output of the sourceJar task
      artifact 'my-file-name.jar' // Publish a file created outside of the build
      artifact source: sourceJar, classifier: 'src', extension: 'zip'
    }
  }
}
#

i have no idea what you'd put for artifact sourceJar and the line below the line below that line

humble silo
#

oh cool! ok ill try that in a bit

half harness
#

uhh

#

๐Ÿ‘€

#

if you get it working plz tell me what u did

humble silo
#

alr lol

frail glade
#

Made a project this week with the Kotlin DSL instead of Groovy. It's actually kinda cool.

ocean quartz
#

I love it, no more random warnings like groovy

humble silo
old wyvern
old wyvern
#

honestly some dynamic typing is kind of nice when its just a build script

humble silo
#

uhhh, gimme a second

#

still testing

half harness
#

groovy looks better imo tho ๐Ÿคค

#

afk

humble silo
#

ok well now nothing works

#

lol

humble silo
#

funny

#

funny guy

ocean quartz
#

Very funny

old wyvern
#

I dont think its particularly better, but at some points kdsl seems like a bit of a hassle

#

gradle python soon??

prisma wave
#

gradle xml soon

ocean quartz
#

That's just Maven with extra steps

humble silo
#

gradle lua ๐Ÿ‘

old wyvern
#

gradle elara

prisma wave
#

graskell

humble silo
#

no.

humble silo
old wyvern
#
dependencies = [ implementation "abc" "2.5.6"
               , compileOnly "efg" "46.7"
               , compileOnly "wefwef" "46.7"
               ]
ocean quartz
#

Oh god

old wyvern
#

Pragma for plugins

#
{-# PLUGIN io.github.slimjar #-}
prisma wave
#

oh my

old wyvern
#

๐Ÿ˜Œ

#

Thats looks kinda nice tbh

#

Now then, how does one implement a language suppourt in gradle

ocean quartz
half harness
humble silo
# half harness o

ok well the issue is(i think) i cant access the java component of the subprojects, which in the kotlin dsl is what you publish, so if i could get the publication into the sub module i could get it to work(i think), but that seems to be what theyare talking about in the issue matt posted

half harness
#

mhm

humble silo
#

lol can you create like abstract tasks in gradle?

#

that would be weird but could work

half harness
#

I don't know D:

humble silo
#

like if i wanted to call task "a" from task "b"

#

can you do that?

half harness
#

uhhh

#

idk ;-;

humble silo
#

I kinda got something to work but its pretty terrible design-wise

old wyvern
#

Uh, tasks arent supposed to return values afaik

#

Are you sure you dont just want a normal function?

humble silo
#

Dang, im kinda just spit balling at this point, i dont think a normal function will work though because i need to be able to access it in subprojects

#

brb

old wyvern
#

Or access the function from the rootProject itself

humble silo
hot hull
#

I migrated my account today, so do we get a cape or nah

half harness
#

but u have to enable it

#

online

oblique heath
#

what's the preferred yml lib for configs

#

it's annoying that bukkit won't keep comments around when saving

static zealot
oblique heath
#

oo thanks, i'll take a look at it

static zealot
#

it only parses values

#

not comments

#

you'd have to specifically go out of your way to read the entire file

ocean quartz
#

Wait which one are we talking? Mine keeps all comments, Configurate also keeps all comments

static zealot
#

wait what? I could swear it didn't. I might be going crazy

#

ohhh. it might be when there are missing values from the file

#

and it needs to add them

#

like when I add a new value in the code but don't add it in the file

ocean quartz
#

With which one? Mine?

static zealot
#

yeah. let me test

ocean quartz
#

It always adds new values to files, if the new value has comments it'll also add the comments

static zealot
#

commented out a value and restarted the server so now a value is missing.

static zealot
#

the problem is the edited/added comments

#

that are added manually

#

by the user

#

as you can see I added 2 comments up there and commented a value

#

and it basically set the default values and comments

#

so my #this is a test comment and the other 2 are gone

ocean quartz
#

Oh yeah manually added comments disappear only programmed ones stay

half harness
#

โ˜น๏ธ

static zealot
#

yeah. that's what he's looking for

ocean quartz
#

I don't think it is, Bukkit if you save a value through code it'll also remove all comments

static zealot
#

yeah.

#

wait what?

#

even the

#

like default ones?

ocean quartz
#

Also I think configurate works the same way and won't keep manually added comments either (could be wrong)

ocean quartz
oblique heath
#

with bukkit it removes the default comments

#

i would like to have that not happen

static zealot
#

yeah. Matt's also removes them but reads them I guess.

ocean quartz
#

Mine doesn't remove default comments

oblique heath
#

that might be good enough for me

half harness
#

๐Ÿ˜Ž

ocean quartz
#

Neither does Configurate

oblique heath
#

gimme a link to yours matt

static zealot
#

there's no wiki for it

half harness
ocean quartz
#

There is no documentation for it, just use Configurate

half harness
#

no wiki tho

static zealot
#

its a fork of ConfigMe tho

oblique heath
#

;o

static zealot
#

tho it has quite a bit changed to it

#
repositories {
    maven("https://repo.mattstudios.me/artifactory/public")
}

dependencies {
    implementation("me.mattstudios:triumph-config:1.0.5-SNAPSHOT")
}```
ocean quartz
#

"https://repo.triumphteam.dev/artifactory/public" ๐Ÿ˜Œ

static zealot
#

o?

#

๐Ÿฅฒ

ocean quartz
#

Just a proxy, both work

static zealot
#

oh. so same shit. alr. thought you're only updating them there now.

ocean quartz
#

Nah they are the same repo

steel heart
#

iirc spigot bumped snakeyaml

#

so supports comments on nodes also

obtuse gale
#

snakeyaml may support that

#

but the bukkit config system will yeet them because it doesn't, it hasn't been updated in literally ages

steel heart
#

Oh crap

obtuse gale
#

essentially you would have to either extend the bukkit config system to support it or make your own lol

#

or use a lib :^)

sweet cipher
#

Or hard code everything

steel heart
obtuse gale
#

๐Ÿ˜Œ

steel heart
#

๐Ÿ˜

urban sleet
#

Emily did you ever get a chance to test the fabric mod? I think you said you made it

obtuse gale
#

Not yet, I got home a couple hours ago and I'm doing stuff yet

#

Also feel free to @ me ๐Ÿ˜„

ocean quartz
#

@obtuse gale Okay

obtuse gale
#

NO

#

admin abuse

ocean quartz
#

๐Ÿฅฐ

drifting estuary
#

hello??

obtuse gale
#

Hello and, again, welcome to the Aperture Science computer-aided enrichment center

ocean quartz
#

ASCAEC

obtuse gale
#

Good morning, and welcome to the Black Mesa transit system

#

This automated train is provided for the security and convenience of the Black Mesa Research Facility personnel

#

The time is

#

8:47 AM

#

Current topside temperature is 93 degrees with an estimated high of 105. The Black Mesa compound is maintained at a pleasant 68 degrees at all times

drifting estuary
#

how i can install 3 java (16-11-8) in a VPS?

drifting estuary
obtuse gale
#

This train is inbound from level 3 dormitories to sector C test labs and control facilities. If your intended destination is a high security area beyond sector C, you will need to return to the central transit hub in area 9 and board a high security train

drifting estuary
#

okok but answer

drifting estuary
obtuse gale
#

sdkman

drifting estuary
#

ty

forest pecan
#

be a man and use the archive and do it yourself

#

๐Ÿฆพ

forest pecan
#

@ocean quartz i managed to get the plugin working with slimjar, thanks for the help.
There seems to be some delay however when slimjar initiates. It doesn't seem to be too long. Hopefully your pr helps with that for next release

fallow remnant
#

Hey im trying to serialize/deserialize packets
I looked at the way ProtocolLib clones packet, and came up with this

    public static byte[] packetToByteArray(PacketContainer p){
        ByteArrayOutputStream out = new ByteArrayOutputStream();
        try {
            ObjectOutputStream oout = new ObjectOutputStream(out);
            oout.writeObject(p);
            return out.toByteArray();
        } catch (IOException e) {
            e.printStackTrace();
        }
        return null;
    }
    public static PacketContainer byteArrayToPacket(byte[] p) throws IOException, ClassNotFoundException {
        ObjectInputStream in = new ObjectInputStream(new ByteArrayInputStream(p));
        return (PacketContainer) in.readObject();
    }
#

However this doesnt seem to work with PacketPlayOutLightUpdate and a few others

#

throwing this exception while deserializing

#

serializing seems to work fine

#

Is there any inbuild PacketSerializer in ProtocolLib / is there a obvious error in my code?

ocean quartz
forest pecan
#

did you already try parallel?

#

i think its better in the long stretch

#

even tho bandwidth is limited

humble silo
#

im soryr

half harness
#

GGGS

humble silo
#

ok

#

ok ok

#

did you get it?

#

or no

#

idk if it works for central

#

but it should

#

as its about the same i think

#

ohh

#

wel

#

well see

half harness
#

it should

#

๐Ÿ˜ฎ

humble silo
#

all i did was apply the maven publish plugin to sub projects and then put all the publishing stuff in there

#

i havent done anything with the signing or nexus yet, so idk if that part will work

#

but it publishes to local just fine

ocean quartz
static zealot
#

resource packs will be the end of me ๐Ÿ˜ฆ

half harness
humble silo
#

alr well its doing some weird naming stuff, but ill try nexus in a second

#

๐Ÿคž

half harness
#

๐Ÿ™

humble silo
#

ok @half harness whats the command to publish to maven central again?

half harness
#

with or without the nexus plugin?

humble silo
#

with

half harness
#

gradle publishToSonatype closeAndReleaseSonatypeStagingRepository

humble silo
#

oh cool

#

great thanks

#

well its not throwing an exception immediately

#

uhhhh

#

did it do it?

#

lol

obtuse gale
humble silo
#

wheres the staging place thing?

humble silo
#

oh great

#

lol did you just have that on your clipboard?

half harness
#

๐Ÿ˜Ž

humble silo
#

lol

half harness
humble silo
#

I THINK

half harness
#

NO Way

humble silo
#

LOL

#

ok ok ok ok

half harness
#

HOW

humble silo
#

lol

#

ok ok ok ok

#

one second

half harness
#

look in the jar

#

to make sure its correct

humble silo
#

ya

#

ok

humble silo
#

got the sources and javadoc stuff though

half harness
#

oh

humble silo
#

still though

#

it got most of it

#

well the sources are here

#

Im actually seeing everything that should be here

#

idk

humble silo
#

or no

half harness
#

well

#

the nexus plugin should have handed it

humble silo
#

but is it in maven central?

#

or do i have to go to the sonatype website and hit a release button

#

or smth

half harness
half harness
#

drop = cancel/remove

humble silo
#

where here?

half harness
#

uh

humble silo
#

is that not the page?

half harness
#

are you in the repositories or staging repositories tab?

humble silo
#

lol i havent done this in a while

#

uh

#

that was just the search thing actually

half harness
#

o

humble silo
#

Hmm

#

no repositories in tehre

#

weird

#

Well it obviously did something because part of it is there

#

but its not in the staging repositories

half harness
#

well

#

is it in the main repos

humble silo
#

i dont think so

#

how do i check again?

half harness
#

uh

#

repositories link ๐Ÿ™‚

humble silo
#

lol wheres that?

half harness
#

no like on the sidebar ;-;

humble silo
#

the search thing?

half harness
humble silo
#

Ok well i see it up there, so something got published, but idk whats happened now

half harness
#

o

sweet cipher
#

p

forest pecan
#

t

sweet cipher
#

u

obtuse gale
#

v

forest pecan
#

w

humble silo
# half harness o

ima just wait and see if it pops up in mvn search in a couple hours, it probably wont, but i need to take a break lol

half harness
sweet cipher
forest pecan
#

^

sweet cipher
#

^

humble silo
#

net.yakclient

half harness
forest pecan
#

Mind your manners

half harness
#

rip

humble silo
#

dang

#

well

#

ill see what happeend later lol

sweet cipher
humble silo
#

my bad

#

continue please

half harness
#

welp ima go to sleep

#

cya

humble silo
#

alr gn

humble silo
# half harness welp ima go to sleep

It might actually be the case that the -SNAPSHOT on the end of the version is causing it to publish to snapshots instead of staging... ill try it again i guess

ocean quartz
#

Yeah you can't publish a snapshot version to the main one iirc

humble silo
#

well lets see if this works, i really hate stuff like that though, where the version name determines where it goes... seems like someone could just break all conventions and screw stuff up but idk

#

like i could probably do SNAPSHOT-1.1 and it would work

#

or something

mighty finch
#

are instanced worlds possible with multiverse?

humble silo
#

@half harness hope this doesnt wake you, but i got it working... ima push my project to github and send it here if you want to look at it...

#

What i did was apply all the default plugins to the root project, then the signing, maven publish and kdocca to the sub project i want to publish. All of the publication stuff goes in the module you want to publish(with signing and the sources stuff) and then the nexus publishing info goes in the root project build.gradle.kts....

To then publish you would run "jar clean <MODULE>:publishToSonatype closeAndReleaseSonatypeStagingRepository

I think thats it, not so different but kinda annoying

ocean quartz
static zealot
#

Hmmm.

humble silo
#

Blitz

#

this is you

static zealot
#

clearly

humble silo
#

Its says ImBlitz

#

how could it not be

static zealot
#

I said clearly

#

that means yes

humble silo
#

yes

#

wow i didnt know you were so good at 1.8 pvp!

#

lol

static zealot
#

Sooooo. I have a custom enchant, I am overriding the setDisplayName(int level) method and yet my enchanted item has no custom lore or anything for the enchant. Am I supposed to manually add the lore when I enchant?

    override fun displayName(level: Int) = "&3EName ${convert(level)}".toComponent()```
#

I used the ItemStack#addEnchantment method to add the enchantment btw.

#

the enchantment is there btw. I used the /minecraft:data command to check. also it glows.

obtuse gale
#

ok

ocean quartz
#

Blitz go sleep

static zealot
#

I'm afraid that is not an option

obtuse gale
#

it wasn't an option

#

it was an order

static zealot
#

An order that I have to disobey

distant sun
#

Yes, you have to add it to lore @static zealot

#

Imagine allowing plugins to add their own enchantments but not display them to the client smh

obtuse gale
#

I mean, it's not allowed to begin with lol

distant sun
#

is it not? ๐Ÿค”

#

Is either that or bukkit doing it, kinda sad that we have to use fucking lore

obtuse gale
#

That's why you have to use reflection to register enchantments

distant sun
#

great

prisma wave
empty flint
#

Has anybody used the mojang-mappings with gradle before?

steel heart
#

With paperweight and fabric and forge yes

obtuse gale
#

I wan't it to be somthing different

gray linden
#

i have a question . I want to refund my nitro and i submit a request and discord automatically sent me a email to which I must respond
. I respond but they didnt sent me nothing . That was yesterday. If anyone know please respond (sorry if my english is bad but i dont speak english).

empty flint
steel heart
#

Idk

#

I mean

#

It helps xd

#

As opposed to look on obfuscated stuff

empty flint
#

But it doesn't do anything for not packaging your plugins for different versions if you want to support different versions :/

steel heart
#

Yeah

#

Well

#

I think thereโ€™s a gradle plugin that would reobf

#

And then youโ€™d use a multiproject setup ofc

empty flint
#

well f me, I hate having to re-do all my nms methods when a new spigot version comes out...

rotund egret
#

The trick is not using nms care

empty flint
#

Yeah, well, despite what md_5 claims about APIs and all that other 'never use nms' bullshit, some things can't be achieved without NMS...

steel heart
#

pr to paper bigbrain

empty flint
#

SpigotMC doesn't allow Paper-only plugins, I don't think

#

and I am not getting around NMS by using Paper and still having to do NMS...

steel heart
#

well pr to spigot then?

potent nest
#

good joke

steel heart
#

If youโ€™re lucky it might get accepted quite fast

static zealot
empty flint
#

I think I just figured out how to do my NMS without multimodule projects...

quiet depot
#

does it start with r and end with eflection?

empty flint
#

Kotlin objects seem to only get loaded when they are accessed, right?

#

So before that, they don't have to align with the classpath

#

which means I could call the appropriate NMS implementation object using reflection, and don't have to reflect the actual versioned methods and classes

#

Let's try ๐Ÿ˜„

empty flint
static zealot
#

welp. fuck.

prisma wave
#

You can make that work yourself though ofc

static zealot
#

yeah. it is just more work I Don't want to do

#

and research. I spent my past few days just reading hundreds of posts and watching a ton of videos (those were just for custom resource packs and how to make them)

obtuse gale
#

Not all of it of course, but depending on what you use exactly some things don't change for years

#

CraftBukkit is still versioned ๐Ÿšฎ

static zealot
obtuse gale
#

Sure

humble silo
static zealot
#

I want to die ๐Ÿ˜ฆ

#

I am in great pain.

ocean quartz
#

Same

#

Did you even sleep today?

static zealot
#

oh yeah. got like 6 or 7 hours of sleep.

#

I'm not tired. I just want to die in general. xD

hot hull
#

Damn, I still have not started with the competition

ocean quartz
#

Smh

static zealot
#

a lot of stuff I never had to deal with until now. I've probably read over 100 spigot posts and other stuff for resource packs

static zealot
inner umbra
#

Ah

sly sonnet
#

isn't like spigot events n shit based on nms?

obtuse gale
#

basically

#

spigot mods the server and adds some lines to dispatch bukkit events here and there

heavy steppe
#

hello

#

like my server is currently vanilla and has been like 1 month old with lot of progress

#

i want to change it to spigot

#

will it affect anything

sly sonnet
#

uhmm

#

probably not, but better make a backup

#

better safe than sorry

#

in any case, it should not break anything

heavy steppe
#

around approx like 3 gb of world file

#

umm ok

heavy steppe
#

or paper

terse tundra
heavy steppe
#

damm

#

u guys soo cool to code soo long

#

experts

wind patio
#

what

heavy steppe
#

me here who dosent knows how to even download a plugin and where to put it in the folder thinking to code plugins f me

wind patio
#

coding does not make you cool

#

if you get enough practice, you'll get there, eventually

heavy steppe
ocean quartz
sweet cipher
wind patio
#

๐Ÿง”

wind patio
rotund egret
#

I made a plugin once and everyone clapped, including the bus driver

hot hull
#

Wait Zodd

#

I have something for you

static zealot
#

your cheeks

#

?

hot hull
#

Took a while to find it

static zealot
#

lmaooo

rotund egret
#

Sorry I can't see it

empty flint
#

Holy mother of... I just talked to a colleague of mine at work who recently got into Kotlin.
He says he's coding all of his classes with only members and no methods, and adds the methods in as extensions separately

rotund egret
#

Nice

obtuse gale
#

break into his house and kill him while he sleeps

#

For legal reasons this is a joke

static zealot
#

nah.

inner umbra
rotund egret
#

It's not a joke for non-legal reasons ๐Ÿ‘€

obtuse gale
#

based

#

but true

ocean quartz
rotund egret
#

Just throw the idea of conventions out the window

ocean quartz
#

Yeah

hot hull
#

Do what makes you happy, not what others deem convetional

distant sun
ocean quartz
#

I think it's good to keep conventions in mind but not follow them religiously

rotund egret
#

That's why I use static every chance I get

#

Even in kotlin, I just pop that Jvmstatic annotation, for funsies

static zealot
#

Oh my. I want to die

#

The past 3 hours of my life is the reason why you debug your code and test hypothesis my friends.

#

I've just wasted 3 hours working with an event thinking it does what I wanted when it actually did something else

hot hull
#

L

empty flint
#

is it possible that I cannot add multiple versions of the same dependency into a project?

obtuse gale
#

That's how maven/gradle works, yes

empty flint
#

well damn there goes my idea for a non-multi-module project build...

obtuse gale
#

you can always put the dependency jar files in a folder and add the folder instead

#

since those will inherently not be maven modules

#

but it's ugly

hot hull
#

Why would you even want that tho

empty flint
obtuse gale
#

no

#

you add the jar file directly as dependency

empty flint
#

ew

obtuse gale
#

and a jar file may not even have any pom xml

empty flint
#

Does that work with a compileOnly jar file as well?

#

I guess I should make submodules then. Frick.

obtuse gale
#

the proper way

rotund egret
#

Personally I use dommodules

empty flint
#

what are dommodules?

woven plaza
#

I am creating vehicle plugin, the current stage I am at is handling collisions with blocks

#

the way I am steering the vehicle is through velocity

#

what I need is somehow detect when my vehicle collide with wall of blocks

#

so for example I can damage it/ slow down its speed

wind patio
#

custom collision class?

woven plaza
#

wdym

empty flint
woven plaza
#

yeah

#

but shouldnt it return false?

#

because nms is probably already preventing from hitbox collision no?

distant sun
static zealot
#

barry is broken. just sent it in like 4 channels and it was just fine

#

lmao

obtuse gale
#

??

static zealot
#

bass gets triggered at his link ^

obtuse gale
#

right..

#

it doesn't

half harness
humble silo
half harness
#

but i thought clean deleted it all anyways

#

ยฏ_(ใƒ„)_/ยฏ

humble silo
#

Well its clean the jar right?

half harness
#

wdym?

humble silo
#

Idk try taking it out, thatd just what works for me

half harness
#

alr

humble silo
#

Oh lol ur right

#

Ya idk

#

Try without if u want

humble silo
half harness
#

wdym?

#

oh im publishing the api module for bedwars

humble silo
#

Oh cool,

obtuse gale
#

(โ•ฏยฐโ–กยฐ๏ผ‰โ•ฏ๏ธต โ”ปโ”โ”ป

loud gyroBOT
#

โ”ฌโ”€โ”ฌ๏ปฟ ใƒŽ( ใ‚œ-ใ‚œใƒŽ)

obtuse gale
#

Why does the client save the server list as NBT wutcat

woven plaza
#

I think the only way to check if entity collides with block is through that method?```java
public List<AxisAlignedBB> getCubes(@Nullable Entity entity, AxisAlignedBB axisalignedbb) {
ArrayList arraylist = Lists.newArrayList();
this.a(entity, axisalignedbb, false, arraylist);
if (entity != null) {
if (entity instanceof EntityArmorStand && !entity.world.paperConfig.armorStandEntityLookups) {
return arraylist;
}

        List list = this.getEntities(entity, axisalignedbb.g(0.25D));

        for(int i = 0; i < list.size(); ++i) {
            Entity entity1 = (Entity)list.get(i);
            if (!entity.x(entity1)) {
                AxisAlignedBB axisalignedbb1 = entity1.al();
                if (axisalignedbb1 != null && axisalignedbb1.c(axisalignedbb)) {
                    arraylist.add(axisalignedbb1);
                }

                axisalignedbb1 = entity.j(entity1);
                if (axisalignedbb1 != null && axisalignedbb1.c(axisalignedbb)) {
                    arraylist.add(axisalignedbb1);
                }
            }
        }
    }

    return arraylist;
}
#

but not sure how to use it

potent nest
#

that rather looks like collision with other entities

woven plaza
#

any idea

#

how to check if entity is colliding with block

#

and the result of that would be change in velocity

static zealot
#

They removed simon again :(

ocean quartz
#

Who's they and who's simon?

obtuse gale
#

simon something something these nuts / mah dick / etc

static zealot
#

No :(

#

I can't find it

#

The video from yugi

ocean quartz
stuck harbor
obtuse gale
wind patio
#

anyone knows what this pulley thing in textboxes is called

#

to resize it

woven plaza
stuck harbor
#

well thats just an improvement of ur for loop there

woven plaza
#

why loop through entities though

stuck harbor
#

thats what ur doing

tranquil crane
#

do you want to just check all the blocks the entity overlaps with?

woven plaza
#

it would be loop through blocks in range then?

#

no?

tranquil crane
#

what exactly are you trying to do lol

stuck harbor
#

i am very confused

obtuse gale
#

what

woven plaza
#

lets say you have armorstand

#

you are applying velocity 3 3 3

#

to it

#

so it is starting to move in direction

surreal quarry
#

ainโ€™t no way

tranquil crane
#

Dark mode

stuck harbor
#

๐Ÿคข

tranquil crane
#

eclipse's dark mode is like the worst dark mode

stuck harbor
#

dark mode is not a pro, it is a requirement

#

thats like saying

pro: compiler
surreal quarry
#

lmao

tranquil crane
#

every IDE in existence does exactly what's listed there in the pros

surreal quarry
#

they did say pro: compiles code

stuck harbor
#

๐Ÿ‘€

surreal quarry
#

i hate this class so much

stuck harbor
#

jesus man

frail glade
#

A lot of schools typically teach to use Eclipse.

tranquil crane
#

Is that like intro to CS or something

surreal quarry
#

they spent 20 minutes telling us why https was better than ssh for got

#

git

stuck harbor
#

lol

#

derp

surreal quarry
#

yes itโ€™s like a CS tools class

tranquil crane
#

a git class is teaching you about.. eclipse?

surreal quarry
#

not git class just cs tools in general

woven plaza
tranquil crane
#

o ok

surreal quarry
#

but itโ€™s a joke

woven plaza
#

I want to hook into that moment

stuck harbor
#

i was taught html in windows notepad

tranquil crane
#

are you teleporting the entity instead of applying a velocity or something?

stuck harbor
#

and those computers had notepad++ on them

surreal quarry
#

lmao

stuck harbor
#

we were just taught to use plain notepad

tranquil crane
#

if you just use the velocity it'll automatically handle collisions and everything

woven plaza
#

but I need to keep track of the moment it hits the wall

tranquil crane
#

if the velocity on an axis suddenly hits 0 it has hit a wall

woven plaza
#

^ checked that

#

it does not change

tranquil crane
#

lol what, jank game

woven plaza
#

remain constant

stuck harbor
#

sometimes i think my code is bad, then i see spigot plugins with 5000 lines in their main class

tranquil crane
#

even if an armor stand were pushed directly up against a wall it technically wouldn't be colliding with it since the game nudges it out of the wall, so I don't think there's really a reliable way to check that

woven plaza
tranquil crane
#

you'd have to get its current position, add the velocity yourself and see if the position between the current and destination has a block between it

#

I'm guessing you're launching a custom projectile or something using an armor stand to display it and you want it to do something when it hits the wall

#

I don't think simply checking what blocks it's "colliding" with would work

woven plaza
#

@tranquil crane What Am I doing is vehicle plugin, I am listening for Steer packets and based on that apply velocity to armorstand player is riding, why I need to know hwne it hits the wall is that I need to decrement the velocity and damage the car

tranquil crane
#

ah

woven plaza
#

it is necessary

prisma wave
#

@tranquil crane HI

woven plaza
#

to make shit look good

tranquil crane
#

hello mittens

obtuse gale
#

Nicoole

prisma wave
#

I FINALLY DID FAREWELL

tranquil crane
#

:D

prisma wave
#

27 hours

#

9000 deaths

tranquil crane
#

niceee

#

oh lord

stuck harbor
#

gg

prisma wave
#

Yeah ๐Ÿ’€

woven plaza
#

any ideas?

#

how to accomplish that

tranquil crane
#

get the armor stand's current position, add the velocity, if there's a block between the current position and the calculated position it has hit a wall

ocean quartz
prisma wave
#

COOL PEOPLE CHANNEL

tranquil crane
#

it's now a celeste channel

#

celeste takeover time

tranquil crane
#

the heck

prisma wave
#

anyway yeah

woven plaza
tranquil crane
#

I'm not entirely sure how the velocity is measured

#

I'd assume it's either a velocity of 1 is 1 block per second or 1 block per tick, though that could be entirely wrong

prisma wave
#

The STUPID last level took me about a million attempts because I would always mess up right at the end and it was hard to practice because the respawn point was so far away

#

So um

woven plaza
#

hmm

prisma wave
#

I might have used debug mode to set the respawn a bit closer BUT then I completed it legit

tranquil crane
#

:(

#

the last level of farewell is so much fun

prisma wave
#

YEAG

#

AND THE MUSIC

#

MMGMHMFMSMA

#

However it was quite frustrating having to do a minute of pain until I could practice the actually hard bit

tranquil crane
#

it do be like that

prisma wave
#

also I have completed every C side except 6 7 and 8 :D

tranquil crane
#

:D

#

7C is so good

#

I have completed it in 55 seconds as my record

prisma wave
#

impressive

#

Trรจs bien

#

5C was a pain

tranquil crane
#

the first room is the only hard part of it lol

prisma wave
#

I did it really well, then choked right before the heart and then it took me another 500 tries

#

Nah the last one sucked imo

tranquil crane
#

oh and the last couple dashes

prisma wave
#

Yeah

#

Right at the end

tranquil crane
#

I'm gonna go play all the c sides rn

#

you have inspired me

#

can still use external emojis, unlimited power ASevilFast

prisma wave
#

let's gooo

tranquil crane
#

I haven't done 3C/8C in a long while

empty flint
#

tfw when gradle decides to ignore the kotlin build options in the build file. f you gradle.

half harness
#

btw anyone knows if its possible to make gradle not run every task when reloading it?

obtuse gale
#

why

half harness
#

not too big of a deal, but i have a task that removes the jar from the server so if i reload gradle while the server is running it breaks things ยฏ_(ใƒ„)_/ยฏ

#

and i reload it since intellij sometimes just decides to pretend that all my dependencies are gone

obtuse gale
#

why do you need that task even?

half harness
#

saves 5 seconds ๐Ÿ™‚

obtuse gale
#

of what?

half harness
#

going to the server and deleting it myself

#

and

obtuse gale
#

why do you need to remove the jar in the first place?

half harness
#

so that if i make a new version

#

so that I can put the new one

#

or if i don't need to test it anymore

obtuse gale
#

just.. copy the new one after build?

#

it will overwrite it

half harness
#

iirc it didn't overwrite

#

ยฏ_(ใƒ„)_/ยฏ

obtuse gale
#

it does for me

half harness
#
task copyFile(type: Copy) {
    if (!new File("../.TestServers/${server}/plugins/").exists()) {
        return
    }
    new File("../.TestServers/${server}/plugins/${fileName}").delete()
    from("build/libs/${fileName}")
    into("../.TestServers/${server}/plugins")
    include("*.jar")
}
```this is what i use
#

its been a while since i made that

#

so

empty flint
half harness
empty flint
#
  shadowJar {
    archiveBaseName.set(project.name)
    archiveClassifier.set("")
    archiveVersion.set(currentVersion)
    if(project.hasProperty("deploy")) {
      val relocationPrefix = hubPluginProject.group
      println("Relocating packages to group $relocationPrefix...")
      relocate("dev.jorel.commandapi", "$relocationPrefix.command.api")
      relocate("me.mattstudios.mfmsg", "$relocationPrefix.mattstudios.mfmsg")
      relocate("me.blocky.lib", "$relocationPrefix.lib")
    }
    if(!isBukkitPlugin) exclude(bukkitGroup)
    if(!isBungeePlugin) exclude(bungeecordGroup)

    //minimize() //maybe do not minimize lib and klib?
    doLast {
      copy {
        from("build/libs/${project.name}-${currentVersion}.jar")
        into("build/final")
      }
      println("Created artifact ${project.name}-${currentVersion} in ${project.buildDir}\\final\\\n")

      val deployToPluginsFolders: (Project, String) -> Unit by rootProject.extra
      if(project.hasProperty("serversLocation")) {
        if(File(project.property("serversLocation").toString()).exists()) {
          deployToPluginsFolders(project, project.property("serversLocation").toString())
        } else {
          println("Server location ${project.property("serversLocation")} not found! Could not deploy artifact.")
        }
      }
    }
  }      
half harness
#

o

obtuse gale
#

holy shit

empty flint
#

here's my shadowJar task, just add a doLast where you replace the built jar in the plugins folder

half harness
#

right?

surreal quarry
#

second removes the -all

half harness
#

oh

surreal quarry
#

but yea 1st and 3rd probably redunadant

#

redundant*

obtuse gale
#

I mean

tasks.build { finalizedBy(tasks.named("copyToServer") }

task<Copy>("copyToServer") {
    dependsOn(tasks.shadowJar)
    findProperty("plugins-dir")?.let { dest ->
        tasks.shadowJar.orNull?.archiveFile?.let { src ->
            from(src)
            destinationDir = file(dest)
        }
    }
}
empty flint
obtuse gale
#

or tasks.jar if you're not using shadowjar

half harness
#

sooo why do u have it if its redundant thonking

empty flint
#

because the currentVersion and plugin.name properties can be changed

half harness
#

doesn't gradle already have a version property

surreal quarry
#

yes

half harness
#

and project.name is already default iirc

empty flint
#

it does, but it doesn't auto-version it

half harness
#

auto-version?

empty flint
#

I have a task that increases the version of my build automatically

#

so I don't have to think about it

half harness
#

what if you test 5 times

surreal quarry
#

oh god

half harness
#

then release a version

#

๐Ÿฅฒ

surreal quarry
#

bros doing ci/cd locally

empty flint
#

those are build versions. that's fine

half harness
#

or do u just not test ๐Ÿฅฒ ๐Ÿฅฒ ๐Ÿฅฒ

#

what

half harness
empty flint
#

patches get a patch version increment, minor updates a minor version increment and major releases get a major version increment

obtuse gale
#

Set the version to the project.version instead?

half harness
#

that too

surreal quarry
#

then you donโ€™t need an auto increment thing

#

just increment the version once itโ€™s tested properly

empty flint
#

I just don't want to think about the version, when I build a patch, it increments the patch version portion of the version string

#

so 1.2.3 becomes 1.2.4 for example

half harness
#

oh boy my bedwars would be at like patch 2000 by now

surreal quarry
#

then you end up with like 100 patches per minor version?

#

probably more

obtuse gale
half harness
empty flint
#

how often do you think I release shit?!

half harness
#

bedwars v1.0.1582-SNAPSHOT ๐Ÿ™‚

empty flint
#

it's like 2 or 3 patches between minor versions

surreal quarry
empty flint
#

and the same for major ones

#

don't confuse patch with build

half harness
empty flint
#

me either

#

who cares

#

as I said. it's just so I never have to think about it

surreal quarry
#

everyoneโ€™s works differently but normally if you have an auto increment build number you see it like 1.0.3-b2819 or somethjng

half harness
#

wath

empty flint
#

yeah

#

when I build with intend to release

surreal quarry
#

but the b1282 is usually the jenkins build number not

empty flint
#

I can build for development too, without increasing the version???

#

like...

surreal quarry
#

oh boy

empty flint
#

it doesn't increment every time I create a jar lol

surreal quarry
#

separate prod and dev build tasks?

#

thatโ€™s like eliminating the point of gradle, reproducible builds

empty flint
#

well no, just a flag in a build configuration where the same task runs the increment or not as necessary

surreal quarry
#

ยฏ_(ใƒ„)_/ยฏ

empty flint
surreal quarry
#

itโ€™s the point of using build tools in general

half harness
#

closed source ๐Ÿคข

empty flint
empty flint
#

It's just for fun anyway

#

and ugly as fuck

surreal quarry
#

then other people can reproduce your builds /s

half harness
#

so that

  • other people can help you fix bugs or add stuff
  • so that other people can tell you how to improve your code
  • so that other people can learn from your code
empty flint
#

I don't care about other people ๐Ÿ˜Œ

surreal quarry
#

/s means sarcasm

empty flint
#

That's just not in line with my motivations to do this in the first place, idk what else to tell you

#

it's not supposed to be a learning tool for anybody, nor do I want other people's opinions about my code unless I ask for it

#

And the entitlement of strangers that goes with providing somethign for free just isn't worth it

#

if I had a โ‚ฌ for every time somebody asked me when I'd be updating my plugins, I would not be making them anymore

#

No thanks, I'd rather close my code, go about this hobby in peace and be left alone

half harness
#

if you go open source then people can update it for you
fingerguns

empty flint
#

I don't want them to touch it, though

#

it's not theirs to update

#

the goal is not to provide a plugin or sourcecode or whatever, I'm doing this because it's fun figuring out how stuff works and how to get minecraft to do stuff

#

now everybody has different motivation and I do understand the appeal of open source software, it's just that in this particular case, I don't share it.

#

heck I couldn't do this without a lot of open source software, pretty much all of it is.

tranquil crane
#

@prisma wave core c side is hard

distant sun
#

What game is that?

quick crater
#

Does anyone know if there is an event that clicks on the recipe book?

obtuse gale
#

No, but I think it sends a packet, not sure

quick crater
#

I think so too, I want to code a execute a command feature when the player clicks on the recipe book

cinder flare
#

man did you guys know that plain C has union types?

#

cause I didn't until today when I was in class looking at the list of keywords

humble silo
#

DKIMMMMMMMMMMMMM, My thing is in maven central yet gradle cant find it... HELP

obtuse gale
#

how long ago did you publish that?

humble silo
#

like last night

#

so 24 hours ago

#

or smth

ocean quartz
#

It's kinda weird, it doesn't show the version here

#

i think that's where the version goes

humble silo
#

should it?

#

huh

ocean quartz
#

i think so

humble silo
#

why is this so weird

#

i mean, i dont need it on central rn, so i can just do it locally

#

but sitll

#

still*

#

it would make life easier

obtuse gale
#

gradle found it just fine for me

humble silo
# obtuse gale

oh dang, well thanks for trying! Ill restart IJ and see what happens ๐Ÿค”

obtuse gale
#

./gradlew --refresh-dependencies

humble silo
#

or that

#

alr thanks

humble silo
#

ima just delete everything

prisma wave
prisma wave
distant sun
#

Ah nice

jovial warren
#

Lol

empty flint
#

Hmmm are gradle dependencies inherited from projects if you add the project as a dependency?

old wyvern
#

If the dependencies are transitive, yes

empty flint
#

how do I declare the dependencies as transitive?

old wyvern
#

for example,
with the api configuration, yes
with the implementation configuration, no

empty flint
#

are there any other differences between api and implementation?

old wyvern
#

You wont be able to access the dependencies of project A in a project B,
where project B depends on project A with implementation configuration

#

But the dependencies will still get shaded if you use shadow

#

You just wont be able to call any of those dependencies directly from B

empty flint
#

so if PluginLib is my api project, does this make the dependencies of PluginLib usable in the project?

old wyvern
#

No

#

Those dependencies should be declared with the api config

empty flint
#

or do I have to declare the dependencies in PluginLib as api?

old wyvern
#

Yes

empty flint
#

ah gotcha

#

is there something like a compileOnly api?

old wyvern
#

apiOnly I think

#

Lemme confirm

#

compileOnlyApi
@empty flint

empty flint
#

so that makes the compileOnly dependency transitive but does not include them in the final jar, did I understand that correctly?

old wyvern
#

mhm

arctic agate
#

Anyone know why my empty lines didnt work in deluxemenus?

#

i try with '' and ""

#

but still nothing

old wyvern
empty flint
#

Hm so how does that work when shading?

#

Specifically with minimizing the shaded jar

#

Can I specify to minimize the jar with transitive dependencies in mind, @old wyvern ?

#

If I minimize a project A jar that utilizes the API, does the project that depends on the compiled project A being present just get fucked?

old wyvern
#

No

#

Minimize is part of the shadow plugin

#

Nothing directly to do with dependency management

#

It only happens on the jar generated by shadowJar task

empty flint
#

Ah yeah I think I mixed up the two concepts a bit

#

thanks for clarifying

remote goblet
#

Time to figure out how to get java on college computers so I can work on plugins instead of actually doing my work ASevil

old wyvern
#

Maybe they already have java installed

#

๐Ÿ˜Œ

remote goblet
#

no they dont

#

or atleast not jdk 11

#

which is what I need

empty flint
old wyvern
#

It makes sure to shade the output of shadowJar

#

on that sub project

remote goblet
#

yeah i got it borzan

empty flint
# old wyvern It makes sure to shade the output of `shadowJar`

Yeah I understand what it's supposed to do but I don't quite understand how to tell it what the shaded configuration of my project actually is.

dependencies {
   compileOnly(BlockyCoreSHADED)
}

results in the error

Project :Modules:Minecraft:Plugins:Blocky Debug declares a dependency from configuration 'implementation' to configuration 'shaded' which is not declared in the descriptor for project :Modules:Minecraft:Plugins:Blocky Core.

#

how do I declare what the implementation with shaded configuration for BlockyCore is?

#

(BlockyCoreSHADED is val BlockyCoreSHADED: ProjectDependency by extra(dependencies.project(":Modules:Minecraft:Plugins:Blocky Core", "shaded")))

old wyvern
#

Blocky core is a subproject in the same project?

#

@empty flint

#

Correct?

empty flint
#

BlockyCore and BlockyDebug are subprojects of the same rootProject and on the same level, yeah

old wyvern
#

Does BlockyCore have the shadow plugin applied?

empty flint
#

yep