#dev-general
1 messages ยท Page 312 of 1
These are the spacers you need
but the spacers get in the way of the components lol
Make the components first, then put in the spacers
I havent put one spacer in
IJ put it in for me .-.
also idk what these lines are
because they get in the way of components but they arent spacers
Check the xml file idk
I got it here which is close enough
problem when its actually put in it looks shit lol
everythings so small
Group them into multiple layouts
what
You're also having them through the entire page which looks hideous
Youd normally be usign nested layouts to form your ui
what lol
how
idc how its donei just need it to look ok and have 3 JComboBoxes and a JLabel for each
The top part looks like it could use a row box layout, and for the bottom one a similar vertical one
i dont know what those words mean lol whats a row box layout
This Swing Java Tutorial describes developing graphical user interfaces (GUIs) for applications and applets using Swing components
They describe how to set everything up I think
@old wyvern When you get on let me know, I'll give you a weapon which will be really good for you
Alrighty
sad
Anime: New Game!!
Like and Subscribe if you crave more Animu content =w=
Comment below if you have any ideas for my next video!
Follow me on Twitter: https://twitter.com/eonisbuffering
(for my daily activities/ anime goodness)
me first time with c
Anyone knows which is the packet that draws the crossbow animation and let you look like you are pulling the crossbow?
I was asking for information around.. if you have any please let me know I would appreciate it, thanks!
Can anybody explain me the difference between those different joins?
EQUIJOIN, THETAJOIN and NATURAL JOIN
Wait why am i meant to use layouts instead of just chucking it all in again?
like this is just an IJ plugin, this screen isnt gonna be shown for long lol]
Cleanness
Natural Join is the ON clauses on ALL collumns
Theta Join allows you to specify conditions >, <, <>
Equi Join is the most common on it allows you to equal two relations with each other.
Is this correct?
very nice

its a relatively small page tho lol, its only got 6 components
Anyone has any idea on that?
sounds like effort if you ask me
I just want my thing to be bigger
and look not shit lol
Yes
its 6 components .-.
will that change the appearance of it? Or will it still be way too small
OR just make this look less shit lol
It will be easier to maintain spacing possibly
You wont have to spam spacers everywhere
Also, didnt ij provide its own lib for UIs for plugins?
does it?
I think so
MineKraft is now 0.4.1, anyone wanna test? xD
It is
I need a JComponent for the return values of things
is this Swing?
big ew
JavaFX objectively superior
oo
idk im making an IJ plugin
IJ stopped packaging JavaFX with it as well
ah, IJ's UI
So now you'll need to shade that if you need to use it
probably because they have their own UI system
Yea
also, MineKraft v0.4.1 test 168.119.171.28:25565 (I think lol)
authentication works now, so for the moment you must only use legitimate Minecraft accounts
and encryption
I pay 20$ if you can make a method for me on that
๐
I'd have to find out which one it is that actually does crossbows first
but I want to help you, not do it for you ๐
Good to hear ๐
I like teaching lol
Wait, you mean you may help me?
I don't have nothing to do with coding haha, I rely on my dev for that but he's struggling findind a solution for that..
I can help him then if you want
If you could help me out in that I would really appreciate it
That would be good actually ๐
What about if you make a working plugin that does that and eventually a simple explanation on how it's done?
I'd rather just make code that works and then explain that, and then you/your dev can make the plugin themselves
tell your dev it will require NMS, he might know what that means
That's the idea, the dev does know what nms is and he's good at it but I think it requires a little bit of "extra" knowledge on that
That would be a good solution
๐
well, I'm making my own Minecraft server implementation from scratch, so I know at least a decent amount about packets
Awesome! Basically we are working on a shooting gamemode which requires to send a packet that replicates the crossbow pulling like in the picture, as simple as that just to clarify ๐
ah right
Oh I cannot send pics sorry
?imgur
You won't be able to upload images here directly to avoid spam, so please use https://imgur.com/ to upload images/screenshots.
You can also use a screenshot service like gyazo or jinx and post those links here.
Thanks man
๐
ah I see
It's an assault rifle
kinda guessed that xD
finding the mother fucker that handles this is a pain in the ass lol
Yeah that's why Im here xD
Im sure it's possible since a dev once managed to make it work
But he scammed me a lot of money and went to Mexico..
the rule is: if it's something that other players can see, it's a packet that's sent and received
So no plugin to prove it, but I saw it was actually doable
Ok!
For each kind of packet?
basically, let me try and explain how client-server works in the easiest way possible
All right
when you want to do something, you send something called a "packet" to the server, basically saying "hey, I'm doing this", and the server generally either responds to you and says "okay, I've received that" (called an acknowledgement), and then either another response packet to just you saying "right, I've got all that, now can you do this?"
or they will send a packet to other clients saying "hey, x is doing this"
That one matters in our case?
indeed
๐
we need to find the packet where the client goes "hey, I'm drawing my crossbow back" and then the server tells the other clients "hey, x is drawing their crossbow back"
from the backstage someone suggested me that: entity equipment packet
that's a shout
Good!
you're right
send an entity equipment packet with the entity ID (likely just an NMS entity in our case), the slot as a byte enum (likely just an enum), and some NBT data about the item
Who was it that made that class name generator that just added words like "Impl, Service, Dao" etc to words and where can I find it lol
That'd be great ๐
import random
possibilities = [
"Factory", "Bean", "Wrapper", "Visitor", "Model", "Singleton",
"Method", "Configuration", "Exception", "Error", "Property", "Value",
"Identifier", "Attribute", "Authentication", "Policy", "Container",
"Order", "Info", "Parameter", "Request", "Adapter", "Bridge",
"Decorator", "Facade", "Proxy", "Worker",
"Interpreter", "Iterator", "Observer",
"State", "Strategy", "Template", "Comparator", "Clone", "Task",
"Resolver", "Candidate", "Expression", "Predicate",
"Thread", "Pool", "Descriptor", "Interceptor", "Definition",
"Getter", "Setter", "Listener", "Proccesor", "Printer",
"Prototype", "Composer", "Event", "Helper", "Utils",
"Invocation", "Exporter", "Importer", "Serializer", "Callback",
"Tag", "Context", "Mapping", "Advisor", "Filter", "Field", "Test",
"Tests", "Connection", "Annotation", "Service", "Repository",
"Stub", "Mock", "Instance", "Dispatcher", "Client", "Server",
"Message", "Map", "List", "Collection", "Queue", "Manager",
"Database", "Reponse", "Broadcaster",
"Watcher", "Schema", "Mapper", "Publisher", "Consumer", "Producer"
]
print(''.join([possibilities[random.randrange(0, len(possibilities))] for i in range(0, 20)]))
Thank you c:
yw
@obtuse gale PacketPlayOutEntityEquipment with the entity ID and a list of slots apparently
Thanks!
yw
also, see https://wiki.vg/Protocol#Entity_Equipment for the packet structure and https://minecraft.gamepedia.com/Player.dat_format#Item_structure for the NBT structure (not sure what kind of list the slot list is)
<player>.dat files are used by servers to store the state of individual players. The format is also used within level.dat files to store the state of the singleplayer player, which overrides any <player>.dat files with the same name as the singleplayer player. These files are in NBT format.
it's not just doable, it's ez
lol, great to hear!
public void sendEntityEquipment(final Player player, final Entity entity, final List<Pair<EquipmentSlot, ItemStack>> slots) {
final PlayerConnection connection = ((CraftPlayer) player).getHandle().playerConnection;
final List<Pair<EnumItemSlot, ItemStack>> nmsSlots = slots.stream().map(pair -> new Pair(CraftEquipmentSlot.getNMS(pair.getKey()), CraftItemStack.asNMSCopy(pair.getValue()))).collect(Collectors.toList());
connection.sendPacket(new PacketPlayOutEntityEquipment(entity.getId(), slots));
}
declaration: package: org.bukkit.inventory, enum: EquipmentSlot
ah, takes a list of pairs
lemme change my code gimme a min
๐ฎ
where Pair btw is ```java
public final class Pair<K, V> {
private final K key;
private final V value;
public Pair(final K key, final V value) {
this.key = key;
this.value = value;
}
public K getKey() {
return key;
}
public V getValue() {
return value;
}
}
and gonna amend my code once again because of the change in pair design
lol
Woah.. we'll test it asap, thank you so much m8! ๐
if you can though, try to shove an @author Callum Seabrook javadoc tag in there ๐
Bardy = 
sometimes
@author Callum Seabrook
just the javadoc tag to say that I authored that bit of code
/**
* @author Callum Seabrook
*/
Oh
also reminds you that you can come to me if you have issues with it xD
Thank you very much, that's so kind of you!
you're welcome bud
See ya soon then ๐ โ๏ธ
๐
also, someone jump on the MineKraft test server please, so I can test entity positioning ๐
168.119.171.28:25565
busy playing games rn
phat oof
lemme open mc
alright
this minecraft server is written in Kotlin ๐
kotlin.UninitializedPropertyAccessException: lateinit property profile has not been initialized
best MOTD ever
indeed it is
and it has random RGB colours as well
courtesy of Komponent's Color#random
:moan:
@prisma wave what do you think of my logback config btw? https://i.imgur.com/wTOtCWm.png
beautiful amirite
Nice
also replaced all printlns with LOGGER.debug
where LOGGER is private val LOGGER = logger<ClassName>()
and logger is inline fun <reified T> logger() = LoggerFactory.getLogger(T::class.java) ๐
because SLF4J superior
wdym?
then it won't compile, since those are all non-null
also, ```kotlin
session.sendPacket(PacketOutStatusResponse(StatusResponse(
ServerVersion("1.16.5", 754),
Players(
MAX_PLAYERS,
ServerStorage.playerCount.get(),
players
),
textComponent("MineKraft is a Minecraft Server written in Kotlin!") {
color = Color.random()
}
)))
that's all the code pretty much for the status
also, might figure out which parts of netty we actually need at some point and depend on those instead of depending on all of netty when we don't need it
also, the jar is still 31.8 MB ffs
what did I do
Jars not from Microsoft themselves are typically much larger
maybe because I'm depending on a shit ton of libs
use pdm ;)
๐
PDM won't do shit here though
it'll just split the big phat jar off into lots of smaller jars
that literally solves nothing
kek
then use compression mmm
okay @prisma wave fastutil is going
no
^
Lmao Lemmo
Surely it can't be 23MB
burp mmm
it's only 23mb
That actually made me laugh
Bigger than hibernate ๐ฅฒ
it is
bardy, beautiful MOTD

85M ./oms-api
I just ran this code: https://gist.github.com/medvedev/968119d7786966d9ed4442ae17aca279
java 7 :)
I will slap you
23mb nothing compared to my 85mb
which outputs the list of all dependency sizes in order
tf do we even use fastutil for anyway?
import lib.from.the.1990s
for speeed
I swear we use it literally once
it is a fast util
Not quite as fast as elara but it's the best you can do in a primitive language like Java and kotlin
An outdated language ๐
stonks
lol
surely the speed:size ratio isn't that good
based on the fact that we use it in literally 1 place
very nice
just the entire plugin
||not||
||mm||
please can I yeet it BM?
Better now
the only place we use this is an Int2ObjectMap in PacketState
I could probably just copy the code of this one class into somewhere and then yeet this
but I don't even see how this is really faster
no boxing
we don't need this entire library
We'll probably use it in other places too
it's fucking huge though
Matters to me ๐ข
The "high performance" framework
Noone gives two fucks about size
Takes me ages to upload
Except women as Lemmo said
lel
Hey my internet is very slow so I care
also, how many times we actually going to access that packet map?
Idk
I had to completely fork supervanish recently for being dumb
just did some googling and found http://autojar.sourceforge.net/en_d/index.html
It Decided to modify the same packet in 2 different locations and read it non async both times ๐

Well Iโll likely put a push request soon see if they want it
But need to reactivate their Persistence and handle it better cause they didnโt ๐
:what:
They saved persistence (vanished data) every time something changed non async so surprise surprise server didnโt really appreciate that
also, can someone please explain to me who's bright idea it was at Mojang to have (inbound) player movement packets be absolute and (outbound) entity movement packets relative
lol
Microsoft stuff you know
gotta love stuff like this btw: https://i.imgur.com/sl4WicV.png
official language in: the seven seas
You forgot LOLCAT
I arrr
wen dis added
Since 1.9
and where I find
I mean... if you could scroll longer ._.
what-
what-
intellij is taking 15 minutes to index ๐ซ
this is like the third time it's indexed the jdk
AHGHHh
right when i thought it was done
it decided to index the jdk again
what is wrong with intellij
now it's "Updating indexes"
it finished
if it starts indexing the jdk again I'm going to go nuts
@prisma wave finally DONE
how do i disable full capslock name's, is there a plugin for that
Yeah, I use multiple
Wtf, why is time on my Discord broken as fuck
Oh my entire pc's time is dead
Nice?
Ok, fixed it
int i = 0;
for (char c : nameToCheck) {
if (c.toUpperCase() == c) {
i++;
}
}
if (i == nameToCheck.length() - 1) {
//name is fully uppercase
}
d;jdk Chracter#isUpper
public static boolean isUpperCase(charย ch)```
Determines if the specified character is an uppercase character.
A character is uppercase if its general category type, provided by Character.getType(ch), is UPPERCASE_LETTER. or it has contributory property Other_Uppercase as defined by the Unicode Standard.
The following are examples of uppercase characters:
Many other Unicode characters are uppercase too.
Note: This method cannot handle supplementary characters. To support all Unicode characters, including supplementary characters, use the isUpperCase(int) method.
ch - the character to be tested.
true if the character is uppercase; false otherwise.
tfw no short circuiting
๐ Fine
for (char c : nameToCheck) {
if (Character.isUpperCase(c)) {
return false;
}
}
return true;
๐
๐
both algorithms are O(n)!! Problem???
republican programmers: cobol, fortran, c ๐บ๐ธ
democrat programmers: dart, go, javascript
that is a false dichotomy and factually incorrect
What is a dichotomy
idk
is defining your own number types a good idea?
I wanna define an Angle (https://wiki.vg/Protocol#Data_types) as 1/256ths of a full turn backed by a byte
just wondering if it's worth me having it be a number or not
how much are you going to be using it
quite a bit
I mean, if I could, I would have you define it something like val angle = 4a or something, but that would require compiler changes so fuck that xD
yeah but Kotlin unfortunately doesn't
and MineKraft is in Kotlin, not F# lol
also, the lack of consistency in the protocol is so frustrating
I mean ig its ok
because you could add some inner methods and stuff
inside the angle to change it up
and it would be useful
there'll be a method to change it to degrees, and to make a new angle from degrees, since those are a pain
Yeah
what I'm currently using to turn degrees to angles is ((this / 360.0f) * 256.0f).roundToInt()
Oof

I think 1.17 will be another iteration that will split the community.
Massive changes
How will it split the community?
I wonder how the performance will be relative to 1.16
Well so far one of the concern ones was the sculk sensor, which they actually optimized pretty well
So hopefully they are having performance in mind now
It should have better performance than 1.16
Its sad to think that you seriously have to wonder who has your IP these days :/
Yeah cause leaking happens too often
https://i.imgur.com/RZ1TDr1.png AAAAAAAAAAAAAAAAAA
god damn you signed bytes xD
unsigned byte time
io.netty.handler.codec.DecoderException: Unknown serializer type 300 phat oof
@ocean quartzThe experiences shown that too many changes can cause huge backlash.
World dimension has significally changed. VOID is no longer at y:0
Block height increased to 320, depth -64
I mean, who hasn't been wanting cave updates?
Those are all changes that people have been wanting for ages
I didn't vote.
The vote was rigged.
Ricked lmao
You're an idiot
Oceans, cave, and nether update have been the most wanted ones in years, latest updates have all been pretty damn nice (except the villagers one, was kinda boring)
What we need is the multithreading update
Yeah
aether engine implementation when
later tonight
I wonder how hard it be to make aether in java
wait until people will find out that mountains will go up to 250 or something like that
Yeah it'll be awesome
its already a mod and someone made it with a plugin already but I don't remember who
I mean its just started and it already looks sick
Blitz aether engine not the aether mod xD
I have done some proper hacks.exe with metadata writing lol
fun ByteBuf.writeMetadata(index: UByte, type: MetadataType, value: Any?) {
writeUByte(index)
if (index != 0xFF.toUByte()) {
writeVarInt(type.id)
when (type) {
MetadataType.BYTE -> writeByte((value as Byte))
MetadataType.VARINT -> writeVarInt(value as Int)
MetadataType.FLOAT -> writeFloat(value as Float)
MetadataType.STRING -> writeString(value as String)
MetadataType.CHAT -> writeChat(value as Component)
MetadataType.OPTIONAL_CHAT -> writeOptionalChat(value as Component?)
MetadataType.SLOT -> writeSlot(value as Slot)
MetadataType.BOOLEAN -> writeBoolean(value as Boolean)
MetadataType.ROTATION -> writeRotation(value as Rotation)
MetadataType.POSITION -> writePosition(value as Position)
MetadataType.OPTIONAL_POSITION -> writeOptionalPosition(value as Position?)
MetadataType.DIRECTION -> writeVarInt((value as Direction).id)
MetadataType.OPTIONAL_UUID -> writeOptionalUUID(value as UUID?)
MetadataType.OPTIONAL_BLOCK_ID -> writeVarInt(value as Int)
MetadataType.NBT -> writeNBTCompound(value as CompoundBinaryTag)
MetadataType.PARTICLE -> writeParticle(value as Particle)
MetadataType.VILLAGER_DATA -> writeVillagerData(value as VillagerData)
MetadataType.OPTIONAL_VARINT -> writeVarInt(value as Int)
MetadataType.POSE -> writeVarInt((value as Pose).id)
}
}
}
hacks.exe
wtf
Couldn't this be simplified with generics?
probably
would still need to cast though
doesn't seem to work
they throw nosuchmethoderrors I think
java.lang.NoSuchMethodError : Method not found: MemberDescription(ownerInternalName = me/bristermitten/minekraft/extension/BytebufsKt, name = writeMetadata-srPc2dE, desc = (Lio/netty/buffer/ByteBuf;BLme/bristermitten/minekraft/entity/metadata/MetadataType;Ljava/lang/Object;)V, isStatic = true)
well that's not good
yeah the decompiled code for this is proper whack
yeah that's not gonna work
lol
maybe I should've just gone with what I was doing before, which was to just make a method for each of the 19 different types of metadata that can be written (which I've kinda somewhat already done anyway)
๐ฅถ
going to abuse method overloading for this lol
Basically CSS
scss
i use less

yeah I hate css too
@jovial warren make it easier to add fake players.
why?
Why not
player spoofing ๐
omfg me and my alt can see each other now
there is movement
no rotation, so heads don't spin yet
but there is movement
no animations yet either
Is there some sort of refresh rate?
wdym refresh rate?
ticks per update
it will send entity move packets as soon as it receives the packets from the clients
gonna upload the jar and run it for fun if anyone wants to join and see lol
168.119.171.28:25565
1.16.5
https://github.com/knightzmc/MineKraft players can now see each other pog
no
it's a Minecraft server from scratch lol
everything in that project was made by me and BM
no Mojang code, no Bukkit code, no Spigot code, no Paper code
Can someone here help me maybe?
depends on what your issue is
^
private fun handleRotationUpdate(packet: PacketInPlayerRotation) {
SessionStorage.sessions.filter { it != session && it.currentState == PacketState.PLAY }.forEach {
it.sendPacket(PacketOutEntityRotation(
session.id,
packet.yaw.toAngle(),
packet.pitch.toAngle(),
packet.onGround
))
}
}
```got a feeling that's gonna be a bit slow
anyone here good with optimisation?
Well, first of all, you don't have to create the same packet over and over again
that is a good point
Also whatever sessions is (i'm assuming a collection), you don't need to make a new collection with filter there
what can I do instead?
Sequence
SessionStorage.sessions.asSequence().filter { it != session && it.currentState == PacketState.PLAY }.forEach {
it.sendPacket(rotationPacket)
}
```so this?
Those could already be classified as very small optimisations because the input won't be too big but it may still be beneficial if this is called very often
it can be called as often as nanoseconds apart
Yeah something like that
If it's really critical you might have to ditch filter completely but that's not a judgement I would make before profiling
how would you even ditch filter?
for each + if statement
filter, when called on a collection, creates a copy of that collection
whereas called on a sequence, it doesn't, since we already have the instance of the sequence
on collection, it's gotta run through all the elements, pick the ones matching the predicate, then create a new collection only containing those elements
It still creates a new sequence object
which I imagine is quite expensive
yeah not what I was saying
O nvm I misread your message
also, I got some whacky maths going on with positioning
Don't prematurely optimise
well I don't want rotation to visibly lag if I can help it lol
Keeping it as a sequence will probably be good enough
yeah I'm keeping it as a sequence for now
Is it lagging?
also, ```kotlin
val oldLocation = session.player.location
val newLocation = packet.location
session.player.location = newLocation
SessionStorage.sessions.filter { it != session && it.currentState == PacketState.PLAY }.forEach {
it.sendPacket(PacketOutEntityPosition(
session.id,
((newLocation.x * 32 - oldLocation.x * 32) * 128).toInt().toShort(),
((newLocation.y * 32 - oldLocation.y * 32) * 128).toInt().toShort(),
((newLocation.z * 32 - oldLocation.z * 32) * 128).toInt().toShort(),
packet.onGround
))
}
got a feeling that doing two separate conversions there is a terrible idea
You got enough magic numbers there
Just no
why no ๐
are bitwise operations faster than standard pure maths stuff?
Uh.. yeah
in some cases
surely multiplication is about the same as bitwise stuff
direction?
Extract this into a proper function first
I feel like a compiler could probably optimize constant multiplication into shifting where applicable
^^^
right, I'm gonna write this down and do this tomorrow lol
and when I say write this down, I mean on physical paper with a physical pen xD
consider using a faster language like Rust
(current * 32 - prev * 32) * 128 = 32 (current - prev) * 128
you could simplify that to a bitwise
Only do that if it matches what the calculation is supposed to express, not because it happens to be a power of 2
Yea I was thinking that
No
I think the more expensive thing here is the type conversions, out of all that maths
or other direction
Yes
"other direction"
Wrong again
that's a right shift lol
oh
you want a left shift
lmao
third time's the charm
i typed it wrong
lol
there
(current - prev) << 12
((current - prev) << 12).toShort()
cause that returns an integer already
Rust could do this in a single CPU cycle ๐
or in my case, ((newLocation.x - oldLocation.x) shl 12).toShort()
Yea
because Kotlin doesn't have Java operators
that should be faster
cause you dont need to cast to integer
yeah
wait hold on though
what if current and previous are doubles?
I still gotta cast, no?
Casts are literally free
Hm actually yeah you cant use bitwise really for decimals
since you can't cast a double to a short, you gotta cast it to an int first
i agree
I guess they're only bit shifts
but this sounds like a massive micro optimisation lmao
anyway, gn all
gn
worth it for the amount of times these are handled
๐ค
its rotation
alr man
player rotation
goodnight ๐
every millisecond counts when you're receiving a packet every like 3 ms lol
and positioning
this is positioning
gn
prematurely optimising is a sin
It's just basic facts ๐
intellij randomly freaks out for me
and i have to invalidate and restart
can intellij takes medications?
๐
intellij 2021.1 - added a new warning to allow users to optimise their multiplications into bit shifts
You literally do not know
Well is it premature if you have evidence?
Good question
I moved IJ to a different drive and lost all the configurations for it ๐
๐ฅฒ
That's hideous
I know how often it's called, I don't know how long it takes to process or if I can even optimise
that doesn't mean it's gonna cause lag
Things that are called a lot get inlined anyway
Which improves performance a lot
Inlined? Does that happen automatically?
Yes
When it happens will depend on the VM
But that's why the Hotspot VM is called Hotspot
It analyses hot spots to optimise them
Ah right
That is an incredible idea
!!!
Kaliber like you have enough brain cells to build your own JVM
I do!!!
this is OUTRAGEOUS

Write it in a fast language like python
Lol
Or js
yeah ive heard good things about js
very high performance!!
I've never heard anything negative about js in my life
idek if python compiles or is interpreted tbh lol
technically both
what?
The same way java is technically both
oh right ok
ye
wait how is java both?
I might be making this up
But I think bytecode is often interpreted by the JVM
Rather than immediately compiled
There's like a 50% chance I'm totally wrong here but yeah
Maybe a 100% chance
Some implementations of JVM may choose to interpret the bytecode instead of JIT compiling it to machine code, and running it directly. While this is still considered an "interpreter," It's quite different from interpreters that read and execute the high level source code (i.e. in this case, Java source code is not interpreted directly, the bytecode, output of Java compiler, is.)
Found this
I guess it depends
interesting
i thought it was all jit
anyway as for python, its compiled into bytecode then interpreted into machine code at runtime
so yea ur right
On most it would be but I think it depends on the VM
PDM in rust coming soon????????
?dm-filler
filler-item:
priority: 100
display_name: ' '
material: gray_stained_glass_pane
slots:
- 0-53```
#bot-commands ๐
@heady birch what ide do u use for rust
I think CLion is also a Rust IDE
Jetbrains 
jetbrains has a rust plugin
i just want to know if niall uses it on intellij or clion
This is a crazy idea
but does mixins work on spigot?
could I use mixins and modify other plugin's execution?
@wind patio or just press tab?
since "multiple vararg paremeters are not permitted" do i just use an array instead?
Just use a list?
disconnected with: Kicked whilst connecting to hub: VPNs or proxies are not allowed in this server
Can any pro know how to fix this?
Turn off vpn
The player turned off the vpn & proxy, also tried to restart his modem/wifi,
after than still the same
I whitelisted his IP , checked all the antibot plugin ๐
Still cant
Is there a way to add an extension method for all enums?
Just use the Enum interface?
o is that a thing
Woo hoo. Found a good nms practice
uhh
why tf cant this be cloned? xD
https://github.com/codechefvitbhopal/Resource-Buffer
oh yea nvm the : character
Holy shit is world gen inefficient
Whats wrong?
Still going
Also I think my map function is wrong
public static float map(final float value, final float inMinimum, final float inMaximum, final float outMinimum, final float outMaximum) {
return (value - inMinimum) * (outMaximum - outMinimum + 1) / (inMaximum - inMinimum + 1) + outMinimum;
}
Writing a 3d visualizer for your generator ๐ฎ
Can I "disable" a package in ij?
huh?
so its just as if it doesnt exist
huh?
No* I was suggesting you to write one
Could be fun, plus hopefully makes it easier for you to test stuff
Well yea I've been trying all these ui frameworks are disgusting tho
Also yea my map function doesn't work at all kek
Ideally you would be using a game engine or something
Unity perhaps?
That would require C#
Would be yikes tho cause that's C# yea
There are a few on Java itself, plus I dont think youll need a visual editor anyway
return this could never be null right?
I mean the generator stuff would be pretty similar so that's not an issue
mhm
lmao
kek
How come in the IJ plugin settings tutorial page theyve marked this as nullable thne lol
No idea
Theres no way to do like companion val or something is there? Ive just gotta do
companion object {
val x ......
}```
Got any recommendations btw?
https://libgdx.com/
This seems to be nice
or you could use lwjgl
I know what we're gonna do today
Yes I am using cLion with the Rust plugin, working very nicely
I need someone who is smart lol
That wouldn't be me
Hey I was wondering if I could get some help with coding, im relatively new but ill try my best to understand the solutions
Cool default app
Ask away
so I'm using hashmaps rn and ive got a inventoryclickevent and an inventory that is created after that click event
I want my intellij plugins settings page to have like a list of stuff on the left hand side
Simliar to that
You say your smart
how do i
its the J stuff idk if thats spring
JList?
swing/awt
Use a border layout and add another panel into the left (or is it called west?) then give that panel a borderlayout and add a JList to the centre
So when a player clicks an item it saves the name into the hashmap and when the inventory is created the name of the item becomes the title of the inventory the issue im having is that one key isn't doing what it should be since I'm using the event to get a player then im using the create inventory to get the player so ik the issue lies there im just not sure how to work around it
Honestly not sure what you mean by that Lazza
alright so
I have a menu which when a player clicks on the item in that menu it creates another inventory, this new inventory I need to have the same title as the displayname of the item that was clicked
You using any gui libs?
no
You should look into mf-gui, it'll make your life a lot easier
Yeah thanks
I know the way ive been making inventories so far has been long way around
but ill have a look into that now improve my code and come back if I still havent found a solution
ij plugin'
JavaFX superior
ij plogin
They all shit
TornadoFX is actually good
What? TornadoFX?
Stupid "kotlin ecosystem" full of legacy code
What's the ping for
Stfu
Am I wrong
Yes
Elaborate
I can't remember the last time I saw legacy Kotlin code in the Kotlin ecosystem
TornadoFX
Is that really legacy?
Last commit 9 months ago
That's not legacy
Not yet compatible with java 9
????
Kotlin to move to EVM
not to mention the ridiculous model of "this requires an experimental annotation" ๐
I've used it on Java 11 with no issues
Compiling against java 9 they mean
Also, who tf uses Java 9?
Java 9 users do
noone
๐
Exactly Frosty
bm he means using a higher version than 9
java 21
There are branches for 9 and above
The java 9 one I mean
10 months is a long time
Let's compare it to something modern like GHC
๐คท
That receives over 200 commits every month
tornadofx isnt part of kotlin tho
Much more active!n
Its a separate framework built on top of jfx
You think JavaFX has added anything in that time?
probably not
Yes
Wow!
Therefore java > kotlin
yes!
Pattern matching? Haskell had it first
Records?
Being modern?
Haskell did that in 1995 ๐
Such a ripoff, burn down oracle!
Why are we still supporting this corrupt and outdated company??
fork OpenJDK and replace it with GHC
Especially when they expressed intentions to buying tiktok!!
horrible!!!!
Yall need drug 
Please provide substantial evidence
Kotlin's entire purpose was to fix the problems with Java
And it's done that
You write less code for the same result
Ever heard of java 15?
What did that add?
Everything
I think 16 added records, which are good, but nobody's on 16 yet lol
Records were in 14 iirc
Nobody's on 15 yet either
Speak for yourself
When I say nobody, I mean maybe a very small minority of Java's users
Most are either on 8 or on 11
Except rust and Haskell which are objectively the best languages
Wrong
true
That's what you think
Senpai
hey guys i think im the current world record holder for hitler anyway guys its pretty cool
They provide things no other language does
What did i just see
I personally prefer Kotlin over those, as I'm not the biggest fan of functional (trash imo) programming and I know Kotlin a lot better
It's funny
I have never heard someone who actually knows a functional language say they're trash
I mean, functional languages aren't terrible actually, that's not true, but I don't like purely functional languages
and yet C style fanboys see 1 line of Haskell and decide that an entire paradigm sucks without knowing the slightest bit about it
It's not a bad language, I just don't prefer it over Kotlin because I haven't used it
consider learning one
I would recommend F# because it's not pure but still has a lot of the concepts, and it's super clean
Alright
a >> b ๐คค
Bit shift?
nope
What then
function composition operator
fancy f# features
let toUpperCase str = ...
let reverse str = ...
let result = toUpperCase (reverse "hello")
let reverseUpperCase = toUpperCase >> reverse
let result = reverseUpperCase "hello"
``` the 2 `result`s are equivalent
it's a lot more useful than that tho
What does reverse upper case do?
In mathematics, function composition is an operation that takes two functions f and g and produces a function h such that h(x) = g(f(x)). In this operation, the function g is applied to the result of applying the function f to x. That is, the functions fโ: X โ Y and gโ: Y โ Z are composed to yield a function that maps x in X to g(f(x)) in Z.
Int...
reverseUpperCase is a function taking a String and returning a String equivalent to toUpperCase (reverse str)
What does reverse do?
reverses a string
"olleh"?
Yeah
the result would be OLLEH
That's noice
mhm
it gets better than that
let formatUrlToTitle =
getPathAfterUrl
>> words
>> List.map capitalise
>> List.filter Option.isSome
>> List.map Option.get
>> Seq.ofList
>> String.concat " "
``` this is used in the wiki
That's nice
mhm
very clean
there's also |>
which lets you write functions in reverse
eg instead of toUpperCase "hello" you can have "hello" |> toUpperCase
like a pipe in bash
wait is function composition in f# in the objectively wrong order
Looks right
wait
yeah that is the wrong order ๐ก
fog (x) is supposed to be f(g(x))
The resulting composite function is denoted gโโโf : X โ Z, defined by (gโโโfโ)(x) = g(f(x)) for all x in X.
wikipedia
yes
let inline (>>) f g x = g(f x)
ah
it didn't specify the order in that sentence though
true
sorry but f# is dead to me now
yes
Yea seems f# has both
redemption arc?
