#dev-general
1 messages · Page 603 of 1
mindsets like this is what leads to all the shit in the world
police states, war on drugs
Oh and the "enemy" can still obviously decompile your code if they really want to get at it
At this point there aren’t any other peoples plugins I’ll use or put on the servers I work on
Closed sourcing and obfuscating it does nothing but bring pain for everyone
So I’m not really decompiling anything
Same mindset behind americans hating "taxing the rich" because they dream one day they'll be the rich ones, but in reality they never will
Kotlin compiles to weird jvm bytecode, when decompiled it looks like obfuscation thus kotlin is obfuscator!!! /s
Lmao I mean what’s mine is indeed not yours. In the sense of competition why would you give the others what is yours
They're gonna get it one way or the other
Thats not my point. For example, I was using this BattlePass plugin which was paid but OS, it was very easy to implement a feature for my server with just a few lines of code that to bug the developer or use god knows what else methods to do so.
I'm pro OS and I will do the same with most of my plugins.
Oh for Java, it absolutely is
True, though Java is much easier
cough denuvo
Maybe if they get there hands on it
saas is a bit unique
Okay if you're making private plugins for just your server, sure, make it closed source
Exactly
But if you're distributing a closed source plugin, which is what we are actually complaining about, then people will get it eventually
And for others i would hate to pay for something for the public to use it
Stuff like anticheats and such need to be closed src
Huge market for them
Again, no they do not
It makes it better for everyone if people can PR fixes and additional features
If we want to give competition the upper hand free of charge then sure
I mean again
If everyone knew every check
It seems your mindset is beyond fucked
This game would be even more ruined
Imagine
No I’m just not thinking like I’m in the slums
Security through obscurity doesn't work
what lmao
pls remain respectful, if you don't see it as disrespectful ignore this message, just keep it in mind
Alright, it seems that your mindset is not something I agree with and something I cannot fix
better
Just because you aren’t profiting large doesent mean you need to hate on the ones who are, I respect what anticheat devs are doing
So I don't see a point to further discussing
Again, what?
After all it’s one of the hardest things in this game to get a grasp on
I am very willing to pay money
The irony here is many are pro-OS which is nice, but meanwhile DeluxeChat is ded and not open-sourced 😂
That is absolutely not the problem
same with other clips plugins
Ah and how I wish that were different
Lets open source DeluxeChat, Autosell, EZRanksPro etc
That’s what it ultimately seems like, I don’t see how open source anticheats would help this game at all. And I still haven’t received a good point
clip's plugins aren't ours to os unfortunately
If it was up to us it would have been a while ago
Really? :o
now I go back to playing resident evil and writing Rust code 😌
pretty much everyone on the staff team is strongly pro os
Can't you persuade clip then
we've tried
Whats the reason he said against?
meanwhile, me: 🍿
idk, he just didn't want to
Piggy you own the discord?
cube has the crown
But I see one next to your name?
lol
your eyes are playing tricks on you boy
yes
bonzi buddy role
You know bout bonzi buddy
Most people don’t tbh lmao
yea
Sus
intriguing.
security through obscurity is inherently flawed
I've adapted some code in three different ways, which one do you think is the cleanest (ignore naming scheme, I just adapted the logic)? https://paste.helpch.at/ixupanugon.cs
1
Always 1
I’d say that goes both ways
https://www.javastring.net/java/string/java-string-transform-method-examples ive found this but there's literally Arrays.stream that does a better job lol
no but it's literally the same as doing the same thing
str.transform(s1 -> Arrays.asList(s1.split(","))); System.out.println(list3); is just the same as Arrays.asList(str.split(","))
it just seems so useless lmao
tldr of what we're on about?
why does this method even exist
Ahh
it just takes the function and applies this to it
public <R> R transform(Function<? super String, ? extends R> f) {
return f.apply(this);
}
Mfw he didn't even update the variable names. He just straight up copy pasted it
Lmao
I'm working on a patch for Paper potentially. It's going to allow you to specify repos so it doesn't abuse maven central.
yes please 🙏
why tf did md5 only make it for central the first place
Idk but Forge got a legal letter iirc for doing the same thing

why can be paper jar downloaded from website but spigot not? is it because paper is downloading other jars?
oh
wrong channel xsd
cause paper uses paperclip which patches the jar automatically when you start the server
Correct. The paper jar you download doesn't contain any NMS code in it directly. It's a binary patch that is applied to the server jar which gets downloaded at runtime.
ooOOO
THAT's why paperclip is so fast
it's the diff of the binary
not the sources
my god that's so genius
i always wondered why without giving it much of a thought
i knew it was a .patch
like a single, merged .patch file
but it's the diff of the final binary, not the sources like buildtools bases it on
Yeah
that's genius
It's kinda even faster now lately with the bundler stuff. Doesn't provide another jar, just simply applies the diff on it.
Yeah
How does it work for library patches tho?
They also do some weird stuff if you want to apply patches to one of the libraries
Check out paperweight
Lazy
sorry i mistakly posted messages on 2 channels
alr
[21:08:46 INFO]: Added Repo: https://repo.glaremasters.me/repository/public/
[21:08:46 INFO]: Added Repo: https://repo.maven.apache.org/maven2
[21:08:46 INFO]: [Towny] Loading 1 libraries... please wait
[21:08:46 INFO]: Downloading https://repo.maven.apache.org/maven2/com/zaxxer/HikariCP/5.0.0/HikariCP-5.0.0.pom
[21:08:47 INFO]: Downloading https://repo.maven.apache.org/maven2/org/sonatype/oss/oss-parent/9/oss-parent-9.pom
[21:08:47 INFO]: Downloading https://repo.maven.apache.org/maven2/org/slf4j/slf4j-api/2.0.0-alpha1/slf4j-api-2.0.0-alpha1.pom
[21:08:47 INFO]: Downloading https://repo.maven.apache.org/maven2/org/slf4j/slf4j-parent/2.0.0-alpha1/slf4j-parent-2.0.0-alpha1.pom
[21:08:47 INFO]: Downloading https://repo.maven.apache.org/maven2/com/zaxxer/HikariCP/5.0.0/HikariCP-5.0.0.jar
[21:08:47 INFO]: Downloading https://repo.maven.apache.org/maven2/org/slf4j/slf4j-api/2.0.0-alpha1/slf4j-api-2.0.0-alpha1.jar
[21:08:47 INFO]: [Towny] Loaded library E:\Servers\Towny\libraries\com\zaxxer\HikariCP\5.0.0\HikariCP-5.0.0.jar
[21:08:47 INFO]: [Towny] Loaded library E:\Servers\Towny\libraries\org\slf4j\slf4j-api\2.0.0-alpha1\slf4j-api-2.0.0-alpha1.jar
WIP
nice!!
pdm really crying now in its grave
SlimJar still pulling through
the gson bug tho 😫
but other than that its perfect
gson bug?
why don't you fix it?
Yeah buddy fix it
Exactly
idk its just the maven repo is down: https://repo.vshnv.tech/releases/io/github/slimjar/slimjar
idk why
When tf did he switch back to Nexus lol
Good think I already got shit released. Probably means I can't do another Guilds release until I provide my own.
Also unrelated, but https://github.com/AlessioDP/libby is another option too
(updated fork to work with latest versions)
Was wondering why this looked so familiar.
Then I scrolled down to the bottom of the README and saw my name.
I forgot about this.
It's pointing to BM's repo, the main one is down and he doesn't have time to fix it
Ahh
I might be able to do it this week
Got busy with uni reopening, wave of corona
☠️
Might make some script to auto setup the vps, oracle is gettinf quite annoying
If you want to just deploy under mine and keep it there I don't mind, pending it doesn't take up a lot of space. I've had like 99% uptime over the past 3 years.
You can just detach the boot volume and make a new VPS and attach it, bam no configuration required
You dont get access to the boot volume after termination
Oh sure 💯
oh yea you do if you detach it
trust me, I literally just did it a few days ago
Just lmk what you need and I can probably get you it
Is it not in the boot volumes section?
Alrighty
you can't find a direct link on the dashboard
you have to know the page
^ replace the region
Is there an alternative javascript expansion for placeholderapi?
why? what's wrong with this one. other than it having very bad performance and being javascript? kek
the alternative is kotlinscript expansion 😌
man. I love discord. I did send a message about it but turns out I didn't. might be my keyboard and not discord :)))
the message was just sitting in the text box
I am on 1.18.1, and it requires java 17, but the expansion doesnt support java 15 and above
poggers
Is there a clearlagg dev build out for 1.18+?
dont find it right away on the internet
whuut
yeah. there's special settings in spigot.yml or paper.yml to make some items despawn faster if you want. but clearlag can make things worse
okey ty
if you want to optimize your server read this: https://github.com/YouHaveTrouble/minecraft-optimization
@eager fern where are your dev builds
tru
someone who could help me with VotingPlugin? Im struggling on that like 3 days
#general-plugins maybe
im looking for someone who can talk with that with me in DM
The "most critical vulnerability of the last decade?" - Dr Bagley and Dr Pound explain why it's so pervasive, and even affected Mike's own code!
https://www.facebook.com/computerphile
https://twitter.com/computer_phile
This video was filmed and edited by Sean Riley.
Computer Science at the University of Nottingham: https://bit.ly/nottsc...
oh. I was waiting for this
Does someone know a crates plugin that supports custom nbts?
OpCrates
also Eternalcrates 
hey people.
so on my machine i have D:/epic folder/. how can i make the dockerized app read that directory?
it's not changeable and must be there
volumes arent helping or im too dumb idk
sounds like a question for lemmo the tresto
i texted him today morning and he was helping and all was good then he suddenly disappeared D:
@quiet depot sorry for ping. But when I use the plugin instance with guice is this fine?
class BukkitModule extends AbstractModule {
final Plugin plugin;
BukkitModule(Plugin plugin) {this.plugin = plugin;}
@Override void configure(){
bind(Plugin.class).toInstance(plugin);
}
}```
(I just got started with it so don’t know if there are any better ways of binding the plugin instance)
Everything can be solved with symlinks
world hunger?
yeah.
oh it's you
I think you bind it on another class, once, and then use @Inject on BukkitModule
Could someone try adding this dependency to their gradle project? implementation("net.yakclient:mixins-base:1.1.2") I cant get it to load on my system, idk if it works for other people
Its my own thing published to maven central and it used to load half the time, but now its gradle is just having a ton of troubles... on maven it works like a charm
It's definitely being hosted on maven central
Hm
Its loading the .pom and .module, but the sources or jar isnt being loaded
when checking the caches
I feel likes its just a issue on my local machine
but idk
Clear all your caches
Would it be bad to delete the entire gradle directory?
Which one
Have you cleared the .gradle/caches dir?
--refresh-dependencies moment
ya i have
done that 😦
Sucks
lol
the .gradle one
And you invalidated intellij caches too?
Does it require a certain java version? I swear, gradle peeps should add a message about that 🥲
*caches
I think 8
im on 11
And you do have mavenCentral() in your build, right?
all the other dependencies load fine
thats the only thing that could be an issue, ill double check
I think the problem is when you use a lower version, not higher
ya, it definitely shouldn't be higher, but ill check... having a friend try it on their computer now
It could be that the hashes don't match up maybe?
would that do it? Ive had to change keys once between version, so i guess i could try an earlier version and see if that works?
Its super weird, it loading the .pom and .module(so gradle is finding it) but it wont load the jar javadocs or souces...
still the same issue with an earlier version
Just tested
If i published it local and the hashes didnt match up would it have the same issue?
Loads fine for me
great thanks, ok im on 7.3.1, ill try downgrading
16
uhg... ya it looks like a version issue
idk how i didnt catch that....
thanks for helping, i made a fix for this a couple months ago just never pushed it i think
published
im on attempt 3 of enchantment plugin
or attempt 5 i cant remember
cause i hate how i made it but dont want to rewrite it
so ill rewrite it seperately
https://i.imgur.com/0bRGpyH.png
floating point 😩
ig ill just change it from double to float 🤷
float 
lol
relieved

get good
for currencies use BigDecimal
Depends
100%
For normal human currencies just use an integer type
not normal human
If you don't have an "atomic" type then BigDecimal
imagine if it was serializable
what are you gonna do
oh no
stop being silly
well
im using triumphconfig for config which also has to store config stuff and gson for data storing
gson = good
I don't see how that changes anything
mittenlib supports custom object mapping
don't say that to matt >:(
also I'm fairly certain gson supports bigdecimal by default?
not 100% sure
more like 25% sure
Id say it to anyone
it does
So whats the problem
triumphconfig
it uses gson
holy shit dkim
don't care
your problem
- ratio
there's a java.sql.Date typeadapter 
you store it as BigDecimal
but what if it breaks
And if that doesn't work then you come back and cry to us and then we suggest something else
Easy
ok
:)
well fix it
Hmm yeah I could technically bind Plugin with toInstance altho that still requires me to provide an instance
Or well wym another class? O.o
Cuz yeah I could bind(Plugin.class).to(SomePluginDerivative.class) altho that’d require guice to instantiate an instance of SomePluginDerivative.class which Bukkit actually does so kinda rip
i have a working test version of my telekinesis enchant
which is just a put block in inventory enchant for all tools and weapons
Pog
ive been going about making custom enchants the wrong way, this time i started with the enchangs instead of the enchant gui
and i dint burn out

You could bind the plugin instance on the class where the modules are initialized
well maybe all the bindings need to be done inside a module and you're stupid simultaneously

that’s fine
Hey...is any one here good with regex...i have not yet used it
I would need to check for a match within 2 strings...by keywords....
So for example, There is a string stored with the "Hello, Have a good day" & my keyword is good day...what shall i need to do?
just check for that exact string
Contains will search for given characters, what i want to check is exact* words...
For eg: if the string is "Every day" and my search keyword is "ever" it will return true...
I am not really good with regex...so could you please like tell me more if possible
What tier is required to post images
hmm...sorry my bad...i meant to be exact...
so friend will return true for friendly and friends also right?
i don't need it like that...i need friend to return which contains the word friend and not those others which contains the characters friend as in friendly and friends...
it was my bad not explaining it correctly sorry... 😃
is DM fine..?
how would u recommend managing dbs for something like this
there are long term things that you don't need to load every time you're fetching a player's profile like their chat history, but there are also things like their permsisions, nick that you might need to be able to access quickly
so should u have two different databases, one for long term storage and one for short term (redis or smt)?
or should you use redis + mongo and use redis as a cache
b/c there'll be like a ServerPlayer class that represents a player
and if we do getServerPlayer("player") and that fetches everything, it might cause unecessary lag
ie: you don't need to fetch a player's entire chat history just to check if they have a certain permission
so how would u do this?
so if ServerPlayer john;
john.getName() would use the in memory db
john.getStats() would use the long term db?
whats that?
long term storage
not actually applicable unless it’s time series
mongo isnt “good enough” there’s no such thing
it’s about your specific needs
if you’re storing “player data” then maybe documents would work maybe relational it’s very specific to what you need
@mystic cradle finally got it working... you called it from the start... thanks
multi release jars ftw
The version stuff, turns out i was compiling for 13 and trying to use it in a 11 project
Oh I'm not the one who said that
I had actually created a mr release of it a couple months ago but never published it
I don't remember who it was but it was someone else in the channel
oh really? lol
well thanks for the help and testing it out on your machine anyways
👍
so if im implementing parties for example
I can have the in memory db hold a list of party uuids, each party has the names of its players
if the player does some action, how do we find the party they're in. should I also store the party uuid with the player, or just do a search (that doesn't seem too efficient)?
i think you’re breaking down this problem too far. you should think of this as a general problem to solve with a specific solution. for the case of “parties” you want it to be fast and efficient, so don’t even think about disk writing. redis works as in memory.
don’t store a “party uuid” with a player, but instead have the party itself contain information about a particular set of users
think of it like a real life problem. if you want to search for files in a cabinet beginning with A, then you put all the A documents in one folder. You don’t go to each a document in different folders and write “this starts with a” onto it
got it
unless you work with a tags system, but that’s a whole other problem
but if i have a player class already, that has all their profile info, then why not add the party UUID in it too?
that way when the player executes a party command, i don't have to go searcher thru every party to find the party that player is in
because that’s not necessary
are you going to look through every single user to find their party? you should look through users find their parents . unless it’s something that is static. if a user is in a group that doesn’t change often then you should keep it with the user. I assume you can leave and join parties quickly
Now this is entirely different from tacking on a method to the player called “get party” or something like that. you don’t have to provide an implementation of the data inside that class, just go fetch it and return a completable future
You could do map<Player, PartyUuid> playerparties
And have map<PartyUuid, Party>
second one concept is good but the first one is not the way to do that
No it won’t
It’s not about amount it’s about general efficiency and data structure
when you want to expand functionality and maintain it falls apart
You think looping through each party and each member is going to be more efficient than two maps in the end when you have a lot of players. Either way works but eh. Easy way of making parties unique and you can use an identity map for the player to be even quicker.
identity maps fall apart when you use a heap object key but that’s besides the point
Fall apart?
it’s not about “maps are fast” it’s really about how is this going to scale in the future
look here i found this randomly https://github.com/AlessioDP/Parties/blob/master/common/src/main/java/com/alessiodp/parties/common/players/objects/PartyPlayerImpl.java
How so the difference would be you need to pass your maps around and you can even have a single helper function. And then again with your idea of a system you don’t even know if they are in a party
So you’re doing useless iteration over who knows how many players and parties to maybe get no result
With a map you can do map.get(player) == bull
Vs looping every single party
And determining if a player is in a party
if you chose the data model of storing a changing (not static) party identification with a player object then you just query the party via the id of it
I never said loop the party array and each player in it
What does this look like?
In simpler terms
i’m waiting for you to provide me with the wisdom you have that i do not possess
Doesent seem much different with a party id
you wanted a map with a player key and a party id value
You're talking about effectively a player wrapper class, right?
that is unnecessary abstraction of the general concept of encapsulation
And the wrapper class would hold the party information
That would be more efficient than a hash map but you would still need a way to get the wrapped player from the regular player
How so?
That is implied
Which you'd likely need to use a hash map for anyways
I wouldn’t
Nothing makes it more efficient at a large scale
We’re not talking about specific issues here just the general concept
Now you have parties holding players
it definitely does actually
And at a large scale how do you check if a player is in a party without having to check every party in the idea of any other system?
How would you retrieve the wrapped player instance for a regular player instance if not with a map?
maps tend to skew towards ologn but when you have the query dependent on something like in memory cache it usually becomes olog1
Yes technically maps have a worst case of O(n)
with all due respect I know what i’m talking about
But they have an average case of O(1)
Source: "dude trust me"
Oh hi yugi
But again, please tell me how you would retrieve the wrapped player object from the regular player object if not through a map
Still doesent scale to iterating a bunch of parties for a nullable result
no, source: I am an engineer at a utilities firm and this is my full time job
From my understanding that's not what yako is proposing
that’s correct
source: "look at my massive brain dude, just look at it"
Sorry the rest of us are so dumb compared to your blinding radiance
source: "Ad played b4 porn"
yugi i don’t want to hear it your slimjar let me down big time
Could you explain it in layman's terms so an imbecile such as myself could understand?
no chance of it working long term
Like I'm really curious how you would retrieve the wrapped player instance
Yes let’s loop through all the parties and all players for a nullable result then say maps are slow.
"Young Dumb & Broke” by Khalid
Listen to Khalid: https://Khalid.lnk.to/listenYD
Listen to the new WATTS x Khalid single "Feels" https://smarturl.it/WATTSxKhalidxFeels
Watch more Khalid videos: https://Khalid.lnk.to/listenYD/youtube
Subscribe to the official Khalid YouTube channel: https://Khalid.lnk.to/subscribeYD
Follow Khalid:
Facebook: ht...
when did I say this
This is the idea you proposed
And I would also be very interested to know your secret knowledge which contradicts common knowledge of hashmaps https://imgur.com/bzpbL3G
I’m legit terms
no it’s not. I said there are many solutions including this it depends on context
Not being able to paste images is very annoying, when do I gain that ability
when you grow up
Parties are mutable therefore it’s better off being unique
If the average case was O(logn) I am fairly sure it would say O(logn) on wikipedia but who can trust wikipedia anyways
Ok for real though how would you retrieve the wrapped player instance
Black magic ofc!
You could use something like a scoreboard tag to store the party directly on the player
But that would just have to be an identifier
Definitely not haha
You would still need to lookup the party by its identifier
Im sure he'l be kind enough to provide it
Think about having 100,000 users and 1,000 parties. On one hand, you have a map that needs to hold 100k keys and 100k values. In the worst case, a HashMap has an O(n) lookup due to walking through all entries in the same bucket (if they all have the same hash code). Now think about if you had a HashMap with only 1,000 parties that you queried based on an already existing reference in the heap to a user with an associated party. Still the same worst case, but n is smaller. You need to think about the whole call stack and heap contents here. Not just “this is in memory so I need to convert it first before using it”
If your hashmap has the same hash code for every entry you should buy lottery tickets
The entire point is scaling
You'd do as well to worry about uuid collisions
I don’t think you’ve ever developed an enterprise application
You need to understand this because it’s a nonzero situation
That’s like saying I’ll never get struck by lightning
I probably won't
UsE ArRaYlIsT
But let's see
😌
You can have ~4.2 billion hash code outputs, yes?
You most likely never will
Let's do 4.2 billion to the power of 100,000
That's your odds of them all colliding
And it’s worst case, not no case. It’s usually O1 but what even is usually when you can run billions of calculations?
i identify as a hashmap
1/(100k^100k) is still just insane though
yako is right, when you code you should always think about the worst case
I mean, do you stay inside 24/7 all year round because a Lightning MIGHT strike you?
And here we have yako's alt
no lol
Worst case scenario someone guesses your RSA private key first try
what are we even talking about
Probably also about as likely
The unlikely scenario of a lot of hashcode clashes
This guy is saying you shouldn't use hashmaps that will hold 100k elements because what if they all have colliding hashes
Like sure it's technically possible
But your odds of it actually happening are so close to zero that it's insane to even consider
You have a better chance of winning the lottery a 100 times
in a row
if it's technically possible then don't use it
Damn
Y'all better get off your computers then
Someone might guess all your passwords by mashing random buttons on their keyboards
Huge security hole, always plan for the worst case
Here’s an interesting video you might like https://youtu.be/L6z10OvE5DI
This bug is something I encountered several years ago while working on a custom inter-process communication layer for a piece of embedded software inside of some big machine. During stress testing we found that the software crashed unexpectedly about once or twice per week. When trying to analyze it I reduced the problem to this little program a...
Ok 1 in 400 billion is one thing
A random bitflip is technically possible causing corruption. Lets not use these.
It explores probability
Probability in software is no joke
but the probability is less
Ok and there are ~10^300 atoms in the observable universe
Which is exactly the argument
100k^100k is just
probability is less
Like, you can't even describe how large that number is
Ok sorry
I stand corrected
There are an estimated 10^80 particles in the universe not 10^300
everything is possible but taking the solution with the less probability of failure is the right thing to do
So worrying about a 1/100k^100k outcome is truly absurd
Literally everything breaks down if you hold it to that level of scrutiny of the most improbable odds
Which, again, is what we were saying
Every digital security measure relies on your attacker having a very small chance of guessing your password, RSA key, whatever it is
Being struck by lightning is something we can at least comprehend the odds of
1/100k^100k is not
You could have every computer man has ever made iterating on every core on empty loops since the beginning of the universe until today and you still would not be anywhere near 100k^100k
Like I'm guessing you would be less than 1 googolth(if this is a word) the way there
We’re not talking about parties anymore if you didn’t catch that
This is about Java performance
Sure party ids that are uuids won’t have the same hash code but what if they were shorts and their happened to be too many parties to overflow?
Yeah and with any sane hash function you really shouldn't worry about hash collisions on that magnitude
Like I said it’s about scaling, performance, and actual logic
That’s true
But it depends
"actual logic" get off your high horse man
A hash map is a perfectly reasonable solution to this
You mean the high horse where I proved you wrong with math?
It's literally what it's designed for
Where did you prove me wrong lmao
I am losing my mind here
I didn’t say it wasn’t, I said I wouldn’t do that because it’s not enterprise
@old wyvern gimme some sanity juice I'm dying
That model breaks down when there’s one bucket
These are real case scenarios
No they're not
🍿
They're scenarios you have made up because you want to seem right despite all contrary evidence
Yes it absolutely is
In real unit testing you need to make these scenarios because they happen in real life
brb gonna tell google to not use hashmaps because there's a technical possibility they end up iterating over all their data
No they don't
Yako, tell me
Problems start when we have a lot of hash code collisions, so instead of a big number of small buckets, we have a small number of big buckets. In the worst-case scenario, in which we put everything inside one bucket, our HashMap is downgraded to a linked list.
This isn’t a fake thing
Would you fear the possibility that I guess your password first try by mashing buttons on the keyboard at random?
Would you fear that I make a completely random key and come unlock your door?
Or do you realize that those are absurd things that would never happen?
I don’t doubt it’s happened before
Because these are many orders of magnitude more likely than what you are describing
That why I use LastPass. Use code Yako for 10% off at checkout
.-.
A password manager doesn't really change anything when we're talking at this level of improbability
Use the goddamn hashmap
Or don't
But stop trying to act like you know better than everyone else and better than the well-known behavior of one of the most common data structures
I don't know if you just refuse to admit you're wrong or if you genuinely believe that it's bad to use a hashmap for data at scale
Again you’re putting words into my mouth
Because a hashmap is literally built to scale
Like, you could make the same argument about quick sort
A pivot is chosen at random
My entire point was that given a ton of data, some of it will be broken. Combat that by developing something enterprise grade
If the pivot is one of the extreme elements of the data every single time, then it's O(n^2)
After all this is a Minecraft discord so use linked lists for block ids I don’t care
But are you gonna say we shouldn't use quicksort for large data sets because of this?
ah yes
No, because you realize that the odds of choosing an extreme element as the pivot every single time is astronomically unlikely
the genre of this discord by nature, means all information shared in here is of no value
Of course
I am but a simple, dumb minecraft man who has no knowledge in the field beyond
Notice how nobody but you has thrown your credentials around like it means anything in the face of serious research and precedent
But that doesn't mean none of us have credentials or experience
You would have made a more compelling argument if you told me that you wanted to use a smaller hash map to save memory and the runtime would be negligible with only 1000 players, because if you were doing those checks relatively infrequently then it would probably be true enough
But statistically speaking it's more likely for a smaller hash map to have all of its keys generate the same hash, because that's just how statistics work
I like hash 👍
Random distributions tend to look increasingly similar to uniform distributions the more data points you generate
Nobody would ever worry about a hashmap with 10 elements all having the same hash codes because it wouldn't really matter
And nobody worries about a hashmap with 100k elements all having the same hash because it's so close to impossible that you might as well consider it such
Okay so after reading this conversation no one has provided me with a spoonfed class of the most optimized implementation for this and now I'm sad.
Also piggy, which one is iyo best/cleanest @Provides or LinkedBindingBuilder::toProvider?
is there some kind of intellij plugin that i can use to deploy a plugin to a remote server for testing?
my laptop is a little short on ram to handle a client, a server and ij at the same time
This is probably a horrible way to do it but I made a bash script that will build my application and then upload it to my VPS for testing via sftp, then logs into it with ssh and starts it. It works, just probably isn't advisable
Honestly, if it works, does the job, why not 😂
maybe I'll write a plugin for it or something
I'm not piggy but I prefer provider classes
Intellij can almost do that already, although it's not the most efficient for file uploads
Ah okay why is that?
SRP I guess, just seems cleaner
Hmm alright well do you create a new class and derive Provider or just supply a lambda?
@prisma wave what did you get purple monkey for christmas
Ummmm
Class for more complex providers, otherwise a lambda is probably fine
Oh ok, thank you Santa, a truly wonderful gift
@steel heart I usually only use configure() for dynamic shit
stuff like main,
@Provides
@Singleton
public JavaPlugin providesMain() {
return main;
}```
Ah okay interesting
Oh yeah I looked at the way you used guice, why do you create like a set of registrables and then pass those to the dynamic thing or whatever? As of now I manually bind
allows me to bind something
inject it
and then bind something else
e.g. I might bind a config class in registerable 1, and then I can immediately inject it in registerable 2 and bind something else which depends on config
Hmm right, I believe it does that automatically? Like making sure to inject in the right order?
wym
for instance
class Config {
}
class Else {
@Inject Else(Config config){}
}
{
Guice.createInjector(new AbstractModule(){
configure(){
bind(Else.class);
bind(Config.class);
}
});
}```
This would work fine I think as guice tries to resolve the order (even tho we bind Else before)
nah wouldn't work
Weird it did work just fine, might be since I use guice 5
oh
yeah it would
but like
that's not quite the same as what I said
because imagine if you needed the actual injected instance of config to bind else
e.g. let's say ur binding jda which depends on config, cuz u need the token from config
Oh yeah true
for that to work u'd have to initialize ur config outside of guice
or you do some wizardry like my registerable system
Ah, very nice
my registerable system basically just goes through the list of registerable classes and injects them one at a time
but the injector itself changes
if a registerable registers any bindings a new child injector is created and that's used for any further injections
Oo, well I haven’t arrived at the need of using child injectors yet but thanks for the insight
chances are you won't want or need a system like mine
loads of peeps use guice and don't do anything like mine
just depends on your design
Yeah fair enough, guice is surprisingly fantastic, also right now I have a lot of binded injects which are scoped singletons, does that signify bad design?
nah
nothing wrong with guice singletons
there's no difference between a guice singleton & passing an instance via a constructor
Ah okay pog
how would i go about turning a hashmap into a single string?
whats the methods for it
or the library for it
i cant remember what its called
toString
i dont want to store the hashmap as a string i want to format it my way
Lol
I mean toString will do the job but slightly different, what do you want to achieve with this? What is this for?
using persistentdatacontainer to store the names and levels of custom enchantments
because i dont want to store what enchantments exist using an items lore
I'd advise storing each pair/entry individually, rather than one large string, but in any case whatever you do just iterate through the map.entrySet, and build them strings
yes but i dont know how to build the string
i dont know what to use
nothing. you can have key-value pairs right. that's what pdc is. so just have a key for each enchantment and then store the value of the enchant there.
and when you get it, if its null it means it didn't have the enchant.
im not sure how persistentdatacontainers store the data tho, like its layout if you used like a nbt viewer or something
why do you care about that?
because i wanted it to be sorta organized
ugh. its a key-value pair. its organised.
CustomAttributes: {
enchantments: {
telekinesis: 1
}
}
i just wanted something like that
ive never used persistentdatacontainers and im not sure what to use to get that result
wait. why do you even store the enchantment as a pdc? you should take a look at BMs example on how to register custom enchantments
i want to change how the default enchantments work aswell later
i dont believe i can override the vanilla enchantments if i just register custom enchantments using the default way
Does anybody know a service like git that can be used for hosting certain projects on cloud and when updating it on another computer, it will update/download only the new files?
There's this cool one
Called uh
git :p
Whu not use it? 👀
I basically have a local test server and I want to sync it between laptop and desktop, I dont think I'm supposed to use git for that xd
Why not? 👀
@static zealot you have a JS framework! https://blitzjs.com/
And it seems incredibly cool actually
Direct API imports
Pre built login
of course
lol
Just saying
wtf. my microphone picks up the sound from my left speaker.
ok
ok
ok
ok
ko
Other opinions about this? Fred suggested to use git
think you can use git
for moving the files and history of commits
idk man
goodle it
I used DropBox at one point to sync between my laptop and desktop
Yeah but not code, the actual server files (world folders, jars, etc.)
i love how since they moved all the classes around i cant find anything
nms makes me cringe
i think i crashed my intellij
i did
that's what you get for using server internals 
how the hell do people know whats what
by.. reading?
reading what exactly?
class and method names? lol
mojang mappings 
when i was using 1.16 NBT had a hadTag() and getTag(), now neither exist for some reason
cause PDC was pissing me off
learning is a non-option?
and there is no info on how to use TAG_CONTAINER
it uses a PersistentDataContainer for the value, not sure what else is there to explain
yes but there is no info on how to create a new PDC
which is what i assumed i needed to do what i wanted
you create one from the PersistentDataAdapterContext, which you get from the PersistentDataHolder (I believe)
actually you get it from the PersistentDataContainer itself 
i just did new PersistentDataContainer() but it gave me some boilerplate for has, get and set
right, because you don't do that, lol
what do i do then?
[19:03] Emily: you create one from the PersistentDataAdapterContext, which you get from the [...] PersistentDataContainer itself
PersistentDataHolder dataHolder = ...;
PersistentDataContainer dataContainer = dataHolder.getPersistentDataContainer();
// yada yada add simple values like ints and strings
PersistentDataContainer complexStructure = dataContainer.getAdapterContext().newPersistentDataContainer();
// add values to my complex structure
dataContainer.set(key, PersistentDataType.TAG_CONTAINER, complexStructure);
you can also make your own custom type adapters
so you can do stuff like container.set(key, MyDataTypes.USER_TYPE, user) (as a mere example)
there's an example for UUID in the PersistentDataType javadoc
there's literally an int array type lol
well that's not "many ints" as in an array, that's a map-like type (specifically, a PersistentDataContainer)
yes
Emily do you have a job rn?
itemstack#getorcreatetag() == itemstack#t() now
hasTag() == r() bool
getTag() == s() NBTTagCompound
getOrCreateTag() == t()
weird
in 1.13.2 they werent obfuscated but in 1.18.1 they are
not sure when that changed
i get them how?
i use maven not gradle
Sucks
mainly cause i started with it
I believe spigot has a solution for that too but for maven but idc about spigot so idk how reliable it is
Md has one for maven right? 🤮
many have said it works for things like 10-line example plugins but then it doesn't for anything a bit too complex lol
or just don't use maven ??
that's the sanest of choices
so true...
ive been using maven since day one and dont really know gradle and my project is already in maven so
there is literally no reason to not use gradle
¯_(ツ)_/¯
that's not an excuse to not learn lol
I too started with maven
so what?
everyone started with maven
they're very similar, the learning curve is not very high
I started without maven or gradle lol
you just need less angle brackets lol
oh I remember when star used to prefer maven 👀

real ones remember when bardy said kotlin sucked
🤢
get out
i'd rather not, thank you for your offer
🌝
fake
hmm what day was that I wonder
ayo guys
did you know that a
did you know that A monad is an abstraction that allows structuring programs generically. Supporting languages may use monads to abstract away boilerplate code needed by the program logic. Monads achieve this by providing their own data type (a particular type for each type of monad), which represents a specific form of computation, along with two procedures:
- One to wrap values of any basic type within the monad (yielding a monadic value);
- Another to compose functions that output monadic values (called monadic functions).
This allows monads to simplify a wide range of problems, like handling potential undefined values (with the Maybe monad), or keeping values within a flexible, well-formed list (using the List monad). With a monad, a programmer can turn a complicated sequence of functions into a succinct pipeline that abstracts away auxiliary data management, control flow, or side-effects.
Both the concept of a monad and the term originally come from category theory, where a monad is defined as a functor with additional structure. Research beginning in the late 1980s and early 1990s established that monads could bring seemingly disparate computer-science problems under a unified, functional model. Category theory also provides a few formal requirements, known as the monad laws, which should be satisfied by any monad and can be used to verify monadic code.
Since monads make semantics explicit for a kind of computation, they can also be used to implement convenient language features. Some languages, such as Haskell, even offer pre-built definitions in their core libraries for the general monad structure and common instances.
Oh ok
04
I am Swedish you baboon
amazing american dates 😌
oh was that not april fools
awkward lol
🥲
epic america fail
It’s epic
nice, nice
Hi Conclure
Sweden
so you're a racist
Hi Matt
notch is a pretty epic guy known for his good takes :DD
it becomes CompoundTag, which is a much better name 🙂
Hehe
Notch is an.. interesting guy lol
i noticed
and top-tier game programming ability!
and oh my god it's Bardy!
speak of the devil
what would be the best way to convert a project from maven to gradle?
gradle init
it'll do it for you
to an extent but yes
Hola Matt, why no mods? 😔
it'll set up things like dependencies, repositories and language version
i mean, what else is there in life, really?
Maven
that's unfortunate

Did you see the message i sent you on my discord?
We just wanted to play on the new update and hardly any mod is updated
there's a semi vanilla server?
how do i install paperweight?
Emily sent you an example ^
ive never used gradle i dont know what i am doing
it is extremely similar lol
i got told to use paperweight i dont know how to install it
giving me a plugin doesnt tell me how to install said plugin
hola, hello, bonjour, kon'nichiwa, hallo, geia sas and a bunch more
this is a different kind of plugin
this is a test minecraft plugin
to show you how to use the gradle plugin called paperweight
some important things to know are that gradle uses distinct build stages that kinda go in order, and that the Maven Shade Plugin is called shadowJar in Gradle
people preach that gradle is better but i cannot figure out how to get the mojang mappings to show up
imma just stick with maven
cant be bothered dealing with it
For 1.18 (and maybe 1.17)? Use paperweight
Paperweight does it for you lol
Clone the repo and open it in IJ, play around with it, read the comments
Paperweight is godlike
imma just stick with maven cause i dont want to deal with it, i barely wanna continue working on stuff as it is
No offense but with that attitude you'll never get to honestly try gradle if all you do is complain about it
All you have to do to see it working is clone it and open it
ive spent the last god knows how long trying to figure out what the new name of hasTag was
imma just go bed cause this is pissing me off completely
Hear me out here, as I’m sure many can vouch here, I was super hesitant of trying Gradle. I was always a Maven fanboy, but Gradle (at the least, speed wise) is much faster.
And actually needs less scaffolding than what Maven does.
plus doesn’t need to be installed on your PC, it has a local thing or you can use your IDE
i use the intellij plugin for creating plugins cause setting it up manually was shit
43mb plugins were fun
Holy shit
It's s.r() btw
i figured it out eventually by opening up a project against 1.13.2
and compairing the itemstack.class
Keep this bookmarked too. I use it all the time now. https://nms.screamingsandals.org/
But yeah I switched over to paperweight, took like 10 minutes to setup, and now I just use regular mappings.
What’s the difference between Searge and Obfuscated?
And, with paperweight where does it store all the generated stuff? I always hate system clutter, lol
Your projects Gradle cache
Np
Oh that’s fantastic
Does paperweight run build tools or something for the jars?


