#help-development
1 messages · Page 1054 of 1
but you would need a really long name though that it wouldn't even remotely make sense to use unless you were specifically testing this lol
as for performance? no impact
It affects jar size though!!!!!111
that is true, how much hard to say though
but regardless not a very large size difference
even if it did affect performance it would be so minisucle that it would be negligible
not in spigot, no
:(
there are a few different events you can listen to like interact event, dispense event etc to get it though
Doesn't alex have a lib for that
It even is on maven central damn
lol
Funny how mojang find it necessary to send a packet when you open the advancements tab, but not inventory
player inventory is always opened now
interesting
yeah, so all you have to do is listen for the click events I guess
and just use some other method to know its the player inventory
player inventory is open even when its not
pretty sure it's just returned as a default value
still weird why they need to know the advancements screen opened though
probably because the server is the one tracking that data
and not the client
The client always needs context of its inventory for things like the hotbar
And opening its inventory without a network request
so each time it sends all advancements to the player when they open the menu?
But advancements can wait
how does the player know what they can craft then? since recipes are unlocked like advancements kinda
minecraft discord full, ah dammit
Hi, I am beginner in protcol libs/packets, is possible to delay a loading screen to client(and block actions)?
what are block actions
Block player sending packet for all interaction with the world like break a bloc when he is in loading screen
yeah i mean if you want to get when they open it
i dont see any hurt in mojang sending a packet if its not handled by anything just for us devs
pedantically saving some bandwidth
yes
anyone knows if hopper minecarts collide with eachother?
I assume they work like other minecarts?
acts like a capricious girl💀 it adds then it doesn’t
idk what any other minecarts means
well idk
they do have some collision
like they push each other forward
on rails atleast
idk about when they just laying on the ground
but probably similar to boats then
thats my knowledge about vanilla idk if spigot messes it up
hmm yeah that may be a bit hard to do
wouldnt surprise me if they have their own special railed minecart collisions logic, since they interact with other entities differently that arent on tracks iirc
I realized what my problem is: if I put an item in inventory from the gui and then delete it, I can’t get the same item again from the gui, I used the clone method but it doesn’t work
the link item changes to air
material
show code
yes I mean the code that has the issue you were describing
so I can actually see what the issue is
instead of guessing
where are you making this item?
itemStack change material to air
add to map
in controller class
create clone for icon and item what i should get
you mean debug?
google bad translate
oh
no i not
in code not
i just clear item from inventory in minecraft
clone method not help
the object still turns into air
for some reason it's hitting the object vault
and change material
where are you clearing the item
private double findY(double x, double z) {
double minY = boundingBox.getMinY();
double maxY = boundingBox.getMaxY();
for (double y = maxY; y > minY; --y) {
Block block = world.getBlockAt((int) x, (int) y, (int) z);
if (block.getType() != Material.AIR) {
return block.getY();
}
}
return 0.0d;
}```
why doesnt this work
This might help you https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/World.html#getHighestBlockAt(int,int)
declaration: package: org.bukkit, interface: World
ALL particles are client side
how can i hide them for other players
Are you referring to sending a specific player particles?
you spawn them for only that player
nice
World#SpawnParticle(... sends to all. Player#spawnParticle(... sends to that player only
ahhhhhh
lol i sent the wrong link but elgar got it
lool
whats wrong with this
for (double x = boundingBox.getMinX(); x < boundingBox.getMaxX(); ++x) {
for (double z = boundingBox.getMinZ(); z < boundingBox.getMaxZ(); ++z) {
BoundingBox other = new BoundingBox(boundingBox.getMinX() + 1, boundingBox.getMinY(), boundingBox.getMinZ() + 1, boundingBox.getMaxX() -1, boundingBox.getMaxY(), boundingBox.getMaxZ() - 1);
if (other.overlaps(boundingBox))
continue;
Block block = world.getHighestBlockAt((int) x, (int) z);
if (block.getType() == Material.AIR)
continue;
double y = block.getY();
spawnParticle(x, z, y, y + 20);
}
}
x,z,y ?
"alot"
oh
wait
yea
private void spawnParticle(double x, double z, double minY, double maxY) {
private void spawnParticle(double x, double z, double minY, double maxY) {
for (double y = minY; y < maxY; ++y) {
this.player.spawnParticle(Particle.COMPOSTER, x, y, z, 8);
}
}
declaration: package: org.bukkit.entity, interface: Player
Wouldn't it be x, y, z, count?
.
:(
?notworking
elaborate WHAT is not working, are the particles not spawning? are they spawning not where you want them to spawn? what have you tried to fix this? are you sure this method is getting called and no early returns stop it? etc
"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.
its not showing the particles
in the area
not even where it was before
after changing my method, to use the world#getHighestBlock
there we go that's crucial context
so it WAS working before you changed it?
so try to print out the result of calling world#getHighestBlock, see if it returns the Y value you need, and work from there
btw could this possibly be wrong
BoundingBox other = boundingBox.clone().expand(-1);
if (other.overlaps(boundingBox))
continue;
should it be contains
i have no idea. read docs & debug
to bad there isnt a shrink method
only expand
it works now
with contains
but its not working like i want it to
its suppose to ignore the center
for (double x = boundingBox.getMinX(); x < boundingBox.getMaxX(); ++x) {
for (double z = boundingBox.getMinZ(); z < boundingBox.getMaxZ(); ++z) {
BoundingBox other = boundingBox.clone().expand(-1);
if (other.contains(boundingBox))
continue;
double y = world.getHighestBlockYAt((int) x, (int) z, HeightMap.MOTION_BLOCKING);
spawnParticle(x, z, y, y + 20);
}
}
Is there a way to get something like Entity.getNearestEntities() but with location instead of entity?
without checking every single entity in the world
World#getNearbyEntities
thanks
something is severly wrong with bounding box
its like impossible to make a bounding box copy with it shrunken
else it implodes
it's offset to the location
Hi, I have a problem with armor stands and FAWE. Is that possible to avoid FAWE breaking the armor stand when it replaces blocks the armor stand is in? I'm using it to animate a structure and the structure can pass on armor stands that should be unbreakable :/
BoundingBox other = boundingBox.clone().expand(-1);
if (other.overlaps(boundingBox))
continue;```
why does this not work
i want the inner of the bounding box
inner?
expand
if your box is of size 1 and you expand by -1 you get zero
ok, if it's size 10 and you expand by -1 you get a size of 8 or 9
I forget if it affects max and min
-1 is a full block
yeah it affects all sides
wait
i think i know a diff issue
other.overlays will always be true
cause like its a region
right
yeah they'll always be overlapping
i just want to check if its in the x y z
huh
ALL inside?
i wanna keep the outer outline
or overlap?
yeah, make up yoru mind what you actually want to do
we have no clue what you are actually doing
im making a border
confusion
border around what?
a square/rectangle region
with particles?
yes
on the outline
i have the width/height right
its just the middle is showing particles i dont want
then why are you checkign if one BB is inside another?
that makes no sense, explain better
Oh you've got a solid block of particles?
bro
yes
You said you are displaying particles around the outside of a BB, but you are checkign the overlap of some other BB and don;t want to display particles in teh overlap? What?
Yeh I have no idea what you are describing.
lol, you are the one asking for help
There's probably some math that you could find online to create an empty cube. Get the two points of the bb and import that math
drawing a border, edge or face is simple, you have yet to tell us what exactly you are attempting to do
You seem fixated on whatever your attempt was, instead of describing what your final goal is.
like... I have a BoundBox and I want to spawn a particle at every point on its surface., or I want a particles only tracing the 8 lines.
i have bounding box
i swap particle
only on the outer blocks and not insude
[ (not here) ]
theres no reason to be using two bounding boxes to draw a border
i use this code and the particle just fly every where i try it without the explosion and it was the same. code:
public class TNTWandListener implements Listener{
private final HashMap<UUID, Long> cooldown = new HashMap<UUID, Long>();
@EventHandler
public void onRightClick(PlayerInteractEvent event) {
Player player = event.getPlayer();
if (event.getAction() == Action.RIGHT_CLICK_AIR|| event.getAction() == Action.RIGHT_CLICK_BLOCK) {
if (event.getItem() != null) {
if (event.getItem().getItemMeta().equals(ItemManager.TNTwand.getItemMeta())) {
if (!cooldown.containsKey(player.getUniqueId()) || System.currentTimeMillis() - cooldown.get(player.getUniqueId()) > 10000) {
cooldown.put(player.getUniqueId(), System.currentTimeMillis());
Block block = getTargetBlock(player, 20);
player.getWorld().createExplosion(block.getLocation(), 3.0f);
player.setCooldown(Material.STICK, 200);
} else {
player.sendMessage("You can't use this ability again for another " + (10000 - (System.currentTimeMillis() - cooldown.get(player.getUniqueId()))) + " milliseconds!");
}
}
}
}
}
public final Block getTargetBlock(Player player, int range) {
BlockIterator iter = new BlockIterator(player.getEyeLocation(), 0.0, range);
Block lastBlock = iter.next();
while (iter.hasNext()) {
lastBlock = iter.next();
if (lastBlock.getType() == Material.AIR) {
player.getWorld().spawnParticle(Particle.FLAME, lastBlock.getLocation(), 1);
continue;
}
break;
}
return lastBlock;
}
}
ok im close
i almost have it
I did it
if ((x > boundingBox.getMinX() && x < boundingBox.getMaxX() - 1) && (z > boundingBox.getMinZ() && z < boundingBox.getMaxZ() - 1)) {
continue;
}
The flame particles are flying everywhere?
yeah
ok ill try another
pass a speed value of zero when you spawn teh particle
That works?
extraData I believe
I've got some particles to bring back if so 🤣
how can i do that?
people literally copying code from internet i see
guys i have a setting in config.yml :
items:
- BEDROCK
if i delete BEDROCK with "-" it still returns BEDROCK
but if its like this:
items:
there is no problem, its not returning anything 👍
(dots are -)
it works with another particle
did you save or reload config?
yes it saves all changes but only problem is this
if i dont put any "-" it returns old value
or default value i think
- implies null
Zero offset and zero speed
can i send photo of config here with photo host website url ? does it comply with rules
?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
Can someone help me with this problem?
Here is the code
private ItemStack head;
public Heads(String value,String name){
head = new ItemStack(Material.PLAYER_HEAD,1,(byte) SkullType.PLAYER.ordinal());
SkullMeta skullmeta = (SkullMeta) head.getItemMeta();
GameProfile profile = new GameProfile(UUID.randomUUID(), "");
profile.getProperties().put("textures", new Property("textures", value));
Field field;
try {
field = skullmeta.getClass().getDeclaredField("profile");
field.setAccessible(true);
field.set(skullmeta, profile);
} catch (NoSuchFieldException | IllegalArgumentException | IllegalAccessException x) {
x.printStackTrace();
}
List<String> lore=new ArrayList<>();
lore.add(ChatColor.translateAlternateColorCodes('&',"&e&nLeft Click&b to go to the mine"));
skullmeta.setLore(lore);
skullmeta.setDisplayName(name);
head.setItemMeta(skullmeta);
}
public ItemStack getHead() {
return head;
}
}```
i mean this:
if config is like this it returns default value of config (BEDROCK)
https://prnt.sc/JqO72WRqYwjg
but if config is like this it knows it's empty 👍
https://prnt.sc/w3f64tIK982E
someone know if i can cooldown an item by his meta and not by his type
yes you can keep track of when they used it
and when they use it again compare the time and see if the cooldowm should be done
but how i cooldown only the item that has the meta and not all the material?
the vanilla cooldown system does not allow for that
you'd have to keep track of that yourself and cancel whatever events related to whatever you want to allow/prevent
thats what i use now but its cool down regualar sticks too
player.setCooldown(Material.STICK, 200);
so its impossible?
Three peopel have told you now you can not do it with normal cooldowns
[10:18]Emily: the vanilla cooldown system does not allow for that
[10:18]Emily: you'd have to keep track of that yourself and cancel whatever events related to whatever you want to allow/prevent
it's only impossible if you ignore my second message
i keep track of it myself
emily uses irc mode confirmed
Does someone how to check if a player is in a certain region?
maybe using a BoundingBox
declaration: package: org.bukkit.util, class: BoundingBox
thank you, any example code?
if (new BoundingBox(c1, c2).contains(pos))
im gonna make a premium version of my free plugin, basically an upgrade to the free one. what would be the best way to manage them, because I'll want changes made to the free plugin to also be reflected to the premium one. make a branch for the premium one, or a fork, or maintain the two separately?
branch seems the easiest but its obviously not how git is intended to be used i reckon, and there might be a catch im not aware of
Can anyone help me?
check if clicked item is null first
NullPointerException means you tried doing something on an object instance that doesn't exist
and clicking on an inventory may result in the current item (clicked item) being null if you clicked on an empty slot or outside the inventory
nope the whole inventory is full of items
like i said, clicking outside might be null too
or clicking on your own inventory on an empty slot
ohhh, how can i fix it?
check if clicked item is null first
do nothing if its null
by doing nothing i mean return or not having the rest of your logic executed
understood
Hello
why tf did you sign me up for all jb newsletters
Bc it was funny
yall what do you recommend for self-hosting docs in markdown? i'm currently thinking MkDocs or MdBook but i'm not sure if these are the best and i lack knowledge
tell me what you use/recommend and why 🙏
in config.yml when i provide this it returns nothing it says its empty there is no problem
but when i delete "-" it returns the default value of items list which is bedrock
how can i fix it
idk what you are trying to do but alternative syntax is items: []
you're effectively setting it to null, which will use the default value then
^ this is an empty list
emily do you know any
not personally, i've seen people use mkdocs regularly
kk
so if i check its null i can fix it
thanks
well, no, because it's gonna give you the default value
i mean if its null it will clear the list
it will clear the list the user put in the config
but when you call getList, it will give you the default values
that's what default values are for, in case the user didn't configure the entry
why does protocollib author have dedicated jenkins server and at the same time uses github actions to build the artifacts and deploy them using actions/artifact-upload runner?
legacy
not really
its not like he's burning money just because of legacy
often self hosted
that doesnt mean electricity doesnt cost
he probably had teh jenkins up before GitHub actions even existed
im thinking to do CI/CD pipeline for my minecraft's server configuration files. I want to do version control via git. There's two ways im thinking to do:
- I could use github actions and listen for commit into
mainand github's secrets to build a docker image, publish it into github's container registry,SSHinto my server via the runner, pull it from github's container registry, and setup a cron job for restarting the server notifying to players about the update and after some time (lets say 30 secs) pull the docker image and restart the container.
Or...
- I could setup github webhook and dedicated jenkins server. Listen to the commit into
mainvia the webhook and do run jenkins pipeline to do the same as in i explained previously.
Which option should i choose is there any better way to do deployment into minecraft server
I like the second because if there's insider in the github repo he wouldnt have access to the server's data as he wouldnt even know the server's credentials at all, and i would setup the placeholders for deployments which he could use to configure database credentials
but it costs infrastructure to setup (jenkins server)
what do you guys suggest?
How can i make this code pick up blocks 10 at a time instead of all at once?
https://paste.md-5.net/odihiyovox.cs
I'm making a spigot 1.20.1 plugin with maven, but I don't know how to make the plugin compile directly to my plugins server folder. Is there any way how?
?nms go here and look for the post about compiling to teh plugin folder
is there an easy way via the api to remove a boss bar from a boss?
wither specifically
or otherwise make it so players don't see it
how about Boss#getBossBar().setVisible(false)
im so very confused
i downloaded the Git and buildtools when i run Git bash and put in the command 'java -jar BuildTools.Jar' i get unable to access jarfile Buildtools.jar
my brain is absolutely cooked and im so ungodly frustrated
if anyone has any advice or a way i can do this that i cant seem to figure out it would be great
did something about #isSimilar change in recent versions
its for a blackhole
Use windows cmd/powershell instead of git bash.
it means buildtools is not in the folder you are in
or the jar name you provided is wrong
oh that might do it thanks
so i should download 'windows cmd' or 'powershell' to then run the buildtools.jar
how do i check that
ls or dir command, copy and paste the name (if its present)
if its not you have to 'cd' into the right directory
you have those if you are on windows
git bash should work tho
ill share my screen just to show you if you want. im so lost
it always says unable to access jarfile BuildTools.jar
and i just ran it with windows cmd
if u can help me with blockplaceevent dm me
?ask
If you have a question, please just ask it. Don't look for staff or topic experts. Don't ask to ask or ask if people are awake or available. Just ask the question to the channel straight out, and wait patiently for a reply. Make sure you use the right channel regarding the topic of your question. Create a thread in case the channel is already in use!
You can double click it now
okay so! did the compiling for 1.21. i have folders with a bunch of stuff and i had to update java to 21. after this idk what to do. i was told doing this would solve the inventory deletion upon death bug, but when i just now tried it out i still had it. whats my next step?
am i supposed to put this somewhere so my server can see it?
did you use buildtools?
yes i used Buildtools with git and using the cmd jara-jar BuildTools.jar
can you change the light level of the block? or turn it off and on? for lantern
why not use the gui?
gui on what?
on buildtools
the git took me to a spigot thing where i compiled all my files
?buildtools
and then in the select version box you use 1.21
%USERPROFILE%\Downloads\BuildTools
you dont need to do any of that im pretty sure
like you download buildtools.jar and open it
that gui at the bottom did come up after i went through git
yes
in there you just select 1.21 from the dropdown and click compile
that will make a spigot.jar file you can use as a server
?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
regardless, i want this problem on my server resolved or i probably wont use spigot. i did the buildtools gui and i have an entire folder from that download, what should i do with it in order for my spigot 1.21 server to run correctly
do i have to open a whole new server?
after the above downloads i ran my server to see. my console still said outdated build and i still had the bug. how do i get it to see my new server jar
im very bad with tech as you can see
no i havent
you need to do that
let me try
BuildTOols doesn't know whre your server directy is
it can't automatically replcae your jar
would it be in like file manager?
your folders tend to be in that location
I'm not really sure what your question even is
what part are you struggling with even? Copying the spigot jar into your server directory?
i dont know where to find to replace the jar file
wherever you run your server at?
i use scala cube
i have scala-cube with a spigot server
scala cube is where all my server info is. files and plugins ect
I don't know what a scala-cube is or anything about them so I can't help you with that
if you can copy files into that you just put your jar file in there
bruh i just found solution how to declare plugin configurations for minecraft server in git. There's itzig's minecraft-server docker image which allows you declare what kind of plugins would you use by providing download links to to them and it'll autodownload them
also it allows you to specify what kind of minecraft server do you want to use
how tf does that work for premium plugins
services:
mc:
image: itzg/minecraft-server
environment:
EULA: "true"
TYPE: "PAPER"
PLUGINS: |
https://download.geysermc.org/v2/projects/geyser/versions/latest/builds/latest/downloads/spigot
https://download.geysermc.org/v2/projects/floodgate/versions/latest/builds/latest/downloads/spigot
ports:
- "25565:25565"
- "19132:19132/udp"
volumes:
- ./data:/data
well you can host your own private mirror (its not piracy as long as you are the only one who's using it ;P)
i honestly dont care about premium plugins
i dont use premium plugins, i use public ones, if i don't find one, i am the one who's coding it for myself ;D
with this docker image you can now only host configuration files without jar artifacts
also it allows you for an easy deployment with github container registry
and github actions
it even supports folia btw (since paper api already supports folia builds, you can straight up download builds from the web api instead of compiling it, but you can also compile it from git repo)
its kinda weird that paper web api supports folia, but yet we dont have front end part for it
i asked it on papermc discord somebody said that this is due to deter people who know little to no about paper from those who use such api's, they already know what they're doing
so that there's no discussions like "OH NO WHY THIS DOESNT WORK, PAPER, FOLIA BAD AHH"
Are there any news on the upcoming api changes for 1.21?
not really
I heard people talking about material getting split into 2 separate classes for blocks and items
but idk for sure
there is no branch/pr that we can track?
yeah
steaf doesnt seem to know alot today 🤣
are you telling me you dont want to increase plugin startup overhead to 10 seconds
I mean, when do i know a lot?
also what else are you referring to
but like I am slowly relocating my knowledge to paper, so yeah makes sense ig
I don’t think it’ll actually make a huge difference
It already has to go through every class, the actual changes aren’t as much in comparison
@eternal night do you wanna tell coll about the commodore overhead on spigot
time to touch minestom
dont violate minestom like that
gently
commodore is such a fucked thing at this point, it's fixable by re-implementing it
well what was it i dont remember it
you still need consent
its 18+
wasnt it like 5-10 second diff spigot v paper
.
remove in softspoon?
Yes
Reimplement it with what
papermc/asm-utils
me wondering why it takes 10 seconds before it says loading server
Sure I guess
but I mean, you can also just do things at build time for the one horrible offending code
Well i doubt spigot can
because, yknow, ✨ maven ✨
That doesn’t help for already built jars tho
what does it do again? i understood it relocates old method implementations to newer ones.. but where do these old ones come from..?
what?
Am confusion
No like
You mean when spigot is built?
spigot's commodore has to do some braindead shit
and you can either fix it by hardcoding stuff
or by generating some class dependency graph at build time for spigot-api
and then use that instead of this BS of a method
I see
i mean where is that old still api being used?

In old plugins
very old plugins
why do we care about old plugins
😏
why not do an api-version trick
1.8-1.21 👀
We rewrite material to ItemType?
exactly why i love minestom
I see
idk, already pissed again at https://hub.spigotmc.org/stash/projects/SPIGOT/repos/craftbukkit/commits/764a541c5b5fd872ec3cacfc3d51d88e8599d569
maybe I just won't do an upstream update
tell that in #help-server
if those kids would learn java in the first place..
I have a dream that the paper team and MD can learn to get along
skript mentioned
I have a dream we just hardfork, but w/e this isn't the discord to sob about it
Yes I know it won’t happy but one can dream
i had a dream about force pushing stash
😏

i have a dream that choco and lynx take over and manage stuff (for legal reasons this is a joke)
I have a dream that epic gets a second braincell
?
it fucks with the damage system again, piling more diff onto a system that barely works 
Wow I’m not invited
fucking lolicolleen and messing with damage
currently only reported one issue in that change for the insta-break of armor xd
they'll be the reason for softspoon
i have a dream i get the other half of my first
and well that PR i remember not has many comments :/
I mean yea, because no one can look at PRs without signing shit 
If I managed spigot I’d probably deprecate stuff for like, 5 versions and then remove it
But that’s just me
i mean the worst is the original damage system with the static field .3
Yea
3*
3, 5, whatever
1
I guess 3 is 3 years which is quite a while

2 including patch versions
break all xd maintenance is hard xd
deprecate in .0, leave .1, start printing warnings .2 and throw errors by .3
thing is, is maintaing support for such old versions is kinda a huge shackle
remove by .4
I understand wanting to maintain legacy stuff for some time, but especially with legacy materials and such its been so many versions
Idk man sometimes plugin devs go into a coma for a while
skrill issue
Yeah I agree
But I’m not 
what colour slime are you
Red
Blood slime
Dangit now I want Mojang to add colors to slimes
Like they did with shulkers
vanilla tweaks
xd
?
orbitmc?!?!?
I renamed again
big
I'm going through my change the name every 10 seconds phase
The wine got launched into space
i liked kryptide tbh
I will settle eventually
JishCollect
JishCosmetics
Hey
ima orbit your nut
You do the same with pineapple
its too bad the name was taken on github :( so the link it OrbiteMC
kekw

yeah but thats a group not a person
retrooper wasnt
remember when we couldnt get the email because it was all claim
i emailed an email i want
if we can trade
no response
what a waste of the email name
its probably botted
a lot of bots probably bot names so they can either sell them or just use them maliciously
retrooper was botted?
I’m a group
😭
no it doesnt count either
Where do servers define the block state registry?
tf is the block state registry
Is there a simple way to get the block a players feet are touching?
If I do player.getLocation(0,-1,0)…etc to get the block it sometimes represents the block below, like when the player is on slab.
just the player's location
In Minecraft blocks can have various different states. For example, a door can be opened or closed. From what I understand, the Block State Registry lets you get the numerical id of the state
Make sure they're touchin the ground
if you are trying to change it, stop right there
I am not.
I would like to look at it
then what are you trying to do
See the block states
If they’re touching the ground, but on slab which is set in the bottom half of the block, and I read (0,-1,0) it will give me the incorrect block won’t it?
I’ll test I spose but I thought I did this before
https://mappings.dev/1.21/net/minecraft/core/registries/Registries.html BLOCK_STATE_PROVIDER_TYPE is the only thing i could find
version: 1.21, hash: fb9f23b1ab
So do (0, -0.5, 0)
It doesn't work with carpets
Right, these are solutions but not the one I asked for. I could code something more complex
How about you look at the block under the player until it's not air
But what I was hoping for was an answer which “was the block the feet were touching”
starting at their feet
Hmm… yeah that seems a good route
yea
So it sounds like there isn’t exactly what I was crossing my fingers for. I could definitely solve this I just wanted a nice clean way if there was one
There isn't a built in way, no
And… yeah I’ve been coding plug-ins long enough to know a nice clean way doesn’t always exist
Thank you!
have anyone tried out running minecraft server with graalvm native images?
I mean, not that I know of lol
im thinking of trying but not sure if that's worth it
Hmm… with carpets I guess I need to scan down from (0,1,0) as a start
according to this post, ~10% performnance increase with graalvm's AOT compilation for minecraft running forge modpack
not bad considering that it uses little to none optimizations from coding side of things (im talking about optimizing it for graalvm)
Hello, I would like to now how to change item meta of glass pane to put it in lime (or create a knew item) in 1.21
I tried with durability and it is not working, that's why i'm asking
no
Most stupid people are stupid
Facts bro
If (0,.5,0) = AIR
(0,-.5,0)
Seems pretty reliable
It’s a little bit of a bummer cause it’s going to detect things that aren’t what you’re “standing on”, like walking through a torch on the ground
block positions != locations
You can make it so it doesn't, just might be a bit slower, just check if the material is what you want
how is aot compilation even different from jit?
i heard graal even tries to regenerate the ast from the bytecode to produce more efficient code
Yeah probly will go something like this route. I have a bunch of categories for blocks which I can check against, and you’re correct in assuming I’m actually looking for specific blocks, which I can check vs
So it’s not exactly what I was hoping for but it’ll be close enough to make it do what I need
how do i configure flyway to work with bungeecord?
e.g how do i get proper classloader
I’m trying to get a players PlayerProfile on login to store for later reference using Bukkit.createPlayerProfile(UUID), and I’m getting null. Do I need to do this later? (As I’m not immediately on login)
Does it make sense to do this at all? Seems like it would be smarter than calling it every time I need it
Ahh… sounds much simpler thanks lemme try that.
Wow I was fighting hard to get that and there it was all along just easy access that I didn’t see.
can someone help me? Im trying to make custom recourcepack for my plugin but i cant get it to work
the texture just doesnt show up
texture for what
for an item
okay , whats your folder structure like
or like are you trying to use custom modl data
like what do you wanna do
recourcepack
assent
minecraft
models
item
stick.json
tnt_wand.json
textures
item
tnt_wand.png
pack.mcmeta
my folder structure
yes
stick.json:
{
"parent": "item/generated",
"textures": {
"layer0": "item/stick"
},
"overrides": [
{
"predicate": {
"custom_model_data": 1
},
"model": "minecrafr:item/tnt_wand"
}
]
}
tnt_wand.json:
{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "minecraft:item/tnt_wand"
}
}
yeah
idk if this is copy paste, but there is a typo "model": "minecrafr:item/tnt_wand"
it says minecrafr
change it to minecraft but same
adn you are sure the item has the model data?
i use this command to check:
/give @s minecraft:stick{CustomModelData:1}
waht mc version?
1.20.4
yeah
Im trying to solve this for like 3 hours
ok thanks
maybe try just changing the normal stick texture to your tnt stick
and see if atleast that part works
like in stick.json
hi guys, vector question for ya. I've got it rotating on the x and y axis and I have set the pitch to 0 but it's moving up and down when I move my player's head up or down. which axis controls that? x or z? because I've found conflicting answers on google. thanks!
Guys, I need help, I am not being able to find citizens plugin for 1.20.1
I'm using spigot 1.21 and it cannot find org.bukkit.Material class for Itemstacks
There is no Citizens for 1.20.1
update your IDE
its working in older versions of spigot though
ok thx
huh, why's that IDE dependent?
lol
Old intelij doesn't support java 21 classes is why
im so tired of this sht, I downloaded the citizens from here: https://ci.citizensnpcs.co/job/Citizens2/3399/
have my dependency like this: ``` <dependency>
<groupId>net.citizensnpcs</groupId>
<artifactId>citizens-main</artifactId>
<version>2.0.33-SNAPSHOT</version>
<type>jar</type>
<scope>provided</scope>
<exclusions>
<exclusion>
<groupId></groupId>
<artifactId></artifactId>
</exclusion>
</exclusions>
</dependency>
and still dont work, returns this: java.lang.NoClassDefFoundError: net/citizensnpcs/api/CitizensAPI
is it in your runtime
There is NO Citizens for 1.20.1
ik
so, im fkd, right?
yes
why not update the server
kinda exists a good reason
updating the server will be a pain in the ass
You can get a 1.20.1 version from their jenkins
They don't include all versions in the main jar to save space
thats not a good reason
from here, right? https://ci.citizensnpcs.co
What other thing was broken in the damage? For if can check 
Yeah iirc
so, everytime minecraft decides to launch a version, I need to update it
wheres ur rank gone doc
yep, thats the job of a dev
I looked ovver 1h and couldnt find
Rank?
but if I wanna be on that version? XD
Do you want to distribute at 200mb jar supporting nms 1.8 to 1.21
if anyone answers my question please ping me
if everyone were to update when the new update came out, that wouldn't be necessary
Well yeah but people are dumb
Look at when 1.20.1 was released for citizens on spigot and when it was removed then locate the last build before it was removed
z? it kinda depends on which direction the player is looking?
right, if the player looks up or down, the vector moves. trying to stop it from doing that
hmmm, thinking abt it, I think it just changes the pitch not the yaw
example: if the player is looking north and moves their head up and down it influences the Z-axis
and so on
not being able to find it :/
I can't figure it out. rip
val decompileRemapClasses = project.tasks.register(DECOMPILE_REMAP_CLASSES_TASK, JavaExec::class.java) {
group = SATELLITE_SETUP_CATEGORY
classpath(project.file("$SATELLITE/vineflower.jar"))
args(vineyard.decompilerArguments)
args.add(
getVersionDecompileClassDir(
project.file(SATELLITE).toPath(), vineyard.minecraftVersion.get()
).toString()
)
args.add(
getVersionDecompileJavaDir(
project.file(SATELLITE).toPath(), vineyard.minecraftVersion.get()
).toString()
)
dependsOn(unzipRemapJar, downloadVineFlower)
}```
For some reason this gradle task is giving me the error, "no sources given" even though I explicitly define a classpath that should be followed and I've verified that there is indeed a jar at that path with the specified name
anything stand out as wrong?
can i place a block mare than 20 times per second ?
i feel like im limited by the server tps
new BukkitRunnable() {
@Override
public void run() {
//place blocks
}
}.runTaskTimer(OptimizedPixelScreen.getPlugin(), 0 L, 20 L / (long) video.getFrameRate());
this is how im placing the blocks, but anything higher than 20 for "video.getFrameRate()" results in the same placing rate as 20
is there some way to place blocks faster than the main thread ?
you can definitely place more than 20 blocks a second. look at WorkDistro
?workdistro
just wrote 300 lines of code in one sitting and IT JUST WORKS???
this is a once in a lifetime experience
dont be fooled
it has tons of memory leaks
and a rare case where itll break
for no reason
how do i lock a player's camera to a specific yaw and pitch
cancel event moves it for a tick
for example to stop movement u make the player ride something like an invisible armor stand
but what do u do to stop camera
Doubt you can
you can
isn't there /spectate
if you cant tell im moving my camera as hard as i can
speaking of spectate, can u move your camera while inside another entity in spectator
you can but it's weird
horizontally it goes infinite
but vertically it only goes to like +90
ugh
well im in spectator in that clip
i'm gonna experiment abit
i figured it out
if someone is looking on how to lock a player's camera, you gotta spawn an invisible armor stand then send a https://wiki.vg/Protocol#Set_Camera packet to the player with field 0 as the armor stand
another approach is to make the invisible armorstand a fake entity (not neccasary)
what would be the best way to add an enchant (looting, fire aspect) to only one kill? Please @ me with response
add it then remove it
👍
Wow. So Smart.
how would i add it when the mob is killed as I could not find a method to edit the weapon used to kill a mob
thanks
EntityDeathEvent#getEntity#getKiller
use DamageSource#getType to ensure the type is PLAYER_ATTACK
declaration: package: org.bukkit.damage, interface: DamageType
declaration: package: org.bukkit.event.entity, class: EntityDeathEvent
declaration: package: org.bukkit.entity, interface: LivingEntity
pagination with sql??
why are we storing paginated inventories in SQL exactly? Moreover what data pertaining to the inventory outside of the items is actually important enough to store
No
i'm confused what you mean by pagination then
It’s one extra command to the query
Pagination is when you split a query result in pages
So you aren’t receiving all data at once e
But no, it’s easy
in mysql you can use limit and offset to create pagination
the limit is how many results at a time, the offset is what would change and you would skip however many rows
SELECT * FROM users LIMIT 10 OFFSET 10;
this query would skip the first 10 rows, and return the next 10 rows
keep in mind with large DB results this will degrade
so to fix some performance we could use a where clause that has the cursor returned
and then to further optimize if we are dealing with a very large data set we can do what is called a deferred join
If a reference to an object is lost, but it's method's bytecode is still used, does it get garbage collected?
How can a reference be lost if a method is used ?
new Thread(someObj::stuff).start();
And then you nullify the someObj
And have the thread always execute some method on it tho
My guess is that it won't be
That means reference still exists
Inside of runnable
sry if I couldnt help :(
it doesnt exist
crazy it took me 2 minutes, build is https://ci.citizensnpcs.co/job/Citizens2/3157/
how did u searched it
what do you mean searched it
your example is flawed
i just scroll back through the updates and found the build on jenkins
the object only exists so as long as the method does
its common sense how i did it
I found it before but i mean how did you found the build?
Hi there, i've been running into some weird "bugs" / "errors" while setting up vault integration and I can't seem to understand where i'm going wrong with it.
I've made a multi-economy plugin with different economies where one of the features is generating a payment report that displays the change within the last 60 seconds of the user, however specifically with vault I run into the problem that the current hook does some wonky af. Stuff
first it checks the users balance 3-4 times (with my hook),
then it removes the entirety of the users balance, does some calculations and then adds the new entire amount back
So far 2 out of 3 plugins i've tested has resulted in this with only one having the expected output (using one method from the hook according to what the calculation is an example of this would be for buying it would only use the withdraw method from the hook).
and I do apologise for the horrible explanation, however it is rather difficult to explain to be quiet honest
I did a lot of this stuff
Ask me anything
Have you ever used reflection?
Or are you thinking of using the nms directly?
?nms
Or that
can you see dms?
ty
what?
don't use dms for support
just ask your question
?ask
If you have a question, please just ask it. Don't look for staff or topic experts. Don't ask to ask or ask if people are awake or available. Just ask the question to the channel straight out, and wait patiently for a reply. Make sure you use the right channel regarding the topic of your question. Create a thread in case the channel is already in use!
Mojmaps just makes it easier to write plugins that use NMS
ah
I just don't use mappings
it just means you can use proper names for objects in your code. It then gets remapped back to .b() or whatever at compile time
?mappings my beloved
Compare different mappings with this website: https://mappings.cephx.dev
shedaniel is better
"better"
for spigot not really
It looks nice but it's missing Spigot mappings
^^
is there some kind of a tutorial of how to use it? Like I'm trying to find how to use pathfinding goals because tutorials show me to use this.goalselector but I don't find anything related
tried searching
just search threads for pathfinding
there is plenty of posts on pathfinding
find your path to pathfinding
or be lazy and go read my open sourced library for it
When working with NMS the best way is to look at how Mojang does it
Take a look at the code for a mob and you'll see how goals are written
tbf it's not that straightforward
not every mob uses goals
or brain for that matter
The thing is either I'm not searching correctly or I can't find the thing I'm looking for
I'm trying to find the mojang api to maybe read about the pathfinding but even that I can't find
there is no Mojang API
are you trying to add a pathfinding goal or are you trying to make an entity pathfind to a place
these are two different problems
I'm trying to add a pathfinding goal
so permanently modify the ai of the entity to have that goal
what is your goal intended to do?
Have a "captain" and 4 minions that the 4 minions follow that captain
like in pillager term
https://github.com/MagmaGuy/EasyMinecraftGoals/blob/master/EasyMinecraftGoals/v1_21_R1/src/main/java/com/magmaguy/easyminecraftgoals/v1_21_R1/wanderbacktopoint/WanderBackToPointBehavior.java https://github.com/MagmaGuy/EasyMinecraftGoals/blob/master/EasyMinecraftGoals/v1_21_R1/src/main/java/com/magmaguy/easyminecraftgoals/v1_21_R1/wanderbacktopoint/WanderBackToPointGoal.java enjoy
whether you need a the behavior or the goal depends on the entity type
sounds like you just want to put the pillager goals onto your mob
I think so yeah
I'll take a look at it ty
Looking at the Pillager NMS
The goal appears to be Raider.HoldGroundAttackGoal
Then take a look at how it functions and modify it to your needs
mojang really missed an opportunity by not calling it StandYourGroundGoal
okay
thank you
The thing is all of the .a or .b is super complicated and I can't really figure it out
like what is what
use mojang mappings
?nms
setup to use mojmaps from teh link I gave
<repositories>
<repository>
<id>spigot-repo</id>
<url>https://hub.spigotmc.org/nexus/content/repositories/snapshots/</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>spigot-api</artifactId>
<version>1.20.1-R0.1-SNAPSHOT</version> <!-- replace with your version -->
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>spigot</artifactId>
<version>1.20.1-R0.1-SNAPSHOT</version> <!-- replace with your version -->
<scope>provided</scope>
</dependency>
</dependencies>
That's my pom.xml
Follow this
I don't even know why I made this wiki autotranslator in python
I don't even know python
this sucks
I mean it works but it's annoying to work with
you get used to it
not really, you use remaps
you can follow methods if you have a decent IDE
I most certainly don't
well not everyone does self-flagelation for fun on weekends
frostalf programs with an abacus
How can i make this code pick up blocks 10 at a time instead of all at once?
https://paste.md-5.net/odihiyovox.cs
so do I
and it's real easy when combining that with the remaps
barely takes any time to get anything done
have a counter that only counts to 10, when it gets to 10 stop removing blocks
barely takes me time regardless o.O
?workdistro
just saying it gets easier to read code without having to rely on some remapping mechanism
and if you don't use any remappings no need to setup a pom to do extra stuff 
i tried that but it ended up with this weird pattern
I'm sure it also gets easier to read raw binary but the installation time something capable of translating it to something legible probably is worthwhile
ok well comparing it to binary is a stretch
its just method names that are letters, not overly difficult o.O
yeah, it's merely the difference of knowing what something is at a glance vs knowing what something is by searching through several methods, definitely not worth the 5 minutes to set up the mappings
never been worth it to me, but if you work with nms a lot you know the stuff at a glance
so that is true over time
I bet you're the kind of person who has 1-letter fields in your code regardless
do as he say not as he do
Hi, I have an error with a plugin. The plugin developer tells me it's a Spigot error and not his own. Is this error known?
if that is all that is needed to describe them or if I just can't think of a good name for it sure
I knew it
Thats not a spigot error. His plugin is trying to access an unloaded chunk
Definitely his own
Hes trying to access an unloaded chunk
My bet he's blaming spigot because his code is written for Paper and it handles chunk load/unload differently
Oops didnt realise I said the exact same thing you did lol
Ok thanks
python's syntax makes me want to punch baby seals
a phoque?
phoque me? no no no, phoque you
?paste
ok still don't know
Which would have better performance?
1: https://paste.md-5.net/sigafewizi.java
2: https://paste.md-5.net/izubicafes.java
which packets is used to send already unlocked achievements in spigot mappings 1.8.8
?
buddy if you're always checking the same thing don't check it every time
Don't detect items by their name
ok but is it better to loop all players in a bukkit runnable or start a new task for every player?
all players single runnable
make one task and loop through players
though looking at the code above you have other things to worry about