#help-development
1 messages · Page 2001 of 1
Yeah
I don’t think I’ve ever used that
Well here it’s just a Set<String> it seems like
I always use the vault API to add perms
Contains exists in every Collection
is there a way of doing this so that it doesnt kill tps as badly https://paste.md-5.net/qidozocefu.cs
lags like crazy
wdym?
Ignore that, it was wrong
If you are using sql you can strict whicj results to take out. For example "select * perms ordered by weight"
also for whatever reason none of the falling blocks it spawns are actually at the block's position they are like halfway in another block
@solar sable make a hash set of all the words you don’t want, then iterate through all the words in the message and check if the set contains them
.contains exists?
Yes
Add 0.5 to xyz
Contains exists on every implementation of a Collection
A blocks location is the lower corner
what about like getBlockXYZ
Lower corner
Yes
@sterile token every one of those has to have contains
That’ll be the middle
and also im getting like 2 tps from this is there a better way
But why checking .contains() and iterating?
You don’t iterate through the set @sterile token
You iterate through the words in the message
2tps from using the physics event?
And check them against the set
I didn’t think it was that bad
lol
My bad I thought you Where saying on the set
okay then how do i make it into multiple words?
What is the recommended way to get the world time, the API docs are kinda confusing to me, is it World#getGameTime() since World#getTime() sends only hours?
String::split in principle
Idk I have a 1.18 server with 16gb of ram and still saying that shit
Ram has nothing to do with that
It’s the CPU
Lol really?
RAM doesn’t make your server run faster, it gives it more memory to store things in
im getting like 6 tps without doing anything, but its not my pc being laggy and my games got 400 fps (hosting locally rn while testing)
Well clearly it's doing something
ohhhhhhhhh
Its has doble xeon. 16 cores each one. In total 32 cores and 64 threads. Im still not happy
lol
Using display name in death messages
i just turn around to a giant hole
Minecraft only uses 1 core
It doesn’t matter how many cores you have
Hmn
Minecraft is single threaded for almost everything
Only chat and networking are on separate threads
Chunk gen
Client or server?
Yeah fair
Server and client
I have read that spigot was multi threaded
World.getTime should send a value from 0 to 24000
Spigot allows you to use multiple threads for networking and file IO but you can’t do anything to the minecraft server on another thread
Want what time of day it is use getTime. Want how long it's been since the world was created use getGameTime
Spigot is not a rewrite of the minecraft server
Which is what would need to happen for it to be multithreaded
so ummm blockphysicsevent is for whatever reason updating the entire world, thats why its lagging so bad
but idk why
And how it managed Runnable? Arent them on another Thread uhmn?
But Runnable arent from spigot?
Nope
That’s just a subclass of runnable
So either confused
Well spigot has a queue of runnables
(Not literal runnables necessarily)
But actions
And then it just runs those actions every tick
Wait java is multi physic Thread
Thank you mate
🤔
No
But Runnable are multi threaded...
Nope
😂
Is there anything that can end up cancelling a player from healing without the actual event?
cuz somehow I managed to do that -_-
Verano there are two substantial multithreading/async notations
concurrent and parallel
concurrent means two things runs seemingly at the same time, but in reality they don’t
parallel means that two things can run exactly at the same time
which is possible if you for instance have two cores
He?
In Java you can’t really decide whether something is guaranteed to run in parallel, we simply have concurrency to deal with merely
Java threads != threads?
There’s virtual threads and physical threads
Virtual threads are managed by each being given a share of the core’s time
Two virtual threads can’t actually execute at the same time
pls help
I now that each core has 2 Thread
This is a physical thread
"hi amxyar".split(" ")
@sterile token this is all more complicated than it needs to be for this explanation though: even if you run something async in spigot, if it’s async it can’t modify anything on the minecraft server
You can’t, for example, spawn a mob async
Or set a block async
Or teleport a player async
That can all only happen on the main thread
Unless you are using a certain fork
im confused, then what do i do
No?
You’re supposed to hit the database async
I git async and have tps problems
Otherwise your TPS would drop and your whole server would just stop until the database finishes and responds
Async has nothing to do with your TPS dropping
How you know?
i know im doing it wrong but still how do i do this
if (e.getMessage().toLowerCase(Locale.ROOT).contains("bad word".split(""))) {
e.setCancelled(true);
Im not idiot I know what ima saying
And yet
You’re not listening
TPS is how many times the main thread can “tick” the server in a second
Async threads are not ticked by the main thread
Therefore they have nothing to do with TPS
Im saying that when I call async func using bukkit Runnable tps goes down
how much data are you processing after it is retrieved ?
its a curse/slurs word detector, basically a swear detector to make people not swear in the chat
Are you processing the data on the main thread or the async thread
Im processimg a json object of 20-30 node for each user from mongo
ye ik im not gonna send the word
ok fine
if (e.getMessage().toLowerCase(Locale.ROOT).contains("bitch".split(""))) {
e.setCancelled(true);
Are you processing that object on the main thread? Or the async thread?
anyways thats not my point
That seems like a job for regex
Just calling bukkit.RunTaskAsync()
More like gay-ex
idk
i just want to make it detect more than one word in just one
i just copied and paste it a lot but that seemed like a mess
😎
so anyone have the slightest clue why blockphysicsevent is updating the whole world every time it gets triggered
?
?
What’s the code
String[] messageWords = e.getMessage().toLowerCase().split(“ “);
for (String messageWord : messageWords) {
if (badWords.contains(messageWord)) {
// I’m a bad word!
}
}
?
@solar sable
Probably because your code is broken
Idk you put a ?
lmao you are trolling
Ye
Please let go back
Yes
Yes
Back on topic
Except he’s like polish or smthng and doesn’t speak English very well
Why when fetching json object with 20-30 node for each user async from mongo let tps down?
I still dont understand
its only changing certain blocks tho but smh its updating stuff way below it
I can almost guarantee you’re doing something incorrectly or TPS is going down by some marginal amount that could be attributed to anything
blockPhysicsEvent is a huge event, its does exactly what it says. so if you have a light change for example on the blocks you get an event for all those surface blocks
So you wanna show your code? The event itself isn’t doing anything it’s YOUR code that’s doing something
lol i showed it earlier, ig ill repost
And un using: Bukkit Runnable and running it with bukkit.runtaskasync()
You’d have to send us your code for us to tell you anything
and unstableblocks is stuff like air and liquids, stable blocks is stuff like bedrock and barriers and tile entities
Wait
So what’s happening
turning blocks into falling blocks
Just checking
And could you show where blocks get put into unstable blocks
To be fair I can often diagnose the problem without the code
Like what’s the problem I meant
Also why do you have a bunch of checks for the same block
I am still confused
rlly bad tps and updating blocks all over the world
¯_(ツ)_/¯
My b
its also the block below it
its not what i want it to be and its probably because I dont get it :/
I need you to tell me more than that
wdym
What are you confused about
I’ve also been doing this for 7 more years than some of the people asking those questions
why https://paste.md-5.net/jigixucota.cs is killing tps and updating all over the world when it shouldnt
"This event is a high frequency event, it may be called thousands of times per a second on a busy server. Plugins are advised to listen to the event with caution and only perform lightweight checks when using it."
like if i break a block on the surface it opens a cave like 40 blocks underground
Because BlockPhysicsEvent is called a lot more than you think it is
well whats the other alternative
BlockBreakEvent?
Creating a plugin that returns some json data from the minecraft server, so far this is the response:
{
"players": {
"max": 20,
"online": 1,
"list": [
{
"name": "ProNoob2016",
"id": "06805a42-80d0-463d-bf71-51b1e1317cd4"
}
]
},
"world": {
"seed": -5894899104137508167,
"time": 17312
},
"plugins": [
"CoreProtect",
"LuckPerms",
"Vault",
"WebExtension",
"SamiPlugin",
"Essentials",
"EssentialsSpawn",
"EssentialsChat"
],
"version": "git-Paper-232 (MC: 1.18.2)"
}
Anything i should add more?
BlockPlaceEvent
lol
couldnt i use physicsevent and check if its instanceof blockplaceevent or blockbreakevent
No
No
BlockBreak and BlockPlace are not physics events
oh
Lol
Probably not just one world, you want all the worlds
do you want me to send the whole code?
physics will also average to the root physics to limit server spam, which would give you incorrect results
idk if that can help
good point, thanks
No I want you to tell me what about the code I sent you confused you
I’ve used the physics event for add gravity to blocks before
async in a new thread on every http GET call (/api/status)
everything
and also the "badWords." cause that had a red mark
I just kept the check very simple
Iirc it was just a hashset.contains on the material
You need to make a hash set called badWords that has all the words you don’t want in it
Like we told you earlier
That’s probably accurate
I agree
?learnjava
Here are some links to get you started on learning Java:
- https://www.codecademy.com/learn/learn-java
- https://www.sololearn.com/learning/1068
- https://www.learnjavaonline.org/
- https://programmingbydoing.com/
- https://docs.oracle.com/javase/tutorial/java/index.html
The last one is the only official one, however some of those concepts assume that you already know a bit about programming.
i learned using sololearn, its not bad
could i do https://paste.md-5.net/anexucifoh.cs and then run that in those events
lol ik that list is cringe
ok lol
No
That’s the wrong direction
Set has all the methods of HashSet and is the abstract representation
So you can switch out the implementation easily at any time
Make it a TreeSet or whatever
Or an ImmutableSet
And with object you can switch it to anything
Or a synchronized set
:D
But you don’t have the methods of Set
lol this is whats left of the world after that blockphysics thing
it was just running in the background
I think I see your tps issue
It does look cool though
668k falling blocks xD
lol this would make a cool map ngl
And not spawn 680k entities
Natural spawned leaves decay if there is no log nearby
It’s a massive PITA
Oh?
not only leaf decay, you also have blockfade Called when a block fades, melts or disappears based on world conditions
Examples:
Snow melting due to being near a light source.
Ice melting due to being near a light source.
Fire burning out after time, without destroying fuel block.
Coral fading to dead coral due to lack of water
Turtle Egg bursting when a turtle hatches
nvm its still shit tps
Turtle hatches
Entire world collapses below the baby turtle
its almost as bad as minehut
didnt you just kill 700k entities?>
falling blocks
lol
i had to do /kill @e[type=falling_block] twice for them to all die
yes
sad now it doesnt work :(
¯_(ツ)_/¯
and the function is still the same as earlier
ok so it works sometimes
but not other times
you are doing less
its like random now
oh both my functions are called onBlockUpdate
lol
still didnt fix
placing works but breaking is random
what event are you listening for?
blockplace and blockbreak lol
also blockbreak updates the block broken but i can fix that easily
im just not sure why its so random
sometimes it breaks, others it doesnt
like it works on certain x and z coords but not others
ok so i think i found out why
its not updating the one above it
unless it does
lol i dont understand this
so it only updates when someone breaks a block next to the one that needs updating but when that one updates so do the ones above it
i have no clue whats happening rn
is there any way to simplify clickable TextComponents as a string?
or is it like a separate packet
despite having affectedblocks.add(block.getWorld().getBlockAt(block.getLocation().add(0, 1, 0))); it updates literally everything except it
Any idea why removing an entity leaves behind a shadow?
hey everyone,
so i have an sql table to store players info and i am stuck wanting to do the following tasks (there was way more but these i couldnt find any solution on the internet) :
- reset a certain parameter to default (for example points to 0 for all players)
- get the amount of players registred in the database (something like Array.size();)
-get the player with the most points or the top 10 etc...
if anyone knows the answer to any of these questions i will very much appreciate it.
are lists of UUIDs ConfigurationSerializable?
ok i made it update diagonally, as well as a check for breaking blocks, but it still doesnt update the one above it https://paste.md-5.net/ezoxelarez.cs
oh wait i think ik why
so its getting the block state before the loop hits it
any way to make it get the updated version of the block?
ig i could make a list of locations and then at each location get the block but itd be more tps intensive
anyone know how to find the build.gradle file when it's autogenerated in intellij?
in the project directory
so would this work https://paste.md-5.net/xuqebavuwa.cs
.
nope
that is amven
didnt change anything
Nowhere
lol
gradle and maven are separate
gradle and maven are 2 different types
maven > gradle
ye what he said
I see
Just do terminal; mvn clean install and it will build your project.
Stop
agreed
no
Or if you have gradle installed you can do ; gradle init which will make gradle files for you.

so wait
I'm following tutorial does anyone have an idea of what to do here if pom.xml is the gradle file?
I mean we all know gradle is objectively better don’t we
The home of Spigot a high performance, no lag customized CraftBukkit Minecraft server API, and BungeeCord, the cloud server proxy.
maven is 1000x better
Maven is verbose and smelly
But much more easy to use especially for beginners.
very confused
Both are trash
🤣
real devs use makefile and javac
this is right
Of course gradle can become complex, but it can be really simple also
so do I need to get the build.gradle file from somewhere else?
You have a maven project

Maven projects have no build.gradle
Either follow a maven tutorial, or make a new gradle project
ok but the tutorial I'm following\
says there should be a gradle file
using maven
Then they are insane
Although maven still has a much bigger community and therefore more online support even for more niche problems.
That’s an absurdly despicable and clearly horrible tutorial you got yourself then sadly
lol
here imma just post the tutorial
docs
The WRLD Payments API provides Spigot plugins with the ability to:
Oh god
in the $wrld payment thing
xDD
it's for a comm I swear
I don't really use maven
so is the tutorial just insane or is there a gradle file hidden somewhere?
Lol it doesn’t even run on spigot
How about you go to microsoft support and ask for help with your car.
It started a while ago
It already has
You can buy a world as an NFT
yeah ok peaceee
ok lol
with context
Let me guess
You break a block inside a block break event
um not rlly
it changes type
and it only seems to happen when its a large amount of blocks being changed
I see a recursion....
lol
Yay recursion
Yay recursion
Yay recursion
Dont use contains() on Lists. Use a Set instead.
And use 3 nested for loops instead of manually adding every location
lol i just wanted to leave out the block directly under it tho
and i was too lazy to make that
mainly the only thing i need fixing now is why does the one for .add(0, 1, 0) not work
like the one above it never gets updated
i just noticed sus generation
lush caves in mansion
Where’d the floor go
um
Wha
...
You made the floor collapse didn’t you
what seed?
You’re killing my resale value!
8174215256371274705
location?
woah
even though this plugin i made is rlly buggy and shit its still so fun
you have more than one
I dont know how to do anything with a obfucator or what that means lol
ohhh
It’s a silly thing people use to try and protect code
hmmm mojang should try it lol
It is silly
ohhh
It will always be at most a minor hindrance
so thats how bukkit got it
@vagrant stratus likes obfuscators
when u "accidentally" punch one block
oof
when you spend 50 years just looking for the mansion and you finally find it lol
good luck
THATS THE PLUGIN????
pretty much
Which obfuscator is used? Probably easy to de-obfuscate
you must show me the code I WANNA DO THAT
its rlly broken
Probably already dealt with iirc lol
I LIKE
lol ill just like post it on spigot and dm u it when im done
thx u
I would also like to see the code pls
bc I am curious boi
Send a random jar obf'd with it @quaint mantle
I can quickly check against a tool I have
or next time i get error spam
I intend to include gravity for more blocks in my realism plugin thingy
But like
Probably just dirt and stuff
i swear smth is off about this seed
rare mansion room, mansion in lush cave
so weird
That’s just one of the circle caves
also this
But in the side of a hill
that exists?
Yeah
That's a new thing actually
You’ve never seen those circle rooms while mining
They were more notable before 1.18
on the grass
wow
New block, 1.18 iirc
wait do they grow on grass
thx to you now I am going to think about that the entire time... not allowing me to sleep until I have figured out the entire science between moss and grass
ur welcome
lol giant cave at y 100
sheeeeesh
The new terrain is so much more interesting
Even if modded still has some cooler terrain
I have fun jumping off the cliff of giant moutains and caves to do a mlg
it is nice :)
Is stone a stable block
no
my pc can be replaced with a shoe thats how slow it is
Oh good
You’re going to cause the apocalypse when mining
lol
my screen is like flashing lol
hehe what ram
awww no fun it stopped halfway through
error spam be like
if you see me using syder ide just know that anaconda downloaded it and I wanted to try it
pythob?
yes
i use pycharm and atom for python
I use pycharm
but anaconda just downloaded spyder ide so I wanted to see how it looks
its that bad?
no it just has horrible fonts and coloring and stuff
my eyes are going to die today
Using a spider to develop a snake
bruh not my vid
original link:
https://www.youtube.com/watch?v=7nY2zCrTG3w&t=193s
lmao
and yes that is a psu failure
thats also why i hate spyder
wtf is anaconda
as long as that broken plugin still works idc lol
python env manager
a python interperetor I believe
I think it does
This is the IRS you owe $900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
scammers are dumb
like one wrong package import on the main env and ur screwed
pip is such a bad package manager
yes lol
but bruh i havent gotten like any solutions to why it updates every block except the one above and why im getting an error when it updates a lot of blocks
i got a partial solution to the second thing
cuz col told me not to change blocks in blockbreakevent but idk what to do instead
and the first one i have no idea ¯_(ツ)_/¯
just dont obfuscate it
Amusingly caesium already has a deobfuscator https://github.com/narumii/Deobfuscator
Whats the best way of doing Username -> UUID for an offline player/player that has never joined the server
The virgin obfuscator vs the open source chad
Exactly. Only my private or unfinished ones are closed source 😂
Just use the provided method
Preferably async
lol they brought up another obfuscator, which I immediately linked a de-obfuscator for
workaround for this?
pretty sure its a paper function, i need a spigot alternative
Add a tag to it and listen for the pickup event
what event
EntityPickupItemEvent
What is the method? Btw this is a bungeecord plugin
cdoe not work ```java
class public void 8 {
voi dpublic st@tic Main(strig[}agrs)
{
print(helloworldplswork)
)
}```
How to get spigot.yml
step one open server folder
step 2 scroll
step 3 find
step 4 click
step 5 click
step 6 you have it
👍
hm no clues looks fine ot me
mayb error on ide tr reload i
the patience you have to actually read that lol
di u chek iteret conec ?
make sure ur connected to the internet
Kinda obvious. How to say hello to the world without internet
🤷♂️ you can't smh
setCanPickupItems
You’d have to do that on each mob
And it would apply to all items
But yes that is an option
They were already using the Paper alternative so I assume they've handled all those situations
Does anyone know if there is an extra run command to make the bungee jar file?
Did you use Builtools?
For bungee?
I need to run the forked code
to make the proxy jar file
If you are using intellij use the graphic interface
Or vía commands: mvn package (building the jar) or mvn shade (building a shaded jar with all dependencies inside)
Ty
Check if it works
Take in care
You should build a shaded a jar
Because if your bungee jars doesnt contains inside the dependencies you will have NoClassFoundException
did someone worked with cem before? do you know how to remove all entity animation inside a .jem?
is there any way to save the full config in hashmap?
I have a lot of keys in config.yml
RRS spigot yanl system is already a Hashmap
Where you have keys and values
But it doesnt work exactly like that
You can just getValues on the root afaik
I am trying to make auto config update
this is how it will work:
save all keys and values from config.yml to a hashmap
then reset config.yml
save value to config.yml from the hashmap
No
Hmn
I would directly create a new file and them copy from old to new one
Wouldnt be better?
do you have a demo?
No sorry
But did you check any auto update files system? Prob you can find examples
And take in care that if the api that manage files update goes down your plugin need to keep running
With your backend online or offline should run
what can I use if I can't use int for 9218383018467213784512 not using string
Long?
no
BigInteger
thank you
worked perfect
how can I check if ResultSet can't find data from the Statement?
like if there is no data in the db
I know that it doesn't return null
So then if I used a while loop it wouldn't go through
Mhm
Is there a reason why when I add the variable into the query and there is a space it cuts out the first part of it
let's say I had water gun it becomes gun
Are you using prepared statements
no using Statement
This is how I do it Statement stmt = connection.createStatement();
public void onKill(EntityDeathEvent event)
{
Player p = (Player) event.getEntity();
if(event.getEntityType() == EntityType.CHICKEN)
{
p.addPotionEffect(new PotionEffect(PotionEffectType.SLOW_FALLING, 30, 2));
}
}
I'm trying to make it so when you killa chicken, you get slow falling. I put it in minecraft and nothing happens
Well you are casting the entity to player and then checking if they are a chicken
But besides that
Did you register the event
Did you @EventHandler it
Are there console errors
"Could not pass event EntityDeathEvent to OnSpawn"...
There ya go
You can’t just blindly cast the entity to a player, you have to check first
Also you probably want to use entity.getKiller for the player anyway
will it return false if there is data already there?
event.getEntity().getKiller();
Oh boy
If you only put getEntity you will be trying to add slow falling yo the chicken
No
oh
alr
It’ll return false if it’s empty or if the cursor is already at the last row
cursor?
Yes
The cursor is the current row the result set is on
im lost then why its returning false
Yes
🙂
But remove the if
IT WORKED!
Then make Entity dchicken = event.getEntity();
ok
Oh well then it's ok, I had another method just in case it didnt worked
You don’t need a variable for the entity
If you are just accessing it once
However you should null check the player
oh just in case a random chicken dies?
Yes
alr
Your if should be
Wait
Theres any other event like when an entity kills other entity?
so i dont have to null check?
No
Why is doing if (!rs.next()) { lbalblabla } else { while (rs.next()) { blbalb } } returning false even though data is there?
Oh
Yeah it's ok like that!
🙂
That’s first rs.next will advance the cursor
I'm pretty sure it's seconds
generally it's rs.hasNext()
so are you saying I should have the while loop above and outside the if
Isn't 1 tick per second?
20 ticks per 1 seconds
not even generally actually, that is how iterators are
i looked it up
Yes
Ahh o
yes to me?
20 ticks is 1 second at normal speed
Also resultSet doesn’t have a hasNext
You can reset the cursor with beforeFirst() though
you should use if(!rs.hasNext())
hm okay coll
Like I said, result set does not have that method
so how should I do this
very cool
You can just do the while loop, if it’s empty it just won’t do anything
well
I want it to do something
If its empty I want it to add data and of course if is not empty update data
You can keep your current code then
And just call resultSet.beforeFirst after } else {
Or use a do while instead so it doesn’t skip the first one
wym use a do while instead of beforeFirst?
do while won’t advance the cursor until after it’s first cycle
So it won’t skip the first row
Yes
Working on updating an old plugin which I had to decompile from a jar,
public class CustomBee extends EntityBee {
private String beeName;
public CustomBee(final Location location, final String beeName) {
super(EntityTypes.g, ((CraftWorld)location.getWorld()).getHandle());
this.setPosition(location.getX(), location.getY() + 1.0, location.getZ());
this.setCustomName((IChatBaseComponent)new ChatComponentText(ChatColor.translateAlternateColorCodes('&', beeName)));
this.setCustomNameVisible(true);
this.setHealth(20.0f);
this.setAge(-32768);
}
public void setBeeName(final String beeName) {
this.beeName = beeName;
}
public String getBeeName() {
return this.beeName;
}
}
The first line is giving me 'x()' in 'net.minecraft.world.entity.EntityInsentient' clashes with 'x()' in 'net.minecraft.world.entity.EntityLiving'; attempting to use incompatible return type, this used to work.. any ideas?
it's been a bit.
wait how do i replenish one hunger point
For Mojang mappings, do you have to use buildtools? or can you just use maven?
for any form of server internals you need to run build tools locally
You need buildtools to get the mapped jars
Using maven would require spigot to be hosting those mappings or mapped jars, which would be illegal
it contains mojang owned assets ?
Everybody can get them tho
Mojang owns it, it’s illegal for someone else to host it
I mean same reason you are currently not hosting a bunch of mp4s of current movies on your public web server
lol
That’s specifically stated in the terms of the mappings
idk how this shit works
Yeah and everyone can get windows too
That doesn’t make it legal
To be fair a site with all the textures exists
And Mojang doesn’t mind as long as they don’t run ads
i had all this working a while ago but the decompiler didnt include my old pom sadge
Maybe they just want to be extra protective of their bad code
“# (c) 2020 Microsoft Corporation. These mappings are provided "as-is" and you bear the risk of using them. You may copy and use the mappings for development purposes, but you may not redistribute the mappings complete and unmodified. Microsoft makes no warranties, express or implied, with respect to the mappings provided here. Use and modification of this document or the source code (in any form) of Minecraft: Java Edition is governed by the Minecraft End User License Agreement available at https://account.mojang.com/documents/minecraft_eula.”
sooo...do the mappings just mean like
how the obfuscated shit is linked to the real names
And you can’t provide a download link for the server mapped or otherwise because that’s mojang’s code
Yes
java -jar BuildTools.jar --rev 1.18.2
so this will download the mapped jars too
run it with --remapped
^
It’s new
fairly certain it is
hmm
the --remapped parameter
it kinda is
Mojang just started giving the mappings out within the last few years
but it doesnt say you HAVE to use it
but then you don#t get mojang mapped server lol
Which doesn’t matter if you aren’t using NMS
And @carmine nacelle if you ARE using NMS with the remapped server, you have to also do the step to transform your plugin back
Since the live server won’t be remapped and none of the classes or methods will exist
im using nms
yeahhh
Then you need the maven thing to un-remap your plugin
Otherwise it won’t work
<plugins>
<plugin>
<groupId>net.md-5</groupId>
<artifactId>specialsource-maven-plugin</artifactId>
<version>1.2.2</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>remap</goal>
</goals>
<id>remap-obf</id>
<configuration>
<srgIn>org.spigotmc:minecraft-server:1.18.2-R0.1-SNAPSHOT:txt:maps-mojang</srgIn>
<reverse>true</reverse>
<remappedDependencies>org.spigotmc:spigot:1.18.2--R0.1-SNAPSHOT:jar:remapped-mojang</remappedDependencies>
<remappedArtifactAttached>true</remappedArtifactAttached>
<remappedClassifierName>remapped-obf</remappedClassifierName>
</configuration>
</execution>
<execution>
<phase>package</phase>
<goals>
<goal>remap</goal>
</goals>
<id>remap-spigot</id>
<configuration>
<inputFile>${project.build.directory}/${project.artifactId}-${project.version}-remapped-obf.jar</inputFile>
<srgIn>org.spigotmc:minecraft-server:1.18.2--R0.1-SNAPSHOT:csrg:maps-spigot</srgIn>
<remappedDependencies>org.spigotmc:spigot:1.18.2--R0.1-SNAPSHOT:jar:remapped-obf</remappedDependencies>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
this?
That appears to be it yes
bruhhh now my "EntityBee" and stuff isnt working
?notworking
"Does not working" is a useless statement. Please describe what exactly is not working, what you expect it to do, and what actually happens. If you get any console errors, also ?paste the entire stacktrace.
It would appear the remapping has not worked
rip.
wish i remember how i did all this last time..
https://www.toptal.com/developers/hastebin/raw/umojoqiguh is there something wrong with my pom?
Well for one thing I believe 1.18 requires Java 17
And your compliance level is set to 16
then my 2nd plugin depends on the first one
<dependency>
<groupId>com.squallz</groupId>
<artifactId>CadiaCore</artifactId>
<version>2.3</version>
</dependency>
but this in my 2nd plugin isn't finding my main one
Are you trying to get EntityBee in the second one?
Yeah
its not related to my main one tho, its saying it cant find stuff in my main and not importing it right with a jar.
EntityBee is just from the main spigot jar tho
Correct
its in my secondary plugin not the main one
But you’ve done the remapping in your second one?
yes
spigot vs spigot-api...?
oh
they have both
I think now its just having an issue with my custom one not resolving with maven
my "parent" plugin
ahh that was it, forgot install
fuuuuuuuuuuu
my pom is the same except im using 1.18.2 instead of 1.18
Open up your “external resources” and see what’s inside
Then perhaps EntityBee is the wrong name
shouldnt the nms name
Let me check
there's one for just "Bee"
import net.minecraft.world.entity.animal.Bee;
but that also requires changing it to "EntityType" instead of "EntityTypes"
this worked as-is in 1.17
So it was changed?
It’s also EntityType
I’m looking at pre-obfuscated code so YMMV
But that does appear to be the case
hmm
well its more readable this way i guess
but
ChatComponentText also isn't resolving anymore
I feel like you were unmapped before
^
If I check the git history of Bee when I get to my desk I doubt it’s been renamed
this.setCustomName(new ChatComponentText(ChatColor.translateAlternateColorCodes('&', beeName)));
I mean..it's possible I guess...? I dont think any of this would've worked without the mappings tho
hmmm..
you dont need nms for this...
For just that part?
"IChatBaseComponent" isn't even showing as a thing that exists rn
I was doing stuff with getting/setting the bee's home hive, getting their pollen levels and stuff so I think thats why I needed nms...?
Yeahh its showing IChatBaseComponent in 1 of my projects but not the other... 🤔
The project it works in is importing
import net.minecraft.network.chat.IChatBaseComponent;
but the other project doesn't resolve that...
Presumably because it isn’t called that
Is one remapped and the other not?
yeah
That’s why
So can it not be used in the remapped?
Correct
bruh
Because that isn’t the remapped name
how do i find the remapped name..
BaseComponent
Context clues
this.setCustomName(new BaseComponent(ChatColor.translateAlternateColorCodes('&', beeName)) {
@Override
public BaseComponent duplicate() {
return ChatColor.translateAlternateColorCodes('&', beeName)
}
});
this seems...wrong.
because it is
Why did you make it a class
Probably TextComponent then
is it possible to set the animation time of a redstone particle because for my purposes it disappears way too slow