#help-development
1 messages Β· Page 1802 of 1
Player
As the class name suggests
ok just making sure
to
I was always wondering why spigot enchant and potion effect names are different from the game
Why is that
because theyre very old
you don't plan updating them?
they are both Keyed though so you can get the actual names
Oh
How can you config.save() your own configs? (not the default config) (to memory, not to disk)
The Configuration API is a set of tools to help developers quickly parse and emit configuration files that are human readable and editable. Despite the name, the API can easily be used to store plugin data in addition to plugin configuration. Presently only YAML configurations can be used. The API however was designed to be extensible and allow ...
ty
md's- dare I say- on fleek today
yeah xD
is it a good practise to save a config on WorldSaveEvent
so that world and config are always "synced", especially looking at server crashes
or when do u guys safe ur config?
only at onDisable?
or everytime something changes?
I never save my config
well not the classic yml ones
as they're intended user configs
not (arbitrary) data holders/carriers
so u use a database i assume
thats the more pro approach i guess
but if a starter wanted to use a config for saving data
what would u suggest
wym u dont save data
by 'config data' do you mean data relating to players
yeah
so not configuration data
uh then its different
playerdata/<playername>.yml
either queue changes for immediate saving off-thread or save at given intervals and when the player disconnects
well you load it with loadConfiguration(), so i just call it configs. but yeah, its not, its playerdata that needs to be stored on disk
I save on connect and disconnect, as well when I mutate the data transfer objects, so I save whenever the data is changing (almost, some exceptional cases), I also leave a config option in case someone wants a synced buffer.
alright, thanks guys
Hmm I don't use the bukkit config api for general serialization or deserialization nor as a data transfer model
what do u use to save data
i asked him xD
it's what they're for
cuz he said no to database
I do/have. It works great.
that depends on teh database
and better if u have lots of data
the pitfall is that you must write entire files at a time
you cannot incrementally save a yml file with bukkit
correct ^
but you can easily put the save thing inside an async task
Its all about what data and how you are going to use it
that's fine if you're saving infrequently
yeah I always use YAML for everything that an admin might want to adjust themselves
for everything else, I use PDC lol
thank god someone fixed the 1.18 PDC bug
I couldn't sleep the whole night until it was fixed
there was a bug?
Idk it just isnt made for it
the linkedhashmap is slow and not thread safe which FileConfiguration uses iirc
ah pdc not being detected as a chunk change so wasn;t saved by the looks
good to know. Someone will be in here at some point with it
yep, basically PDC not being saved when no blocks changed inside a chunk
yes
hmmmm must be a plugin causing this crash then
also that was for config data, not arbitrary data just to clarify
<!--Bukkit/Spigot NMS -->
<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>spigot</artifactId>
<version>${project.spigotVersion}</version>
<classifier>remapped-mojang</classifier>
<scope>provided</scope>
</dependency>```
io.netty.channel si there just fine
iforgot the param for the remapped π
I use maven and its just fine, so long as you use teh remapped flag when running buildtools
@echo off
curl -z BuildTools.jar -o BuildTools.jar https://hub.spigotmc.org/jenkins/job/BuildTools/lastSuccessfulBuild/artifact/target/BuildTools.jar
set /p Input=Enter the version: || set Input=latest
java -jar BuildTools.jar --generate-source --generate-docs --rev %Input% --remapped
pause```
don;t avoid it, its so handy
I was avid against using it a couple of years back. I would not move off Ant
However, if you are refusing to use maven, which jar are you actually adding to yoru project?
\Spigot\Spigot-API\target\spigot-api-1.18-R0.1-SNAPSHOT.jar
G r A d L e π΅
oh god no. If he's anti maven he would blow a gasket at gradle
Hey, I have a question what can I do about it, how can I get the texture out of it?
^ Yep, until I used it I hated it
I think for me it was more a dislike of everything being internet based. I like everything local. I didn;t understand .m2
DOesn't GameProfile has a property for the texture?
yeah me too. And I disliked maven because eclipse fucked up the project everytime.
yes it does, but I don't know how I can get it out of reflection
anyway, maven is heaven sent and it works really really well with IntelliJ
let me see
works well with eclipse too.
The only issue it has is downloading javadocs, you have to update project to get it to do that
yeah well
eclipse ignores / overwrites many pom stuff when you still have this .eclipse directory or whatever it uses
at least it did 2 years ago
try this:
profile.getProperties().forEach(new BiConsumer<String, Property>() {
@Override
public void accept(String s, Property property) {
System.out.println(s+": " + property.getValue());
}
});
so basically just print out all the properties. Then you can see how the property you need is called
probably it's just "textures"
ew
?
use a lambda
why? it's just for debugging
because even if it's just for debugging, it's faster to type
I let intellij create the anonymous class lol
yes, but i mean more a matter of reflection, i have a field that relates to gameprofile but i don't know how to use get properties method.
but here, to make you happy @lavish hemlock
profile.getProperties().forEach((s, property) -> System.out.println(s+": " + property.getValue()));
thank you
well just do GameProfile.class.getMethod("getProperties",null) etc and invoke it via reflection then
or use method handles if you call getProperties often
i want to get texture of playerhead item
i found this soulution
yeah but can't you easily do sth like this?
one sec, gotta type it
SkullMeta headMeta = (SkullMeta) item.getItemMeta();
Field profileField;
try {
profileField = headMeta.getClass().getDeclaredField("profile");
profileField.setAccessible(true);
GameProfile profile = (GameProfile) profileField.get(headMeta);
String texture = profile.getProperties().get("textures").stream().findFirst().get().getValue();
} catch (NoSuchFieldException | IllegalArgumentException | IllegalAccessException exception) {
exception.printStackTrace();
}
hmm, I will try this
How do I get a net.minecraft.server.network.ServerPlayerConnection to be able to send packets from a org.bukkit.entity.Player/org.bukkit.craftbukkit.v1_17_R1.entity.CraftPlayer object? I don't see any fields that will do the conversion, and casting doesn't work.
no idea whether it'll work, just try it
are you using mojang mappings or obfuscated ones?
Mojang mappings I believe.
you believe? π
import net.minecraft.core.BlockPos;
import net.minecraft.server.network.ServerPlayerConnection;
import net.minecraft.network.protocol.game.ClientboundBlockUpdatePacket;
import net.minecraft.world.entity.item.FallingBlockEntity;
These are my imports, I'm pretty sure that this is using the Mojang mappings.
that's mojang mappings
yes
okay in 1.17 idk, I'm using obfuscated for 1.17
I only switched to mojang in 1.18 so sorry
but maybe this will help you anyway:
this is how I send packets in 1.18 mojang mapped
I'll give it a shot, thank you!
np but probably it won't work by copy pasting
e.g. connection.connection is just connection in 1.17 IIRC
It's connection.connection in 1.17 it looks like.
ah okay
wasn't sure, as said I'm using obfuscated in 1.17 because back when 1.17 came out I was too stupid to figure out how maven modules work
Works, thx! π
np π
tbh I'm surprised it works lol
I just typed it down without checking it lol
Worked perfectly! Thank you!
is it possible to detect right/middle clicks on an item in a gui?
is there a way to toggle online mode without nms
π
What possible reason could you have for that
do not question the methods
glad to help π
I think that detecting middle click is no longer possible in 1.18
at least not for empty slots
no it does definitely require NMS
but why would you ever need to change it at runtime?
just stay in online mode lol
I just cannot see a legitimate use
me neither. anyway, setting onlineMode to true in MinecraftServer should be enough from a first glance
or false
Hey guys I got a question.
- I need to check if the player has an inventory opened
- I need to get that inventory and for example fill it with items.
Question:
Is there a pretty way to accomplish that, some method for the player - getting an topInventory if there is one or do I really need to store it basically if an inventory opens / closes?
btw is it still possible to access private fields via reflection? I heard that this illegal-access flag was removed
I'm not sure that would even be possible. It would invalidate every players UUID
yeah well but shutting the server down and changing the setting would also do that
Player#getOpenInventory
ππthis plugin that i'm working on that i didnt create is an all op plugin that used to support online and offline mode and had a cmd to switch between the two
doesn't that return like the player inventory? if there is no open one?
i didnt make it
so idk why it exists
but anyways yeah thats why
trying to remove any nms usage in this plugin
yes. so check if the inventory equals the player's inventory, and if so, the player doesn't have any inventory open
except maybe their own inventory
but you can't detect that anyway
it's client sided
i dont know if u know of this server but its like one of the top 3 mc servers still existing or smthn
was created back in like 2009
Oh I saw it doesn't return and Inventory, rawer an InventoryView, basically I can just check for the right TopInventory
That supports piracy
thanks for your help @tender shard
exactly π
yeah i dont know, they dont do offline mode anymore
not sure what top and bottom inventory will return when the player doesn't have an inventory open, just try it π
Well if they donβt do offline mode then they donβt need to switch to it π
but anyway, either the top or the bottom one will be the player's inventory
yea I will test it anyways :D
just add some debug statements and see π
ez
the only legit reason to use offline mode is when running behind a proxy imho
yes
for (OfflinePlayer player : Bukkit.getOfflinePlayers())
{
player.setWhitelisted(false);
}```
although I remember notch once tweeted he's okay with people pirating the game if they can't afford it
Seems correct
lesgoo
however he's gone for a long time now lol
Well its not his game anymore
didn't he also tweet some racist things or something? π
i opened this class and i was like wtf
How can i practice the Logic Gates + programming
don't even try to play nandgame
the first 4 levels are fine
Transphobic, but even then there's other screenshots of him being pro-LGBT before then, so honestly I just don't take a side on that argument.
but when it comes to the adder, you will die lol
didn't want to say sth bad about him, I just remembered there was some discussion about his tweets
i wanna be able to understand the underlining thing
are we speaking of notch
Notch is an interesting being
isn't he transphobic and a white supremist or smthn
he's quite the labyrinth
I've heard similar, unfortunately
I once dated a trans dude and he was transphobic himself lmao
excusemewhat
It's not all that uncommon, which makes absolutely 0 sense to me.
he was inspiration for me the idea of making unique games but i never cared of his whatever
can confirm all trans ppl r phobic to ourselves, source? i am π³οΈββ§οΈ
pemdas
cancel each other out
ez
We could sit here and debate Notch all day and neither side of that ongoing argument would be fully correct.
Join the neutral side, where you're never not correct :)
people can self hate
yeah idc about notch as a person at all. he made a nice game and that's all I need to know about him π
theres no real reason a plugin should check that tbh
it's not to check it's just to print out
NMS?
normalize never being correct, just a complete fool, a total idiot
for like motd and stuff
I follow him on Twitter because sometimes he makes funny tweet.
or e.g. to check what particle names to use
it's getBukkitVersion right xd
there's a getMappingsVersion for NMS, and for particles and other stuff capability testing is the better way
i mean maybe if a plugin needs to behave differently depending on the game version

stuff changes within versions
I'm using this to get the NMS version:
try {
final String packageName = JeffLib.class.getPackage().getName();
final String internalsName = Bukkit.getServer().getClass().getPackage().getName().split("\\.")[3];
//abstractNmsHandler = (AbstractNMSHandler) Class.forName(packageName + ".internal.nms." + internalsName + ".NMSHandler").newInstance();
abstractNmsHandler = (AbstractNMSHandler) Class.forName(packageName + ".internal.nms." + internalsName + ".NMSHandler").getDeclaredConstructor().newInstance();
would Server.Spigot#getConfig return spigot.yml
I think so
alr
I prefer abstraction over reflection in the case of NMS.
tyty
But then again I never use it.
?javadocs
?jd
And then again I haven't made a plugin in like, 2 years.
"Why are you in this server then?
"
Because fuck you, that's why.
you'll have to try yourself. the docs say nothing about it https://hub.spigotmc.org/javadocs/spigot/org/bukkit/Server.Spigot.html#getConfig()
declaration: package: org.bukkit, interface: Server, class: Spigot
me too but I somehow have to detect the version, don't I?
half of what?
the mns
m&ms
yum
skittles
yes this man is correct
β€οΈ
skittles are preferable
there is also smarties
I mean yeah but
looooo
they make my mouth dry
tittie skittles
what the fuck does that mean
estradiol
oh
oh man
I just see spigot removed a rule violating review from one of my plugins lol
would not have expected this
normally they don't really care about review reports
Is there a tuturial i wanna change where blocks spawn
Asking again because noone replied - is it still possible to change private fields of another class using reflection?
wdym "change where blocks spawn"?
Yes mfnalex
thx
yes, .setAccessible(true)
But only certain ones
or whatever the new Handle method is if youre using that
so what does the removed flag with "illegal access" do?
I thought it was about this
Like i wanna retexture some blocks then make them spawn underground like custom ores
reflection into Java internal classes is blocked
you want to change world generation stuff?
alrighty thanks
probably just setAccessible into an unreflect
Yea
its Lookup.privateLookup or something
Question on whether I am doing this right or not, am I missing something?
I have a villager that I run remove() on.
However no other villager will claim the bed or workstation that they had.
I checked the poi nbt and both have free_ticket set to 0(i.e. unclaimable).
Am I missing something, doing it wrong, or should this be a potential bug?
tutorials*
you want to implement a custom WorldCreator or something like that then. For minor changes, you could probably also rely on some events and change the chunk after it already was generated
how do i learn Logic gates with programming?
if you murder the villager is it ok?

when their deals are shit, yes
Maybe .remove doesn't run the necessary cleanup, in which case probably a bug worth reporting
Poor villager
So look up worldcreator tuturials
privateLookupIn but I believe that requires the caller class to have access to the private elements.
yes murder if deals is bad mafia mothed
that's a strange question

Either that, or you can use the internal IMPL_LOOKUP
just promise to never try nandgame @round finch
learning it for computer science
you will never be happy again after getting to level 4 or 5
plot twist, already not happy π
killing the villager in game removes the poi/memory of home and jobsite. remove() from code does not seem to do so.
correction: Full Adder is the nandgame level that will kill you
it's the 7th level I think
yeah .remove is brutal, it doesn't run the death logic which is where the poi releasing code is
.setHealth(0) or something might be a workaround, though I think it's worth a bug report. I am a little concerned though because .remove is meant to be a hard kill and not do other things like drop items
what does poi even mean?
pooi
point of interest
points of interest
and what is a POI in regards to entities? I'm confused lol
maybe just overriding .remove for CraftVillager would be ok, but in any case open a bug report
why i dont see any kill player method other that hard-set the health to 0?
right now i am getting the poi block from memory and doing a destroy/create on it
PROTECT OUR INTELLIGENCE
wait
what method are you actually calling
I dont see Entity.remove() in the API ?
villager.remove()
i need to verify it still exists in 1.18 but will do....
are there already any datapacks out for 1.18 that add custom biomes? I want to check whether my NMS code is working to get custom biome names
I'm talking about datapacks that use an actual namespacedkey to add new biomes
e.g. terralith in 1.17
or however it was called
datapacks use what to add more things in mc?
oh it's released? nice
they are mostly some json stuff IIRC? no idea
yep
here's how terralith looks like @quaint mantle
yeah just json
hmm
so...
the json access the api like plugins in spigot right?
Datapack
no
api for datapacks.
minecraft itself reads the datapacks
i always wanted to learn Data Packs and modeling + texturing for spigot plugin making
me too
they read? instead of datapacks access the api? ok
minecraft reads the json files inside the datapack and then does stuff with it lol
it has nothing to do with the bukkit api
then how can datapacks do custom biome better than nms...?
Herobrine.json
a few of the old school bukkit stuff was implemented by the microsoft/mojang team. i think they even hire some to help with the modding portion of the vanilla api
im saying mc api, vanilla api, etc... but not bukkit api
It's not really an API
yea
it is in the game
anything can be an API
you can use datapacks in single player
APIs don't have to be public after all
ok bro but this is still what im asking
there is a vanilla api. that is where the resource/datapacks are implemented
yeah but APIs are about source code and datapacks aren't "source code"
i think not? the resource pack might just like minecraft take every assets then put it in the game that are running then reload it
it's not an "api"
what constitutes source code tho
according to wikipedia, something written in a programming language, which json isn't
datapacks are implemented via a application programing interface(API)
an*
lol
md_5 can you confirm there is literally no way to check when a player opens their own inv?
I looked through the whole NMS code for hours but it seems like it's impossibler in 1.13+
well
that's bad
lol
nice idea but I doubt they'd care
what I also don't understand
bundles are working fine since 1.17
but now we have 1.18 and they are still not obtainable in vanilla
whyyy
"They aren't finished yet"
yeah...
Can you make an entity that acts like some blocks don't exist? I wanna create a custom mob that can walk through doors
they arent allow it yet π
And that can also pathfind through doors
aaaah you're sachin's antagonist
can't they all walk through doors?
I meant closed ones
like that?
Only if they are chasing someone through a door
ah closed ones, okay
Or actually any type of block
that's some harry potter stuff
9 3/4
Yes lol
Like dat
nah it wasnt bro
UH! DataPack coding!?
where is the stuff about bundles?
Only thing that comes to my mind is making fake blocks for each player
I don't find it lol
Recipes
is it Javascript?
datapcaks are json
But I mean if you only want bundle recipes, just use the VanillaTweaks version
ah, didn't see because it had no picture. You should add more pictures π
well json might originate from javascript but it has nothing to do with it
it's neither a scripting nor coding language
it basically just describes things, like HTML or yaml
where i find to learn it
@misty current get the pathfinding, override it for the location it wants, when it hits the block that it should go through teleport.
learn what? datapacks?
json and datapack
Wouldn't it not pathfind at all?
Since a mob needs a clear path to pathfind to somewhere
hmmmm
no, JSON is JS but with more ""
One or the other is basically a version of the other, I can't remember which is which
although JSON is apparently valid YAML π€·ββοΈ
YAML is a superset of JSON
@misty current that is where the pathfind override comes in. Get what it should be looking for, if blocked by "door" set pathfind anyways. if door still blocking, teleport.
every json file is valid yaml but not the other way around
Thanks
probably not lmao
most languages shouldn't be compatible with one another
unless it's like a programming lang
I think most of Java is valid Groovy, but they're both JVM langs so it kinda makes sense
@misty current leverage the near by entities method. should get you close to what you are trying to do. also, if you what to make it look like it is still "walking" through the "door", you might want to implement a runnable to do the teleport portion in smaller increments so that the player "see's" it "phase" through the door. not sure the actual distance needed from when the door is blocking to when the are actual through it based off hit box
Aight thanks
and all java is valid kotlin but
kotlin
ugh
I don't like kotlin
in german kot means shit
so I like to call it shitlin
not true
can you show me an example of valid java code that's not valid kotlin?
public static void main(String[] args) {
System.out.println("Hello, World!");
}
Short question: When I'm converting a player (entity Player) into a string using Player.toString() and afterward try to get a Player from that string using .getPlayer() it gets me a null. Is that intended and I'm using getPlayer in a wrong way or is something else broken? I'm to dumb to find something online
how is that invalid?
In Kotlin, that has to be
fun main(args: Array<String>) {
println("Hello, World!")
}
that's not how it works
Player.toString() will return sth like "CraftPlayer{18241195}" or sth like that
to get the player's name, use Player.getName()
then you can get the player back through Bukkit.getPlayer("name")
but I'm wondering, why do you even want to store the player by their name?
store players by UUID
Players can change their names, UUID doesn't change with em
yeah
void is fun, String[] is Array<String>, arg name before argtype, yeah
thx for the answer. I know, UUID would be better, but long story and awful coding got meto that decision. But it's stored only for a very short period of seconds
void is not fun
then as said, just use Player.getName() π
void is Unit
scala???
and return types are postfix as well
they're just implicitly defined
if you wanted to be perfectly explicit in Kotlin
you could declare the above as
I hate gradle so much
I just created a new kotlin project in intelliJ and now gradle is taking 2+ minutes to set everything up
public fun main(args: Array<String>): Unit {
System.`out`.println("Hello, World!")
}
maven just works out of the box
people always claim "gradle is so much faster" but erm no
at least not for me
i use gradle bc i cba to understand xml
cba?
cant be asked
can't be asked/assed iirc
oh
I think the pom.xml s are way easier to understand than gradle files
but thats obviously because Im used to maven
If you understand Hashmaps, you understand xml (for the most part)
bold of u to assume i understand anything
i just write stuff and pray it works
Ah the good ol shotgun approach
bold of you to assume people other than Maow understand anything
Quick question, Is creating a spigot plugin considered as Software dev?
you're right, it's not valid in kotlin
yeah
I always thought every java code is also correct kotlin code
writing any code is considered software dev imo
I must have confused it with something else
that shows your limited knowledge of Kotlin and the fact that you have no right to call it "Shitlin"
:)
yes, I know about this fact
I know that I don't know enough about it to call it shitty
i will now call kotlin shitlin for the rest of my life
shitlin, i like that
it is optional
java is nice and appealing lol
oh i am never using that sticker again that is GROSS
Java is not appealing
First to remake Minecraft in brainfuck wins my sympathy
and also why does kotlin think that every method is funny lol
cuz coding is fun π
to stay consistent with how fields and parameters are declared
e.g. it would be weird to do val/var and then not have postfix on methods
yeah I get it. I just don't like it
I don't even have a proper reason not to like it
if im using val/var ill just write js π
I just don't like it because I'm stubborn
the : seems redundant though
yes
yeah
many things in kotlin seem redundant
true too
why? a space would be enough for separating stuff
lexical ambiguities
none of you understand how lexers/parsers work
java can not understand i believe
most of the time, whitespace is ignored
also why is out in backticks
because out is a keyword
although I found out you don't actually need to use a verbatim literal for it
only with in
do you really think they did that without any reason?
galaxy brain move there
cuz y'know, unlike Java, Kotlin gives you the option to name shit after keywords :p
I can do that too π
so you can do that in java, just not before compilation
then technically you can't do it in Java
because after compilation, it's not Java
technically u can
Java virtual machine
technically i can write haskell in java then
yeah cuz it's a brand name
just cant compile it y'know
right
the Java language does not support verbatim literals
anyway why would anyone wanna name their variables "for" or "if"?
well not that
default
but class, fun, out, in, pretty much anything Kotlin takes that may be useful as a name otherwise
people do it for obfuscation
I know, I'm doig this myself
just makes using the decompiled output harder to get working
or lets say: allatori does it for me
allatori is a meme
actually it's doing a really good job when you're not using the demo version
.
All obfuscators are memes.
that is true
and yet here we are. still using it :(
I get happy about new Java features not because they improve Java
but because they'll probably improve Kotlin due to their effects on bytecode
good enough for me though π
all i needed was java 11, that built-in HttpClient is fan-fuckin-tastic since i dont use Apache
I could probably make a tool that remaps invalid names to valid ones before decompilation.
Would take me like what
a day?
maybe less than a day?
All I would have to do is loop through the constant table, check for keywords in Utf8 constants, and then add a 1 or smthn to the end of them.
tbh I'd love to see that actually happen
I don't wanna say I don't think you can do it, but I'd indeed love to see it happen
^
aight then give me a class to test on
containing a class called Stepsister
dont worry about it
de.jeff_media.autocomposter.daddy.Stepsister
I used to do that for AngelChest to distinguish between paid and free version
I can do stuff like
if(Daddy.allows(Feature.SOMETHING))
obfuscation but your dictionary is all vaguely porn-ish words
that's next level shit
Moist.class
oh_no.stepbro.ImStuck.class
everyone is always stuck
because Daddy had a bug where it was in an endless loop
so I renamed it to Stepsister
i have a set that = [10, 20, 30] is it possible to use it like an array list and get the 1st one in the set? or some sort of work around?
sexual programming
the newest design paradigm
do you guys want to see an actual plugin in meme form?
doesn't it have any toArray method?
You can only retrieve specific indices via List
It would be more inefficient to use something like a toArray
I mean, sets are not in any order
yeah but is it possible to then get it from there? i couldnt find anything
Nope
so there basically is no "first" element in a set
My plugin wont load, I am using the api build with build tools i also tried download form the website for the api
Set doesn't have get
not without iterating thru the Set
ah
anyway @lavish hemlock if you get the jar (de)compiled into actually readable source, pls don't send it here, it's a paid plugin
thanks

yoy try replace a recipe?
you gotta give me some time I gotta code it bitch
alr alr
show the full error pls
I also have to stare intensely at the JVMS again to remember how to read classfiles.
Indeed I am, didnt realise that, I havent used this in quite sometime lol
you cant create two recipe with the same key... if you wanna replace need remove the original recipe and register the new
what's NovaUtils line 41?
yeah this ^
remove the recipe before adding the same namespacedkeyed recipe again
yes
I feel really dumb now lol. Thanks everyone

You can?
I just realized
THERE'S A NEW MUSIC DISC
and it's π₯
it's so shitty
I love it
How is it shitty
but nothing beats the stal flute solo
No you canβt
Its not as good as pigstep
idk it's just shitty somehow π
NOTHING beats the stal flute solo
Pigstep and the broken 11 and 13 discs set the bar too high for me
stal always reminds me of this https://www.youtube.com/watch?v=BG6EtT-mReM&t=98s
Tommyinnit has left the chat
the other stuff, how you call it, is GOLD
I want to have this guy play flute at my funeral
Fun fact: Kotlin has a ===
This is not a compare by type thing like in JS btw
It's actually just the equivalent to Java's ==
Since Kotlin's == is equals
Well most of the time you're gonna want to use equals anyways
Plus I'm pretty sure classes can operator-overload equals to do identity comparison anyways
Like enums
Eg, the classic https://youtu.be/xIQrC4CerB8
You can get Volume Alpha on iTunes here:
https://itunes.apple.com/album/minecraft-volume-alpha/id424968465
And at Bandcamp here:
http://c418.bandcamp.com/album/minecraft-volume-alpha
I seriously appreciate your support!
and == 100+ times
PHP has an ===
It means the types and the values are equal.
Yeah same with JS
sometimes I fall asleep with MC still running and it keeps playing those chilled songs and then I'm not sure whether to be mad at me for not shutting down the PC, or whether to be glad about it
yeah but in kotlin it's just java's == according to the cat dude
mew
and with cat dude I'm referring to @lavish hemlock who couldnt spell "Meow" correctly lol
Minecraft has the perfect music when youβre burning an entire village to the ground
π
- Maow is closer to the sound a cat makes than Meow
- Meow was already taken
- That is the name of my cat (technically, although her name is Maow-Maow considering that is the sound she makes constantly)
- depends on the language
- valid reason
- ooooooooh :3 please send a picture of her
except for the few cases where I have to use Maow_
because Mao was the chinese hitler
π
Maoware Bytes
probably every country had their hitler. its just that some of them were more "successfull" in their genocide than others. thats why most people know hitler and stalin and mao, but not everyone knows paul potts etc
lmao
who was the American Hitler?
the one who got his election "stolen"
also oh no we're getting into politics lmao
yeah lets not do that π
Better https://youtu.be/nZ_zNUmr8fM
[Screen Themes 'Ride of the Valkyries' series - 6 of 6]
The most famous, and possibly the best, use of this piece of music in film. Because as terrifying as death from the sky must be, it's much worse if they are playing Wagner at full blast.
Starring Robert Duvall, Martin Sheen, Laurence Fishburne, Marlon Brando, Frederic Forrest, Harrison Fo...
I have to google that idiom
it's not an idiom
I'm not native english lol
it's just a Maow thing
Ye idk it either
hm I still don't get it
what does it mean to "take ones shins"?
google wasnt helpful
to forcibly acquire ones shins
Theyβre going to saw off my fingers if I donβt pay my taxes
isn't shin the thing in your leg?
I really don't understand lol
a shin is the thing where it hurts so much when you get kicked into it
like the "testicles of the leg" lol
you should pay your taxes then
or get a fake hand for them to chop off
recently the police knocked at my door
because they thought I was selling kidneys
and now the funny part
after I explained to them that i don't, i got a letter from the tax authority a few months later
and they asked whether I have income from selling kidneys that I did not declare
Haha wtf
but if you google "sell kidney seriously" in german my website comes up first on google
its a satire website
some people just dont understand it
its actually kinda sad
sometimes I get phone calls from people who actually wanna sell their kidney and think its real
because I have to provide my real phone number in the imprint, its a law in germany
See, this would be a great front for someone who actually did sell kidneys
Is that whole website satire?
I donβt know German
it pretends to be "news"
But I see a marque, which is a sign of quality
this is google translated
obviously the puns dont work in english but you get the general idea
btw the last paragraph which is about taxes is actually true
Why the heck is a heart worth less than a kidney
if you indeed decide to sell your newborn's kidney, you must pay taxes for it unless your child is older than 1 year
Hah so you mentioned tax at the end
because the transplantation is more complicated? idk lol
I looked up the price on some suspicous websites and just quoted them
Good to know my eye is worth less than the new iPhone
XD
Or should it be eyePhone
I especially love this:
A skull without teeth (1,200 euros)
like
imagine you want to buy a skull on the black market
and the dealer is like "with or without teeth?"
Iβve got a hammer I can remove them myself
XD
I also got a website that tells people how smoking is awesome and healthy. somehow people are also too stupid to realize it's a joke. I often get hate emails insulting me for promoting smoking lol
probably also doesnt make much sense in english, but whatever
it also doesnt make much sense in german sooo
ugh google does a very bad job in translating the smoker website
I think my chrome is a bit spammed with tabs
so uh
do you want to change the skin yourself, or do you want to use some kind of API like mineskin?
I dont know what mineskin is
so sorry if this question doesnt make sense
is mineskin a website or a plugin?
its a website
actually idk
its supposed to like
give u some key thingy
idk
lol
I am not 100% sure on that, but:
wait
first let's talk about what you're trying to do
what are you trying to do? π
i want to try to make like
a skin animator
thingy
liek it changes your skin
every like
idk
.1 sec
for example
that won't be possible
why?
you know, the server doesn't really care about the player's skins
?
only the clients are looking up and downloading each other players' skins
wdym
I mean: skins are client sided
by faking player's UUIDs or something, it might be possible
but definitely not possible to have the skin change every second
why not
Ok I've been stuck on this for the past hour
SynchedEntityData sed = npc.getEntityData();
EntityDataSerializer<Byte> eds;
FriendlyByteBuf buffer = new FriendlyByteBuf(buffer);
EntityDataAccessor<Byte> eda = new EntityDataAccessor(npc.getId(), eds.read(buffer).getSerializer());
because the mojang skin server has some kind of rate limit
Good timing lol
- send it inside a
code blockplease - what's your question?
i.e. what doesn't work?
- Idk how to
`
3 `
^
- I'm trying to transition from a DataWatcher to the SynchedEntityData, but the EntityDataAccessor<T> can't get the Serializer for the 2nd parameter in the Constructor
SynchedEntityData sed = npc.getEntityData();
EntityDataSerializer<Byte> eds;
FriendlyByteBuf buffer = new FriendlyByteBuf(buffer);
EntityDataAccessor<Byte> eda = new EntityDataAccessor(npc.getId(), eds.read(buffer).getSerializer());
^ i was gonna say that
π
insta*
lets use this lol
so yeah @next fossil
tell us what "npc" is
probably an NMS entity?
also what version? 1.18?
all of that is important for us to check what's wrong
@next fossil it's 5am here and I#d like to go to bed soon
so if you're still looking for an answer from me pls reply soon
aight I'mma update one server from debian 9 to debian 11, then go to sleep. So you'll have to ask someone else @next fossil
npc is the ServerPlayer instance
kk
ServerPlayer npc = new ServerPlayer(((CraftServer) Bukkit.getServer()).getServer(),
((CraftWorld) player.getWorld()).getHandle(), gameprofile);
you have this line:
FriendlyByteBuf buffer = new FriendlyByteBuf(buffer);
it doesnt make sense
you basically say "buffer = new Something(buffer)"
that won't work, obviously
It's this constructor that's confusing me the most:
EntityDataAccessor(int var0, EntityDataSerializer<T> var1)
what do you need the EntityDataAccessor for?
For setting the skin into the the NPC based on their ID, similar to DataWatcher, for the outer layers
Hence the bytes:
byte bytes = (0x01 | 0x02 | 0x04 | 0x08 | 0x10 | 0x20 | 0x40);
hm
all I can see is that EntityDataAccessor.createAccessor(int) returns a new EntityDataAccessor<Byte>
but that probably doesn't help you lol
And because DataWatcher's method originally was:
dataWatcher.set(DataWatcherRegistry.a.a(17), b);
I can't tell what the changes are. The first a's constructor is:
a(PacketDataSerializer packetdataserializer, Byte obyte) {
and the other a extends ByteBuf
public PacketDataSerializer(ByteBuf bytebuf) {
hm sorry I can't help with that, my knowledge about NMS entities is very limited
maybe someone else can help
Because the original method extends ByteBuf, I figured the FriendlyByteBuf method would be similar for calling the Serializer
Not friendly at all given the amount of time trying to fix this XP
The trickiest part about the EntityDataSerializer<Byte> is its an Interface, it CAN'T be instantiated
So i'm not even sure how to fit it in a method call for
EntityDataAccessor(int var0, EntityDataSerializer<T> var1)```
I'm trying to have a thing where if you click an item in your inventory, it will take it, and then put it in a gui, but I'm also trying to make it so that you can only put 1 of the item in. So, here's what I got.
ItemStack newitem = e.getCurrentItem().clone(); // cloning the item player pressed
newitem.setAmount(1); // setting the amount to one
e.getView().getTopInventory().setItem(25, newitem); // putting one of them in the gui
p.getInventory().remove(newitem); // then removing 1 from the user
But this somehow just does not take 1 away from the player, it just puts 1 of them in the gui, but the amount the player has stays the same.
Im trying to set a join message and have the whole message ChatColor.YELLOW
But because Teams.getClanPrefixName returns both colored prefixes and the username - it overrides the ChatColor.YELLOW.
event.setJoinMessage(message);```
how would you override all colors to yellow?
remove the clicked item and you have to specify the amount
no reason to have a seperate string
wdym? I don't understand
that was just for demonstration purposes
Well also remove the static abuse and dont set the colour for the clan prefix
the item they click, remove that not a specific item
I don't see any static abuse, and I need to keep the prefix colors for other classes
is there no method to override all colors?
Here are some links to get you started on learning Java:
- https://www.codecademy.com/learn/learn-java
- https://www.sololearn.com/learning/1068
- https://www.learnjavaonline.org/
- https://programmingbydoing.com/
- https://docs.oracle.com/javase/tutorial/java/index.html
The last one is the only official one, however some of those concepts assume that you already know a bit about programming.
@flat perch ^
I found a workaround, thanks
Yeah, I don't understand what you by removing the item. Are you saying I add it to the gui, and just remove all of same items from the inventory?
so i want to replace all stone with sand so far my code is ```java
@EventHandler
public void walkEvent(PlayerMoveEvent e) {
int raduis = 2;
Block middle = e.getTo().getBlock();
for (int x = raduis; x >= -raduis; x--) {
for (int y = raduis; y >= -raduis; y--) {
for (int z = raduis; z >= -raduis; z--) {
if (middle.getRelative(x, y, z).getType() == Material.STONE) {
}
}
}
}
}
but it does not work
like at all
List<String> l1 = sec.getStringList(stdata2.get(player)).add(text);
Required type:
List
<java.lang.String>
Provided:
boolean
what.... why is this happening
.add returns a boolean
List<String> l1 = sec.getStringList(stdata2.get(player));
l1.add(text);```
you're doing simple variable comparison on Enums. it's getType().equals(Material.STONE)
the Equals sign is for null checking
no, enums can use == aswell
so use == instead
is it faster?
negligible
Aye Hello, I can't find EntityZombie class to extend.
import org.bukkit.entity.Entity;
public class sentrytest extends EntityZombie { }
if i Alt + Enter, intelij Just keep say make a new class.
Should I import more Things?
i think EntityZombie may be in spigot-api
thats exactly the kind of mistakei i would make
!!