#help-development
1 messages · Page 1032 of 1
It's not
net.minecraft.world.level.block.ButtonBlock#press
Note that all it does is
world.setBlock(pos, (BlockState) state.setValue(ButtonBlock.POWERED, true), 3);
this.updateNeighbours(state, world, pos);
world.scheduleTick(pos, (Block) this, this.ticksToStayPressed);
Is there a way to check for this tag?
declaration: package: org.bukkit, interface: Tag
declaration: package: org.bukkit, interface: Tag
oh my god
I'm stupid
I always forget what these <> things are for.
I'm used to C#, but I still fail to understand the meaning of them
its just a type
I thought I understood, apparently I don't.
Tag.REPLACABLE.isTagged(...
and also use this
^
generics
how tf would somebody explain generics. "Dynamic typing but for statically typed langs"?
this feels so weird
"object oriented static dynamic typing"?????
what's weird
why
looks like a normal day in java
dynamic typing but without any of the convenience
yeah but there are so many things about java that I find weird
perfectly summarised
Tag -> Class
REPLACABLE -> Statically accessed field
isTagged -> Method from the field
I understand why primitives don't have a .toString() method (they're primitives, duh)
but why do you have to check if an object has a tag, via the tag?
..what?
ofc they do
everything does
the only weird thing there is that traditionally api access on spigot is done via method, so that field could also be in a getter instead of being public
true
¯_(ツ)_/¯
Spigot has a ton of public fields
sure
spigot also has a ton of parts of its api that don't follow normal standards
it's a big project
Imagine a getter for every material
you mean you're not inferring type from string?
you weirdo
js moment
well the mappings website doesn't have 1.21 yet so I guess I have to check manually, how cringe
cephx smh
primitive type moment
cephx hasn't updated yet truly the website has fallen off
idk i use kotlin so i don't need that
now do I even remmber where mojang hides the remaps
well, primitives are primitives, they aren't objects so they don't inherit object methods like toString or hashCode
Isn't everything in kotlin a reference type?
what
but buildtools is a piece of sh...
real
Do it better than
if I'm saying something is shit it does not mean I can do it better
thanks mojang I hate it
too late I'm already jacked in
also they privated the ClientboundAddEntityPacket, thanks mojang very based
yknow I should really document what name this field actually is some day
Is it inefficient to check for all entities in a chunk to see if a block can be placed or not?
and I said something confusing again
wth is 1.21 out?
yup
yep
mhm
time for everyone to spam the spigot and paper devs
nearly done updating my systems
Spam us for what
spigot is already done
^
paper devs then
I think I needed bb?
You should ping @eternal night about it
trust me they already have
:D
eta for 1.22 when? 😛
has anyone updated their ClientboundAddEntityPacket and if so can I steal your homework review the quality of your code
@echo basalt
1.21 or what
1.21
new packet changes? lesgo
yeah
let's see
?paste
doesn't look different
the public version now wants a ServerEntity, Entity and uh something else
just look at the wiki 💀
or you can just call the constructor with 5 billion params
weren't you using the now private version with RegistryFriendlyByteBuf?
huh
nah
Or you can use public ClientboundAddEntityPacket(Entity var0, int var1, BlockPos var2) {
huh
Also, is there an entity tag for replaceables (like item frames)?
did I not steal your code for this? It's been a minute
If you have the bytebuf you could just use the stream codec
hm
Otherwise I'd just pass the same exact params to the constructor with all the args
because it's the most basic primitive one
(entityId, uuid, x, y, z, pitch, bodyYaw, entityType, extraData, initialSpeed, headYaw)
wacky ass packet
yeah I guess
What is the extraData even for
probably stuff like wolf color
lovely
I should be able to just derive all of this data from a valid living entity right, doesn't sound like that would be a problem
I believe it was "1" for certain entity types
Yeah
Ah it was probably the subtype back in the day?
no clue why the var0 var1 but you might just be able to pass the entity on both
I don't think ServerEntity extends entity
ah yes now I remember this
please click reformat
yes
What would be the best way to get how much damage a player would do (on average, for example without a crit) with an itemstack?
Uhh, math
you can't

math won't help, minecraft has a ton of variables you can't consistently account for
does it now
Okay cause I have a method using NMS to calculate it, but I was wondering if there was a better solution without nms
It is not exact, but its okay
Yes presumably the game knows how much damage you do when you do damage
yes
when you do damage
but it doesn't know how much damage an item will do ahead of time
there's no abstract true value for how much damage an itemstack will do
Yeah but that logic is there, so I was wondering if there was api to access it
Yea thats why I meant "getAproximateDamage"
or somethin
Whatever, ill just stick with my nms for that
the damage depends on whether you crit, whether you are on swing cooldown, and what you are hitting, what effects it is under and what armor it is wearing, plus what effects the player is under, before accounting for any plugin weirdness
Just the NMS getDamageBounus method was removed in 1.21, so I need to figure out a replacement
Tis a very large method
if you just want an inaccurate amount I am pretty sure items literally have stats you can expose
they are meaningless is many scenarios but they are there
and it doesn't account for enchantments because it can't
The calculations are all in net.minecraft.world.entity.player.Player#attack
I remember doing this kind of simulation stuff
if you have bane of arthropods 10000 and hit a zombie it won't do jack shit
but you will send a spider to the shadow realm
that's why I just made my own damage system
This is the method I am using now. Been using it for many versions, it is probably inaccurate now
yo magma I'm doing a pro gamer move btw
It did a resonable job in the past
you know how geyser shits the bed with models?
do I?
Ah right getDamageBonus would have been changed
Well
Since enchantments are datadriven now
I mean in what sense
It doesn't like modelengine 4 because display entities
So everyone uses meg3 because armor stands
🤡
Geyser shit hits the bed sounds kinda interesting
If only..
Anyways I'm making a plugin that fixes that
Clearly this means Java is better
Ya... Do you know what it was replaced with off the top of your head?
Hooks into all modelengine-like plugins
Ignore the fact that bedrock has actual custom entities
I just send them armorstand packets
Is there a similar helper class to get a value easy peasie?
That lags the client a bunch though
Or we can just use native stuff with all the fancy interpolation
We'll find out once buildtools is done
Ew model engine
meanwhile I'm out here making a plugin that will automerge, autoconvert and autodistribute java and bedrock edition rsps
I'm having fun 
did that change or something
You can have multiple server packs now
but does it work for bedrock and java at the same time
uh where is the announcement that that became a feature
I don't even see that in the changelogs for the wiki page
that that became a feature is better than that becoming a deletion.
Does anyone here speak Spanish so you can help me create a plugin?
that’s why it’s better than that
a little bit
md?
basicaly for bedrock, you just run
sudo rm plugins/geyser-velocity.jar
and that will fix it
Client can now accept multiple server resource packs.
My bad it was 1.20.3
all programmers look alike, except for me, since I'm the main character
when I look it up online the only thing I can find is people bemoaning how that's not possible
not saying I don't believe you just saying it's hard to see if it's a global change or just java
it's something in the java protocol
Seems to be EnchantmentManager.modifyDamage
doesn't really change that because because I don't trust mojang to merge them correctly because I want to automatically detect collisions anyway to give proper warnings, plus merging them isn't that bad, converting is
I mean they merge just as if you had multiple resource packs on your client, that's all it does really
you send multiple resource packs and.. it adds them
then it wouldn't work for my purposes
in your resource pack list
I think
actually I'm not 100% sure, if two rsps have different custom sword models with non-colliding IDs does mc handle that correctly?
that's the main thing I want to make sure I'm handling
yes
that's cool, is it in bedrock as well?
Thank you So much 🙂
No idea about bedrock
Their server content system is entirely different (and jank AF last I checked)
Make a FurnaceRecipe and then bukkit.addRecipe
i had that but for a custom item
you put a custewm item in out you get also custom
RecipeChoice.exactChoice for the input
tho idk if that works for furnace recipes
When do we get a recipe choice that takes a Predicate<ItemStack>
https://i.imgur.com/x4UEnHs.png Anyone know a fix to this error?
My server is not offline btw. and my bungeecord is configured correctly i believe https://i.imgur.com/IwonkMx.png
They are data driven now
fun
particles are broken, enchantments are broken, potion effects are broken
it's joever
oh entity types are also broken
choice
events are broken
sounds like this update is going to cause a rift
:)
well... I'm going to have to abstract a lot away from bukkit/spigot/mc I guess
Skill issue
am I crazy? did 1.20.6 already have all these changes and I just didn't notice?
awesome, seems like 1.21 spigot build got the fix for spawneggs damage I reported 😮
1.20.6 was the giant update
.21 is rather small beyond enchantments and attribute modifiers
man I basically entirely ignored it
so does that mean a huge amount of pre-1.20.6 plugins would fail to load on 1.20.6 at this stage?
I hope so. clean out the trash
my code is trash, what do I have to clean?
dies in 1.20.4
lol
Looking for an experienced dev who can teach me development. Message me for more info
?services
If you wish to request or offer development/art/building/administration services, please do so at https://www.spigotmc.org/forums/services-recruitment-v2.54/
If they only use the api, no
imagine waiting on dependencies to update to 1.21 💀
tempted to just do what the api does myself so I don't have to rely on them updating in the future
What's the best way to connect a container to a block?
How to change player's skin using plugin
I'm used to creating a storage entity on bedrock, but there has to be a better method, right?
Use block pdc to save ItemStack array
?morepdc
You can create custom persistent data types on your own, or use one of the many libraries available which have implemented those which match your needs. Learn about more persistent data types here: https://www.spigotmc.org/threads/more-persistent-data-types-collections-maps-and-arrays-for-pdc.520677/
thanks
?blockpdc
Learn about CustomBlockData here:
https://www.spigotmc.org/threads/custom-block-data-persistentdatacontainer-for-blocks.512422/
I used something like
Location blockLocation = block.getLocation()
ItemStack[] items = new CustomBlockData(block,plugin).get(new Namespacedkey(plugin,"items"), DataType.ITEM_STACK_ARRAY)
Inventory inv = Bukkit.createInventory(null,27,"title");
for(ItemStack item : items){
if(item != null){
inv.addItem(item)
}
}
Hypixel has this thing for 1.20.5+ where going to new servers has a nether background, in what packet can you trigger this background of the loading screen?
guessing that's a resource pack
There is no resource pack enabled
and I mean trigger the nether screen not change it btw
oops
go through a nether portal lol
yeah, I mean even trigger when not going to the nether
sorry didnt make it clear enough
This isn’t a resource pack. It’s just vanilla Minecraft
Added in 1.20.5
I know im trying to find a way to trigger it even when not going to the nether, like going to another server
I’m not sure if you can. It’s something that the client does when switching between worlds.
You might find something in those packets, or it might possibly be triggered when using a nether portal specifically.
Just have to find the right packet events for that and see if any new fields have been added for the background.
?mappings
Compare different mappings with this website: https://mappings.cephx.dev
Then how come hypixel did it lol
If you use 1.20.5+ then you’ll get that background.
they sure didn't
Bro try 1.20.1-1.20.4 and tell us if its a nether portal 💀
In 1.20.5+ they changed the background of the loading screen depending on the type of world you are entering, and I always want it to be nether
the proxys respawn packet has to have the correct dimension
It uses the respawn packet?!?!
I see
Well that is how cross dimension teleportation happens lol
This might be a dumb question, but is there a way to make the game wait a tick before handling an event? Right clicking sometimes places 2/3 blocks at a time because there is no delay.
https://i.imgur.com/x4UEnHs.png Anyone know a fix to this error?
My server is not offline btw. and my bungeecord is configured correctly i believe https://i.imgur.com/IwonkMx.png
Do you checked in your event which hand got used for right click?
Because interact event should fire twice because of 2 hands when you click
You mean this?
No, check the hand as well
at the top if the event check if getHand is not "HAND" if so return
"Represents an event that is called when a player interacts with an object or air, potentially fired once for each hand. The hand can be determined using getHand()."
Since when was that a thing?
declaration: package: org.bukkit.event.player, class: PlayerInteractEvent
Since you have a offhand?#
oh right that makes sense
then make a PR?
I mean I'll probably swing around to it when I update the full inventory API otherwise
but it could be a while for that
wdym
?contribute
You can find information about contributing to Spigot at the following links:
https://www.spigotmc.org/wiki/cla/
https://www.spigotmc.org/wiki/guide-contributing-to-spigot/
https://hub.spigotmc.org/stash/projects/SPIGOT/repos/craftbukkit/browse/README.md
https://hub.spigotmc.org/stash/projects/SPIGOT/repos/craftbukkit/browse/CONTRIBUTING.md
stands for Perfect Replica, which means you have to do everything yourself without an examp;e then try to force it into the existing code
kekw
oh, thank you
no it does not PR stands for pull request
yes it does
Smh imagine being able to do your NMS updates already
then I might have messed it up all this time ☠️
you at cabernetmc use diff terms
did you actually thinkt hat 💀
I'm already finished its just copying and pasting a directory ain't that deep💀
Apparently that didn't fix it.
@EventHandler
public void onPlayerInteract(PlayerInteractEvent event) {
if (event.getAction() == Action.RIGHT_CLICK_BLOCK && event.getHand() == EquipmentSlot.HAND) {
if (event.hasItem()) {
// Item interactions / Block placement
ItemStack heldItem = event.getItem();
// Block behavior
if (heldItem == null) return;
if (heldItem.getType() == Material.STICK) {
Block targetBlock = checkCanPlaceBlock(event);
if (targetBlock == null) return;
targetBlock.setType(Material.NOTE_BLOCK);
}
}
}
}
@Nullable
public Block checkCanPlaceBlock(PlayerInteractEvent event) {
Block targetBlock = event.getClickedBlock().getRelative(event.getBlockFace());
if (Tag.REPLACEABLE.isTagged(targetBlock.getType()) && targetBlock.getWorld().getNearbyEntities(targetBlock.getLocation(), 0.5, 0.5, 0.5).isEmpty()) {
return targetBlock;
}
return null;
}
Oh fun... Mojang made the enchantment class a record 💀 can't extend from it now 💀
kekw patrick remapper 💪
coll, how would you quick-fix that? lol
Patrick remapper is janky
sinner
you don't need to they're literally data driven now
extending it would be stupid
hm?
How to change player's skin using plugin?
I don't think the patrick remapper task has an output configuration
I need a tutorial
enchantments are data driven there is absolutely 0 reason to extend enchantment
custom enchants
I wonder if I can make a paper fork that undoes all of paper changes to get a spigot devbundle
kek
yeah you bother jason for a few hours and then you have new enchantments
idk haven't looked at internals
ah
Who developed userdev, I'll pay them $3.50 to make a spigot version
Normally a datapack, yes
you could use a datapack, could probably do it with NMS too though
its probabl also possible with datapacks now yeah
as long as you unfreeze the registry and ensure no one is on
kek
perfect thing to do onEnable or onLoad
bruh datapacks don't play nicely with spigot (afaik)
They play fine
they server wide though
I find datapacks plus spigot stupidly annoying
instead of per world
so just use NMS
unless I'm missing something
i find datapacks to be stupidly annoying
Maybe if we get that registry api
that paper api?
getting merged in 1.21
probably need to add a step to the plugin loader
lol
machine maker in shambles rn
src/main/resources/data when
When someone writes the PR for it
won't be me
eyo???
damn rip lynx
What is with the paper slander these days 
MM is churning through the patches like crazy 
but hes afk rn

spooky
How many paper patches end up upstream smh my head
people just don't care for the spigot CLA ¯_(ツ)_/¯
?nms
no nms
But half of you have already signed it smh
when using custom loottables they're a blessing
It's for me
smh my head
Yea, half lol. That aint the team and certainly not some of our largest contributors
and I mean, mostly to look at PRs
not signing anything here
There is no way to change player's skin without nms
smh my head
to sob at whatever the fuck commodore changes come in
I mean, leaf has a couple giant ones
I still don't get why spigot isn't on GH these days 
smh my head
stash is so depressing
GH?
github
github
oh my bad
fuck
github

gitpub 🍺
also like, what do you think the probability is that md_5 cares for someone else with approval/push perms to master?
usurp and push to master, no pull request needed
there's a fly in my room asdkjasdjahsd
because like, spigot is chilling at 129 PRs with 0 paper contributors
How many open PRs does paper have
yes
Yea 208 rn
Does Bukkit.getOfflinePlayer(name).getUniqueId() always return the correct uuid?
yea if it exists
actual answer is.. not always
yeah i lied
getOfflinePlayer() seems to only return an offline player if they've ever joined your server
^
55 merged PRs in the last month. vs 17 on spigot. But w/e enough me ranting. Love you guys 
amazon moment
I had an amazon parcel with 5 different shipping labels slapped ontop of eachother all inside a DPD parcel
I guess someone couldn't agree where it should go lol

7smile has an open pr
hes contributed to paper recently
did paper fix that thing we last dm'd about
yes yes (thank god
)
smh
Epic are you working with the enemy now? smh
Nah, don't worry
👀
(its a setup for carabenetMC (or whatever it is called))
How can I make the custom block placement more natural?
Add a delay
How?

?cooldowns
no i found something i shouldnt've found on lynxs github
(it was my anime list)
kek?
https://i.imgur.com/x4UEnHs.png Anyone know a fix to this error?
My server is not offline btw. and my bungeecord is configured correctly i believe https://i.imgur.com/IwonkMx.png
????
Pls does anyone know the fix
good to know they're called cooldowns (I've been searching with the keyword "delay" and it didn't give any great results)
I mean, something is exposing a version of mysql connector with a known CVE
And how to fix it?
Eh, you could exclude that dependency if you don't need it
I just want to install fucking nms
if you don#t need it, don't worry about mysql
if you do, maybe shade your own mysql connector
Okay, I would but IT DOESN'T WORK
What's wrong
It has mojang authlib
but doesn't have craftbukkit
is there something to edit for 1.21 to allow 1.20.6 plugins?(its the chunky plugin to pregenerate)
?paste
What's the default block placing cooldown?
Ok, but I still don't have CraftPlayer. Here is my pom https://paste.md-5.net/ivigisekep.xml
whats the most reliable way to see the server's mc version? Right now I am making a switch on Bukkit.getVersion but feels a bit clucnky
Yeah, I did this
.
I don't think so
its ServerPlayer
there is no serverplayer class
ServerPlayer is nms
will it work if i do entity.getPlayer?
i mean its a player like entity
why shouldnt it
hello, im updating a 1.8.8 plugin to 1.20.1, it for some reason just does not know what "minecraft" is.... help please?
https://ctrlv.cz/UcJB
?nms
custom data is basically a dumping ground for non-official data
so like before you could have {literallyanyNBT:1b,Count:1,othervaliddata:{}}
Yes, and I'm trying to get that.
From code grab it from the class metadata or manifest entry
The compiler puts the implementation into the class file info
it would then be custom_data={literallyanyNBT:1b},count=1 I think
Is it not part of the item meta?
uhh
okay and now pretend like I dont know what means
Easiest way to show you is go look at spigots source code for when version is ran and how it gives you api implementation version and you will see
is it possible to put a durability bar on items that naturally dont have durability
yes, since 1.20.6
okay ill see if I can find that
with what
if (stackMeta instanceof Damageable) {
((Damageable)stackMeta).setMaxDamage(maxDamage);
((Damageable)stackMeta).setDamage(currentDamage);
}```
or prettier
but thats the idea
meta.getPersistentDataContainer().set(new NamespacedKey("pixelatedsorcery", "item_id"), PersistentDataType.STRING, "test_block");
Is this the way to add custom components? Or am I overcomplicating things?
again with the casting to TranslatableContents? #help-development message JukeboxSong supports any type of component, it's not safe to just always cast to TranslatableContents https://hub.spigotmc.org/stash/projects/SPIGOT/repos/craftbukkit/browse/src/main/java/org/bukkit/craftbukkit/CraftJukeboxSong.java?at=a4c2ee70db50ade62436c7eaf6ec1f5376dce192#63
oh it just deos Bukkit.getVersion, and CraftServer gets it from the DedicatedServer
so I guess Bukkit.getVersion is good enough for me
Well the implementation should pull it from the class info
Because if you look in the pom you can see where the compiler puts that in
?paste
So you should be able to do something like Bukkit.class.getImplementation or something like that
Cant remember exactly lol
Hello. Can you please help me? My i value is not resetting
Guilty code: https://paste.md-5.net/vubeyikime.cs
How it is called:
CustomGui customGui = cachedGuis.get(id);
customGui.generateInventory();
// Inject page system consumers
GuiDetails guiDetails = injectPageSystemConsumers(customGui);
customGui.setGuiDetails(guiDetails);
player.openInventory(customGui.getInventory());
// Update default page systems
// to allow them to appear in the inventory
customGui.getPageSystemMap().values().forEach(pageSystem -> {
instance
.getServer()
.getScheduler()
.runTask(
instance,
pageSystem::updateInventory
);
});
Output sample:
https://paste.md-5.net/fujecucipu.css
(It cycles 3 times)
oh maybe its this Bukkit.getServer().getClass().getPackage().getName();
So the getVersion will return server version and the way i am talking about returns api version
There you go similar to this
oh, well I just care about the version of minecraft that the server is running on
sice I wanna use different items based on version
like items in 1.21 dont exist in 1.19 for example
so my config will die
Well i only recommended the way i was saying because its guaranteed to not have some plugin change it as it cant
And it exists on the official versions
yeah I will try whati showed, should be good
Bukkit.getServer().getBukkitVersion(); also exists 
what does that return
oh thats funny
Bukkit.getServer().getClass().getPackage().getName() returns org.bukkit.craftbukkit.v1_20_R4
but im 100% in a 1.20.6 server
because that number is more or less magic
yes thats what R4 is
I'd strongly recommend to not use that method
okay
mostly because it'll break on paper 
oh right
okay
so then Bukkit.getVersion it is xD
like im not making a paper pplugin but I dont wanna break paper builds on purpose xD
Yee
Can you please give a look? I'm going crazy 🤣 😅
¯_(ツ)_/¯
Build your own 3D A* pathfinder then lol
A* for effort
Its not magic lol
'if it's a hostile'
well ye a cow is not hostile
cows are not hostile
it is
aggressive mooing intensifies
You'll need a 3D A* or some other 3d path finder
'is zombie hostile' bruh
A* is one of the easier ones to learn I'd say
how do you get the new ServerEntity out of an entity in NMS
huiwfghuiwf
ITS CONFUSING
use Mojang Mappings?
ye
apparently ClientboundAddEntityPacket now requires (Entity var0, ServerEntity var1) instead of before was just (Entity var0)
and I can't get it from anywhere
have you tried passing null and just see what happens?
its used in the contructor
its not saved as a variable
the second arg looks to be the player you are sending to
can't tell no IDE open at mo
doesn't really sound like it, it takes X, Y, Z from it
um
How to get now EnumPlayerInfoAction?
not sure what version you are using but npc.getAddEntityPacket()
takes no args
that npc is a ServerPlayer
I'm not
what event do npcs call for move?
Is there a better block to use for custom blocks than note blocks?
If it’s packet based it wont call an event
oh no, latest Eclipse fails to install due to a linkage error (Caused by: java.lang.UnsatisfiedLinkError: Could not load SWT library. Reasons: )
wth Eclipse my baby
well that sucks
I bet it doesn't like Adoptium or some shit
As a former Eclipse user, the solution is use IntelliJ (unless you're working on a potato)
god no, Ij will not do what I want
What is it you want
Not intellij 
multiple projects in one workspace
just open the folder above it /s
I have a half dozen Eclipse installs on this PC> just the latest fails to install 😦
You can import multiple maven/gradle projects as modules, but I'll give you Eclipse is cleaner about it
Not changing to Ij
bruh so i need to add support for each npc plugin?
can someone confirm that citizens plugin doesnt call move event?
What was Enchantment.ARROW_DAMAGE replaced with in 1.21?
K thats what I thought thanks
What is pikamug doing here o_o
I know that eclipse had a big scary warning message that you had to install a plugin otherwise your install would be f-ed up if you updated to eclipse-2024-06
Since eclipse is now using Java 21
I had to go back a version to get Eclipse to install
somethign def up with latest release
I managed to upgrade to it well enough - I'm not sure if I installed that requested plugin; probably did though
Ah no I didn't as I already was using the Java 22 variant of that plugin for a reason that eludes me
yeah it failed with an outdated swt dll on latest. Even though IT provided the dll
going back one version (3 months) it installs fine
2024-03
My Eclipse update actually also failed
I'm installing fresh
I had to reinstall the latest version using the Eclipse Installer and copy over the files manually
Yep
had to go back one version to even install on java 21
I actually have 5 different installs of Eclipse, all different versions for differing reasons
I go years without updating Eclipse.
I actually downloaded eclipse 2022-06 today just to verify I wasn't going insane, only to find out that a feature was removed but apparently noone is aware of that and the removal is poorly communicated
Like the fact that the developers didn't respond with a "uh, that feature doesn't exist, wdym?" for over 9 months is terrible.
But I know that other projects have similar issues (IJ having removed the same feature [remote repository indexing] - although I don't quite understand to which extend IJ removed it)
I just wanted to test it out as I'm writing a maven repository (NIH syndrome strikes yet again) - while I was aware that it existed at some point in time, I never knew how well it worked out
do someone have an answer to this ? (Rotate a display block around a axis with the spigot rotation maxtrix sys ?)
Quaternion diff lmao
I'll try an update to latest if it ever finishes installing
slow mirrors its saying
Yeah that is what I've been experiencing for the past few hours too
I guess they are not looking for more donations
My eclipse won't auto-update as it failed to properly update mylyn ages ago so I always have to manually exclude mylyn from the update process - so there is always some kind of manual intervention that needs to occur
didn;t that get removed long ago?
My eclipse install is two or three years old now
or combined into somethign else
yeah I have some of those
my last one keeps asking if it can delete a plugin cache as its no longer used. But my other install uses it
plugin cache - that isn't something I've heard of actually
Ah that is the cache for the remote repository indices (i.e. the nexus-maven-repository-index.gz et al files) and is actually that feature I complained about being removed
Just usr a packet listener
yeah older Eclipse craps its pants if its cleared
doesn't surprise me - the maven central index is like 15 GiB decompressed
Yo md I sent an email to spigot last night
Did y'all get it?
Woke up to a bunch of roundcube emails saying I had 6 unsent emails or sumn
I didn't
I don't think so
I remember seeing a rule regarding plugins must be functional out of the box with no setup
So memory + wonky terms = confusion
Does the Generic Attack damage attribute modifier on itemstacks include damage from enchantments?
The intention is obviously DRM and not configuring functional things
Perhaps being slightly more explicit stating DRM only might clear up
Hello,
does anybody know if there are other sources or methods other than wiki.vg to see the new packets added in the new versions like 1.21?
It's pretty clear but feel free to propose new wording
I use this https://mappings.cephx.dev/
Just two tabs and compare
okay thanks a lot, i appreciate it
Anyone know?
It does not
kk Thanks
Yeah updated to latest Eclipse 2024-06 and it fails to startup. Same error as tryign to install it. swt link error
I'll stick with 2024-03
Swt?
Does it need javafx?
libswt seems to be a Eclipse dll
2024-03 works fine (4.31) but 2024-06 fails to install or start after an update (4.32)
Even on a clean install? Weird
yep, installer errors out as it starts with the linking error
What os?
Win 7 😉
Need to add the libraries to the path
I thought that too, but it seems not
it finds the dll fine, but fails to find an entry point
which is odd as its a dll provided by the Eclipse installer
installs to the users .swt folder
Is the dll compiled with higher lang version?
possibly but I have no indications of that
however 2024-6 supports java 22 so its possible
I'm running java 21
Only 2 ways to solve that. Install the runtimes or use a dll compiled on lower version
Not sure if win 7 can install the runtimes
I'll stick with 2024-03 until I have to update
it actually seesm to be the same swt dll file in both versions
swt-win32-4965r11.dll
works on 4.31 but not on 4.32
Anyone here familiar with vineflower? When decompiling I get some rather yucky variable names
if (this.uncategorizedStackTrace != null && this.uncategorizedStackTrace.length > 0) {
$$0.append("-- Head --\n");
$$0.append("Thread: ").append(Thread.currentThread().getName()).append("\n");
$$0.append("Stacktrace:\n");
for (StackTraceElement $$1 : this.uncategorizedStackTrace) {
$$0.append("\t").append("at ").append($$1);
$$0.append("\n");
}
for example
StringWriter $$0 = null;
PrintWriter $$1 = null;
Throwable $$2 = this.exception;
I kinda just want to switch them to var versus $$
but It doesn't seem like their is a configuration option for that
only thing i see in their docs is maybe --use-lvt-names=0, by default it's 1 and tries to do something to interpret the type to fix the naming of vars but looks like that might be failing
entirely a guess, though
it might be an issue with my remapping it looks like in the remapped jar I have names like $$0
o
what are you trying to remap/decompile?
its definitely the remapper ig I'll try and tweak that
the server jar
https://github.com/PaperMC/mache just use this. clone it, run gradle setup and you've got it
with way better lvt names than vineflower can give you
also includes decompile fixes so you can actually compile and run the vanilla server
Ik of mache, but I'm homebrewing my own shit for a hobby project atm
pretty much CabernetMC in a nutshell kekw
any ideas on if
public void WorldLoading(final Player player) {
if (WorldLoading.field_spectatorMode == null) {
Core.instance.getLogger().severe("Failed to show world loading screen to player. This server version is not compatible.");
return;
}
final PacketContainer packet = new PacketContainer(PacketType.Play.Server.GAME_STATE_CHANGE);
try {
final Object spectatorMode = WorldLoading.field_spectatorMode.get(null);
packet.getModifier().write(0, spectatorMode);
packet.getFloat().write(0, (Object)0.0f);
sendPacket(player, packet);
}
catch (final IllegalAccessException e) {
Core.instance.getLogger().severe("Failed to show world loading screen to player:");
e.printStackTrace();
}
}
is possible w/ just the api? (Just shows the loading screen)
it was my remapper looking at how fabric does it you need to actually match the $$(num) with a Pattern matcher than rename it as you please
there's
public void Credits(final Player player) {
if (Credits.field_spectatorMode == null) {
Core.instance.getLogger().severe("Failed to show credits screen to player. This server version is not compatible.");
return;
}
final PacketContainer packet = new PacketContainer(PacketType.Play.Server.GAME_STATE_CHANGE);
try {
final Object spectatorMode = Credits.field_spectatorMode.get(null);
packet.getModifier().write(0, spectatorMode);
packet.getFloat().write(0, (Object)1.0f);
sendPacket(player, packet);
}
catch (final IllegalAccessException e) {
Core.instance.getLogger().severe("Failed to show credits screen to player:");
e.printStackTrace();
}
}
as well, for the credits screen
If I set a player's scoreboard, is there anyway to "unset" it so it goes back to using whatever vanilla scoreboard is assigned to that player? Because otherwise the plugin overrides anything, even if it is not continually getting sent.
declaration: package: org.bukkit.scoreboard, interface: ScoreboardManager
You can set it back to ScoreboardManager#getMainScoreboard
However another plugin may have replaced their scoreboard already
I suppose you could store their old scoreboard and then restore it later
wait thats not taylor swift thats a model 1857 12 pounder napoleon cannon
wow, you're right...that's not taylor swift, that's a model 1857 12 pounder napoleon cannon! good eye
I mean
I’ve never seen Taylor Swift and a model 1857 12 pounder napoleon cannon together
I have a sneaking suspicion that, that isn't taylor swift I think it might be a model 1857 12 pounder napoleon cannon
fucking england moment
oi m8 u got your chattin on discord license
oi m8 you got your comput'ah license
oi m8, you got your breathing license
i will break your legs
oi m8 you got your physical violence license
smh
java -jar BuildTools.jar --rev 1.21
Make sure you have Java 21 JDK installed.
Also, keep in mind that 1.21 only just released recently.
Spigot will be updated frequently throughout the week to address any outstanding bugs with the release. So you may need to run BuildTools again in the near future.
I've been making plugins for a bit and I want to start trying to make plugins other people so I can get money to keep running my server, what are some good sites/ways to find people looking for plugins to be made?
Also what are some sites for selling plugins?
I know spigot you can but I don't meet the requirements yet
?services
If you wish to request or offer development/art/building/administration services, please do so at https://www.spigotmc.org/forums/services-recruitment-v2.54/
You may get banned linking other commercial sites here
also do you have to be 18 or older to sell plugins?
ah
I mean, if you can sell lemonade, why can't you sell plugins
makes sense lol
Is there some good inventory api libraries?
Something like SmartInvs but more upto date?
mfw germany
.-.
A lot of places you have to be 13+
However for selling it's likely going to be 18+ as in most countries you can not legally enter into a contract under 18.
I’ve been wanting to learn some Minecraft development, is there anyone that teaches? Dm me
best way is to google
make sure you have some understanding of java then its straight forward searches
"how do i create a custom item in spigot"
"spigot custom command tutorial"
I don’t know anything about Java tho
?learnjava
For Beginners:
Codecademy - Learn Java: Interactive Java programming course from basics to more advanced concepts. Perfect for absolute beginners.
https://www.codecademy.com/learn/learn-java
JetBrains Academy - Java Developer Track: Learn by doing with projects and challenges. It covers Java fundamentals to advanced topics.
https://www.jetbrains.com/academy/
Udemy - Java Programming Masterclass for Software Developers: Updated courses that cover Java 8 to Java 17 features. Suitable for those who prefer structured learning.
https://www.udemy.com/course/java-the-complete-java-developer-course/
For Intermediate to Advanced Learners:
Oracle Java Tutorials: The official guides by Oracle for Java programming—great for understanding the depth of Java.
https://docs.oracle.com/javase/tutorial/
Baeldung - Learn Java and Spring: Focus on Spring Framework and modern Java technologies. Best for intermediate learners aiming to expand their knowledge.
https://www.baeldung.com/
Practice and Hands-on Learning:
Exercism - Java Track: Solve exercises and get feedback from mentors. Great for practicing coding skills.
https://exercism.io/tracks/java
LeetCode: Practice your coding skills and prepare for technical interviews with Java.
https://leetcode.com/
Free Resources and Documentation:
Java Programming and Documentation: A comprehensive collection of Java programming guides, tutorials, and API documentation.
https://docs.oracle.com/en/java/
Community and Support:
Stack Overflow: A vast community of developers. Great for getting help with specific problems or understanding concepts.
https://stackoverflow.com/questions/tagged/java
r/learnjava on Reddit: Join the community of Java learners and get advice, share resources, and discuss projects.
https://www.reddit.com/r/learnjava/
Remember: Learning to program takes practice and patience. Don't hesitate to experiment with code and participate in community discussions. Happy coding! 🎉
Thank you
How do I check if a material is a stained glass pane?
Regardless of it's color/data that is
i think material has material data
you can get the material and check for the stained glass material data
or make a set of all stainedglass materials and check if your material is in the set
or just see if teh name ends with...
yeah thats another good way
yes, my dumb ass prefers the first one
I think the second one means you cant put it an Employee
I do the first too, but I prefer the second
except if you put in a derived version
good morning. I need your help. My hosting server has been allocated 10 GB of RAM. After restarting the server, only about 1 GB is used, but gradually the amount of RAM used grows, and when 3-5 players are online, the server crashes due to insufficient RAM. Somebody tell me that it is necessary to optimize the server, but I absolutely do not know how to do it. Please help me
any crash log?
Plugins (73): ACubelets, ajLeaderboards, AntiRelog, AtributeHeadsPlace*, Automessage*, BankPlus, BattlePass, BeeStar, BKCommonLib, BottledExp, BSpawner, ChatEx, Chunky, Citizens, ClearLag, CMI, CMIEInjector*, CMILib, CommandTimer, ConsoleSpamFix, CraftEnhance, DecentHolograms, DeluxeMenus, EasyPayments, FunUtillity, GooDTimEBosses, GooDTimEMessages, HexAirDrop, HideAchievements*, HideStream*, HolographicDisplays, HolyBoers, HyperReseller, HyperSpeedTasks, IRandomTeleport*, ItemEdit, KOTH, LagMonitor*, LightCheck, LiteBans, LuckPerms, MineResetLite, MiningBlock, MoneyFromMobs, MultiEconomy*, Multiverse-Core, MyCommand, NBTAPI, Orebfuscator, PlaceholderAPI, PlayerPoints, PlugManX (PlugMan), PrimeAlchemist, ProtectionStones, ProtocolLib, PSAddon, PSUApi*, Quests, RE4TNT, RocketPlaceholders, SCore, SimpleAutoRestart, SKLibrary, spark, TAB, UltimateServerProtector, Vault, ViaBackwards, ViaVersion, Vulcan, WorldEdit, WorldGuard, zAuctionHouseV3
out of memory
strip your plugins and start with a few at a time. You have a leak
half your plugins
get rid of Plugman. Should never be on a live server
could also be death by a 1000 cuts, i.e. multiple plugins causing leaks
but yeah, if memory just keeps going up with 3-5 players its a memory leak
How about when adding entry 🤔
Both should function the same right?
Or the second one cannot add new entry 🤔 to the pass by reference list
Or the second method is just pass by values?
neither is pass by value
the difference is just an inheritance thing
but im convinced noone knows the actual difference
first one means you cannot pass an ArrayList<FancyEmployee> where FancyEmployee extends Employee
Well yes I do know this
But how about when you try to add new entry to the list
Let say we have
FancyEmployee and BadEmployee are the childs of Employee
So we cannot add FancyEmployee to the list of the BadEmployee right ?
no because thats not a subtype of bad employee
But it is all subclass of Employee
So I believed we cannot add new entry to the second method’s parameter list
if its a List<Employee> you can
why wouldnt you
it just says its a list of employee or subtypes of employee
so you can pass an ArrayList<FancyEmployee>, ArrayList<Employee> and ArrayList<BadEmployee>
if you pass ArrayList<FancyEmployee> => You cannot add BadEmployee right ?
in the first one it gotta be an ArrayList<EMployee> (which ofc doesnt mean you cant do .add(BadEmployee))
well does BadEmployee extend FancyEmployee?
if so you still can
no ofc
no ofc, does that mean ofc not or ofc it does?
ofc not
then you cant
im thinking
iirc in ArrayList<? extends Employee> you can still add BadEmployee
wait no you cant
with ? super Employee you can
hmm and 2 methods cannot exist at the same time
what are you even trying to do
so to conclude you cannot add entry if the parameter has ? extends
? extends means reading, ? super means writing
understanding more about java 😄
covariant/ contravariant thing
well
but you cannot put the class extend Employee into the function anymore
If you really want, you can do proxy FancyEmployee.class using BadEmployee object.
but yes you can add
The whole point of those janky ? extends Whatever in collections is to put them on other collections and ensure wonky type restrictions
Think of a Map<Class<? extends Joe>, List<? extends Joe>>
If you encapsulate things properly you can end up with strict type constraints that prevent you from inserting misc Joe subtypes in the wrong place
well that is not the point of this question
in reality this is a question that I got from my friend's test
1> 2 methods have the same properties
2> first method cannot add entry to the list while the second one can
3> second method cannot add entry to the list while the first one can
4> all entry of methods 2 can only include subclass of Employee and not include Employee
which statements are correct?
for me it is 3
both can add, or atleast the first one
but on the second one, it must be of the exact type Employee iirc
sadly nope
or is it the other way around, that it only allows adding a subtype?
ah wait that type means it could be a List of whatever subtype of Animal so you cannot add an Animal because the list might actually be of type Dog, or Cat, or whatever
nope
so i believe thats the reason you cannot add
ye cuz you dont know the exact type
yes
with List<? super Animal> you can however
but i havent touched that stuff enough
well this just revert everything :l
you can only add parents or it self
and you can no longer cast childs to that function
i mean the place that constructed the list is still responsable for knowing the exact type
What about this?
public static <T extends Animal> void func(ArrayList<T> list) { /* */ }
now thats a list of a single type
just fill in T
bound is on the T, not the list anymore now
glad kotlin has T : Animal for generic bounds and in, out for collections
Is this how I'm supposed to cast a pdc value to a string?
nevermind there's a toString method
I'm confused
isnt it already a string?
Does it just give me this warning because java can't tell if it is guaranteed to return a string?
