#help-development
1 messages · Page 576 of 1
If that were the case casting it to Sign would work, but it does not
sign.getBlockData() is a thing
It also raises an error in console
ah wait
sec
check if the block is a TileEntity
if tile entity instance of sign

That's what I've been trying but my ape brain cannot figure out how to go from BlockData to BlockState
Blockdata should have a method to get blockstate
Yeah well not sure how you have blockdata without having a block instance to begin with
holy f***
i was looking for a getBlockState
:p
i'll try that and report back
i need to push this update
Before you encounter some other wordly problem that only you can encounter
BlockData imaginarySign = Material.OAK_SIGN.createBlockData();
event.getPlayer().sendBlockChange(playerLocation, imaginarySign);
event.getPlayer().openSign((Sign) imaginarySign.createBlockState());
Raises this: java.lang.IllegalArgumentException: Sign must be placed
Player#openBook does not seem to like fake signs i'm afraid
I said a sign needs to be placed and that api method only works on first placing of a sign lol
It will take time for api to change and update for 1.20 features
openSign isn't a 1.20 feature i believe
it's an open sign editor packet under the hood if i'm not wrong
either way
protocollib time it is then
In 1.20 you can re edit signs now
As been told earlier
The only time you could edit signs with the api from player instance was when the sign was first placed to open that sign editor window
But since signs can be re editted now, we should expect the api to change and allow for the sign editor to open at any time 
isn't that what Player#openSign does in the first place?
It’s supposed to
It opens the sign editor but as i said the protocol didnt allow the sign editor to open again for said player and sign once it was closed
It doesnt stop plugins from editing the sign, but players however would need to destroy the sign and place it again to open that editor again same is true through the api
But 1.20 i guess changes that
But we would need to wait for spigot api to update to make use of it as well

I should go start testing some 1.20 features out
I am confused as to what API is missing 
Current implementation if it hasnt been changed is based on the old ways that the sign couldnt be edited again from player view once placed and exited out of the editor
I mean, openSign sends those packets
iirc on spigot it forgets to set the allowed player uuid
but beyond that, it should function
Well never hurts to check implementation. Just because the api methods are there doesnt necessarily mean they work as it should lol
handle.setAllowedPlayerEditor(player.getUniqueId()); // Paper 
this one might be the problem rn
as I guess it is missing on spigot
Its not hard to patch something to make it work without really updating it accordingly
but is required for the server to allow re-edit
may someone help me understand what I need to do to use another plugin's API in mine?
I ma lost.. I know I need to add a repo and a dependency in POM but where do I get the infor in there from? And is changing hte POM all what I need?
You add it as a dependency in maven then like with spigot api make your imports. Now most plugins you cant shade into yours so that plugin you depend on needs to be on the server and you need to add in plugin.yml depends (plugin)
most plugins that have an api would probably have the info on github
okay..
how do I know if I got the right repo.. and the right group ID for the dependancy
ahh this is weird
Downside of this is that if you push this say to github anyone who tried to compile wouldnt be able to auto download that dependency
what api you wanna add
Maven will complain at you of it cant find the dependency when you compile 
multiverse core and inventories
cuz I wanna make 2 worlds and customize them. then use world edit to do some copy pasting
search up the plugin, find its github, check read me, wasnt there so checked the wiki and found it
Alright so let's say I'm on Spigot 1.19.4, how would i go if I needed to create a client-sided sign and open its gui? I'm guessing it's pretty similar
okayy ill remember to do that next tome
thanks alot
BlockData#createBlockState() is not listed in the 1.19.4 api docs btw
Place sign, then with sign use that to open sign editor. Unfortunately only the player can close the editor
Anyways have work to go do. Be back some time later lol
np, ty for your efforts 🫡
IS MY SERVER GETTING HACKED???
21.06 06:15:06 [Server] [INFO] at com.nickuc.login.ζΠΨθμδμθγκΣηω.b(:83) ~[?:?]
21.06 06:15:06 [Server] [INFO] at com.nickuc.login.ζΠΨθμδμθγκΣηω.a(:75) ~[?:?]
21.06 06:15:06 [Server] [INFO] at com.nickuc.login.ςμκΔΣιζρΛξΨιθφΠ.c(:204) ~[?:?]
21.06 06:15:06 [Server] [INFO] at com.nickuc.login.ςμκΔΣιζρΛξΨιθφΠ.run(:138) ~[?:?]
21.06 06:15:06 [Server] [INFO] at org.bukkit.craftbukkit.v1_20_R1.scheduler.CraftTask.run(CraftTask.java:82) ~[spigot-1.20-R0.1-SNAPSHOT.jar:3790-Spigot-ddcbdcc-b2322fe]
21.06 06:15:06 [Server] [INFO] at org.bukkit.craftbukkit.v1_20_R1.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:54) ~[spigot-1.20-R0.1-SNAPSHOT.jar:3790-Spigot-ddcbdcc-b2322fe]
21.06 06:15:07 [Server] [INFO] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) ~[?:?]
21.06 06:15:07 [Server] [INFO] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) ~[?:?]
21.06 06:15:07 [Server] [INFO] at java.lang.Thread.run(Thread.java:833) ~[?:?]
21.06 06:18:59 [Disconnect] User /20.4.48.76:51286 has disconnected, reason: Disconnected
21.06 06:22:49 [Disconnect] User /20.4.48.76:48822 has disconnected, reason: Disconnected
21.06 06:26:29 [Disconnect] User /20.4.48.76:41250 has disconnected, reason: Disconnected
21.06 06:30:19 [Disconnect] User /20.4.48.76:43870 has disconnected, reason: Disconnected
21.06 06:34:13 [Disconnect] User /20.4.48.76:44026 has disconnected, reason: Disconnected
21.06 06:38:07 [Disconnect] User /20.4.48.76:51936 has disconnected, reason: Disconnected
21.06 06:41:58 [Disconnect] User /20.4.48.76:53276 has disconnected, reason: Disconnected
WTF IS ζΠΨθμδμθγκΣηω.b
obsfucated class name
okay... <,<
im hosting a server for lgbt and other minorities, so it's not unlikeyl someone might wanna destroy it or crash it
I doubt you’d get hacked via a plugin unless u downloaded that plugin from a sketchy source or from someone
no I only have first party plugins and my own
Yeah your safe
I’m pretty sure that plugin is a payed plugin
So unless u cracked it u should be safe lol
none of them are paid no.
Hmm
You probs still are safe
Usually only payed plugins that obfuscate their classes
report it to the dev ig
but i didnt update or change anything
What error?
i dont even know which plugin it is
nlogin
ahh
oh wait it says this..
21.06 06:15:06 [Server] Craft Scheduler Thread - 82/[ERROR] [nLogin] Failed to spoof start packet for cuute
cuute isnt logged in my player history
ah fuck it.. ill deal with that later
you running bungee?
we do bungee dev and server support here too
oh cool..
i was gonna guess it'd be someone trying to spoof their name to an unshielded backend
is that good or bad...
bad
ah.. they also had a VPN from the netherlands
if you do end up using bungee make sure the backend servers arent accesable from outside or use bungeeguard
okay... ill just stick with spigot i guess
im getting an error with maven is trying to resolve dependancies
says com.onarandombox.multiversecore:Multiverse-Core:jar:4.3.1 was not found in https://hub.spigotmc.org/nexus/content/repositories/snapshots/ during a previous attempt.
?paste ur pom
you using intellij?
yes
reload maven
ah
would love to know why its not searching the others while its deffo on the last one
id post pics but this fucko @undone axle insists on treating me like trash
very much a cafebabe moment
!verify BlueNova_123
This account is already verified!
FUCK YOU
email support or something
dumbass bot
yeah idk...
<.<
shes the first 4 bytes of every class file
com.onarandombox.multiversecore:Multiverse-Core🫙4.3.1 was not found in https://repo.onarandombox.com/content/groups/public/ during a previous attempt.
lmao jar
🫙
that's deff the correct repo....
idk wtf
oh
im gonna take a wild guess and say it exists https://repo.onarandombox.com/content/groups/public/com/onarandombox/multiversecore/Multiverse-Core/4.3.1/
it worked when i used the force snapshots flag i nthe command
how do i figure out exactly what the depend string is in my plugin.yml
im gonna say it'll be the artifact id of the dep
interesting... because world edit uses worldedit-bukkit as art id
but in plugin.yml is just WorldEdit
it depends what they put in plugin.yml as the name
again another moment of stupidity right here wondering wtf is going on only to realize im making my entire forEach async instead of making each index async smfh 
"why dis all on worker"
Hey!
I'm currently working on a small quest system.
I need to check how much the player recieves when breaking a plant.
I tried this:
e.getBlock().getDrops(e.getPlayer().getInventory().getItemInMainHand(), e.getPlayer())
But for some reason, it only outputs 1 as the amount.
It works just fine with ores, so I thougth it would do the same for crops.
Is there something special for crops?
I remember tryna do this actually
ye crops only always drop one.
But what the player actually recieves is not just one - Especially with Fortune 🤔
block drop item event
o.
well the easiest way would be with this, if not you get to rewrite the fortune mechanics
what is best method to get NBT data from itemstack these days?
nbt-api
Oh, didn't know about this event.
Let's try that, thanks!
Weird question, how do you get to code plugins as a job?
it's interesting.. is it just "make a hit paid plugin"?
make some free plugins, update them, keep people happy and make sure stuff looks good, make a few of them and people see you as a talented dev and would pay you
hm aight interesting
is there a way to get the NBT data without using a third party plugin?
nms
ok, so if i'm using nms to extract the nbt from an itemstack, how to i get it into a string using mojang mappings
one min
net.minecraft.world.item.ItemStack nmsCopy = CraftItemStack.asNMSCopy(ItemStack);
CompoundTag tag = nmsCopy.getTag();
String tagAsString = tag.toString();
Right and that worked fine for reading, but i can't figure out how to put a string to CompoundTag.
just as data saving?
I'm able to do before without the mappings using MojagsonParser.a(string)
as in convert nbt string into a CompoundTag
anyone know what thread Executor this is?
@remote swallow okay never mind.. maven shut up but I cant seem to use Multiversecore in my code.
its known class
MultiverseCore core = (MultiverseCore) Bukkit.getServer().getPluginManager().getPlugin("Multiverse-Core");
TagParser.parseTag
which part isnt working
it doesnt recognize MultiverseCore
does it allow you to import it
Cannot resolve symbol 'MultiverseCore'
that's exactly what I was looking for! Thanks epic
hover over it and see if an "Import class" appears
still
im gonna guess its failing to add the dep somehow
yeah.. I tried to the force flag in the resolve dep command for maven
that made it stop whining but the lib isnt there still
weird
I can see multiverse in my resolved dep list
i wish i could send pics
can i send them in dms?
sure
is there an equavalent for NBTTagList?
ListTag
thanks
feature was added
Which PacketContainer methods do I need to use in order to fill the two fields required for this packet?
I can't decypher protocollib's docs
Just ping choco
@worldly ingot #2
i would guess something like getModifier().write(0, new BlockPosition(theX, theY, theZ)) and getModifier().write(1, theStateId), idk
never used protocollib so thats a fat shot in the dark from a quick glance at its wiki and javadocs
You sometimes need to grab the datawatcher too
how can i use particles to make a line from one player to another in the form of a parabola? I don't know math
You need math
like that
Heyo! I am messing around with projectile vectors and I have come to a screeching halt when trying to figure out when an arrow has either stopped moving (hit a wall) or it has hit a entity. My thought was to do .getVelocity of the projectile and try to compare it to 0 but I haven't gotten any results.
i am young to learn this
No you are not
learn young it's not that hard
There is projectilehit event
Yea, but I am trying to do it from a ProjectileLaunchEvent
this vectors in minecraft, circles kills me ☠️
this is 3d
Well use a global boolean that can be set from projectile hit event that can be checked from your code
well do a practice run of just setting particles on the floor until you get it right and then apply it to players
yeah they answered the github issues on the same day, both answers basically were "yeah it's already added but not on the website yet" lol
lol
Your checks have to be in some kind of runnable or loop anyways. So it shouldnt be that hard to check a boolean at some point to see if it is set
Its easier to learn math when you have a reason for it and you dont have to learn everything either
o bello, mi serve un favore, rendi Open Source tutte le risorse Premium, altrimenti altrimenti ti faccio trovare gli amichetti sotto casa
i tried following this https://www.mongodb.com/docs/drivers/java/sync/current/usage-examples/updateMany/, but it said something like "it doesnt start with $set so im throwing the exception"
something's still missing since java got really angry
java.lang.IllegalStateException: Unable to set value of field private final net.minecraft.core.BlockPosition
thanks tho
fixed it, getBlockPositionModifier() & getBlockData() were the appropiate getters respectively
if someone could explain me why getModifier didn't work i'd really appreciate it!
what
oh boy, I need a favor, make all the Premium resources Open Source, otherwise I'll let you find your friends at home
yeah, it doesnt make sense
i blame google translate
how would i hide the player fully including their armor , held items etc?
i tried player.setinvisible but that just hides the player , not their armor too
i saw p.hideplayer but intelij screams at me for it being deprecated
iirc its deprecated bc its experimental api still
could be wrong
so it would work?
or theres a /better/ method (i think its the one that takes in a plugin argument)
should work :p
is there an equavalent for NBTCompressedStreamTools that takes CompoundTag?
i try the top one , it still says deprecated
what do i put in the plugin argument?
your plugin instance i assume
Guide to dependency injection: https://www.spigotmc.org/wiki/using-dependency-injection/
public static FloorIsLava plugin;
@Override
public void onEnable() {
this.plugin = this;
}
oh ty
save all bred mobs somewhere
and compare
once a mob spawns, it stores no way of how it has been spawned
add a flag to PDC on mob I guess?
nbtio
How to teleport a player to the center of a block?
center of a block is block_coords + 0.5
add a 0.5, 0, 0.5 vector to the location
?pdc
dosnt seem to work properly, player gets teleported to a corner
do waht @remote swallow said
add 0.5, 0, 0.5 vector to the location
still the player gets teleported to a corner instead of the centre
send the code
Location playerLoc = p.getLocation();
playerLoc.add(0.5, 0, 0.5);
p.getWorld().setSpawnLocation(playerLoc);
your're getting the location of a player
try p.getWorld().setSpawnLocation(playerLoc.add(0.5, 0, 0.5)) instead
the player doesnt necessarily have to always be standing on the corner of a block
ur just moving the player's position by 0.5 x and z
use this. or get the block you want the playre to spawn on, and add 0.5
nvm i tried adding the vector to the location while teleporting, it works
if you do the adding route id recommned calling the #zero method
what is tat?
declaration: package: org.bukkit, class: Location
ill look into it thx
zeros the location, so removes the decimals so you always get the center
this isn't correct
i just checked it
i got the meaning that it remove decimals, not just setting the locaton to 0
ah ok
yeah
on Vector it has a use
wack
I am using the following (every tick) to fake players glowing:
public static void applyPlayersGlow(List<Player> receivers) {
if (receivers.isEmpty()) return;
ProtocolManager pm = ProtocolLibrary.getProtocolManager();
PacketContainer packet = pm.createPacket(PacketType.Play.Server.ENTITY_METADATA);
List<WrappedDataValue> dataValues = Lists.newArrayList();
dataValues.add(new WrappedDataValue(0, WrappedDataWatcher.Registry.get(Byte.class), (byte) 0x40));
packet.getDataValueCollectionModifier().write(0, dataValues);
for (Player receiver : receivers) {
for (Player player : Bukkit.getOnlinePlayers()) {
if (receiver.getUniqueId().toString().equalsIgnoreCase(player.getUniqueId().toString())) continue;
PacketContainer copiedPacket = packet.deepClone();
copiedPacket.getIntegers().write(0, player.getEntityId());
try {
pm.sendServerPacket(receiver, copiedPacket);
} catch (Exception e) {
e.printStackTrace();
}
}
}
}
Having this function be called on a player causes that player darkness effect to "reset" and restart it's animation every time the packet is sent
Any idea how to fix this issue?
Why not just use Teams and setGlowing(boolean)?
is there any other way to get the nbt data from an itemstack, other than NMS copy using CraftItemStack?
ItemMeta ?
What NBT are you trying to get and why ?
I'm just wondering because seems like the import for CraftItemStack version dependent
yes, that it is
Also you can serialize the itemstack to get all the data
nbt-api or multimodule nms stuff
suppose it's fine. perhaps its better to allow different cb versions, for the nms interface in order to allow more than one version implementation in the jar
but the remapper I'm using doesn't support different versions for the same gradle project, so would have to figure that part out to support multiple versions
is there a way to get the CompoundTag from an entity?
why do you feel you need to use nms on itemstacks at all?
because its easier to port code that to rewrite
not usually
and this question is about entities
what specifically are you using nms for?
everything that wasn't supported in versions since 1.8
this code is legacy, so basically the nms is legacy
surely most of it now has other means to handle
but in this case, i'm setting nbt for leash data
precisely why I'm askign what specifically are you using nms for. There are replacements now
and at the time this plugin was written, there was not much support
use teh API when you can
because it's 3am, and I would rather find an equivalent method, rather than spend hours rewriting
How can I change the player skin?
not to mention the time and effort to do a full retest of all functionality
I'll keep driving my horse and cart because it's how I've always done it. Doesn;t matter that cars and planes exist now.
so, my choices are not to update at all, because I really don't have time to rewrite it now, or put out an update based on same code
alright, well, guess i'll leave this plugin using obfuscated nms then
declaration: package: org.bukkit.profile, interface: PlayerTextures
Permission: eat Cooldown: '5
Thats not valid yaml, is it?
Theres a ' in front of the number
Any idea how to fix this?
i spent 6 fucking hours making gui handler classes yesterday 😭
why fake glow just give them the effect
That was not my question
yeah but the explanation was shit so I did it myself and now i understand everything
also whats a darkness effect
What the warden gives (similar to blindness)
Hey, i want to start code some projects. I stopped with Spigot 1.17.
I used BuildTools to generate 1.19 spigot jar but if i import it to eclipse, its not working. I cant import org.bukkit.plugin.JavaPlugin but with my OLD jars (1.16 etc) it works.
Is the jar compiled differently meanwhile?
?bootstrap
Bootstrap Jar
The main spigot-1.18.jar is now a bootstrap jar which contains all libraries. You cannot directly depend on this jar. You should depend on Spigot/Spigot-API/target/spigot-api-1.18-R0.1-SNAPSHOT-shaded.jar, or the entire contents of the bundler directory from your server, or use a dependency manager such as Maven or Gradle to handle this automatically.
Please read the release notes for further information: https://www.spigotmc.org/threads/9-years-of-spigotmc-spigot-bungeecord-1-18-1-18-1-release.534760/#post-4305163
maven/gradle is easier
oh im not familiar with newer versions but resending the glow packet or wtvr mighht also be resending the darkness effect packets
Use IntelliJ instead of eclipse and use the "Minecraft Development Plugin" there to auto-generate a project
how can i make the player prone? (swimming animation)
Don;t tell people to change IDE. An IDE is a choice
you can still use eclipse just fine and the mc dev plugin on intellij isnt required
For Minecraft Development i will still use Eclipse, i dont know why but for MC Development, i like it.
Darkness is a potion effect, so the glowing packets probably reset it, but I don't know how to keep the rest of the data untouched
Thanks for the help!
does the darkness effects duration change when you send them the packet?
I also use Eclipse, but I do recommend you start using maven. it makes life so much easier
you want to run BuildTools.jar with the --compile craftbukkit,spigot options to get the jars that you can use in your dependencies like the spigot-api.
no you don;t
if you want to use nms without a build system i pray for your sanity
you shoudl not use --craftbukkit switch on buildtools and current versions anymore
?nms if you need to use nms
Alright, I personally enjoy it more and the plugin is the only way I know how to generate a project, so I tried to help
I can test it
and the reason is?
do it
i would be wildly surprised if anyone in here makes theyre blank projects without a plugin in here now a days 🤣
Yea exactly, that's the only way I could help him
It literally takes under a minute to create a blank plugin by hand
i just cant be bothered to remember this point, thats why i use the plugins 
eww, xml
yeah I just copy/paste it 😉
How do i create a maven archetyoe?
I basically wanna create a multi module project template
I've never messed with archetypes
I remember mfnalex was playing about with them and bitching a lot 🙂
you should really consider using maven instead of manually adding .jars to your classpath
archetypes are great
it's just annoying to write them
using them is great, though
https://github.com/JEFF-Media-GbR/spigot-plugin-archetype you can check out my archetype
basically you just put all the files you want to be generated into src/main/resources/archetype-resources
here's the official docs about creating archetypes -> https://maven.apache.org/guides/mini/guide-creating-archetypes.html
how can i make the player prone? (swimming animation)
Sry i didnt copy everything
Here is all of it
Permission: eat Cooldown: '5'
the value of Cooldown is a string, because you put it in 'quotes'
a string is not an integer
so getInt("Cooldown") returns 0
and 0 * 60 * 1000 is 0
So how do i make it to not a string if you know what i mean
Cooldown: 5
Lmfao
There is a small issue
Well its a small issue
when I copy an area, there's not enough memory to copy it and paste it
on the void world
Give more mem to the server or use disk instead of RAM.
I get by copying about a few tens of y layers
when I copy that amount tho. it lags a lil sure but it WORKS
it doesnt crash
i mean
manually using the plugin
not the API
a distro
ngl it looks sexy as fuck in the video when he loads all that stone
but it looks so complicated <.<
Perfect timing
for wat...
Between me putting the disco gif and your comment 
ah..
I was going to make a joke with the distro thing but your comment is better
When i am using /preload the cooldown isnt getting updated its only updating when im using the /reload command
PreloadCommand:
@Override
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
Player player = (Player) sender;
Config.reload();
player.sendMessage("You have reloaded the config");
return true;
}
}```
Config class:
private static File file;
private static FileConfiguration customFile;
//Finds or generates the custom config file
public static void setup(){
file = new File(Bukkit.getServer().getPluginManager().getPlugin("Eat").getDataFolder(), "options.yml");
if (!file.exists()){
try{
file.createNewFile();
}catch (IOException e){
//owww
}
}
customFile = YamlConfiguration.loadConfiguration(file);
}
public static FileConfiguration get(){
return customFile;
}
public static void save(){
try{
customFile.save(file);
}catch (IOException e){
System.out.println("Couldn't save file");
}
}
public static void reload(){
customFile = YamlConfiguration.loadConfiguration(file);
}
}
Anyways time to drive home
show some code where you're using the config
also why don't you use the builtin JavaPlugin#getConfig() method
@Override
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
if (sender instanceof Player) {
Player player = (Player) sender;
if (player.hasPermission((Config.get().getString("Permission")))) {
if (!cooldown.hasCooldown(player)) {
cooldown.setCooldown(player, (Config.get().getInt("Cooldown")) * 60 * 1000, TimeUnit.MILLISECONDS);
looks okay. anyway, is there any reason why you don't use the builtin getConfig() method?
I dont know how to, i found this method in a toturial
The home of Spigot a high performance, no lag customized CraftBukkit Minecraft server API, and BungeeCord, the cloud server proxy.
At config.addDefault("Permission", Config.get().getString("Permission"), true); and config.options().copyDefaults(true);
It says Cannot resolve symbole 'config'
I've seen that default thing called bStats or something like that used for statistics. How do I implement that in my plugin?
sign up and follow https://bstats.org/add-plugin
Login into your bStats account.
what did you expect? that there's magically a symbol "config" appearing outta nowhere? you still have no clue about the basics of java
?learnjava
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.
also what the heck is that code supposed to do?
config.addDefault(config.get(...)) ??
My class is called "config"
no
your class is called Config
and now you're mixing up the config provided by JavaPlugin with your own FileConfiguration
I can just delete my Config class right? if im using the one provided by JavaPlugin?
yes
for the .setRotation it takes two angles as it's parameters
anyone know if these are in degrees or radians?
should be degrees, same value as in F3 screen
Can i just also delete mig Cooldown class? if im using the on from JavaPlugin?
no clue what you're talking about
The Cooldown class, that from the girhub link you have sent
and what are you going to replace that with?
Idk, i was just wondering if it also had that
I cant see how i update the config
@tender shard ^ do you know?
Hi, does anyone know how would I get the array of blocks from a .schem file from worldedit?
Hi, Does HikariCP API Down ?
Don’t think so?
Da f*ck, I got this error today without any update of the plugin,
That just complains about Java version
I use Java 8
Okay i Change the Java Version to java 18, But with sql I got this ERROR :
I think it's in this zone
you're asking if a player has a permission for a boolean ?
I am pretty sure you have to pass a string into that method
Doesn't IDE yell at you for that ?
Looked it up, ye it takes string.
The IDE should tell you what is wrong
The program doesn't write any table in my database
How do i check if the player has the permission?
The permission can you set in a config file
hey I tried to do workload distro. this is my first time. and I dont know if I am doing it correctly since it is still crashing my server from the memory heap.
I am trying to copy and paste 9 chunks from one world to the other using the world edit API.
I followed the tutorial from this link: https://www.spigotmc.org/threads/guide-on-workload-distribution-or-how-to-handle-heavy-splittable-tasks.409003/
Here is my Workload class:
public interface Workload {
void compute() throws WorldEditException;
}
The two bins have my other classes; one has my task and the other is the runnable that should distro the task.
task: https://paste.md-5.net/efotejalij.java
distro: https://paste.md-5.net/atosafedag.java
My server still crashed when I call to run() the distro class with one CopyPasteGame object in the Deque.
When i am trying getString it says this:
Cannot resolve method 'getString' in 'Config'
(Config.getString("Permission")))
is it the correct behavior for Comparator.comparingInt() to put the highest ints on the end of the list?
?paste
these tiny snipplets of code tell me nothing
post the whole class here
BEFORE SORTING
[12:43:52 INFO]: [Option 3, Option 2, Option 5]
[12:43:52 INFO]: [0, 1, 0]
AFTER SORTING
[12:43:52 INFO]: [Option 3, Option 5, Option 2]
[12:43:52 INFO]: [0, 0, 1]
probably yes ?
Usually you want to sort smalles -> biggest
paste your Config class then
Idk why you even have your own if you followed the tutorial
I dont have a config class
What do you mean?
Then is your variable called Config ?
variable names should start lowercase
Or be fully uppercase if final
Sooo...
What do you mean with start lowercase or fully uppercase
What am i gonna do?
It's just that you're confusing me with your naming is all
again, send the whole class, not a snipplet, I can't do much with just that
?notworking
"Does not working" is a useless statement. Please describe what exactly is not working, what you expect it to do, and what actually happens. If you get any console errors, also ?paste the entire stacktrace.
where is Config then
You said i should do it on this metod and i am trying?
What else should i do?
no, I told you to learn basic java
many times
you seem to have absolutely no idea about java and you keep ignoring all the tutorial links
@wet breach could u maybe help me :33333 hehe~
im sure my issue is very obv, but just because its my first time doing this..
if u want ofc
all you do is copy/paste random stuff out of context, then wondering why it doesnt work. earlier, you thought '5' is a number although it's obviously a string.
now you try to turn "eat" int oa boolean, but don't even know on what you should call getBoolean on. You didnt understand the most basic conctepts of java, which is e.g. that methods are always members of either classes or instances of classes. You randomly used "config" in your code without declaring what it is, and didn't understand why it then says "cannot find symbol".
it's a waste of time to try to help you because you keep refusing to learn the basics of java, hence I won't answer anymore until you have finished one of the following tutorials:
?learnjava
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.
so what is the issue?
my server (or thread in that case) still crashes because of memory heap
then you need to reduce the memory usage
great! and I thought i was doing that by distro the copy and paste task
but it still crashes cuz it is not being correctly distro ( i believe)
distributed doesn't necessarily mean less resources used
I asuumed it was resources used is spread over time
it means you distributing the work load over a longer period of time by using multiple tasks or whatever
task is finished slower but doesnt crash and time out the server
key word is work load, not resource management XD
in order to keep resources low, you need redesign so that you make use of object reuse
and nulling out stuff quickly that you don't need anymore
nulling out quickly allows the GC to more quickly remove it from heap
and then you may need to use some JVM args
?flags
Aikar's garbage collection flags: https://aikar.co/2018/07/02/tuning-the-jvm-g1gc-garbage-collector-flags-for-minecraft/
bruuuhhh I heard FAWE can do that for me...
this just seems so hardcore and intense for just copying 9 chunks
you are the one with these requirements
not our fault your hardware is very limiting XD
how much ram do you think is needed to easily copy 9 chunks
and delete them
its not about just the ram
you need better cpu so you can more easily have threads, and for your server you should be able to do stuff easily with 6GB, probably only need 4 but, since you most likely have a VM it could be an issue that wherever your VM is in regards to the box's physical ram it may not be ideal
this is one of those downsides of trying to run stuff in VM's
especially providers that like to over load their boxes
have to remember in regards to the physical box, you are not the only user that has a VM running on it
WAIT i think i figured out hwat's wrong with my implementation
@wet breach ill get by with 6 gigs nomatter what.. and youll see!
its possible
I have ran servers with 4GB just fine
even had one that ran on just 2 as well
no i mean ill make my plugin do this buttloada stuff and still use 6 gigs
yeah and I am saying its possible to go further in terms of extremes lol
its all a matter of what you know and how much work you are willing to put in to make it happen
aint no way im making someone pay for 12 gigs or even more just to run my plugin
na ah
I have 6 rn on prod. testing is also 6 but i gave it 12 once to just test and it barely worked
my plugin is just not light at all. uselessly intense.
sounds like design problems
over time you will learn how to make your code more optimal 😉
I have like pigstep playing throught the game in the background and everything
itll be a banger plugin
best Floor is Lava minigame out there
what do i do if the usermanager needs the rankmanager and the rankmanager needs the usermanager?
do they make their own instance?
you redesign because this is a recursive dependency that will never be satisfied
help on redesign
use interfaces
thaknsk
this way you have a hierarchy
if multiple managers need the same data or info
then that info and data gets moved higher on the hierarchy chain
can i just make a blank interface?
what good is a blank interface going to do?
I mean yeah you can if you just want to have an interface that is named differently to have something later extend it
this does feel like an oop problem
but anyways you will need to implement the interfaces, but using the interfaces though allows your managers to become other managers if necessary as well other then keeping data organized where all of them need access to it
i dont know how to use inferfaces here
seems you found one of your limitations
they both have different methods
and should now do some research and learning in regards to effectively using interfaces 🙂
thats impressive

seems you have garnered Burchard's interest maybe more may become interested because of it
ohhh your trying this
ima copy paste 9 chunks in under 10 seconds. that's my first goal
10 seconds??
cuz now it takes either one min or crashes the server
easily do able
copy and paste?
I can tell you right now that it is possible to copy and paste 9 chunks in less then 1 second
wait doesnt fawe do workload distribution on its own, cant theyre API be used
i aont using fawe
im my own fawe

in that case you should be mega fawe
use NBT to edit the world file directly while async 🗿
seems Burchard was taught the ancient ways
i only know the texts, i cant recite them 
lol
I need help with setting the exitEndPortal location to a dragon so it won't go to 0, 0, 0 coordinates. Can someone please help me? I am using 1.18 and later versions of minecraft in java 11 ? This is about spawning EnderDragon.
and then ofc, i forget weather the forloop stops on false or true
:)
anyways retesting
Fun fact, if you manage to die just above the portal, you will still go through the portal but all your items will be missing
this can be accomplished if you have insane momentum and ram the podium as this will damage you
not that this helps or anything lol
iirc the ender dragons ai is pretty set in stone without nms right
I think you can fix that with a listener or something.
its just always goes to 0 0 in any world
Well it stays still until you give it a Phase, but then the dragon will fly to 0, 0, 0 still.
So no fix?
not sure what you mean by fix, I think its like hardcoded to be 0,0
because if you manage to destroy the exit portal, it regenerates after 5 seconds
however, the y can be different
you could change its pathfinding with NMS possibly for a specific phase?
Oh. I ment when I spawn it in the overworld.
oh just spawning
To make a custom AI?
good luck doing that with the dragon
dragon is technically like 5 entities if I remember right
iirc its really challanging hell even hypixels dragons are goofy asl 💀
Well can't I change the AI of one of the entities and copy it over 5 times?
i hate the dragon
Il go to fight it f3 + b, and literally hit the boxes and mf sit there like "whatever"
lol
"GoTTa HiT MaH HEaD"
XD
you have to change the AI of the entities simultaneously otherwise it starts looking weird when they are all out of sync
and then if the entities get too far apart it just like vanishes but its still alive or whatever
Well you can change the hardcoded exitEndPortal Location on 1.16.5 and earlier versions.
With a NMS class.
well anything is do able if you resort to NMS
well almost anything
thats is an aids class holllyyy 
Will ChatGPT help with anything?
maybe? idk ask it
chatgpt couldnt help me figure out indexing for paginted inventories, i doubt it could do that
Does anyone know why I can not create 1.20.1 build tools there is also a total problem with other versions
ok I don't remember the command >>
I think they are not ready yet.
On the website is already the 1.20.1 and other versions do not work either
Ok so you guys are telling me that the only way to change those 3 numbers for the coordinates is to make a custom dragon AI? Can MythicMobs do that or any other mob plugin?

looool
this poor developer
is he okay?
someone needs to check in one him in concnered for his safetey he did this all the way back until 1.14 wtf
well, either way that class could be useful its from the rideable ender dragon plugin
emphasis on could, might be entirely useless
https://github.com/Phiwa/Dragontravel
1,17 version of moving dragons to a location
the dragon AI doesn't dictate the coords for the portal
He is registering a new Entity. That can be something.
can you show which method you are using exactly?
That doesn't have 1.18 and later versions.
its just his own custom ENderDragon
hence why i said 1.17
still could be usefull
Yes, but if I put the plugin on a 1.19 server it won't work.
no its just if you ever plan on coding it yourself
you can checkout other open source plugins and get ideas on how they do it
how do I get "bungeecord-proxy" with a version besides 1.4.7-SNAPSHOT?
uh what does that give me?
You choose witch version to download
it's ?tas
uhm and how do I
Ops sorry. Wrong link. Here: https://ci.md-5.net/job/BungeeCord/
uhm that's the link to download the bungeecord itself?
I need the bungeecord-proxy maven part
it should be obvious, this is help development
you mean the maven dependcy ?
?tas
ooh
just specify the version you need
that is because it isn't in spigot repo
its located here https://oss.sonatype.org/content/repositories/snapshots
I have it
then try this one
https://hub.spigotmc.org/nexus/content/repositories/public/net/md-5/
I suppose you could just pull the bungee repo
and compile it yourself
what's the group id?
<dependency>
<groupId>net.md-5</groupId>
<artifactId>bungeecord-proxy</artifactId>
<version>1.19-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
the only version available on sonatype is 1.4.7-SNAPSHOT
I don't want 1.4.7 tho
https://github.com/SpigotMC/BungeeCord then clone the repo and mvn install it
Nah, I just said
I cloned the repo when I saw bungee uses modules for some commands, so I decided to try and make one module
Still on my server to this day, the stop command lol
I wonder if that could cause compatibility issues tho
Or any issues
Hello, how can I make <Entity>#setCustomNameVisible(true); only visible for 1 player ?
Packets
Teams also work
Oh yeah
- assuming you still want to hide names when looking at entity
Otherwise you'd need to reimplement that server side
Hey guys! I am trying to copy 9 chunks from one world to a void world but things dont seem to work, meaning;
I get the print messages that I copied the correct coords and pasted in the correct coords but nothing is actually there...
// COPY RANDOM PLACE USING WORLD EDIT
cs.sendMessage("STARTING COPY AT: (" + gamePlot.plotStart.getX() + ", -64," + z + ") to (" + (gamePlot.plotEnd.getX()) + ", 0, " + z + ")");
CuboidRegion region = new CuboidRegion( BlockVector3.at(x,-64,z), BlockVector3.at(x+gamePlot.plotEnd.getX(),0,z));
BlockArrayClipboard clipboard = new BlockArrayClipboard(region);
ForwardExtentCopy forwardExtentCopy = new ForwardExtentCopy(BukkitAdapter.adapt(FloorIsLava.NORMAL_WORLD), region, clipboard, region.getMinimumPoint());
Operations.complete(forwardExtentCopy);
cs.sendMessage("COPY FINISHED...");
// PASTE IN PLOT
cs.sendMessage("STARTING PASTE AT: (" + gamePlot.plotStart.getX() + ", "+ gamePlot.plotStart.getY() +", " + (gamePlot.plotStart.getZ()+z_paste) + ")");
Operation operation = new ClipboardHolder(clipboard).createPaste(editSession)
.to(BlockVector3.at(gamePlot.plotStart.getX(),gamePlot.plotStart.getY(),gamePlot.plotStart.getZ()+z_paste)).build();
Operations.complete(operation);
cs.sendMessage("PASTE FINISHED...");```
This snippet is inside a workload distro and loops through the z levels and copy pastes them one by one in a runnable.
I get exactly 50 messages of successful copy paste ( because my plot size is 50x50) but when I go to the pasted coords, nothing is there...
Have you considered just using a ChunkSnapshot for the blocks
whats that
and can be used in other threads or async
ur telling me the reason it isnt pasteing is because it's async...
how to make a player slowly glide from one location to another? is there a method in that, maybe in nms? or do i just apply calculated velocity and hope for the best lol? i doubt that velocity will work properly because it's not exactly smooth, the movement speed of the player will accelerate and slow back down when applying velocity, and what i'm seeking is smooth transportation without any speed fluctuations
ugghh ofc it is
More than likely. Block operations can only be done sync.
can i do a bukkit scheduler?
Yes, you can do that.
well you can't modify the world async
any ideas?
hey, if I set a custom name for an entity (a cave spider for example) will it still despawn or does it have the same effect as applying it an itemtag?
disable playerMoveEvent and let only the velocity do its coarse i guess?
Hi, new here and to minecraft dev: is it ok to run a scheduled task each 50ms ? I'm looking for a way to poll data efficiently on a bungee proxy
sure go ahead
well it's not exactly what i'm asking
velocity is not smooth
when applying velocity to a player the speed of the movement changes
if i cancel playermoveevent i'm pretty sure they won't be able to move at all
Okay thanks ! Basically each 50ms I pull data and add the corresponding event so that the runnable doesn't take too much cpu time and the event queue take events when it has time
even when i apply velocity with code
ah true.
You might be able to use the slow falling potion effect, but it's very rigid in its speed.
make the player ride an invisible pig?
this assumes i only want to move the player vertically down
i want horizontal movement, diagonal movement, upward movement, not just downward
and how do i make the pig move smoothly?
well.. i assume their speed is uniform.
?
actually i think i have an idea
i can make a player ride an invisible bat
the bat in question
can move from A to B with a pathfinder
even midair
isnt there a way to give any entity a destination?
a pathfinder i think yeah
well.. yea
but a pig can't fly
there's even an achievement dedicated to that fact
or there was one
didnt know u need to fly
if i need to move upward
a bee might work as well
yep, any flying entity, preferably small
if a player has a plugin's custom inventory open, and that plugin is disabled, will the player be able to take from the inventory freely
im currently unable to test it
well yeah
stupid question ill have to test it eventually
if youre looking for the "launch" animation like on launchpad plugins they just let you ride an enderpearl
yes
not the launch animation, i just want to move a player from one location to another. i don't want them to quickly jump, i don't want them to slowly fall, i want them to move in midair. and i think i found my solution, it's an invisible flying entity who can be sent from one location to another with a pathfinder
yeah thats what i meant and other plugins achieve that by invisible enderpearls
Disable gravity, disable movement and update velocity with each tick. Try to avoid teleportations
In Version like 1.19.4 i cant use CraftItemStack or CraftPlayer anymore, is that normal? (The Last Time i coded was on 1.16 ig)
?nms
What does NMS decrypt to?
Hi, I know I'm dumb but I'm trying to check if a world exist by doing this : if(getWorld(nom).equals(null))
but the console return me this error : java.lang.NullPointerException: Cannot invoke "Object.equals(Object)" because the return value of "org.bukkit.Bukkit.getWorld(String)" is null
Can somebody have an explaination ?
== null
really ?
You can't use .equals on something that is null
Because it's null
null.equals does not exist
I have this class
public class MeteoriteEventScheduler implements Runnable{
private final String listName;
public MeteoriteEventScheduler(String listName) {
this.listName = listName;
}
@Override
public void run() {
System.out.println("a");
}
}
But when I do this:
Bukkit.getScheduler().scheduleSyncRepeatingTask(this, new MeteoriteEventScheduler(list), 1L);
Error (see screenshot)
right mb
I was wondering why my changes were not taking effect and I just saw that I uploaded the shaded verion of my jar and left two copies of it (the shadeed build and normal build) on the server
🤯 🔫
if it makes you feel better ive been using the wrong version of ExploitFixer by having an old and new version on the server at the same time and it was a huge vulnerability
What should be written to the PacketPlayOutEntityMetadata package at the end, other than the EntityId, since it changed in 1.20.1?
im just going to save the plugin instance instead of having rankmanager and usermanager save each others' instances
well never recommended they save each others instances anyways
that is one way to do it, but again its not the OOP recommended way
the ideal solution or what some would say the proper solution is to use interfaces or redesign your objects where they are not depending on each other like that
usermanager and rankmanager each have like 10 methods and 2 of them do similar things
maybe i dont understand interfaces
but idk if i should make an interface
there's always never anything wrong with an interface
like I can u show u my most recent project and u will see
ok
Is there anyway to detect if a leaf block was naturally generated. Leaves only decay if they are naturally placed and not connected to a tree, so they must have metadata storing that, right?
Is velocity recorded in units of meters/second?
assuming you mean blocks, yes I think so
I’m pretty sure it’s blocks (meters) per tick
Leaves have a persistent flag that you can use to check if they are natural or not.
Thanks
That makes sense. I was using print statements and walking speed was a really low number (~0.1)
Hi,
I want to use the WorlEdit plugin in my plugin, I add the jar file as library of my project but I don't succed in using it. Somebody can help me ?
I'm trying to paste schematic in the world from my plugin.
walking speed is a number between 0 and 1
as for units, each block is 1 meter
Hello, I'm trying to colourise chat messages with HEX colors. So I want to check with regex if &#XXXXXX is present, my code is:
System.out.println("Message to colourise: " + message);
Pattern hexPattern = Pattern.compile("&#[a-fA-F0-9]{6}");
Matcher matcher = hexPattern.matcher(message);
StringBuffer result = new StringBuffer();
while (matcher.find()) {
System.out.println("found");
matcher.appendReplacement(result, createHexColour(matcher.group()));
}
And in the console, I have:
[STDOUT] Message to colourise: &#RRGGBB test
But no 'found'
I tried online and my regex should be correct
what ChatColor import?
import org.bukkit.ChatColor;
oh sorry your regex isn;t even matching
Yes sir
you need to use components for hex
But my problem here is my regex not matching at all
uugh xd
thanks but I first need to find my hex codes thats why im using regex
Paper 
Hey everyone, not sure what I'm doing wrong but when I try to set an armor stand's pose through the entity metadata packet, my plugin crashes with the error message
No serializer found for class com.comphenix.protocol.wrappers.Vector3F
Not sure why this would happen since the JavaDocs say there's a serializer for Vector3F
I don;t use protocolLib but should you not be using a Bukkit Vector not Vector3f
I'll test with Bukkit's vector now, I assumed Vector3f was the correct model since it's provided by protocollib
think you have to do some converting between 3f and bukkit vectors
Got the same error that there's no serializer for bukkit's vector model either
What do you mean? Like I need to create a bukkit vector and convert it to a 3f vector?
Does ray trace result correctly detect entities for short distances (4 blocks or less)? It seems to not work for me
bruhhh my server broke
From teh Protocol read.me it shows using a Bukkit Vector. Are you putting it in teh correct place in teh packet? getVectors().write
omfg at this point, I'd just paypal someone 20 bucks who can actually help me figure out how to wrk with this WorldEdit API
llike fr
I was setting it like this
WrappedDataValue(20, WrappedDataWatcher.Registry.get(Vector3F::class.javaObjectType), Vector3F(-90.0f, -20.0f, -20.0f)),
Since it's an entity metadata packet, let me try using the getVectors() approach and will let you know
I cant copy paste!!!
No luck, looks like the packet doesn't take vectors, got this error trying it that way
com.comphenix.protocol.reflect.FieldAccessException: Field index 20 is out of bounds for length 0
Yeah I have it up (https://wiki.vg/Entity_metadata#Armor_Stand), the value type is "Rotation" which takes 3 floats
then place 3 floats
in an array?
getFloat().write(0,3F) etc
How do you write the other two floats to the same index?
The packet takes multiple rotations though, at index 16, it takes the head rotation which is 3 floats and at index 17 it takes the body rotation which needs 3 more floats, which is why I assumed I needed to pass a Vector3f for each rotation
does anyone know world edit's api well?
Something's just wrong with me trying to copy paste
I'd suggest try an array then
you may even find protocolLib has a defined getter for Rotations
Alright I'll try with that, what serializer do you use for an array?
I don;t use protocol lib at all
yes hello
omg please. im gonna go insane
Well
Oh okay, is there someone I can ask who is experienced with protocollib?
What do you have..
Yes hello
?bin
?paste
?paste
Oh dope, so basically my issue is I'm trying to set the pose of an armor stand with the entity metadata packet but having an issue trying to serialize the Vector3f, with this error message
No serializer found for class com.comphenix.protocol.wrappers.Vector3F
Here's the line of code causing the error
WrappedDataValue(20, WrappedDataWatcher.Registry.get(Vector3F::class.javaObjectType), Vector3F(-90.0f, -20.0f, -20.0f))
Alright so
There's a getVectorSerializer method
I'd rather use that one
And then you pass protocollib's vector3f wrapper
Ah right, forgot those methods existed, testing that now
Hi can somedy help my with that : error: package com.sk89q.worldedit.extent.clipboard does not exist import com.sk89q.worldedit.extent.clipboard.Clipboard; ^
I have added the jar file as library of my project it don't want to build.
I'm using itellij
This is my gameLobby class:https://paste.md-5.net/mapisemedi.java
All what matters about it is the constructor. There, a random section of a pregenerated world is selected, the selection is a fixed size everytime but random coords so that no game has the same map.
I want to copy this selection, paste it in a different void (also pregen-ed) world where there are "plots".
That selection is then pasted in a "plot" and players will be teleported to play.
WHAT I HAVE NOW:
Players get teleported in the "plot" but even though my console debug prints work, no blocks are present.
WHAT SOULD HAPPEN:
The plot gets its copied section of the pregened normal world pasted in the plot and then players should be teleported.
Seems like you're using the 1.19 method so nothing to worry about
uhh this file structure is a bit funky
I honestly made Cosmos (https://github.com/IllusionTheDev/Cosmos) for this exact kind of problem
So if you can, I'd suggest using that and skipping over all of the headache
Otherwise
what...
what's cosmos
It does all the crazy void world pasting and schematic management for you
It can save schematics to a database, has world pooling, grids
etc
But let's say you don't want to use cosmos
First let's start by splitting your logic so you have a minimum understanding of what's going on
yea..
btw something tells me you're not passing a world here
but maybe the world's already on your main editsession
the editSession has the world
Still let's split this
okay..
We'll start with this
private Clipboard createClipboard(World bukkitWorld, CuboidRegion region) {
BukkitWorld worldEditWorld = new BukkitWorld(bukkitWorld); // go figure
try(EditSession session = WorldEdit.getInstance().newEditSession(worldEditWorld)) {
Clipboard clipboard = new BlockArrayClipboard(region);
ForwardExtentCopy copyOperation = new ForwardExtentCopy(worldEditWorld, region, clipboard, region.getMinimumPoint());
Operations.complete(copyOperation);
} catch(WorldEditException error) {
error.printStackTrace();
}
return clipboard;
}
private void pasteClipboard(Clipboard clipboard, Location targetLocation) {
BukkitWorld worldEditWorld = new BukkitWorld(targetLocation.getWorld());
try(Editsession session = WorldEdit.getInstance().newEditSession(worldEditWorld)) {
Operation operation = new ClipboardHolder(clipboard)
.createPaste(session)
.to(BlockVector3.at(targetLocation.getX(), targetLocation.getY(), targetLocation.getZ())
.ignoreAirBlocks(false)
.build();
Operations.complete(operation);
} catch (WorldEditException error) {
error.printStackTrace();
}
}
id legit tip you if you help me understand how to use this API
perfect..
?paste (forr mee guys)) sorry
Im unsure if that was it or you're tryna figure out my janko code..
Is there an easy way to detect if a block is a leaf block, without having to specify every type of leaf?
yes. there is.. I dont exactly remember on the top of my head
but you can check if the type string contains the world "LEAF" in it
took a bit but here
whow
So you can for example do like
all that to copy and paste... <.< what API is this..
Clipboard clipboard = createClipboard(gameWorld, new CuboidRegion(-10, -10, -10, 10, 10, 10));
pasteClipboard(clipboard, new Location(voidWorld, 0, 128, 0));
type deal
I had to figure this out myself
how painful was the journey?
why... WorldEdit has documentation?
I'd say it does a fairly good job at basic introductions as well
have you read it?
have you went to their server to ask questions?
yes
never needed to
ehh
they treat ppl like maggots bruh
took a while
Thanks, that fixed the serializer issue, the root problem was the serializer is for the net.minecraft.core.Vector3f model and not protocollib's Vector3F
this is how I do it on cosmos
Yeah serializers are always for nms classes and just the raw stuff
Not for the wrappers
Which is why those methods exist
Ah good to know, thanks for the help
I'd recommend passing the world on the cuboid region
Cheers, had a little extra time
Gotta go to the gym in like 10 minutes
Anything else anyone?
Does ray trace result correctly detect entities for short distances (4 blocks or less)? It seems to stop working if the entity is too close to the start location
uhh it kinda depends, it's accurate from my experience
wow you go the gym?
but you need to lower the ray size
my leg day is monday
Well
can I also use those function in a runnable?
As long as it's not async
should be fine
how can I make sure?
I'm also struggling to get the MOUNT packet to work properly, not sure how to pass an array of Int's
Let's take a look
It consistently doesn't work for small distances for me, but does once the distance is over 4 blocks