#dev-general
1 messages · Page 181 of 1
I can do what? 🙂
I meant its possible to transfer issues
ah okay lol
also, making your repo public means you can make use of features like draft pull requests, which require a paid subscription for private repos
and there's a bunch of other things that you get access to
changed how holograms work in my plugin for third time lets see if i made improvements.
yeah, with private repos you only get a total of 2,000 actions minutes/month, whereas you get pretty much unlimited for public repos
you also get code owners, protected branches, draft pull requests as I said earlier, multiple pull request assignees and reviewers, scheduled reminders, and automatic code review assignment
oh, and free pages and wikis, repository insights and multiple issue assignees
i will make ElaraHub when i am in charge
and required reviews, required status checks, automated code scanning and GitHub security advisories
free everything but only for projects written in Elara
otherwise you get a maximum of 2 files before you get banned
you mean if
if
mark my words
@heady birch also making the whole lot open-source means it can all be one big project, rather than you splitting it off in to separate repositories to accomodate the API (which should be open-source ngl)
True
For my adapter implementation models. At the moment they are names just 1_8_R2 e.g, should they be kiteboard-adapter-1_8_R2?
nah you'll be fine
I'd just leave it as it is and let others suggest changes like that xD
kiteboard-adapter-1_8_R2
kebab case 👀
actually that's not what I mean
that reminds me of a certain language
shut up
🙄
I mean you should open-source it now so I can work on it xD
I love contributing to other people's projects
also @heady birch , what's not ready?
I'm just curious
groupId in all the poms is net.kitesoftware.board when it should be just net.kitesoftware
oh yeah that
but that's what I'm working on now
Not really
from what I saw in my version there wasn't
except for that weird initialisation thingy with StorageManager being given the current instance of the plugin while it was still initialising
@quiet depot never done this before so it might not be what you were looking for, but I've written up every language feature with what I think is a formal grammar in ANTLR syntax:
https://github.com/ElaraLang/Elara/blob/master/spec.md
whats that the new YamlStorageAdapter()
Oh yeah that I see what you mean now. I'm not too sure why that works, but it seems to
The global multiplier has ran out and has been reset!

Wait it didn't work for you?
nope
Interesting
not with my version of the code
that's what I mean
I tried moving the assignments outside of the constructor and just assigning them where they're declared, but that didn't work either
also something's probably wrong with my pom since it doesn't seem to like putting the shaded artifacts in the normal JAR, it only puts them in the shaded JAR
also @heady birch , got something for you to look at
I invited you, check your GitHub
there's probably quite a few things you'll notice
I've never seen that properly decompiled before
yeah luyten couldn't do it
CFR did it though
that's why @quiet depot is an actual god
Spigots anti-piracy thing it injects on the download's which is quite clever
I knew it existed, since luyten showed a loadConfig0 method at the top of onEnable
but only CFR showed the actual code
CFR was the one that properly decompiled those enum switches
i've actualy managed to fix my placeholder updater frik yes!
now API for placeholders here we go and after that api for creating the holograms
also I added some nice annotations for the API if you noticed @heady birch
@ForTheFuture (the best name for an annotation ever lol) denotes that something will be implemented in a future version
and then @Experimental denotes that it is currently in testing and it is unknown whether it is fully stable or not
also you can see my attempt at removing any remenants of Bukkit in the API with the GroupAssignEvent, though that failed because the UserManager takes a Player
do you know if the interface event would work?
I reckon it will since it's technically an event
well, it's implementation is a registered event
would they not need to do
@EventHandler
public void onSomething(GroupAssignEventImpl event)?
As for the user manager i was thinking of maybe KiteUser<T>
but I dont know how that would work with the rest of the plugin internally
Matt used that to abstract his thingy
would I just use KiteUser<Player> internally?
probably yeah
I'll look in to it right now
what would the UserManager be?
<T> KiteUser<T> getUser(final T player);?
or should UserManager also take a T type param
lemme have a look in to this
Heh good point I'm not sure
maybe just make the UserManager methods take <T> and have UserManager remain how it is
but I'm worried that could be annoying for developers
myKiteService.getUserManager().<Player>getPlayer() seems a bit annoying, unless Java can figure those out by what you pass in as a param there
gotta love this
http://images.virtusdevelops.eu/shareX/nr71bsrh.png
e.g. myKiteService.getUserManager().getPlayer(aPlayerInstance)
@dusky drum welcome to Minecraft, done in the complete opposite way to everything else Microsoft does
XD
(what I mean is that Windows 10 for example is backwards compatible back to the ages of DOS, where Minecraft has 0 backwards compatibility)
also @heady birch , you can probably see that everything that isn't extended is declared final, just a Kotlin habit as classes are final by default in Kotlin xD
I did a pretty good job though huh
everything is already final but proguard probably removed that
I mean, you will find the odd method named noClue or noFuckingClue or noIdea or alsoNoIdea lol
that's just where I had no idea at the time and forgot to come back to it
or where I actually have no clue
or unknown
like in some of the animations
TypewriterAnimation has a noFuckingClue in it at the bottom lol
WaveAnimation has a noIdea in it
yeah I saw, that is basically just a counter that goes up to choose between _ or " "
what the typewriter one?
stupid question
but I can have perms like
azone.staff.heal
right?
and azone.staff.* is just all
nice
had some issues with 1 class so i made it in java, now i have to convert it back to kotlin, idk why it wasnt working as kotlin .
@jovial warren was thinking about putting all the animation option keys into a single enum
yeah might be a good idea since they're constant
also having a little trouble with Java generics atm lol
maybe we just allow you to get players by UUID and name
which was my original idea
Yeah that could work, but then youd have to lookup the player by the user uuid every time you need the player
true
but there isn't really any other way to use it in implementation
since if I use <T> KiteUser<?> getUser(final T player), because T doesn't extend Player, it sees it as invalid when I try to take Player as a parameter in implementation
and if I take T as the type, it can't find player.getUniqueId()
contract based types 
KiteUser<T> getUser(final UUID uuid, final Class<T> clazz) ?
Elaras version of a "generics" implementation
@heady birch that could work maybe
but then giving Class<T> every time would be really annoying
You would ask for a function or variable to be present as a contract rather than define a base class
<T { getUniqueId() => UUID }>
let getUser = (T player) => KiteUser<?> {
return player.getUniqueId()
}
ez
accepts any type that has a function getUniqueId() that returns a UUID
in elara you can
^
that's really cool
indeed
but I'm in a Java project lol
Move to Elara
^
ez
not really feasible for this project
everything is feasible for elara
@heady birch wait I've got another issue
what about AbstractCriteria
it requires a ConfigurationSection for the config
should we just make that generic as well?
anyone has idea if i can like do player#hasLineOfSight as like location not entity? cause entity doesnt really exist on server.
Well it get's complicated quite quickly and I'm not sure I will ever add cross platform support anyway
yeah I just gave up and committed the broken code to a devel branch lol
also @heady birch would you be alright if I made a library based off of the idea of internally adapting to the current NMS version (basically I wanna make a library based off of your adapter system, but more extensive)
because I think it's a really good idea that people could make good use of
yeah sure
cool!
thanks
now I gotta make an adapter for pretty much every single packet and then make the implementations for each of them in each and every version lol
I'm really not sure whether to make this in Java or in Kotlin either lol
@eager fern web scrape deesnt work for ig?
Keep getting blocked for some reason and we have to be signed in to be able to actually view it
@distant sun prob not its scuffed idk what todo
Seems to work fine without being logged in @eager fern
even friking better made even more improvements:
http://images.virtusdevelops.eu/shareX/3mxivveh.png
after this i'll add per player lines and so on
Yea just had the scraper loop a 100 times, does not seem to rate limit atleast at that
https://www.instagram.com/USERNAME/?__a=1 this works for me https://stackoverflow.com/questions/50086945/how-to-get-instagram-profile-picture-via-api
Welcome back to Instagram. Sign in to check out what your friends, family & interests have been capturing & sharing around the world.
I might design my own language
@jovial warren Bro bro hear me out: HTML-like code, but it compiles to PHP 😳

The more I think about it, it actually sounds like a great idea. Just imagine the looks if you were out there writing pure HTML backends like an absolute mad lad.
"Combine the beauty of HTML with the webs most powerful scripting langugage"
"beauty"
Oh fuck please no
And you could even market it as innovative by automatically enforcing strict typing etc :p
Imagine using Typescript in 2k20 when you could be using HTML instead 🤷♀️
<define> <id>Test</id> <value>"wtf"</value> </define>
yea... no thanks
<var type="integer" value="18" id="age"/>
<var type="boolean" value="true" id="minor"/>
<!-- if(#age >= 18) -->
#minor = false
<!-- endif -->```
Terror
Honestly imma give making a composer package that "compiles" html to PHP a shot sometime when I'm bored. Perfect troll.
That seems kind of cool
Thymeleaf could probably do the same but you still need java powering it
This took some time but got it working, idk what to do with it yet but hey it's pretty cool
cool
I guess this is the idea
mfgui.gui.guis.Gui
Shhh
lol
arent we all?
"Combine the beauty of HTML with the webs most powerful scripting langugage"
@quaint isle if php really was the "webs most powerful scripting language" we would be absolutely doomed
Do you guys know if BuildTools and the Spigot jar are signed or not?
I can't find anything in the METAINF of the jar
but maybe there's another way to tell
@lunar cypress well, HTML isn't that beautiful either :p
Combine the beauty of HTML with the Web's most powerful scripting language*
*based on W3Tech usage statistics
better?
For real tho, as a web guy, while I personally enjoy Typescript more, PHP has come a long way. Coding in recent PHP versions feels just fine.
I just came across this and it might be useful to anybody trying to learn Kotlin 🙂
https://docs.google.com/spreadsheets/d/1P2gMRuu36pSDW4fdwE-fLN9fcA_ZboIU2Q5VtgixBNo/edit#gid=0
lol have you guys ever seen a file that it's actually a folder?
someone sent me this weird jar and there's an yaml file "random-letters.yml and when you want to open it, it is actually a folder but with a file icon 
spoopy
hm?
spoopy
@quiet depot with cfr, is "java -jar cfr.jar file.jar --outputdir path/to/directory all I have to do? If yes, then I guess it failed to decompile the code 
https://www.spigotmc.org/threads/suspicious-plugin-essentialsbackup.352389/ https://www.spigotmc.org/threads/alert-mc-security-threat-adwind-malware-daily-lootbox-essentialsfly-pluginmetrics-jar.321597/
Hello,
I recently saw this new plugin in my server named "EssentialsBackup" surely I thought it was just built into Essentials. I was wrong. with more...
People say the jar it's obfuscated using Allatori, tried to use https://github.com/java-deobfuscator/deobfuscator but doesn't seem to do anything
@distant sun Scraping is scuffed yk
@distant sun we dont want to require something like an oauth to get there token we just need them to put in a username
Yeah ;p
@astral quiver duck you! You didn’t made the java version now we gonna have an even better one hehe
He is doing in Kotlin as well
you are doing a IntelliJ plugin with Psi read as well? @ocean quartz
Yeah, kinda confusing though, still trying to understand most of it
And yeah doing it in Kotlin too
Cause: unable to find valid certification path to requested target
halp
gradle broke 😦
He is doing in Kotlin as well
@astral quiver ye but it’s for his GUI framework.. (java)
Idk if this is the wrong channel but I was wondering if anyone is capable of fixing a PAPI expansion here and is willing to?...
@astral mason What expansion and what's the problem with it?
skript-expansion, as for the problems, placeholders don't work anymore.
I'd like to give more detail but I don't know anything about the internal stuff.
I'll try to get an error with it to show you.
@versed ridge [PlaceholderAPI] skript is attempting to register placeholders via a PlaceholderHook class which is no longer supported!
It was working up to .6
I already did and I was only asking to see if anyone was maybe capable of making like a fork or something if that is a thing with expansions.
Who maintains the expansion
Okay
It just clicked to me who the owner is, I'm actually going to dm him because I actually kinda know who it is.
Who's the author in the cloud
f8te
Gotta hit them up
Oh wait, so the guy from github isn't the same guy?
¯\_(ツ)_/¯
Well he mentions f8te
I can send you the version from github
Talking to me or Waffle?
Probabaly you since I don't need it.
Probabaly you since I don't need it.
lol
try that out
:)
Alright, the only issue with this is that if it works on my local server it doesn't mean too much because I cant use it on my minigame server over on minehut
Unless its uploaded to the ecloud
Why not?
Because you can't upload on MineHut.
Ye
ah, never heard of minehut :P
I dont use it as my main host
We can just do a release in the ecloud later this week.
Yeah Waffle, he sent me a new version that seemed to have fixed everything.
this version
@distant sun the first thread's jar link is broken, and i don't see a link in the second thread
just send the jar pls
@quiet depot will do when I get home
@quiet depot Sorry for the ping but I thought if anybody knew this about spigot it would probably be you. Is there a way to verify that a provided BuildTools file or spigot server file is actually what they claim to be? I could not find any sort of signature from spigot.org in the manifest and I don't want to use some hash sum or whatever because that would change with every version.
Basically, if I ask the user to provide the path to a BuildTools file in order to run it, I'd like to verify that it is a valid BuildTools file provided by spigot...
no clue
How can I autowire classes into a class after the bean in that class is done
Hm ok ty
@Service
class A @Autowired constructor(
private val b:B
){
@Bean
fun coolThing():C{
// Do stuff
return C
}
}
@Service
class B @Autowired constructor(
private val c:C
){
}``` this is my problem
@obtuse gale
does frozenjoin support sounds on 1.16? I tried and report that bug a couple of days ago but frozen answered that it shouldn't be a problem with that. Does someone have this bug too?
@obtuse gale Basically you should find away to make A not depend on B
yes
I was tryna make my thing follow srp more or something, I did this a while ago lol
How do I exclude a certain package in kotlin from building by gradle?
I can't get it to work
sourceSets {
main {
java {
srcDirs = ['src/main/kotlin']
exclude '**/old/**/*.kt'
}
}
}
This doesn't seem to do the trick
I want to exclude everything in the old package
@prisma wave hey so I started working on an NMS adapters thingy last night and found out the hard way how shit NMS is, and decided to revive the MineKraft project. Interested in giving me a hand? Because you probably know more than me about the Minecraft protocol and how packets work lol
MineKraft?
it's a minecraft protocol implementation in Kotlin
but I plan on making it stupidly high-performance and easy to work with
and I want proper concurrency and coroutine support
like imagine a Minecraft server that performs better than Spigot, yeah, that's my plan lol
I wrote a aproch of concept that if I was able to deliver minecraft packets using Kotlinx.serialization
And works pretty good
is far for be a complete list of packets, but, still is really nice
yeah MineKraft uses kotlinx.serialization
I'm gonna do a bit of a shuffle around with the structure of this project though, because having all the outbound packets in one place doesn't seem like a very good idea
Uses kotlinx.serialization to serialize packets aswell?
yeah
Nice
it's open-source if you wanna contribute
Can you send me a link?
I thought you meant just the JSON serialisation lol
I didn't know you could serialise that sort of data with kotlinx.serialization
you can do some rewriting to make it use kotlinx.serialization if you like
hahah
Yes, I does not know that was possible too
But works
Have some problems because the packet is not static
Like, some packet if a value false they will load in a different way
Like full chunk
idk
and I want proper concurrency and coroutine support
@jovial warren that was what I had planned too lol
Can you use ktx for raw bytes?
The biggest thing that needs implementing is the chunk data right now
chunk data?
And of course not hardcoding everything
I'm currently working on restructuring the project a bit, since having loads of packet classes in one place seems a bit eh to me
as opposed to what?
is it bad to mix like using @Autowire and manual DI with spring?
Incidentally I'll warn you that last I checked the wiki.vg packet format didn't work for 1.16 so I had to reverse engineer it from the nms
@obtuse gale generally yes
If you're using a DI framework you should use it for everything
having packets like this: ```
packets
|- login
|- inbound
|- // inbound packets, probably split up a bit, though there isn't many login packets anyway
|- outbound
|- // outbound packets, same with inbound packets
|- play
|- inbound
|- // inbound packets, same with login inbound, split up a bit
|- outbound
|- // outbound packets, same with login outbound, split up a bit
hm
oh yeah if i use manual DI it wont autowire classes into that class will it
me.bristermitten.minekraft.packets.login.inbound.PacketInLoginStart makes more sense to me than me.bristermitten.minekraft.packets.in.PacketInLoginStart
I'm also migrating a few things to Kotlin 1.4 where necessary
e.g. SerialDescriptor() was deprecated in 1.0-M1-1.4.0-rc (required for Kotlin 1.4), so I'm replacing it with PrimitiveSerialDescriptor()
also we still haven't settled on the style
I've been writing my stuff in K&R, but some of your stuff is in allman and other stuff is in K&R so idk
¯_(ツ)_/¯
also why tf does PacketInLoginStart not extend LoginPacket lol
because I was only using the inheritance as a shorthand
rather than for an actual class graph
ah okay
the entire project is a huge mess rn
yeah I'll do some restructuring and submit a draft PR
alrighty
(draft PR 1. because I wanna make use of them lol and 2. because then we can set thingys we have to do)
I'm using a branch called devel for all this stuff atm, just in case lol
kk
interesting
Here is the packet implementation
and that's instead of netty?
I guess you can use netty as well
But I never test it
This is just a proof of concept
if it's faster and more efficient than netty then it may be worth taking a look yeah
Compiler time stuff get so fast
then again netty's pipelines are pretty useful
pipelines?
also I was thinking of a solution to Minecraft server's biggest problem: it being single-threaded
originally my idea was to open a new concurrent thread for each new player connection, but that could end up out of memory very fast
so my second idea was to make what I call "batches", groups of players all handled by a single thread, say 5 or 10, and then the batches can communicate with each other using channels
which drops the amount of threads you have drastically, but also means you're not handling all the data on a single thread
Not always great
I'm not 100% sure if it will work or how to make it work, but I don't think it's a bad idea
there's probably a better idea though
but if we group them in to say 10 players per thread, that means we won't have 250 players all handled on the same thread, meaning it'll reduce the stress and you can finally run Minecraft servers on server CPUs that are designed to execute multiple tasks at once
having a thread per-player would mean you'd run out of memory very, very fast
have you also considered that you would also have 25 threads active?
is 25 active threads worse than a single thread on its own though?
threads are heavy
also, this is MineKraft, what about coroutines?
some sort of thread pool that has a limited amount to begin but can grow if need be is probably the best option
Last I read about this, parallelism value is increasing only till no. of threads = no. of cores
After that it starts decreasing
we could easily just have a new coroutine per player since you can kinda get away with that
idk though
I mean i wish mc was like multithreaded so we could do more stuff async
Coroutines arent exactly threads, more of tasks for threads of a pool
yeah true
so we'd still have quite a few threads running
and sharing 250 coroutines on a single dispatcher is a horrible idea
Can I autowire into method params?
If so what do i pass in when I call the method
Common pool always has no. of threads equals to core count unless you manually change it I think
cos like it lets me put @Autowired for a method param
if the method is managed by Spring then you can DI with Spring
that's the rule: if it's managed by Spring, you can DI with Spring
wdym managed by spring
@old wyvern what about custom dispatchers with say cached thread pools or something?
because cached thread pools reuse threads that stop executing
for example can i do this
fun commandSetup(@Autowired jda: JDA): CommandManager {```
Thats not a bean btw
But it is in an @Service class
we need to keep the thread count down whilst also keeping the concurrency up
As long as the executing thread pool size doesnt expand over no. of cores, that should be its maximum efficiency
okay, so say on a 4 core machine, common pool has 4 threads max
Basically the limitation is that to run parallel tasks, each tasks are run on diff cores
actually no, because most CPUs also have their own virtual "threads"
if there are not enough cores
Time for each thread is reduced to allocate other threads
you can have more than 4 threads on a 4 core machine though can't you
but it's just not efficient
so we wanna stick to common pool is what you're saying btw
but if it's fixed we'd have a maximum player count built-in
actually doesn't Minecraft already have that
Dont think so
Minecraft has a maximum player count of 250 unless you use BungeeCord to get around it I believe
You dont need each player handled on a diff thread
^ yeah ik
Minecraft has a maximum player count of 250 unless you use BungeeCord to get around it I believe
@jovial warren
Dont think so
but I'm not handling every single player on a single thread
because then we'd just be making Minecraft server but shittier
You dont need it on a single one, hold a thread pool of size = to available processor count or something
also we gotta think about the more important thing, which is: how are we going to make this accessible? and how are we going to serialise packets in to entities
@old wyvern wouldn't that limit the max players though?
how are we going to serialise packets in to entities
?
or are you just saying use a load balancer to choose the thread with the least load
@prisma wave you know how NMS has things like Entity for example, which is an entity that has an ID, and the packet sending gets that ID to serialise it in to a packet
Netty already uses a thread pool as well I think
ah okay
yeah it does
@prisma wave you know how NMS has things like
Entityfor example, which is an entity that has an ID, and the packet sending gets that ID to serialise it in to a packet
@jovial warren yes? what's the relevance of that
I want an API for this
like instead of having to create packets with PacketOutSpawnEntity(entityID, etc. etc.), I wanna just give it Entity and then it to its thing internally
ya know what I mean
bruh
Error creating bean with name 'jda': Requested bean is currently in creation: Is there an unresolvable circular reference?
maybe we should design the API first, since then we can do some implementations and base the rest of the system from the API
indeed
yes
also what should I do for inbound packets? fill them with lateinit vars and then initialise them in read?
nice
or is there another way
lmfao
so
basically I need a way to delay the autowires from the constructor until one of my beans done
i'm not sure that's how it works
well yeah lol
But my class that registers the commands depends on JDA
and that JDA class has to autowire it in just so that the @PostConstruct gets called
another thing we'll have to consider at some point is cross-compatibility
hm
maybe this is a good time to mess around and try that thing where I register all the commands with that fancy way piggy was saying the other day
actually no
that will break with spring most likely lol
what?
ignore what i just said lol
Spring, ew
well idk what to do here lol
wow I just came up with the best hackery for converting enum entity names to common entity names lol
Spring makes nothing break usually. You could register your commands like this
@Autowired
CommandManager(CommandOne, CommandTwo) {
...
}
Where CommandOne and CommandTwo would also be a bean
val replaced = name.replace("_", " ")
val splitted = replaced.split(" ")
return splitted.joinToString(" ") { string ->
var foundFirst = false
string.map {
if (it == string.first() && !foundFirst) {
foundFirst = true
it
} else it.toLowerCase()
}.joinToString("")
}
```👌 top notch hackery right there
took me a little time to get working though lol
actually I could omit the string builder there
Was just about to say that
you only append once
also that's a bizarre amalgamation of imperative and declarative styles
gross
wait which parts are declarative and which imperative?
that's just so say if there is two As in the same string, without that it would think both are first and leave both upper case
yeah true
override fun toString() = name.replace("_", "")
.split(" ")
.joinToString(" ") { string ->
var foundFirst = false
string.map {
if (it == string.first() && !foundFirst) {
foundFirst = true
it
} else it.toLowerCase()
}.joinToString("")
}
```now that's more like it lol
I am scared of releasing my premium resource, since I cannot really test how the plugin performs in bigger servers
I don't see why it would break or anything
But there might be some bugs and people might hate me
this won't work actually due to custom names like Minecart TNT and Mushroom @prisma wave (got around it by adding the parameter val commonName: String = toString())
@foggy pond you will find bugs, it's just how it is, but if you work quickly to fix those bugs as soon as you get them, then you're showing that you care about your players, and people will like that
Yeah but imagine you buy a plugin for 5 euros, excited to use it and it's broken
THat would lead to a negative review probably
only dick heads are gonna give you bad reviews and chat shit
good people will submit an issue or something and if you fix it for them, they're more likely to submit a good review, since you fixed their issue
yeah i guess
Anyone knows what this is?
Caused by: org.jetbrains.kotlin.resolve.lazy.NoDescriptorForDeclarationException: Descriptor wasn't found for declaration FUN
Can't find anything related to it
hey @prisma wave u told me to always use the reformat code button a while ago just to get a habit of it. but i literally dont need it 
Sheesh
oof
🌝
you are now officially a Professional Programmer
wanna know where I'm up to @prisma wave btw?
thanks 🌝
sure
PacketOutSpawnPainting lol
Kali, u got mc opened? 
I'm doing them in order from the top of the list
do u want me to test the jar in general plugins frosty
yus
got it boss
I've created a few enums already like EntityType, PaintingType and Direction, and I've also got Location and World (TODO)
I can't test sounds myself cause I don't got speakers setup :p
1.8mb for a join plugin 
then EntityPacketType, which holds all the packet types for packets that take an entity ID
the new one is 2.4mb 
World is gonna be tricky
yeah ik
that's why I've left it for now lol
it's just a skeleton class for Location to make use of
you're gonna have a field day with this when you see it lol
👀
All proceeds from this video will go towards my Sublime Text license
---- Follow Us On Social Media ----
Katie's Instagram: https://www.instagram.com/katiegracestrobel
Josh's Twitter: https://twitter.com/joshuakcockrell
---- Shop Our Editing Equipment ----
Editing/Coding Lap...
lmao gaby
wait, I never knew that in xxxxxxxx-xxxx-Yxxx-xxxx-xxxxxxxxxxxx the Y means the UUID version
the FactoryFactoryFactoryFactory part of that video just screams @heady birch enterprise logic
factory.fact().ory().factory().get()
classic java 
@prisma wave any idea what Position is in, for example, this packet: https://wiki.vg/Protocol#Block_Break_Animation ?
in NMS, it's BlockPosition apparently
apparently it gets sent as a long with a really weird algorithm
No luck, i have no idea what is causing this .-.
Caused by: org.jetbrains.kotlin.resolve.lazy.NoDescriptorForDeclarationException: Descriptor wasn't found for declaration FUN
Yeah 1.4
block position = ((x & h) << g | (y & i) << f | (z & j) << 0);
where h = (1 << c) - 1;
where g = f + e;
where i = (1 << e) - 1;
where j = (1 << d) - 1;
where c = 1 + MathHelper.c(MathHelper.b(30000000));
where f = 0 + d;
where e = 64 - c - d;
where d = c;
where MathHelper.c(n) = MathHelper.e(n) - (MathHelper.d(n) ? 0 : 1);
where MathHelper.e(n) = unknownArray[((n = MathHelper.d(n) ? n : MathHelper.b(n)) * 125613361 >> 27) & 0x1F];
where unknownArray = [0, 1, 28, 2, 29, 14, 24, 3, 30, 22, 20, 15, 25, 17, 4, 8, 31, 27, 13, 23, 21, 19, 16, 7, 26, 12, 18, 6, 11, 5, 10, 9];
where MathHelper.d(n) = n != 0 && (n & n - 1) == 0;
where MathHelper.b(n) = {
n2 = n - 1;
n2 |= n2 >> 1;
n2 |= n2 >> 2;
n2 |= n2 >> 4;
n2 |= n2 >> 8;
n2 |= n2 >> 16;
return n2 + 1;
}
``` @prisma wave this is what I got from the code lol
(I tried to be as generic as possible when explaining those thingys)
it's not language-specific
it's just my method of trying to explain what goes on in steps
where the hell do we even begin with that BM?
where do you see that?
@prisma wave Enjoy lmao
https://paste.helpch.at/ubemajomuw.bash
that algorithm is how Minecraft server converts a block position to a long value to send in a packet
the best way to work with this is to work backwards
It seems like you're really overcomplicating it
wut
On wiki it looks simple
where did you find position?
Guys can I ask a stupid question
dont ask to ask thats my anwser :3
@ocean quartz maybe make sure the plugin is latest version?
It is xD
The thing is that this wasn't happening yesterday, with the same code
What is the difference between sending nms or protocollib packets and using spigot methods , why does the people advise to send nms/protocolib packet
Amazing
That depends, nms/packets are normally used when the API can't do what you want to do
A lot of the times people use nms for no reason
protocollib is just a thin layer of abstraction over nms
The spigot methods will use nms under the hood, but they're limited
@prisma wave you still didn't tell me where you found the Position type algorithm on the Wiki
On mobile
Just at the top
Where it says where it's encoded or whatever
It was like 3 lines of bitshifting
ah okay
Can you give me an example that thing api cant do but nms can
Changing blocks without triggering light updates is a very important one
oh I know why I got that algorithm
If you want to change lots of blocks quickly, you basically need NMS
I'm using 1.8 as a reference lol
@errant anchor Custom entities (path finder etc) is also a good example
is << right shift or left shift btw? I can't remember lol
left shift
left
okay so shl
yes
cool
so ((x and 0x3FFFFFF) shl 38) or ((z and 0x3FFFFFF) shl 12) or (y and 0xFFF) then
yeah ik
I'd actually consider using java in a class just for bitshifting stuff
yes
But it's ugly
and requires excessive amount of brackets because of no precedence
Is really disgustingly
but I get the jetbrains chooses
I rare code base that uses it
Ternary operator we use more and they do not add it
and I get this as well
More keywords = More things to learn about the language it self
also @prisma wave , how do we plan on processing NBT?
we gonna do that ourselves or just use a library?
also @astral quiver your library https://github.com/DevSrSouza/KotlinNBT made it on to a list of NBT libraries on wiki.vg btw xD
😮
I do not work in it for a time now
Currently I was thinking in create a library for NBT in Kotlinx.serialization
yeah that would be very handy
Is pretty hard to me, I have a bunch of projects ideas
but I work full time
I'm in college as well
hah made improvements on my placeholder handler
So sad to not have time and money to focus on open source projects :c
I feel that, a bunch of project ideas but no time
lol
is the top one your old placeholder system?
the update interval?
nice
before i just updated entire holo
yes why?
just wondering
i dont want to deal with reflections
except i use 1 part
private fun Any.updateField(name: String, value: Any)
= this::class.java.getDeclaredField(name).apply { isAccessible = true }.set(this, value)
how are you working with NMS and not dealing with reflection lol
oh yeah, my reflection lol
yes
thats all i use
just to set values in metapacket
other packets dont really need reflection
ah okay
well
some need some dont
this one doesnt:
http://images.virtusdevelops.eu/shareX/51srzs6j.png
Mhm, how does one disable the useless moves of mobs to reduce lag? Like, still have them walk around and such but with a lower impact on performances.
@distant sun not entirely possible with the way Minecraft works afaik
😔
since every time a mob moves, the server has to send a packet to every player who is within render distance
yep
Tuinity handles that well
Tuinity?
ah okay
imagine that:
http://images.virtusdevelops.eu/shareX/hpgyi6vr.png
Oh ok
https://www.mc-market.org/resources/16271/ oh. my. god
why do these things exist
a fork of tuinity which is a fork of paper which is a fork of spigot which is a fork of bukkit which patches NMS
$$
ikr, all you need is a catchy name with a catchy title and you can sell it
@dusky drum yes
wat
but you have the right to request source code under GPL if you buy it
but Tuinity doesnt even have license
People sell spigots for hundreds of dollars
wait
Tuinity is covered by GPL since it can't be sublicensed
its MIT license
no, their patches are licensed under MIT, which is allowed, since they created those
actually hold on
if that was the case then Paper wouldn't fall under a delegate
but it does
wait
he is nut actually allowed to or is he to sell modified version of ther stuff
@dusky drum 2nd
Mit allows selling
The thing that makes me sad is that I'm the lost payed Android Developer ever, I'm brazillian and currently I receive 2400 REAL a month
any open-source license allows selling
is it even allowed to sell?
Depends, if it's just like paper then yes, where you download a buildtool that downloads the server on runtime, it's it's like spigot then no, you are not, not even allowed to distribute, so for example all the getspigot websites actually are illegal as it distributes the server
i just hate when they cant make license.md file.
I'm really sad
@ocean quartz technically you can redistribute Spigot since it's GPL, it's the NMS stuff you can't redistribute
You cannot
but CraftBukkit is like 99% NMS anyway
Yes
you can distribute forks of GPL products
because GPL allows you to redistribute
that does not have DMCA
so how can papermc just share jars?
^ paperclip
I can see, the Bukkit API is still online at Github
GPL applies for the Bukkit portion of Spigot, the API only
Spigot comes with Minecraft server, which you are not allowed to disctribute
isnt paper fork of spigot?
paperclip downloads Minecraft server and patches it when you run it
You cannot distribute Spigot itself, that's why they use Buildtools to download
BUT, why you will do that...
thats why papermc does some wierd stuff on first start XD
I don't think BuildTools is licensed under GPL
You cannot distribute Spigot itself, that's why they use Buildtools to download
@ocean quartz that and because they are OLD :(
Yup
and thats why theres cache with mojang,patched jars
Paper is fine though, as the jar they distribute is basically a runtime buildtool
the Spigot API breaks GPL though anyway because they have their own license agreement that says everything you contribute is licensed to them under their own license rather than GPL
interesting
they're technically sublicensing GPL, which is illegal
What is their license?
Spigot API is a fork of Bukkit, which is licensed under GPL
It doesn't need to be specifically GPL, just a GPL compliant one, like MIT
PaperMc is not GPL?
GPL cannot be sublicensed Matt
I guess Papemc does Patch in the Spigot API as well
^ yeah
Paper's source code contains nothing from Spigot, Bukkit, or NMS
You can, if it is GPL compliant, paper is MIT
I thought Paper was GPL with MIT-licensed code
but distrubute a maven artifact with other License for the API I guess it is illegal
since you can submit MIT-licensed patches and put your name in the CONTRIBUTORS.md thingy
Paper inherits its licensing from upstream projects.
As such, Paper is licensed under the GNU General Public License version 3; as it inherits it from Spigot, who in turn inherits it from the original Bukkit and Craftbukkit projects.
Any author who is not listed below should be presumed to have released their work under the original GPL license.
In the interest of promoting a better Minecraft platform for everyone, contributors may choose to release their code under the more permissive MIT License.
The authors listed below have chosen to release their code under that more permissive MIT License. Any contributor who wants their name added below should submit a pull request to this project to add their name.
because the maven artifact from paper will have Spgiot code inside
Licensing is a fucking mess
ohhh
I get it
they migrate to MIT
This is allowed
if the authors accept it
Change license is a mess but can be done
licensing itself is a mess, I agree with Matt
We should all use WTFPL license
I really dislike GPL
Same, thank Grum for it
I really like MIT
Same, all i do is MIT
I love GPL, because it's supposed to encourage people not to make premium forks of your shit, and encourage open-source
MIT is nice, but it means that my credit can be removed, so I prefer to use Apache
GPL promotes collaboration, MIT promotes embrace
But I think this way: I do open source because I love to share and help other peoples with my code
But I don't care if they will get it, add stuff and sell it
because was my choose to do not that
And if they will put work on it, I guess they can sell
I make my stuff open-source because I want to encourage people to be more open with their stuff in the world, and I like to see people making use of my stuff
Because so many people need to make money I have a great idea about a thing that they love
@jovial warren plenty of pre-existing nbt libraries, making an in-house one is probably a bad idea
but they can't do because is GPL
Like, I want to change a plugin but only for my server
To have the essence of my server
but is illegal to do
I don't want to share a code that have alot of private APIs that, never will work, just because it should be open source
I think I prefer Apache over GPL tbh, since Apache gives my software more diversity in terms of usage, but still means that people retain my credit, meaning people can go "oh look, this was made by Callum"
MIT as well
it's also why I use the @author tag pretty much everywhere
but Apache you can't have closed source
you can do the same with MIT
but Apache you can't have closed source
what are you on about
you realise Kotlin is licensed under Apache 2
and so is OpenJDK I believe
Android as well
exactly
also, you realise that technically GPL can be used in proprietary software
but since you can't sublicense it, anyone who owns the binary version of your software has the right to request the source code, and you're supposed to give it to them
imagine a world where we didn't have to worry about things like licensing because people just behaved themselves lol
also @prisma wave , in that case, you got one in mind?
we need one that's stupid fast and efficient ideally
I don't blame people that put their work in something that is open to get money
I still wonder how we're gonna pull this off, since I imagine that the Minecraft protocol model is protected by the EULA
A Premium Spigot fork is needed because we can't change game stuffs
If we are in the Forge/Sponge world, we can just use Mixins
or ASM it self to change the NMS
like, to improve performance
^ you mean reflection
you can just use reflection to change NMS
Change the bytecode
ah okay
This is what Forge and Sponge does to add their APIs
or you could do what me and @prisma wave are doing and rewrite the entirety of the Minecraft protocol from scratch
lol
what Bukkit probably should've done
If I have time, I will try to help you folks
cool
There is this project https://github.com/Elytra-Server/Elytra
Done in Kotlin
BUTTTTT it does not focus on Kotlin features
And it is just really sad to see
Is a minecraft server implementation in Kotlin
with the same things that you could do in Java
what Bukkit probably should've done
@jovial warren that wasn't the point of Bukkit though
true
the point of Bukkit was to allow you to easily manipulate game mechanics with add-ons without having to reflectively update NMS
The main problem with Sponge is the focus on Java 8 APIs
I don't want use Optional
Sponge also doesn't have Spigot/Bukkit compatibility
I want @Nullable annotations !!!!
Uh oh
oof
😂
Discord strikes again

Null shall now present himself
one thing I was thinking about as well was a Bukkit compatibility layer, if it's possible, so Bukkit/Spigot plugins can function on MineKraft, which will make it more appealing
Prepare yourself
one thing I was thinking about as well was a Bukkit compatibility layer, if it's possible, so Bukkit/Spigot plugins can function on MineKraft, which will make it more appealing
@jovial warren that would be an excruciating amount of effort
are compatibility layers like that even possible?
You might be able to use classgen or something
If you folks have this IDEA in mind, the project will need to be done thinking in that
But not without a lot of effort
yeah
and I think that if you folks want that
will put limitation on your implementation
I mean obviously we're making our own API from scratch either way
using kotlin
Also most plugins are really tightly coupled to being in a bukkit context
So getting past that would be tricky
Make a skeleton of the bukkit classes
Have them hook into MineKraft classes internally
^ brilliant idea
Hold them in a separate module to separate their developement
that wouldn't work for any plugin using NMS or anything though
Or for things that aren't interfaces
yeah and I ain't adding a compatibility layer for that lol
Or all of the plugins that depend on the very specific functionality of Bukkit
ORRRR
like what?
Bukkript >
Elara >

if Elara can support Kotlin then yeah
did someone say elara
We can have the evalutor function anywhere needed technically
Elara tooling, hope this exists 👀
Multiplatform would be nice but a lot of effort
Yes
Lets replace skript
Yes
yeah Skript can go fuck itself lol
Elara/Clojure will be the first backend I think
xD
Followed by Elara/Fortran
Elara/Fortran? get outta here
Elara native
Yes!
Elara to every other fucking language that exists
xD
The one language to take over all
That might even be possible though
With a bit of clever abstraction
You could make backends for most other languages
hmmm
how about we make a translator system that uses machine learning to figure out how to write Elara code in other languages intuitively
lol
then Elara would be the only language you'd ever need
Machine learning for this? You could probably build a transipiler by the time you create enough labelled data for it to be close to viable

Elara/Go
oh fuck no

I think it's a good idea
Scripting good Skripting bad
If we keep it being interpretted we can possibly even provide better "hotswapping"
👀
