#help-development
1 messages ยท Page 1237 of 1
When its not smelting, yes. But when its smelting, use the time
Ok what version
1.21.1
nevermind, it was something completely unrelated that was causing it
@EventHandler(priority = EventPriority.HIGH)
public void onFurnaceSmelt(FurnaceSmeltEvent event) {
Furnace furnace = (Furnace) event.getBlock().getState();
FurnaceInventory inv = furnace.getInventory();
if (inv.getInput() == null || inv.getInput().getAmount() <= 0) {
int remainingBurnTime = furnace.getBurnTime();
frozenFuel.put(furnace.getLocation(), remainingBurnTime);
furnace.setBurnTime(0);
furnace.update();
}
}
@EventHandler(priority = EventPriority.HIGH)
public void onFurnaceBurn(FurnaceBurnEvent event) {
Furnace furnace = (Furnace) event.getBlock().getState();
if (frozenFuel.containsKey(furnace.getLocation())) {
event.setBurnTime(frozenFuel.get(furnace.getLocation()));
}
}
@EventHandler(priority = EventPriority.HIGH)
public void onInventoryClick(InventoryClickEvent event) {
if (event.getInventory() instanceof FurnaceInventory) {
FurnaceInventory inv = (FurnaceInventory) event.getInventory();
if (inv.getInput() != null && !inv.getInput().getType().isAir()) {
Furnace furnace = (Furnace) inv.getHolder();
Location loc = furnace.getLocation();
if (frozenFuel.containsKey(loc)) {
int resumedBurnTime = frozenFuel.remove(loc);
furnace.setBurnTime(resumedBurnTime);
furnace.update();
}
}
}
Ok. Before I test this, do I need to create another variable?
No
Oh shit
My bad, my snippet wasnt complete, yeah you will
Map<Location, Integer> frozenFuel = new HashMap<>();
Ok, thanks. I will add that
Wait. I was looking at the code and is this turning off the flames and when I smelt something, it auto turns back on?
So I would not recommend trying to say I copying stuff
Is that a threat ? It reads like one. Buddy try to word stuff better...
I will see how Songoda does it
So some plugin already has this feature which means you are copying it... I asked which one 'cause some of them I've seen on github, so I wanted to check.
In that case we might need to end it now because I can see which way this is going to go. There is no threats, you know I cannot do that as its against the rules
Once again, this reads as "It would be if it wasn't against the rules"
Some plugins are even copying each other and coding in Java, does that mean we are all shit programmers and should make our own languages?
No, I was asking 'cause I wanted to know how they did it
I was curious how they solved it
Thats like asking "How do you cook a steak"
I will tell you the plugin but know, I not into drama but it always finds me. The plugin is EpicFurnaces
Who cares if you copy something? You arent copying it to rip them off. You are just trying to figure out how they achieved the outcome you desired for that specific method. Hes likely using something similar that is completely minute to the overall outcome and direction of his plugin
Well once again, the source is available on github, you can check stuff yourself.
You might also don't care but I want to put this out there, my bpm has been all f*** up, I think its because the stress. So I like for this place to be peaceful without drama. Can that happen?
I don't care if someone copies something lol
Well it kinda depends, but this instance is ok
If I wanted to, they not worth the money really. But I cannot really copy them, I cannot really tell how they written the code. I don't want to go into why they not worth anything but if you want to try to use them, please ask for a free code. That is one of the reasons I avoiding them
Algood. I have no problem lol. I was defending you. How did you get on with my code snippets
I did not fully test it because I was dealing with people but thanks for defending me
do you mean when an ore is smelted?
https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/inventory/FurnaceStartSmeltEvent.html
https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/inventory/FurnaceSmeltEvent.html
declaration: package: org.bukkit.event.inventory, class: FurnaceStartSmeltEvent
declaration: package: org.bukkit.event.inventory, class: FurnaceSmeltEvent
you could check if something is smelting in the furnance by interact event
and check on interact event if its a furnace
etc
or this https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/inventory/InventoryOpenEvent.html
-> https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/inventory/InventoryType.html#FURNACE
declaration: package: org.bukkit.event.inventory, class: InventoryOpenEvent
declaration: package: org.bukkit.event.inventory, enum: InventoryType
or BLAST_FURNACE
When I place a fuel source in the furnace, it smelts but when there is fuel left, I want that to remain frozen until its starts smelting again
I don't want to delay anything. I just want it paused when its not smelting so I not wasting my fuel resources if that makes any sense. It can go at its normal speed. Just only use the fuel when smelting
fuel is consumed only when there is something to smelt
as soon as there is nothing left to smelt then fuel wont be consumed
Now the cooking arrow is going heywire, messing with the events
should be able to modify the remaining cook ticks i think, did something similar with datapacks a while back using this (not by modifying recipes)
and that arrow will go absolutely over 2 screens duplicating itself if you put it at a wrong value lmfao
Wasn't that fixed ?
not sure, my memories are from 1.18.2
how can i make that when someone click on a message it copy like "/say hello" in the ctrl + v?
Chat components, if ur trying what i think ur trying
i think
i forget what u can do with Hover event actions
!jd-s
?jd-s
All the way at the bottom, you want
ClickEvent.Action.COPY_TO_CLIPBOARD
why cant every bot use slash commands by now 
or maybe they should read the entire post ๐ค
its 2025
Red is too fancy for slash commands
fight me
Is there a reason perfectly fine images are shown like this on my plugin's page? They were displayed correctly before and one of them still does lol
Image probably not found
I checked URL and it's definitely there, it even loads in the editor
Make sure that when you open the url its only image not html and other stuff
What is the best way to find out if a player has already picked up a certain item?
picked up when
there is a pickup event
At the pickup event
Depending on the item there could be an advancement for it
If not, you'll have to keep track of it yourself
I meant more like across what timespan
like did they ever in their life pick something up
or did they pick something up in the last tick
Yo does anyone know how to use grief prevention api?
or did they pick something up since they joined the server
?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!
oh sry
Basically, as soon as a Netherite Scrap is picked up, the player receives one point. And now I want to add protection so that the player can't simply drop the item and pick it up again. I was possibly thinking about NBTs.
so do you mean if the player has scrap in their inventory?
At some point, the item will be picked up as soon as the player finds Netherite Scrap.
You're suddenly asking something different..
Items have Thrower id, you can probably just check that
or you mean picked up from a furnace?
As soon as the player somehow gets the item into the inventory, regardless of whether it's via an furnace, a dropped item or a chest
do you want to block that specific instance of the item or the item/material in general from getting picked up
what if the player dropped it by accident, does that matter?
The player may pick up the item again at any time, he should simply not receive any more points for it
and when do you give players points for the item
only when they pick it up?
I guess also when they get the item directly from a furnace
As soon as the player gets the instance of the item in his inventory for the first time
should he make it a singleton? ๐
and can the player drop it and give someone else a point with it?
Yes
So the goal is that the UUIDs of all people who have ever picked up the item are somehow stored on the item
?pdc
Ahh, thank you!
BUT
oh no
That will have the sideeffect of making the items unstackable at times
if you care about vanilla, item sorters will just not work probably
there is no way to accomplish what you want without that side effect
Ah, damn. But it's only for one event anyway, so I think I can stay with it
hello, i need some help with my plugin. i wanted to add some custom bosses. the modelling is not a problem but i was wondering how to add animations in my plugin. if somone has a solution then please help me i will really appreciate it
Thanks for the help guys, I appreciate it!
There are a two main ways of handling animations. The first one is having a model for every frame of your animation. And the second one being having a model per part of the entity and then moving them around with code
First approach is easier but might look worse
Create your own animation system from ground up
Or use MysticMobs or whatever its called
There's also https://github.com/MagmaGuy/FreeMinecraftModels but idk how well that works, you can tag Magma and ask him here :D
i am using blockbench for modelling, but i dont know about per frame animation
You can also combine the two depending on the needs for different parts of the entity
it depends how you are adding those models into the game
the thing is i also want to animate some items
then you have to describe better what you mean by "animate"
well i dont know what will be the best approach
modelengine and most of its derivatives as well as optifine model definitions all support blockbench's bone animation system to some extent
forget about items i just need to mainly animate my custom bosses
so group your objects into bones, go into the animation editor in blockbench, and create the animation
then go into the corresponding help discord to ask how you can import it into the game, e.g. the mythicmobs discord if you use modelengine
ok but how do i make resource pack for it, do i need like optifine for resource pack?
no
oh mythic mobs
optifine is not needed for anything
modelengine for one i think generates the resource pack from the assets automatically
yeah it's an imgur link, it worked before. Today when I checked it stopped working for some reason, the imgur URL is still working tho
and no, optifine isn't generally required
there's also a free interoperable alternative, i think that's the one from magma that came up earlier
it is
ah
i mean there is like a demo where you can load 3 models or something
but if you're sneaky about it (don't tell the mythic guys you're not using their plugin) you can ask for help from them, and then make use of that help with the free alternative
good idea i will try it then ig thanks
Hello, how can I damage an LivingEntity with a specific item ? Something like .attack but with by specifying an ItemStack or a Material
I also want the knockback to be applied
Summon dummy entity, do attack, remove entity ?
There may be a better way, dunno
it's a bit challenging because damage is fundamentally always dealt by the entity rather than the item
unless someone can think of something smarter i'd probably go with what steve said; use the entity visibility api to hide the entity in the Consumer accepted by World::spawn so nobody sees the entity, then equip the item, have it attack, and remove it
what would be the type of the dummy entity ?
anything that can attack using items
most of those are hostile mobs, so you might have to un-cancel the spawn event or worldguard/towny/whatever might stop it from being spawned
okay thanks
Piglins. Those can survive on peaceful too.
interesting thanks
if you have a component:
var test = new ComponentBuilder()
.append("Hello!")
.color(ChatColor.RED);
and another component:
var root = new ComponentBuilder()
.append("ROOT: ")
.color(ChatColor.BLUE);
if you append test to root, does test stay red?
I would say yes
in adventure at least yes
this is because .append actually creates an extra child component; you can't "append" to an existing component
it's a child component so it will inherit all properties of the parent
including color
Hi guys, i can't post updates of my plugins and i have 2fa enabledโผ๏ธ
the page keeps telling me "Enable 2fa to post update", but i already have it enabled
unless explicitly set, so yeah, got that working
if you'd like your components to not interfere with one another, what i usually do is .add them into a list and then .join the list's components into one big component
that way they become siblings rather than nested children, and one component's properties won't leak out of it
yeah I know, I'm implementing my own text API for my modloader and wanted to ask :P
Yes
Child styles always override parent styles
aight thanks
is there a way to make a warden neutral to set entities WITHOUT extending the class?
there's an entitytargetentity event, at least on paper, that you can cancel
okay thanks
yea i basically have to guess with half of the events and methods because i only have paper docs open
best always check whether they're on spigot, quite a few things have been pulled in from paper
Is there an API to make an entity walk to a certain position without relying on another existing entity
it doesnt fire when the warden targets an entity naturally (hearing it moving)
paper's entity pathfinder api has a go to location method
that said the game pathfinder is kind of garbage and won't very accurately go to where you want it to go
it will frequently stop 1 block short, for example
apart from that it's pretty reliable for what it is
soo what can i do
Hey everyone, does anyone know a way to get a list of all blocks from the Material enum that are full-sized? Specifically, I'm looking for blocks that have a full-sized bounding box.
Do you care about slabs ? Those can be double and thus a full block.
I'd prefer if slabs were filtered out, as I'm specifically interested in blocks that are inherently full-sized without considering double slabs.
Great! That makes things easier
This would be great if you could come up with a solution. I already found this post, but it specifically covers checking if one block is full-sized.
bump
Block has getBoundingBox method, so my idea is to iterate over all Materials, somehow get Block and use that method to determine if its full or not
There also is getCollisionShape, no clue which one you want.
there's no way to get that from Material
but you can get it from BlockData i think
which you can get from Material
this is because the collision shape and bounding box depend on the block state and its properties; e.g. whether a slab is the top or bottom half
i'm not sure if bukkit has a way of iterating over every block type's possible states; you could either use nms for it, or the worldedit, which does offer api for block properties
if you just care about the "default" state of the block type, you can get that from the material as BlockData
They don't want all states
there is also Material::isOccluding and isSolid and others, although they aren't always intuitive as to what they contain
I'm sure there could be a block that is both but does not have a block AABB
or the other way
That was my first thought as wellโto use the getBoundingBox method to determine if a block is full-sized. However, I haven't been able to find a method to get the block from the Material Enum to check if it has full-sized bounding boxes. Unfortunately, the methods isOccluding and isSolid haven't been helpful either, as they also include blocks that aren't full-sized.
BlockData::collisionShape is probably the closest you'll get
That's not a thing
it is on paper i guess
sir, this is spigot
suuuure but i only have the paper api memorized
BURN HIM!!!!
Then why be here, why not Paper discord ?
i don't like it there
Fair :D
Nah I'm still up for burning him
i'm a pretty flammable guy
Hello, how can I use gravity and velocity for an ItemDisplay ?
Entity#setVelocity and Entity#setGravity?
looks like ItemDisplay doesn't care about it
show code
but maybe there is a spigot/nms trick to tell the server "hey, just let me use it" ig
there it is https://paste.md-5.net/amazafadez.java
and are you sure that velocity is not zero
They have Transformations. No velocity
I'm sure
because it's working with an ArmorStand
is there an easy way to translate velocity in Transformations ?
could also just set the teleport duration to something and teleport it around
that would look buggy, right ?
but that'll obviously not interpolate or anything
no, that's the whole point of the duration
it would just animate the teleport like such
wdym
what it would look like to the player ?
well this is a teleport duration of 1
I can try and find it whilst being unset
wait I'm sending you what I want to reproduce
but there it's using armor stand, it's not the best ig
hmm interesting, what happens if you do multiple teleports that are at opposing times? ๐ค
I believe this is how it looked like without a teleport duration and also without actual logic in place
can't really notice it in a 30fps recording but it looks terrible ingame
OOOOH
the display is the mouse ??
yes
lool I though you were talking about the button
latest one overrides and it will snap to the target position/rotation of the initial teleport, then start interpolating from there
bump
e.g. if you first teleport it from A to B, and then you teleport it back to A when it's interpolated its position midway, it snaps to B and starts interpolating from B to A
well it'll take a while
"i should just remove this from the code and run the server!" bad idea, loom
but if you could time this right though it would be interesting, but the snapping feature is also handy too in some scenarios
you would need to have the timing not equal or not divisible by one another in a sense. So like 1 and 3 for example, but not 1 and 2
it's a bit finicky because the interpolation is clientside, so you have to account for latency to get the timing right
yeah I could see it being a bit tricky
or what are we talking about, simultaneous transform/teleport interpolations into different directions?
those should just stack i think
they do
idk, whatever that first duration example was
what's the packet for updating an item's lore
well if they stack, then I don't think it would really work then I don't think
I just saw a big green checkmark floating in the air still and nothing happening so i stopped watching without reading anything
entity item or item in inventory?
inventory
there's a cursor moving around hehe
it's just a plugin ?
it's a server-side mod
you can do the same with a plugin, it'll just be a bit harder
how are you doing it please ? seems interesting
its magic apparently
teleport duration 1 vs none
fuck
seems like
see, even discord doesn't want him revealing the tricks
not smooth ๐
pretty much just listening for moving, specifically rotation packets and mapping the yaw and pitch to a position on a flat plane
wdym
when you prevent the player from moving
the player is set to fake spectator mode, put into a boat and camera set to a marker entity elsewhere
between the camera move by the client and the camera cancel by the server, it can do a weird effect
that's smart
gg
oh it's an ingame cursor
it's like 2 pixels on my screen so i thought it was just the actual cursor
very neat, what is this for
love that
i pretty much just wanted to play around with it a bit, may use this in some projects in the future
it is horrible with worse ping though
even made a whole ass DSL for this: ```kt
interaction {
position(player.x, player.y, player.z)
distance(1.85)
button {
x(0.31)
z(0.32)
width(0.115)
height(0.14)
onInteract { player, _, _, _ ->
player.sendMessage(Text.literal("You clicked my button!!"))
}
itemStack(ConfiguredItemSprites.CONFIRM_BUTTON.itemStack)
}
cursor(ConfiguredItemSprites.CURSOR.itemStack)
}.init(player)
how is it controlled? wasd? or like player rotation-move packets to capture actual mouse input
latter one
did you lock the screen by force spectating an entity?
yep
^
neat
you would use set container slot packet
we love UB
k, ty
i've been reluctant to depend on it because i feel like mojang is going to bust it any day now for no reason
depending which version, you would either use the structured components to set the slot data, but if you are using an older version you would use the nbt format instead
well it still works in the latest snapshot
https://minecraft.wiki/w/Minecraft_Wiki:Projects/wiki.vg_merge/Slot_Data
https://minecraft.wiki/?oldid=2768623
fist link is the updated way to set the slot data, the second link is the old way
Idk but hope this helps
?learnjava
The learnjava command was not needed for that question?
it's literally all they've been spamming
?bt
z
z?
bt doesnt support 1.7 rght?
?tas
oh no 
Minecraft Snapshot 1.7 is 11 years, 4 months old.
older than some people in this discord
man whats that site called
you really don't want to use it
u dont even know why i want ti
right, and if you were to tell us we could probably help you come up with a better solution than.. using an 11 year old version
i need to use the API
?
whats with the questions man
you are trying to use an 11 year old version
Hi, how can I make an ItemDisplay do a rotation like this ? (Just, what value specifically I need to change ? I tried leftRotation with AxisAngle4f converted to Quaternionf and directly with Quaternion... And I just obtain some weird behaviours)
.
so what why does it matter to u
cool its 11 years old
where can i get a download
._.
its fine i found a git repo
idk how it contains net.minecraft but ๐คทโโ๏ธ
ah it has local depends nvm
i just need a dl
for 1.7.10?
yeah link that please
as long as it doesnt need any bs from wolverness should b good
Git commit history
ah man
since u said u checked that its there
would u have the hash im looking for
?
Looking for the last 1.7.10 spigot commit or the 1.7.10/1.8 hybrid
the hybrid would be fire if u can find it
e4d4710834f7b292bc496f41f1cf9ac363225c0e
That's for Spigot you will need to check CraftBukkit and Bukkit as well
ah wait now u made it sound like a complicated build process
Actually that's the last 1.8 version not hybrid
a
Will need to check a couple commits older for hybrid
Yeah might be a bit tricky
Spigot builds on top of CraftBukkit
and CraftBukkit is the implementation of the Bukkit API
So you will need the three of them to build Spigot
They are all on the stash ofc
again, why do you even need this
to develop a minecraft plugin
like just use 1.8 at least
yeah p long i just need a built binary
ur not educated enough
for this field
theres a reason i need 1.7
Right I doubt that
1.8 throttles cps
see this olivo guy knows what hes talking about
theres a hit delay at around 15cps
Unless you use a client that gives a competitive advantage, like Lunar, did at one point (or still idk)
nothing but respect for this guy
yeah lunar used to remove the delay but they got backlash so
also lots of people still play 1.7
but the hybrid is good cuz some people play 1.8
but i wanna use the 1.7 api
acc i can prob find the hybrid build
trust me you really don't wanna use the 1.7 api
I was going to say. Nobody in their right mind wants to use the 1.7 API
You can just compile against the 1.8 and not use any of the api methods that were added later
^^
yeah but idk which were added in 1.8 and which werent
Check the javadoc
there is probably a @since
shit
no because that would be too easy
effort lad
Someone should generate the @since javadocs :sadge:
may justt use the 1.7
somebody made that for paper, don't think it exists for spigot
yeah it's not exactly a cakewalk
You're wanting to write against an 11 year old API. This isn't going to be an easy feat
what did you expect lol
ive enough experience
And not only are you wanting to use an 11 year old API, you're wanting to use an 11 year old API that was DMCA'd
ok then do it
It's not hosted anywhere legally
i am..
ok
๐ the system
Spigot doesn't host it and you can't build it with BuildTools, so if you want to use 1.7, even if it's just the API, we're not going to help you here
see, police:
man its way too difficult to just find a download
do you even read any of the messages here
you're better off reimplementing basic and pvp related parts of the server/protocol from scratch
ur the only one giving it 10 for no reason
i assume this is for some sweaty kitpvp server
im reading everything but urs
no i just want to code a hcf core
No I think you just ignore everyone that doesn't support using an 11 year old version
What about minestom?
DO NOT BUG US FOR SUPPORT FOR 1.7.10. YOU WILL NOT GET ANY.
does that support 1.7
that's pretty clear if I do say so myself
sure
really?
you may need to do minor tweaks
If you write it to support 1.7
that might be the move u know
then it will support 1.7
or
nahh let me give that a look'
neh
Modding unreleased Beta 1.2_02 (20110517) using Fabric. - modmuss50/secret-example-mod
if you just need an api to build against, build directly against whatever server jar you will use to run the plugin on
its not even that
i dont wanna start a server
i just want my own core for the presence
๐
then what do you need the api for
We recommend users update to 1.8.8
Hilariously funny in today's context
to make the core?
what is the core gonna run on?
terraria
undertale
kek
it's been a decade bro ๐ญ
why was it never approveeeed
any 1.7 server
im looking for craftbukkit
so it will support everything
๐คก have fun with that
ayo chill tf out
you're acting so surprised for trying to run an 11 year old minecraft version that nobody runs anymore
on a DMCA'd version/server too
at least use forge...
fabric >>
you can even like https://github.com/modmuss50/secret-example-mod/
I mean, yes, but there is much more 1.7.X content for forge than fabric
i don't think that's what they care about
for modern, fabric is better
why did he even do that
๐
ruined it for everyone
?dmca
An unofficial explanation of the DMCA can be found here: https://www.spigotmc.org/wiki/unofficial-explanation-about-the-dmca/
why isn't what working
fun restore(world: World) {
println(regen.size)
object : BukkitRunnable() {
val batchSize = 500
override fun run() {
val startTime = System.nanoTime()
var i = 0
while (i < batchSize && regen.isNotEmpty()) {
regen.pollFirst().restore(world)
if (System.nanoTime() - startTime > 50_000_000) break
i++
}
if (regen.isEmpty()) cancel()
}
}.runTaskTimer(UltimateDuels.get, 0, 5)
}
I'm using that here, the regen list contains the block but the changes dont appear
idk blocks just dont regen
is a regen system
im saving them in: val regen: LinkedList<FormerBlockState> = LinkedList()
is like, you place a block, save it there, then when the minigame ends the blocks should return back
but idk why it is not working
oh i got it
for some reason
it is saving yea
but AFTER i place the block
how can i do it then?
oh nvm wait i can just set them to air
@worldly ingot with that method world.setBlockData() is the best way? you do that on hypixel? i have a friend that says that there's a much better way to do it but he doesn't want to tell me ๐ฟ
what about water/lava flow
They will flow again when placed
?staff
Don't ping staff for development/server help, if you have a question just ask it and someone in the discord will respond when they are capable of helping.
i know but he was helping me with that yesterday
yes
Oh then you can just skip saving the arena to begin with
make the arena into a schematic and paste it with the worldedit api
probably better to just place the map twice / n times
https://www.youtube.com/watch?v=DjT1bnO9iu4 He sent me this video and told me that there is a much more optimized and faster way than the one I am using, I would like to know it but he doesn't tell me lol, so I am trying things out
#shorts #spoilers
Portfolio: https://elb1to.me/
Store: https://store.frozed.club/
it's to place it with the fawe api instead of the worldedit api
I'm not saving the sand but the blocks that the players put there
yea that thing is faster, is an option too
Just looks like a fill with air
lol
That's also an option
I don't think so because he has a server with a fortnite type battle royale and it resets the entire map in seconds
i'd just copy the regions into a new world as a file system operation outside of the game and then load that new world in, and discard the old one
if you need to reset a huge map, that is
Yeah that's an easy solution to a big map
so my way is okay for now?
well are you running into problems with it?
for now no
i need to implement water and lava flow
i can use BlockFromToEvent for that right
what you want to do instead is probably to save the entire arena before the match starts, and then restore it
instead of trying to track changes
because trying to track "all" changes through the myriad possible ways blocks could be placed or broken or changed is not easy or simple or cheap to do
you can take a look at the flags list of worldguard to get an idea of just how many ways there are for things to change
so you probably want to not bother with that all and restore the map from a predefined snapshot or a schematic
Just copying a world file each time is nice
this gives you the matrix4f directly
as well as the left/right rotation and scale if you want those instead
Perfect thanks
hey how might I make an entity on my server look different for clients than what it actually is? (eg. make an arrow, look like a dropped item) so I'm making an "itemLauncher" that launches a particular custom projectile. right now I'm currently using "p.launchProjectile(Snowball.class)" to launch a snowball from my player's perspective, however I want it to look like a dropped item on players screens. what's the best approach, or a few options that I have for doing this? any suggestions would be appreciated, thanks. also note that I have NMS setup on my plugin project if needed.
You can set the item a snowball shows
what's the proper method to use for doing that?
oh wait, you mean the actual texture? like how eggs look different, but are considered the same action?
Well those happen to be separate entities, but yes, all throwable projectiles (eggs, snowballs, ender pearls, etc.) that just render a billboarded item can have their display item changed
Hello, how can I make a ItemDisplay rotate on its "center" instead of location corner ?
ItemDisplays always rotate around their center. BlockDisplays rotate around their origin corner.
okay thanks
Hello nice to meet you guys,
Can someone help me about Bungeecord?
Im first time using it and get error for 1 my server
Sure, if its a development related issue, we can help. Otherwise this is probably the wrong channel.
Post the error anyways.
Where i can post it?
Owh thanks buddy
why is this inaccessible here?
Think you need to define the variable there
= new HashSet<Material>();
Its not initialized but it saying not resolved tends to mean its completely absent
assign it and test again
Looks like it's initialised in the ctor but the ctor is collapsd
maybe this.preserved will work?
and there's some closing bracket, no idea what that belongs to
oh I see. too many }
Lubiฤ w dupke
english only
Is there a way to make a player drown faster?
put your foot on their head

i mean when the player is underwater
i know that, i mean when a player changes his oxygen level.
like
if player is underwater his oxygen goes down more faster
i think thats client side
nah im trolling
or atleast the client predicts it when the server doesnt send an update
okie dokie
Hey everyone so basically I'm trying to create the silent aim for bedrock players with packets but for some reason it doesn't work correctly. If anyone knows why I'd appreciate the feedback. I decided to go with packets since setRotation in spigot api doesn't seem to work?
return player.getNearbyEntities(range, range, range).stream()
.filter(entity -> entity instanceof LivingEntity && allowedTargets.contains(entity.getType()))
.map(entity -> (LivingEntity) entity)
.min(Comparator.comparingDouble(e -> player.getLocation().distanceSquared(e.getLocation())))
.orElse(null);
}
private void adjustAimTowards(Player player, Location targetLocation) {
Location eyeLocation = player.getEyeLocation();
Vector direction = targetLocation.toVector().subtract(eyeLocation.toVector()).normalize();
Vector currentDirection = eyeLocation.getDirection();
Vector smoothedDirection = lerp(currentDirection, direction, smoothnessFactor).normalize();
float yaw = (float) (Math.toDegrees(Math.atan2(smoothedDirection.getZ(), smoothedDirection.getX())) - 90);
float pitch = (float) -Math.toDegrees(Math.asin(smoothedDirection.getY()));
PacketContainer packet = new PacketContainer(PacketType.Play.Server.ENTITY_LOOK);
packet.getIntegers().write(0, player.getEntityId());
packet.getBytes().write(0, (byte) (yaw * 256 / 360));
packet.getBytes().write(1, (byte) (pitch * 256 / 360));
packet.getBooleans().write(0, player.isOnGround());
ModernCombat.getInstance().getProtocolManager().sendServerPacket(player, packet);
}
private Vector lerp(Vector start, Vector end, double factor) {
return start.clone().multiply(1 - factor).add(end.clone().multiply(factor));
}```
no clue what "silent aim" is lol
But probably ask Geyser
probably aim-assist like many console games have due to shitty controller for playing games
why not call it aim assist then
sounds like ppl trying to hide skill/controller issue lol
not sure about the skill part, however controllers are inadequate in comparison to a mouse due to the fact they have large dead spots. also sensitivity is an issue too
how should i load a world thats not being automatically loaded?
Run the WorldCreator
https://hub.spigotmc.org/javadocs/spigot/org/bukkit/Bukkit.html#createWorld(org.bukkit.WorldCreator)
declaration: package: org.bukkit, class: Bukkit
so if they typo a worldname in a config i just create it and let them deal with their own mess?
Yeah that's one way to do it
whats a nicer way?
Guess you could compare world names with the input and match within some params
Only default to a new world when thereโs no significant matches
@lost matrix How did you end up doing your RPG skill system?
Kinda working on one right now and the idea I have in mind is too complex
been wasting multiple hours at work just staring at the ceiling doing nun
infinite money glitch
ppl getting kind of mad because we have a limited budget and I get paid hourly
so they are jealous you make a living?
no they jealous they're paying me to sit around while being over budget
sounds like an error on their part if you are just sitting around
yeah because I'm the only dev and I gotta think like a mad man
we discuss options but no conclusions
what are you stuck on?
complex ability system
passive abilities, active abilities, skill trees, toggleable abilities
gotta make it all configurable and easy to work on
Going back to the drawing board rn might get something out of this
Might want to look into not just using pure java then
you could use python for this
naw
not interested
basically my idea is to tie actions to triggers but I need a way to toggle between active vs inactive states
and having mana costs and stuff somewhere in the middle
well active per player?
Yea
get players unlocked abilities...
if you didnt want to get their persistent data container all the time you could make a small data type that stores it all and just read it when they join and write it when something changes
main thing I need to manage is that we can have different actions with different costs depending on the player's level
managing player data on join / on quit isn't an issue
It's the whole trigger -> cooldown -> cost -> action flow
store the cooldown in the data type and just have a method for the cost
cooldown and cost depend on the ability level
or store the cost in the datatype also
but there are different cost structures depending on what activates it
I might merge the left and right sections because actions can have a cooldown and activation can also have a cooldown
so what if activation is just an action that calls a trigger for more actions
a trigger can be, for example, damaging a mob
it can also be caused by activating an ability
Activating the ability can be an action that calls a trigger that calls other actions
That way the cooldown logic is unified
i dont see what your problem is
basically coming to a conclusion about how this is going to end up
action->trigger->more actions->more triggers
so unify the left and right side
trigger calls the method for the effect
if i use a command it calls the method for the effect
check the cooldown and the cost in the method
So
Player activates ability, calls "activate" trigger
"activate" trigger runs "shoot fireball" action, takes 50 mana, applies 5 second cooldown
fireball hits entity, calls "fireball hit" trigger
"fireball hit" trigger runs "light_target_on_fire" action, applies 3 second cooldown
hm
so they can only catch on fire every 3 seconds?
There's a 3 second cooldown on the entity for the light target on fire action
so we can't light it on fire 12 times in a second
bad example, more applicable to extra damage / critical hits
I'll also need filters because some actions only trigger under 20% health
But yeah unified system, hm
only thing I need to deal with is converting ability levels to action values
but that's a problem for later me
doWhateverAbility() if(!cost() && !cooldown()) fail
not as easy
this is enterprise code
The cost and cooldown can just be part of the filters
hm? what's the issue?
just figuring out the ideal structure
why do the modifications made clientside in a SET_SLOT or WINDOW_ITEMS packet reflect to the next SET_SLOT or WINDOW_ITEMS packet for the same item
creative mode?
hm what if I make presets and all the active vs toggleable ability logic is just a couple actions that update an internal state
does packet.getItemModifier().write(0, clientItemModifier.applyCallbacks(item)); in a SET_SLOT packet in protocollib affect the item serverwide
Make sure to clone the item
i am
Ahh so it needs to be either incredible over-engineered or completely terrible
No in-between
both, even
why is the mobile gif picker SO slow and inefficient
both
Yeah my discord drops to spf instead of fps with the gif picker open
a basic attributes system took me 50+ classes
but yeah I think I'll combine this trigger -> listener -> filter -> action system with a state machine
for toggleable abilities
you have mastered the art of procrastination ๐
nvm fixed it
I have something stupidly complex but incredibly versatile. At least for the ability system.
yeah I'm prob gonna end up with the same
I kinda gtg rn but I'd like to hear your approach
Hello everyone, I am trying to make a plugin but I am a beginner and don't know what is causing it not to work.
Please kindly help me.
package org.tofu1.plot;
import org.bukkit.Bukkit;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.player.PlayerMoveEvent;
import org.bukkit.plugin.java.JavaPlugin;
import java.awt.print.Paper;
public final class Plot extends JavaPlugin implements Listener {
@Override
public void onEnable(){
// Plugin startup logic
getLogger().info("plugin enabled");
}
@Override
public void onDisable(){
// Plugin shutdown logic
getLogger().info("plugin disabled");
}
@EventHandler
public void onPlayerMove(PlayerMoveEvent event) {
// move
event.setCancelled(true);
}
}
you're not registering your listener
Bukkit.getPluginManager().registerEvents()
pass your plugin and your listener (which is also your plugin)
Where do I fill out the form?
Register it in your on enable
thank you i try it
It worked! Thank you very much.
hi!
I need help with a datapack I am trying to create for 1.21.1. I have almost never built these before so kind of struggling.
{
"type": "minecraft:crafting_shaped",
"pattern": ["###", "BBB", "###"],
"key": {
"#": { "item": "minecraft:netherrack" },
"B": { "item": "minecraft:dead_bush" }
},
"result": { "item": "minecraft:netherite_ingot", "count": 64 }
}
Wrong folder
Bug do go to MCC
thx!!
yeah, I am checking out that server. Also, wrong folder?
they seem fine to me.
namescape/recipes/recipe.json
you have the recipe in 'recipes'
but in 1.21 the folder was changed to 'recipe'
oh bruh.
Mojang hates plurals
still doesn't work...
How is this more difficult than writing a plugin with java?
idk, maybe I am just inexperienced.
Probably some other changes in recipe format
Use wiki or ask for help in that discord, do not forget to mention your exact version
yeah. Anyway, thx for checking it out.
does plugin description on spigotmc.org support markdown?
Thereโs a preview button somewhere before you make the post
Could check and see what markdown support it does have, Iโm also pretty sure thereโs a link somewhere of formats
it uses bbcode
bbcode my behated
You're actually right, I've changed it to aim assist xD
silent aim sounds like a cheat
does anyone know how to achieve this without shulkers? shulkers have a collision box and i want people to go through it
Resourcepack, make a block invis, then use blockentities?
im looking for options without a resourcepack, i relaly only want to use that as a last resort
i'd avoid removing a block's texture and just use an item model
Fast question: Can i make the player sneak via the spigotapi? Yes/No?
yes
Alr, thx!
Hello, I am making a mistake while installing bungecord. Can you help me? How can I upload a photo?
@chrome beacon Can you help me?
Block blockLocation = block.getLocation().getBlock();
block.getWorld().dropItemNaturally(block.getLocation(), new ItemStack(blockMaterial));
System.out.println("debug out");
if (blockLocation.getType() != Material.AIR) {
System.out.println("debug in");
blockLocation.setType(blockMaterial);
} else {
System.out.println("debug else");
blockLocation.setType(blockMaterial);
}
}```
why my block doesn't get replaced ?
on BlockBreakEvent and yes i get the debug out an debug in
why? block.getLocation().getBlock()
to put the block back to the same location?
oh wait
it should be only block.getLocation()?
you don;t need its location
and how can i put the block back?
you have teh Block which is a single instance
your issue is you are trying to set teh block IN the event which is before it is actually confirmed broken
there is an event when the block get broken or i need just to make like a Runnable?
you just need to delay your setType code for a tick
but the else of my code work fine?
you are trying to restore teh block after its broken?
yes
then delay your setType for a tick
@Override
public void run() {
System.out.println("debug out");
if (blockLocation.getType() != Material.AIR) {
System.out.println("debug in");
blockLocation.setType(blockMaterial);
} else {
System.out.println("debug else");
blockLocation.setType(blockMaterial);
}
}
}.runTaskLater(plugin, 20L);
like that right? or there is a different way to do it?
your naming is confusing. You call it a blockLocation but its actually a Block
you should get a fresh Block inside your runnable to be safe
it "should" be ok though
new BukkitRunnable() {
@Override
public void run() {
Block block3 = block.getLocation().getBlock();
System.out.println("debug out");
if (block3.getType() != Material.AIR) {
System.out.println("debug in");
block3.setType(blockMaterial);
} else {
System.out.println("debug else");
block3.setType(blockMaterial);
}
}
}.runTaskLater(plugin, 200L);```
so something like that right?
Why not just cancel the event
i want the drop
why are you using a bukkitrunnable
what i should use?
passing a lambda to Bukkit.getScheduler().runTaskLater() is cleaner since it avoids the anonymous subclass boilerplate
how do i get a player name from an uuid?
but im not sure if player is online or offline
does Bukkit.getOfflinePlayer work if player is online too?
yes
๐
if you get an offline player with an invalid UUID the name will be empty
im adding offline support for bank transactions
I think Player extends OfflinePlayer so yeah you're good
no null? only empty?
I ask because its marked as @Nullable
๐
yes nullable
Looking for someone who can help me with some information about starting a player in a " cutscene " or " dialogue " sequence when they first join a server.
assuming this is done with betonquest or if someone know another way I'd like to hear
Not that I am suggesting this, but there is api for conversations: https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/conversations/package-summary.html
Otherwise just track some state on the player throughout some chat events when they first join @urban hedge
i just saw a plugin for this on hangar
i forget the name however
someone in the betonquest discord surely knows
it forces the player in spectator mode with predefined camera and npc movement while playing dialogue in the actionbar
that sounds fancy
i need to try it
but how do you handle a smooth camera movement tho
if you attach it to an invisible entity it will lag
how do you move a camera in the first place
then you have to move an entity at specific speed and also make sure the entity moves where you want the "camera" to move
sounds complicated
it also spoofs a npc with the player's own skin so the player sees themselves walk and look around in the cutscene
it's very cool and i was planning to look into it but i've never gotten around to it
it sucks that F5 is client side
otherwise you could "lock" the camera
and player wouldnt be able to look around
But the third person camera isnโt locked
yea it isnt..
You can easily lock the camera by spectating an entity
i also saw this same thing used for a third-person over the shoulder camera perspective for some big rpg "soulslike"
not f5, but behind the player so you could see the fancy attack animations they'd put on the "player model" using modelengine or something
that sounds complicated
you just record the points along the path and move the entity there tick to tick
im also guessing you have to manually rotate the head if you want the entity to look eg.: 5ยฐ to the right
You just make keyframes and then interpolate
rotation information it part of the points, yes
iirc the plugin had 2 modes, one where you record the camera movement by running a command that records your movement and saves it tick by tick
hmm hmm
and another that interpolates keyframes made in some web editor
typewriter
absolute dogshit SEO
page 5 on google search for cutscene plugin
fancy stuff
That character by character text in the chat
Probably not good for your client log files XD
i wonder how that even works
resend the entire chat history for every new character, except with that character added
i though so
XD
would be nice if there was a feature to edit the chat, each message would have its id, and you could access it
and yeah on low end machines it looks super choppy because the renderer can't keep up; the chat window starts flickering with just some of the newly sent lines in and others not yet rendered
and modify it
You only need to resend that single message and some spaces
Rather than the entire history
depends on if you want the player to scroll back up
also the selection... arent arrow keys client side and cant be detected by the server?
You can delete signed messages
how did he detect them in the chat? while typing
But server messages arenโt signed
i suppose you could prefix it with ~100 newlines to push the old chatbox completely out of history with relatively little bandwidth
Scroll to change options, F to select
hmm
I just realized you could implement an F to pay respects plugin
XD
what are the cool kids using these days for AI autocompletion of code, I have grown to dislike relying on ai that much but I still kinda liked it when it was just autocompleting code in my ide
guess I'm in a bit of a weird spot with using ai for programming
demonic posesssions to write code, old school, I like it
sometimes i write out entire halves of sentences without thinking about it just on autopilot
it's like autocorrect but in my tendons
I like AI when I'm doing something absolutely supremely braindead
a good example is just a builder pattern
I have a class with like 30 fields I want a builder pattern for
it will be a cold day in hell when I type that out manually in anno domini 2025
lombok ๐คก
does lombok even allow builder patterns? I only ever use getting and setter
Yes
hm how does it do it
Real programmers use Lombok and then run delombok afterwards to atone for their sins
neat trick
sounds about right
eh it's fine
use it where you need it, like here
i wouldn't start replacing all my setters and getters and ctors, however
too late
I've been using lombok getters and setters all along
I mean if you're already using lombok then go for it
hey if you dig down far enough I heard you get to pop out on the other side
well at least that's what I keep telling my bank
has anyone here tried cursor out
I'm curious but skeptical
But youโll hit bedrock
I'm no quitter, I know I can break through
I ran an online Kotlin to java converter yesterday and I'm 95% sure it was AI based
Yeah it was perfect except the type inferred for one list was wrong
the problem I have with using AI is just that it can't really reason well for anything big
But no idea how it could have inferred any type at all without ai given no imports were in the snippet
it's amazing for when I need a python script that does the one thing, even if the one thing is semi-difficult to do
but if you want a system, any kind of system, it blows
the current api prices for claude 3.7 make me sad
it's such a good model, but actually trying to use it for a project is more expensive than a coke habit
if only I could get a small loan of a million dollars to get me started
reminds me of the claude plays pokemon bot on twitch that is running right now, 45 hours in it had burned through $3k-$30k worth of tokens
varying depending on how the caching strategy is actually working
deepseek is reasonably capable (and way cheaper), and if you put a lot of work into figuring out how to rag your codebase, i'm fairly certain it will turn out relatively proficient
for sure, but some compromises need to be made
hell I was about to check the current deepseek providers right now
for the millionth time
it is unfortunately substantially dumber and substantially slower
but
in fairness
it's also literally a fraction of the price
even if it might not be capable enough to produce the final output, it can still play a role in the system, e.g. filtering or reasoning about rag results
the slowness of it gets to me more than the quality honestly
it is incredibly, insanely slow
iirc their input processing is slower than e.g. openai, but output isn't noticeably slower
should be fine if your request hits the cache
compared to o3 mini high or whatever it was called though, slower but closer to similar
the api access is a mess for deepseek anyway
I think claude is pulling a trick with its reasoning, it's the only thinking model I currently know of that seems capable of calling reasoning off "early"
deepseek and chatgpt will go on and on forever in their reasoning, and not really be able to detect they're at times going overboard for something rather simple
there's definitely some optimizations that can be had in that specific field, not every request requires the same amount of "reasoning"
AI has learned to overthink
literally
Dear revered SpigotMC members,
I hope this letter finds you all well. I am anticipative of this writing, as it will aid me in finding not only a new friend, but a fellow competent server developer. I already own a server of the highest caliber specifications. Budget is not a problem for me. With all this being said, I still do not want to enjoy this journey alone. For more questions please DM me.
p.s. I cover all server expenses + resources
tldr: i wanna friend who is also good at developing because it sucks doing stuff by yourself. Everyone gets a share of server profit + are paid for the work they are done.
repost ๐
oh sheet
og from this server ๐ฅ
what i do in my rag system unrelated to coding is i split it into sectors by similarity and run multiple model calls in parallel (after culling them with rag) and finally consolidating it with a more expensive model
in this context multiple calls could work in parallel on e.g. separate classes
i'm going to rag you
i am a rag
Dear revered SpigotMC staff,
I hope this message finds you swamped with forum moderation work. I take great pleasure in seeing you struggle, as it means the Spigot ecosystem is attracting numerous new members.
Earlier on this day, the 6th of March of Anno Domini 2025, a foolish member of the Spigot community elected to extend an invitation to find a server developer.
This dunce of the highest caliber has thus misused this room, sullying its with offer, instead of directing his request to the famous services forum.
I beseech you delete his cringe-ass message, and provide a verbal spanking of the highest caliber.
Your fairweather friend,
- \^.^
Dear revered SpigotMC member,
im sorry and i wuv you lots <#3
this works far better with local models but unfortunately i don't really have the hardware to mess with it too much
honestly local models are really underpowered compared to online models
well of course, they are orders of magnitude smaller
you can maybe use gemini for free, but not really if you're hitting it with a ton of requests
several several orders of magnitude
its honestly remarkable that they are usable at all
But my eye phone has aye eye !!!
one day however i will buy a pile of used 3050's or something and run an unquantized 72B parameter deepseek
I halfway built an openrouter config to load the largest version of deepseek on there automatically
but then went around asking other people and they said it was just not really worth it so I gave up
it's a bit of a stupid time and money investment anyway
sorry did I say openrouter
I meant runpod
I was looking at openrouter, it was on my mind
if you look at it the other way around, the margins are much better than e.g. for mining shitcoin
that came out wrong
I meant to say I was making a private instance for it on runpod
for my own use
not that i was building something for selling
the two biggest problems with trying to do this are that there's no real platform for you to sell inference time, and the upfront investment is far higher than for miners
interesting
yeah
the second problem is solvable as well, by pooling together gpu resources with a few others
