#help-development
1 messages Β· Page 1170 of 1
Old terminology, but yes
U have some video to i see?
Grab second computer
Put usb into second computer
Download a linux iso. (debian, ubuntu, mint, anyone that has a live environment)
Use Rufus or Balena Etcher to write it to the usb.
Put usb to borked pc.
Boot from usb drive.
Diagnose and repair OR copy data to another drive.
I already have a pen bootable i used to install arch linux
can I copy data to pen while is used to boot pc?
Technically yes, but it won't be saved.
The live environment is still only loaded into memory and never written to disk.
That's what the install script in the live iso is for.
You can copy data to other drives in the machine though.
i dont have more drives
That is if you have another drive that can contain all of the original data.
You could always plug in an external drive.
my brother have extern hd
Maybe i can use it then
Idk if my pen bootable allow transfer data between drivers
It's not the usb that allows it. It's the recovery image utilizing the hardware itself.
You are just booting into a temporary OS.
how do i make a "laser beam" effect with particles?
for it to stop once it touches a block or a player i guess and i dont want it to be constant just 1 beam
idk if my pen allow boot into a temporary os
i dont wanna be spoonfed
As long as it has space for the iso file, then it should.
You just have to use the right software to ensure it is marked as a bootable.
try a repair first
if you were not messing with drivers it may just be a corruption
rayTrace from the start position to get your end position
Then simply lerp between the two and spawn your particles
Ah lerp. Good ole lerp.
I imagine that this way I run the risk of losing my files
Idk elgar. I think they should save their data first.
They may not know how to repair it.
true
And at worst, he'd end up formatting it
yeah, get your data first, then try a repair
It was through this bootable pen that I installed Arch Linux. Is that how I can transfer files from the disk?
I imagine I have to open cmd and transfer the files via terminal
It should be yes. As long as you can access the basic commands and avoid installing arch again with that iso, then it's possible.
where do yall think i should start learning webdev
At least I didn't lose the data that I could see here
but now opening the terminal I have no idea
Well, this is where you reference the arch wiki.
Or download an iso with a GUI.
But you should already be in one with arch
I think I have to click on arch linux as if to install it to run archlinux on the pendrive. My fear is that I'll end up installing it by accident.
w3schools is a good start
Web dev for what purpose? Actual web based applications that do specifc tasks/things or more like commercial style websites. If its the latter I would say watch some wordpress tutorial.
Hello, me and another person are making a friends plugin that allows players to see if the friend is on another server that is connected to our bungee or just not online at all. We are using the bungee api to grab the information within the plugin however we are running into an issue where when we call what server the player is on it is returning the wrong server for some reason. All of the IPs are placed in the correct spot and properly named so not entirely sure what the issue is.
sure
Im sorta new, well used spigot many many years ago. I have added a ton of stuff to my plugins models items, etc and wish to not allow them to everyone unless they go through a shop plugin or whatever means necessary to prevent everything spawning all at once through ia, etc. Ideas?
Then download another iso with a gui and boot to it.
Who knows how to get players from SlimeChunk in .slime world format?
i`m stuck at this code
for (SlimeChunk slimeChunk : gamingSlimeWorld.getChunkStorage()) {
for (CompoundTag entity : slimeChunk.getEntities()) {
}
}
https://paste.md-5.net/itefedatov.java
Here's a base of the code for what I was mentioning, took out a bulk of it, but it shows how we are loading it up and calling the servers
why do you have all your code in one class
This is not all of the code? And I didnt write a majority of this code.
If its that big of a deal I can go split it up into different classes for him, but I'm doubtful that the code being under one class is the issue here lol
Its not a big deal if you can read it
Trust me I dont disagree its a mess
Better focus on making it work first
but I'm not the lead dev working on it
So I don't want to ruin his flow on what is going on and confuse him. I'll go through and fix it for readability later.
At a quick glance, it looks like there is a potential race condition at the playerServerMap
Try creating a map for each player request
Okay, I'll look into that, thanks.
where do i get an EntitySnapshot or how can i create one when i have no entity present ? O.o
I managed to make the backup with a .png, so I imagine there won't be any problems with the .zip. I did it with the .png 1st to avoid losses
I already made the backup. Now how can I fix the boot? @kind hatch
depends which linux
arent all method to create an entity directly spawn it too ?=
ahhh thanks
Found the issues with the code, my dev had the wrong subchannels for messages which was causing the issues. So I just had to change the subchannels as well as some other things, thanks again.
You compiled with preview features enabled
So you need to start the server with them enabled too
or disable them when compiling
so I just put --enable-preview parameter in start file?
it's just 0xffff for the minor version
Do you know how the default boot manager of Arch Linux works?
do you also support sysslinux
boot into your usb drive and check the boot logs on your main drive to see what point it stops
Do you want a photo of my loader.conf and loader/entries/arch.conf?
I don't understand what this returns. I will show you
i executed journalctl -b
that will only show the current logs of the usb boot, not the ones from your system drive
ok
ill opne var log boot.log then
Before turning off my PC I had deleted some logs so I think that's why I have nothing https://imgur.com/a/bVUPIRa
I can send all the commands in the terminal that I executed before turning off the pc. It must have been one of them that caused the problem.
@eternal oxide
i executed this
`sudo rm -rf /var/log/*
sudo journalctl --vacuum-size=100M
sudo journalctl --vacuum-time=7d
sudo rm -rf /tmp/*
sudo pacman -Scc
sudo pacman -Sc
find ~/.cache -iname "intellij" -exec rm -rf {} ;`
I don;t linux but that last line looks really dangerous
its eh only dangerous if you have a typo
as long as you don't type anything wrong its fineee
what is delay and what is a period? eg. what if i want a repeating task without any delay but it should fire every second?
then it should be like that or inverted?
delay, how long before it starts
period, how often it runs
oooo
made a little mistake lol
should be 20, not seconds * 20L, that's why it ran every 3 seconds lol
time in ticks
is it possible to update the server properties without restarting
i just ctrl c ctrl v
After I restarted my PC I couldn't turn it on anymore
π
probably can with reflection and NMS
but would it be updated
though I'm sure not all of the changes would do something
ok thanks
you probably shouldn't be using arch
I've had it for months bro
I simply had a problem and tried to find out how to solve it.
hey I'm just making a suggestion I mean I'm the one who can turn my desktop on atm
π
and I only executed these commands, and as you said, they are not dangerous
I'll have to go to archlinux support
I'd just flash ubuntu or fedora and stop running a system where its clearly easy for you to shoot your foot off
what support lmao
forums?
they aren't nice people and they're gonna tell you to read the wiki and not touch things you don't know
totally not talking from experience
Biomes changed from enum to Comparable<Biome>. I used to use the //commented code line to build a string of all biome names. .values() has been deprecated saying to use Iterable.iterator(). Im trying to do that but the IDE is complaining saying "The method iterator() is undefined for the type Biome". What am i missing? Doing wrong?
Registry.BIOME
to get all biomes registered even with datapack you now can use: Registry.BIOME.iterator()
Does that look valid? IDE isn't complaining.
for (Biome loopBiome : Registry.BIOME) {...}
its fine because the registry is iterable:
public interface Registry<T extends Keyed> extends Iterable<T> {
Thanks for the tip.
.set(key, string list)
Is a hash set a string list?
but that added some extra symbols, which were okay at first, but after reloading my server there were errors, the server didnt understand the config file.
Nope my bad lol I meant to say hashset idk why i said string list
I think the best way to do this is to add a string list, and when getting it from the code I'll just convert it to hashset
Probably
Why does hashset produce some extra symbols doe?
Cause config doesn't know what to do with hash sets
Should be fine, config supports lists
Gotcha.
hello im trying to do dev an ac just to see how it works and i wanted to include protocollib into my project but on debugging im stuck there [22:54:47 INFO]: [ProtocolLib] Loading ProtocolLib v5.3.0
i never did plugin dev so im kinda lost
if you never coded plugins.... why would you start with something complicated like protocollib
anti cheats are not a beginner project
do you know any series like you "suck at anticheats"?
We'll see what ChatGPT has to say about that
chatgpt only makes really basic checks
chatGPT will generate chinese anti cheat which is like buying a car for $100
ChatGPT just cooked you're so right
https://paste.md-5.net/owusakutoq.java
this is crazy
ice boats 
lgtm
full ai made
500ms cooldown between attacks
the PVPers are gonna have fun wiht this
π
Stop leaking Hypixel watchdog source code
don't tell choco and we are chill π
did you know that hypixel anticheat devs sit around changing config values every day?
BRO WHAT π
Where do I buy this
send $1000 to my card
its kinda closed source right now, I'll prob sell it on some third party marketplace for like $250 with really heavy obfuscation and a licensing server
?premium guidelines are irrelevant for such an important plugin
I'll upload to spigot, but maximum plugin price is rediculously low for such high quality software so spigot resources is not ideal for me
this reminded me of https://www.youtube.com/watch?v=tboUxiIKDng from the "might be flying"
My Amazon Affiliate Storefront!!
For the best price wheels:
Tell them I sent you! β€οΈ
Lem Ung, EUC Ungerground :
Join Telegram group here: https://t.me/+KLiB369OuqhlMDgx
You better not fuckin go above y 255 or ur dead
all my homies hate elytras
Fake
Wind cannon
Back in my day we didnβt have wind!
Only ass pressure
but did you have Squee'ek uh'k kk'kkkk squeek eee'eek
Nah I got mds mixtapes
@EventHandler
public void onPlayerPreLogin(AsyncPlayerPreLoginEvent event) throws SQLException {
logMessage(String.valueOf(event.getLoginResult()));
[...]
This returns ALLOWED, even when player is not Whitelisted... Why?
whitelisting is probably done after prelogin because prelogin is pre login so no mojang auth
just a guess
Alright that is fine, thank you
prelogin is already post auth
but yes it's before whitelist/ban list check
the normal login event is after that
honestly for what I'm doing PreLogin is fine, gives the server an opportunity to check a few things before properly authenticating them
alrighty, I'm completely lost with setting up dev env for spigot and patches won't apply. I know I'm probably (not) doing something simple but idk what.
https://paste.md-5.net/elegemekiv.bash
generally screams wrong java
Just run build tools --dev
it failed compiling CB. one sec, gonna do fresh install I might've messed with stuff during my testing
alrighty, that works. Thanks π
and I did need to update my java back to 21 lynx, so you get credit as well π
?stash
is it?

ig id have to sift through actual decomp workspace but patch looks like it would be before authentication
That's the offline mode code path I think
yes
you can check by logging something in a handler and trying to log in an online-mode server with an offline mode client
Which jar do i use for 1.21.3 NMS? (I tried the spigot shaded jar as well)
I used build tools but dont see any jar in CraftBukkit folder
seems like it only works with maven, that solved more of the issues
would this be the online mode path?
yeah
Can someone help me to format the chat so it's inline? I want the scores to be in-line, i'm stuck for full 2 hours trying to find the correcy way, this is my code:
public static String formatLine(String left, String right, int totalLength, String character) {
String leftStripped = ChatColor.stripColor(Common.color(left));
String rightStripped = ChatColor.stripColor(Common.color(right));
int leftLength = leftStripped.length();
int rightLength = rightStripped.length();
// Get dots amount
int characterAmount = totalLength - (leftLength + rightLength);
String fill = character.repeat(Math.max(0, characterAmount));
return left + fill + right;
}
Find player with longest name
add your filler length and calculate max line length
Then you can just align the number length at the end
Since different characters have different lengths (in referance to player name), wouldnt this still be "off"?
also keep in mind this will probably break if the player has a texture pack that edits the font
Since different characters have different lengths (in referance to player name), wouldnt this still be "off"?
probably you'd need to calculate character pixel length to be exact
but that's kinda impossible unless you hardcode the values
but that's kinda impossible unless you hardcode the values
https://www.spigotmc.org/threads/free-code-sending-perfectly-centered-chat-message.95872/
https://pastebin.com/9Be2DF2z
I remember coming across this for centering messages in chat, this might help you
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
Its 9 years old but should get you on the right path (not sure if any of these values have changed)
Thank you, will look into it.
If someone has a library around this, that would be very helpful.
parseable json files for you
can you unload a world if its the only loaded world in a server?
no
a server must have a world
because I think it somewhat breaks and doesnt unload properly because I get these errors:
Caused by: java.io.IOException: Unable to delete file: .\matches\match-1\region\r.0.0.mca
If you don't want your server to have a world you might as well just stop the server lol
how can I have like a completely blank world
like taking up as little memory as possible
make sure to add gamerules, or set the server to peaceful mode to prevent those entity spawns
don't even need that if its a void world no entities can spawn you can just turn off spawn chunks and set a specific spawn point
then they just won't be loaded until someone joins the world
WorldCreator creator = new WorldCreator("limbo");
creator.type(WorldType.FLAT);
creator.generatorSettings("2;0;1;");
creator.generateStructures(false);
World world = creator.createWorld();``` this is void world right
flat is a flatworld - layer of bedrock, two dirt, and a grass
I thought thats what this did
creator.generatorSettings("2;0;1;");
this is like hte most brain dead implementation
flatworld is very performant tho, i dont see why youd need any less
wtf is this abstraction
I mean no one is every going to be in the world
and I want no chunks to ever be loaded
well if no one is in the world then it unloads..
right
so use flatworld
so then what do I do to make sure its loaded when I unload another woorld
how so
level-name=limbo in server.properties?
Bukkit.getWorld("limbo"); on server load event. that call will load it and itll stay as a loaded world
Bukkit.getWorld("limbo"); on server load event. that call will load it and itll stay as a loaded world
thank u
what are all the reasons why a world wont unload
got it
tried to unload a world with players
even though the world is called to unload after the last player leaves
one tick of delay worked
if I need to spawn in permanent entities such as NPCs and TextDisplays for my server, where should I put the code? Should the code check if the entities exist every time the server starts, and then spawn them in accordingly? Should I make a command to spawn each one in, so I can do it manually and then replace them manually if they get deleted?
I WANT DELUXE HUB PLUGIN version 1.21.3
GOOD FOR YOU
add custom data tag so they dont get deleted and you can check which entity not to let be killed. then upon server load loop your config of them and spawn it at those locations
and what do you think complaining here will accomplish?
can I use ObjectOutputStream and ObjectInputStream to serialise and deserialise a List<Type>
how should I send data between servers using a socket
cus object streams are not working out for me
use a fancy and complete socket system if you dont know how to code it yourself
connect all servers to the master or all servers to all other servers then
As long as you use an underlying byte array input and output you should be fine
You can send the byte array over
Or even better use json to serialize/deserialize
any to recommend?
hmm i coded one myself and i used MultiPaper back in the days which had this function already
what if I use netty
?pr
does the so called "Effect.FOOTSTEP" exist as a particle in 1.21 spigot Particle class?
or can I somehow replicate it
the particle is based on the block the player steps right ?
well FOOTSTEP was basically a global particle that looked like a 2D square
i would asume that Particle.BLOCK with the BlockData as data is what you want
probably yeah
every vanilla particle is in the particle class
This is for spigot/bukkit dev
I mean i am on paper i cant ask this type of question here?
no
alr
you asked for a specific plugin help... you will need to ask the plugin-creator or at his discord if he has one to get help
Yeah I know that. I think it was removed? But no worries since in this version I have a lot more to choose than in older versions.
Oh are you coming from a really old version
I am upgrading my whole plugin from 1.8 to 1.21.3

well yeah...
yeah sorry no idea that's very old
well I've realised that the amount of NMS that I need now is like 10 times less
agreed
I think it's Particle.BLOCK
yeah that will do
can I "send" fake armor packets without packets in 1.21?
i mean you can spawn them and show them just to 1 player (or more if you want) and set them to not persistent
they will despawn at chunk-unload and will never get saved
I want to send them to a specific player to see another player differently
oh sry wasnt reading correct ^^ was thinking about armorstands
did you know that in new versions you can use the mojang mappings to use NMS stuff more easily ?
lol about that... I can replace their text with TextDisplay
I am using special-source + mojang remapped instead of spigot mappings
but afaik spigot+mojang mappings are combined, I could be wrong but afaik they are combined
then the packet is called ClientboundSetEquipmentPacket
Isnβt there a sendEquipmentChange
yeaaaah I knew it existed but didn't know the naming
thanks
anyone familar with netty
I'm trying to writeAndFlush an implementation of Serializable, RequestLoadedMapsPacket to my netty client channel, however my server doesn't seem to even recieve this object
honestly no idea what I'm doing
public CompletableFuture<List<BridgeMap>> sendRequest(RequestLoadedMapsPacket request) {
CompletableFuture<List<BridgeMap>> future = new CompletableFuture<>();
channel.writeAndFlush(request).addListener((ChannelFutureListener) futureListener -> {
if (!futureListener.isSuccess()) {
future.completeExceptionally(futureListener.cause());
}
});
SimpleClientHandler.setResponseFuture(future);
return future;
}```
What on earth
Use httpurlconnection
Trust
I donβt even need that bro iβm just trying to communicate between servers
why is it so hard
would be a thing when bungee had a nice data transport without players needed
why not use something established
like RabbitMQ
thats how i communicate between servers
I mean honestly, I'd just do the same thing Vanilla does for Packets
Have read and write methods of ByteBufs
or some kind of PacketCodec
Codec's π₯΄
If your data is fairly simple transferring it via bytebuf should be easy
How can I use reflection in spigot 1.21 for NMS since the final spigot jar is obfuscated and I assume special source won't replace literal strings for example "ClientboundPacket...", do I actually need to look into the final name and write that into the string
Yes
Or you need to avoid names as much as possible
Actually I think class names are still re-mapped to something at runtime
Idk what tho
Spigot names maybe?
multi-module project will be the better choice here
wait no what
it seems like the names are still mapped?
why not intellij
this is the final spigot jar
are only class names not obfuscated and all methods are or smth
I believe itβs only class names
well idk if I still want to use reflection
its possible create a empty folder in .minecraft ppl with a plugin when he enter on a server?
If the player doesn't have the server-resource-packs folder, create it in .minecraft
https://imgur.com/a/F5YVNPH to avoid this error
no u cant do stuff on a players pc from a plugin..
cant u just send over the server resource pack like normal?
And see directories?
this error still happens if i just modify there on server-proprieties on some people who don't have that folder
That is never even used in modern clients
There's downloads now
And the client downloads the pack there automagically
Yeah the old client was dumb
If server-resource-packs didnβt exist it just exploded
Rather than yknow, making the directory

Older versions of 1.8 had a fun exploit where you could detect if certain files/folders existed by abusing the resourcepack system
Real mojank

Only existing?
Yeah the path traversal was fun
Hi rad
"anticheats" started using it to check for cheat software π
Fun
Hi
is calling hashCode on a string many times source heavy ?
if you use the same object string yes... but not if you create the string many times
Well that wasn't your question now was it
why are you creating that many stings
not me.... craftbukkit does

kek
what strings are we talking
random.setSeed(Mth.getSeed(x, "should-structures".hashCode(), z) ^ this.world.getSeed());
random.setSeed(Mth.getSeed(x, "should-surface".hashCode(), z) ^ regionlimitedworldaccess.getSeed());
random.setSeed(Mth.getSeed(x, "should-caves".hashCode(), z) ^ regionlimitedworldaccess.getSeed());
random.setSeed(Mth.getSeed(x, "should-noise".hashCode(), z) ^ this.world.getSeed());
random.setSeed(Mth.getSeed(x, "should-decoration".hashCode(), z) ^ generatoraccessseed.getSeed());
random.setSeed(Mth.getSeed(x, "should-mobs".hashCode(), z) ^ regionlimitedworldaccess.getSeed());
its not that much but for every chunk within a Custom ChunkGenerator ... idk
that doesn't create strings
no
it creates the string once
but it is interned
the jvm will always just throw the same string instance at that
thats using an already predefined seed right ?
^?
Thats why "hi" == "hi" is true
ahhh ok... but the method hashCode will run every time still ?
yeah ok then its fine all in all
thanks
do you know why there is a shouldGenerateStructures but not a generateStructures ?
the ChunkGenerator is kinda just there to carve the base chunk
and then configure which vanilla features should be slapped in
there is no generateDecorations or generateMobs either
because those are further down the line in chunk generation
public void applyBiomeDecoration(WorldGenLevel generatoraccessseed, ChunkAccess ichunkaccess, StructureManager structuremanager) {
WorldgenRandom random = getSeededRandom();
int x = ichunkaccess.getPos().x;
int z = ichunkaccess.getPos().z;
random.setSeed(Mth.getSeed(x, "should-decoration".hashCode(), z) ^ generatoraccessseed.getSeed());
super.applyBiomeDecoration(generatoraccessseed, ichunkaccess, structuremanager, this.generator.shouldGenerateDecorations(this.world.getWorld(), new RandomSourceWrapper.RandomWrapper(random), x, z));
}
its in the same class where the other should and generate methods are
in fact its ok there becasue BlockPopulators replace the Decorations
hmm maybe i should try to create a PR for this if there is no valid reason against having this
I mean, maybe there is
Β―_(γ)_/Β―
might be worth opening an issue first before putting in the time
Chunk gen is wack
the api is slow :8
isn't it supposed to be really fast since it's async ?
its a lot better then in older versions but its still generating the complete noise at once ...
there might be a reason for it
if you generate the noise at once it won't have to keep generating it every chunk or ever so often
its totally fine to generate it at once but its still resource heavy
there's probably some low-hanging fruits to tackle there, just that nobody bothers since it isn't worth maintaining in a fork
wouldn't be as much of an issue if we were capable of injecting through mixins instead so a mod/plugin could handle it π
mixins my beloved
If i do:
@EventHandler
public void evHandler(org.bukkit.event.Event event){
// blablabla
}
``` does it handle ANY event?
in (Craft)ChunkData the Method setRegion limits the height to the maxHeight but it will set Blocks withing the Bounds exclusive the maxX, maxY, maxZ
it works for maxX and maxZ to set them to 16 because block-range is 0-15 (=16 Blocks) but not for the height... because the last Block at y would be the maxHeight-Block which is then exclusive ?
Why would you want to do that? That's gonna be called like 100x a tick
I don't want to do it im just curious to know if that would work
doesnt it need a HandlerList to get called ?
Yes, but maybe it works because all the events extends Event or a class that extends Event
anyone know the 1.21 way to change entity scale w/ out nms?
attributes
oh it is?
it's possible with attributes but why don't you want to use nms?
/attribute @p minecraft:scale base get
generic.scale
thanks
why would you wanna use nms is a better question
there is a spigot API for a reason
nms needs to be updates each version
you can't do EVERYTHING with the spigot api
yes but you should use it as much as possible
true
yes i'm not saying "use nms instead of spigot api"
well, then the answer to this question is simply, "because there is API for it"
of course everyone should use spigot api instead of nms, but as i said you cant use the api for everything
ok
But: even if there is an API sometimes the NMS is faster and cooler :9
this too β¬οΈ
π
"cooler"
faster not really
In case of world manipulation it's faster if You do it right
Ignoring warnings makes everything faster
thats an interesting mindset
Question, when an item has the hidden enchantments flag, where does the hiding enchants part happen? Does client still get the full enchantment list just hide it afterwards?
I think so
Is there any way to make the attack animation of a zombie at will? like, every time they get damaged they make the attack animation
Considering rendering is on the client
The client
The client is sent the ItemStack and interprets all of the components on it to determine what needs to be rendered
ic
Yes, the client still has the enchantment list
Is it better to update the scoreboard every 5 ticks for each online player the scoreboard lines even if there are no changes or to update the lines when needed in real time?
Only update when you need to
and its possible create folders?
thanks
stringbuilder is more faster concatetation?
No
It's only really beneficial if you're concatenating in a loop, or passing your builder to a method to concatenate as well
And you should go abusing vulnerabilities
It's faster for large amounts of concatonation
And sometimes JIT even Inlines a string builder for you
Just Time In
jit u say compiler?
but string builder never is more slower right
i had like 15 concecations every 5 ticks
string builder difference is visible?
StringBuilder is such a w
kotlin buildString fr
Devious language
Make it async
π
fast async multithreaded string builder
ConcurrentStringBuilder
maybe we overload it to the gpu as well and hardware accelerate it speaking of which
What could go wrong
It could be for single concatonations because you have to make a new object
TL;DR: Have a loop? Use StringBuilder. Don't have a loop? Don't use a StringBuilder
Pretty much
its normal when i send a c06 and i try to print the packet server sided with protocol lib it sayng [18:00:59 INFO]: Dynamic-4eff3826-c31c-4929-a9e2-2f6c08951ff9[class=PacketPlayInChat, id=6]?
Looks fine
yea but i want to acces yaw and pitch
and it tells its not exist
but with c05 it works
A chat message does not have yaw and pitch??
if(event.getPacketType().isClient()) {
MessageManager.messageStaff(String.valueOf(event.getPacketType()));
}
when im sending a c06
its printing [18:00:59 INFO]: Dynamic-4eff3826-c31c-4929-a9e2-2f6c08951ff9[class=PacketPlayInChat, id=6]
Yeah
but when i getFloat theres no data in it?
As I said a Chat Message does not have yaw and pitch
The packet with id 6 is the Chat Message Packet
position look
As you can see in that debug message and on wiki.vg/Protocol
yes but why
does it saying its a chat packet
when im sending
a position look
i dont understand
yes im am ?
Show us how you're sending it
i dont send it myself i just change pos while change look too
You just said you changed pos and look
So you're changing it clientside
yea
What version is the client
1.8.x
and what version is the server
1.8.8
also idk if it do smth or its unrelevant
registered)] [direction: from SERVER]
[17:59:17 WARN]: [ProtocolLib] Error filtering reports: java.lang.IllegalArgumentException: Cannot find report name for Plugin %s tried to register listener for unknown packet %s [direction: from %s]
[17:59:17 WARN]: [ProtocolLib] [OutboundPacketListenerSet] Plugin Base tried to register listener for unknown packet SET_SUBTITLE_TEXT[PLAY, SERVER, 99, classNames: [net.minecraft.server.v1_8_R1.PacketPlayOutSetSubtitleText, net.minecraft.network.protocol.game.ClientboundSetSubtitleTextPacket, PacketPlayOutSetSubtitleText, ClientboundSetSubtitleTextPacket, SetSubtitleText] (unregistered)] [direction: from SERVER]
[17:59:17 WARN]: [ProtocolLib] Error filtering reports: java.lang.IllegalArgumentException: Cannot find report name for Plugin %s tried to register listener for unknown packet %s [direction: from %s]
[17:59:17 WARN]: [ProtocolLib] [OutboundPacketListenerSet] Plugin Base tried to register listener for unknown packet MOUNT[PLAY, SERVER, 95, classNames: [net.minecraft.server.v1_8_R1.PacketPlayOutSetPassengers, net.minecraft.network.protocol.game.ClientboundSetPassengersPacket, PacketPlayOutSetPassengers, ClientboundSetPassengersPacket, SetPassengers, net.minecraft.server.v1_8_R1.PacketPlayOutMount, net.minecraft.network.protocol.game.ClientboundMountPacket, PacketPlayOutMount, ClientboundMountPacket, Mount, net.minecraft.network.play.server.SPacketSetPassengers] (unregistered)] [direction: from SERVER]
[17:59:17 WARN]: [ProtocolLib] Error filtering reports: java.lang.IllegalArgumentException: Cannot find report name for Plugin %s tried to register listener for unknown packet %s [direction: from %s]
[17:59:17 WARN]: [ProtocolLib] [OutboundPacketListenerSet] Plugin Base tried to register listener for unknown packet REPORT_DETAILS[PLAY, SERVER, 122, classNames: [net.minecraft.server.v1_8_R1.PacketPlayOutCustomReportDetails, net.minecraft.network.protocol.game.ClientboundCustomReportDetailsPacket, PacketPlayOutCustomReportDetails, ClientboundCustomReportDetailsPacket, CustomReportDetails] (unregistered)] [direction: from SERVER]```
Haven't seen that before
Are you sure the server is 1.8.8 and that you're not running anything like ViaBackwards
So show your entire listener code and how you're filtering out other packets than the postion and look
?paste
yes
Instead of having an if check for packet id numbers I recommend you set what you want to listen to in the PluginAdapter constructor
wdym
oh yea
i tried to put
in annotaiton
but
Invalid type 'PacketType' for annotation member
which constructor
idk
public PacketEventBus() {
protocolManager.addPacketListener(new PacketAdapter(PacketAdapter.params()
.plugin(AntiCheat.getInstance())
.listenerPriority(ListenerPriority.NORMAL)
.connectionSide(ConnectionSide.BOTH)
.types(getPacketTypes())
.optionAsync()) {
@Override
public void onPacketReceiving(PacketEvent event) {
handlePacket(event);
}
@Override
public void onPacketSending(PacketEvent event) {
handlePacket(event);
}
});
}
here?
yea but its not pratical for me
i want to use the thing like a packet event
like bukkit events
Then check the packet type instance rather than the id
if(event.getPacketType == PacketType.ENTITY_LOOK) for example
i tried but it did nothing
Using stream to set lore on an item in an inventory when a command is executed is bad, right? .setLore(ToolPlugin.INSTANCE.getTools().getStringList("iron-axe-1.lore").stream().map(line -> line.replace("%progress%", BukkitUtils.generateProgressBar(5, 0, '|')).replace("%level%", String.valueOf(0)).replace("%max-level%", String.valueOf(ToolController.getMaxLevel(1)))).toList())
Guys, theres an issue I have
when I have a smithing table open and when the server stops, I drop all contents of the first 3 slots
I have a function that clears those items on inventory close, but it doesnt get called I guess?
Hey can I create threads in spigot mc and make like a wiki where I will explain plugin features also indirectly promoting it????
how about
setLore(Arrays.asList(
"",
"",
"",
))
i think you need to handle it in onDisable() too
god no π
just call the same method like in InvCloseEvent
yea it doesnt work
but id owrk
no
like
when i use packet type
PacketType.Play.Client.POSITION
it doesnt work
event.getPacketType() == PacketType.Play.Client.POSITION
but
event.getPacketType().getCurrentId() == 4
it works
and how ill replace
alr I fixed it, thank you for the help :)
do you wanne try to replace each line with the same stuff or do you know which line and only replace at one line ?
if you need to replace all in all lines then your code should be fine ?
see code:
.setLore(ToolPlugin.INSTANCE.getTools().getStringList("iron-axe-1.lore").stream().map(line -> line.replace("%progress%", BukkitUtils.generateProgressBar(5, 0, '|')).replace("%level%", String.valueOf(0)).replace("%max-level%", String.valueOf(ToolController.getMaxLevel(1)))).toList())
If a line has a placeholder (it may or may not) it has to be exchanged for a value
what is wrong with your code then ? it looks fine and should work...
the stream is the problem
Is there a way to generate a new variable from a string?
for example:
Asdadasdasd = "hi"```
With that example i would need to generate a variable called hi
you mean
String varName = "test"
String %varName% = "super"
and using test.replace would work ?
what value would you assign to "hi"?
why would you need that
Idk, maybe "hi again" or smth
I'm just wondering if it's possible
I don't need to do it
this is clearly an x/y issue
There's no point
No, i'm just wondering if its possible
nope its not
anything is possible
you could use a Map for that
Yeah i thought of that
then how can i do it?
as said, a Map
but then it's not possible to create a variable βπ»π€
um
Lol
You are seriouly askign how to create a variable at runtime?
Lol I was just wondering i have no reason to do it
it would be pointless as code is compiled, so how woudl you access or even know about it
as said, i was just wondering Β―_(γ)_/Β―
the answer is no, not in java
alr thx
well...
yeah not in Java, you'd have to mixins or other methods
Using stream to set lore on an item in an inventory when a command is executed is bad, right? .setLore(ToolPlugin.INSTANCE.getTools().getStringList("iron-axe-1.lore").stream().map(line -> line.replace("%progress%", BukkitUtils.generateProgressBar(5, 0, '|')).replace("%level%", String.valueOf(0)).replace("%max-level%", String.valueOf(ToolController.getMaxLevel(1))));
π what's that
i will have performance issue?
not when used in a command
There will be the repetitive stream call
you'd have to make a LOT of stream calls to cause issues
So, if 100 people type the command at the same time and each inventory has 10 items, that's 1000 calls at the same time
not heavy
and as far as I know streams are to do long operations that are mostly parallel and with a controlled call
But even so, I should stop using stream for that case. Right?
my goal is to have 20.0 so it's heavy
you seriously won;t even notice
if I have 1000 players and the 1000 execute the command at the same time then it goes down 2 tps
my 0.02 was a not a hard number. It was just an example of how insignificant it would be
If you had 1000 players do it you'd have more issues with network bandwidth than you would in using streams
You could make it more readable just without a stream though. I don't see the obsession with the stream here :p
List<String> lore = ToolPlugin.INSTANCE.getTools().getStringList("iron-axe-1.lore");
lore.replaceAll(line -> line
.replace("%progress%", BukkitUtils.generateProgressBar(5, 0, '|'))
.replace("%level%", String.valueOf(0))
.replace("%max-level%", String.valueOf(ToolController.getMaxLevel(1)))
);
itemMeta.setLore(lore);
Instantly more readable than .setLore(ToolPlugin.INSTANCE.getTools().getStringList("iron-axe-1.lore").stream().map(line -> line.replace("%progress%", BukkitUtils.generateProgressBar(5, 0, '|')).replace("%level%", String.valueOf(0)).replace("%max-level%", String.valueOf(ToolController.getMaxLevel(1)))); lol
1.8 dont need bandwidth
thank you so very much
thank you so very much
I don't see the obsession with the stream her TRUE
hi guys, i am trying to make a plugin has its own library as plugin using gradle and reflections. i am new to plugin development, is there a template or guide to do this
you both having the same pfp is crazy
?img
Can't send images? That's because you're not verified! Use !verify to complete verification.
Alternatively, you can upload screenshots to any image hosting site and share the link.
Here's some screenshot utilities that you can use to upload images.
Lightshot: https://prnt.sc
Imgur: https://imgur.com/upload
Flameshot: https://flameshot.org
i dunno how to do reflections
is there a guide for it
and also for gradle with spigot
You can Google java reflection
ahh how couldnt i think it ty soo much you are the best!
Do you have minecraft dev plugin for your ide?
@valid bramble
hi
my files look like this:
hi
Maven will do so by default
They're most likely not using maven to compile
but artifacts instead
which is the wrong way to do it
yes, I use artifacts
Don't
Open the maven tab on the right and run package
You can then find your plugin jar in the target folder
[19:43:50 WARN]: [ProtocolLib] [InboundPacketListenerSet] Plugin Base tried to register listener for unknown packet POSITION_LOOK[PLAY, CLIENT, 27, classNames: [net.minecraft.server.v1_8_R1.PacketPlayInNet.minecraft.network.protocol.game.ServerboundMovePlayerPacket$PacketPlayInPosRot, net.minecraft.network.protocol.game.Serverboundnet.minecraft.network.protocol.game.ServerboundMovePlayerPacket$PosRotPacket, PacketPlayInnet.minecraft.network.protocol.game.ServerboundMovePlayerPacket$PosRot, Serverboundnet.minecraft.network.protocol.game.ServerboundMovePlayerPacket$PosRotPacket, net.minecraft.network.protocol.game.ServerboundMovePlayerPacket$PosRot, net.minecraft.server.v1_8_R1.PacketPlayInFlying$PacketPlayInPositionLook, net.minecraft.network.protocol.game.ServerboundFlying$PositionLookPacket, PacketPlayInFlying$PositionLook, ServerboundFlying$PositionLookPacket, Flying$PositionLook, net.minecraft.server.v1_8_R1.PacketPlayInFlying$PacketPlayInPacketPlayInPositionLook, net.minecraft.network.protocol.game.ServerboundFlying$PacketPlayInPositionLookPacket, PacketPlayInFlying$PacketPlayInPositionLook, ServerboundFlying$PacketPlayInPositionLookPacket, Flying$PacketPlayInPositionLook, net.minecraft.network.play.client.CPacketPlayer$PositionRotation] (unregistered)] [direction: from CLIENT]
does anyone know how to fix
im trying to register them for an ac
but i wanted to minimise it down so theres less load time and now i have this
Too old! (Click the link to get the exact time)
Well it is 10 years
yea but i want to do an anticheat
You really shouldn't make an Anticheat if you have no idea what you're doing
You should atleast be on 1.8.8 and also anti cheats as I said yesterday are far from a beginner project
i started i have a pratically a full base
i just want to fix
protocollib
Lol
its better to know how to make an anticheat first
ik
but the plugin part
nono
also stop using 1.8 lmao
ok bro
if you ever judge someone for using a legacy version again, I will bazooka you personally
Imagine torture just for legacy combat
updates do other stuff than just combat
for example, 1.12.2 is still by far the best version for modding today
1.12.2 was the last version before downfall
I agree
but now 1.21 seems going up again
idk it has cool features for vanilla shit
doubt
newer versions just pack a different feel, theres something about nostalgia
(X) doubt
modding community turned into shit after 1.12.2
How so?
but especially for security newer versions are just objectively better
playing modded mc is garbage nowadays
nah
there were 100 scandals turning into people splitting the community basically
terrafirmagreg packs gregtech and terrafirmacraft into one
people started making other modloaders because they didn't like each other lol
Not really
forge 1.16.5 is aids to dev
the sad things are that most packs nowadays are just vanilla+
they changed to official mappings or sum i cant even recognize basic things
well that's literally the main point of modern modding
fabric is cool to dev
everything went from "creative, special, chaotic shit" into just vanilla+ DLC content
modded mc nowadays is literally minecraft with DLCs
both actually
mojang started it basically
it is a direct consequence of mojang's decisions
What did Mojang do
i dont get it
update their game
in a direction that caused modding to be what it is now
if they stop updated the game it would be stuck and bad ^^
modders are free to make whatever they want
what is modding now ?
this
mojangs fault for... what, exactly
you can create much cooler and better mods then back in the days
is mojang mindcontrolling mod devs
no you literally had exactly the same options back then as now technically speaking lol
βCreative special chaotic shitβ hey look we made a new version of the macerator again
but with a bad performance
no
that's a mod developer issue
if you wrote shit code back in 1.12.2, it was inperformant. If you write shit code today, it's literally as inperformant
only that 1.12.2 was a lot more performant and less resource hungry than now
back in the days there wasnt any custom world that was bigger then 256 Blocks i think...
scale of entities wasnt a thing.... and many other attributes too
it was
so if you could develop in 1.8 you could develop just fine in 1.20
everything was possible
people literally wrote a mod to extend world size to however big they wanted
and everything is still possible
yes
all i know is that old modpacks suck a lot and today modpacks are performant and easy to use with much cooler stuff
I said that
that's like objectively wrong, todays modpacks are not more performant
1.8 is a dying version and I will always work to kill it further
you need more resources, you get less fps
how is that dependent on the hardware???
so true, you aren't getting rid of my 1.6.4 1.7.10 and 1.8.9 modpacks
mojang has been doing a lot of optimizations
the world gen was updated to be better, the entity movement too
i sadly can't play 1.7.10 and 1.6.4 versions due to intel though... π
mojang has also been adding a lot of shit that concluded in the game needing more resources
yeah 1.7.10 is slow af
Well yeah, every update adds shit
compared to new mc
dont want that? Play on alpha
yes but there are more cool features then resource hungry problems
rd0.0.24 or whatever
new stuff is good man, bloatware ain't good tho
that's subjective. I disagree
microsoft is master at bloatware
I dislike new vanilla content
it is known thing
I dislike new textures for modded mc
then use programmer art
they are also master at leaving optimizing to free mod developers
programmer art is trash after adding 2000 blocks
I dislike how mods turned out to being developed nowadays
but thats not mojangs fault
that does not work for mods lol
mojang didnt make these mods
ofc it's their fault adding content that I dislike?
lol
minecraft would be dead if no new content was added to vanilla ^^
also, if they didn't update the textures, mods would not have changed their artstyle into what it is now, so that's also a consequence
...content that I dislike
then go play on 1.8 ^^
Last tinker I played was 1.16.5 so Idk what you talking about
1.8 is ass
they changed everything last time i saw
no I am playing on 1.12.2
If mojang didnt update anything, nothing would change
nah you won't stop me from playing agrarian skies in 2024
well yeah, duh
@orchid gazelle your next modpack (after this one) should be 1.7.10 fr fr
And thaumcraft based
I think I'll stick to 1.12.2
but they did and it has
ngl I played that last week
what?
no idea why people shit so much on older versions man, just because they are young they can't appreciate the beauty of old and good things
@shadow night might also make a war pack for 1.12.2 now that MCHelicopter just received a port to 1.12.2
100%
if it is good
Damn
ofc
Do you like magic-oriented packs? Or are you more of a tech person?
I like tech more
Understandable
i like both
both are nice
I really love tech mods, especially 1.12.2 ones, but there is this space reserved in my heart for thaumcraft 4 and I can't do anything about it
Ah funny times
got everything too fast due to broken af lootboxes
The most unbalanced modpack ever
i rly like modpacks and new modpacks often dont have the mods from the past or at least some of them dont work like before but i also hate to install stuff to play better Mc .... in 1.12 the ocean was empty, less cool building blocks and entities, boring villages, boring nether, no big caves, no better endgame or fancy biomes and fancy World Generation .... for all that you need like 20 mods at least to have an intersating game and they are more resource hungry for sure
i want to make my life miserable
Iβve done way too many packs where you have to do the same tech or magic progression
project ozone 3
I like the concept of a chaotically balanced pack (balanced around being unbalanced) but stoneblock 1 didn't do it too good, stoneblock 2 was basically perfect imo, stoneblock 3 just wasn't my thing
So Iβve gotten pretty burned out of all the old tech and magic mods
po3 had two forced shit mods but other than that it was great
try crash landing modpack
remove lordcraft and abyssalcraft from po3 and then it's perfect
you will not survive past 1 ingame week
This reminds me of rl craft
rl craft is easier
rlcraft is way too lightweight for me
I remember when rl craft was like the hardest thing out there
I don't play anything under 200 mods
bro a single old school mod beats rlcraft any time
better than wolves is way harder than rlcraft
the last modpack I made myself was 283 mods
and it is 1 mod
@shadow night I am looking at ic2 rn
maybe I'll force it as early game tech mod but I don't think so
because too many people don't like ic2 ig
Have 100% completed that
Weird, in the communities I was in it was the one most popular mod that was in every single modpack
better move this convo on #general
Currently running BloodNBones in hardcore 
[20:25:04 WARN]: [ProtocolLib] [PacketFilterManager] Plugin Base tried to register listener for unknown packet POSITION_LOOK[PLAY, CLIENT, 21, classNames: [net.minecraft.server.v1_8_R1.PacketPlayInFlying$PacketPlayInPositionLook, net.minecraft.network.protocol.game.ServerboundFlying$PositionLookPacket, net.minecraft.server.v1_8_R1.PacketPlayInFlying$PacketPl
π
killing myself is an option rn
lol
What a verb
will that spawn a new one every time the server starts?
Despawn method on shutdown
what if the server crashes and onDisable isnt called?
Hi, I know this isn't spigot related, but I can't find anything about this and nobody know, why it's happening, so i'll try my luck here.
Basicaly, i'm updating my mod and plugin to 1.21. The mod sends a packet containing all the loaded mods. The server listens to this packet and either kicks the player or lets them in. The problem i have is i can not send my CustomPayload. Every time i try to send it, i just get kicked out of the joining process.
https://cdn.discordapp.com/attachments/721100785936760876/1305257908036177972/error.txt?ex=67325fa7&is=67310e27&hm=34385a4f8182f832cb929b8769896d2877a50e24ed1c19afbca2bc04b1357860&
https://cdn.discordapp.com/attachments/721100785936760876/1305257908405276692/Source_code.zip?ex=67325fa7&is=67310e27&hm=669ab527dbd0641baddec70f547887cab777f474ae8d1b46a251cd086082914b&
do you need to register the packet at the client maybe?
Then on startup call remove -> spawn
Break down your needs
how do I get the entity when the server starts up?
If I have a cache (hashmap) and I only do cache.put and cache.remove but both of these operations are on different threads, do I need to use concurrenthashmap or is the hashmap enough?
concurrent