#help-development
1 messages Β· Page 1810 of 1
by anything
Well why not just EntityDamageEvent
EntityDamageByEntity whats the differenc
oh? π
For all maven users, they should run maven clean install (consecutively) imnotdani
bukit/maven 1.18 docs? specifically pom.xml stuff
(I'm not a maven user so Idk if there's something better) but it used be that way
EntityDamageEvent is more generic
anyways how do i cancel the kb
if i run a task later for 0ticks its unreliable (depends on ping)
[13:47:24 INFO]: true
Class<?> parameter = parameters[i];
Class<?> requestedParameter = requestedParameters[i];
boolean found = parameter.equals(requestedParameter);
System.out.println(parameter + " equals " + requestedParameter);
System.out.println(found);
Ehm Java?
just nullify the velocity inside the event?
does the CraftPlayer class override the equals method
Lol
ah yes craftPlayer seems like a string
I have absolutely no idea
check
why would any method override equals tho :o
?
Cause you want to compare content or something else perhaps?
When comparing your objects
Class::equals is just the classic == iirc
But these are class objects
so thats a bit strange what tvhee got
Ah yeah nvm
So this doesn't do anything with the equals method
Yes π
but why not create a different method instead of overwriting java itself
I am testing paramenters for reflection
Not sysout
because a lot of 3rd party libraries, and java classes use the equals method
I mean ideally equals is for content
its a polymorphistic method declared in the class Object
and == is for reference
thus very reliable
So just override it
for instance HashMap uses ::equals when bucketing keys with the same ::hashCode
o alr i understand
can you send the entire method?
Yep
not just the snippet you've alr sent
Is it possible to target another entity even if the Entity is NoAI?
But first, I will create a nice print
wym?
set an entity's target whose ai is disabled?
Yes
Still prints the same, but I will send the method then
I want the snowman to look at an object within a certain distance without moving.
like sentry
well noai disables look around fyi
public static List<Class<?>> getSuperClasses(Class<?> clazz)
{
List<Class<?>> superClasses = new ArrayList<>(Arrays.asList(clazz.getInterfaces()));
Class<?> superClass = clazz;
while(superClass != null)
{
superClasses.add(superClass);
for(Class<?> interfaceClass : superClass.getInterfaces())
{
superClasses.add(interfaceClass);
superClasses.addAll(getSuperClasses(interfaceClass));
}
superClass = superClass.getSuperclass();
}
return superClasses;
}
I forgot this one
how?
What is the issue there?
getCommand(String) is null
Should I find another way to immobilize snowman's location?
yeah
probably
for instance apply particle-less slowness to it (with a high amplifier)
or set its walk speed
Windows 7?
[AdvancedReplacer] [STDOUT] class java.lang.Object equals class java.lang.Object
[14:02:16 INFO]: true
Ofcourse this goes on until java.lang.Object
And these always equal
So I have to exclude Object from the superclasses
i see nothing related to vectors or velocity in the event
Then, Should i use ProjectileLaunchEvent to Disable shooting snowballs?
Or is there another ways to disable snowman's snowball shooting?
I am looking for a rental plugin like AreaShop but version 1.14x
yeah try that one
EntityDamagerEvent::getEntity then Entity::setVelocity and pass a new Vector(0,0,0)
Yep that was the issue, problem solved
i thought of that but doesnt that also affect the player moving at the same time?
imagine them flying on an elytra and getting hit by arrow
i want the arrow to not affect it at all
but the flight would remain the same
aaaaaaaa now i cant even get hit by arrow
i have no idea why
i restarted the server, changed gamemodes and did /kill but its not working
Would there be any way to make Boats ride up? Im not even sure how the heck i would go about this
Not sure if its possble but maybe you can give them levitation?
Not sure if boats extend LivingEntity tho
They do not
Y would a boat be a living entity
Armor stands are :p
They already do... Don't they?
Sadly they dont because this water is generated going down
Is EntityDamageByEntityEvent called upon projectile damage
wont a boat ride up automatically
like doesnt it always try to stay above water
this ^
They just sink once they hit that
and keep going to the bottom
uhh
bump anyone know how to do this?
i almost want to say ask in Forge discord but i know for sure they wont help bc Mixins implies Coremod, + legacy version
last time I asked them a question about mixins they yelled at me
yea
Fabric :p
1.8.9
oh nvm
lol
why do ya still use 1.8.9 lol
mayb its a pvp enhancer mod π
@proud basin what is the bigger picture of this project of urs
for it to be usable
lo
Because it doesn't take forever for simple shit.
simple being wat
is it failing in dev launch or in launcher launch
Everything. Its the last minimalist version. (Before they started adding BS)
mc modding was simple up until roughly 1.13 id argue
bc then they really started changing stuff
Yeah but the PVP update, the end update. Mechanics changed etc...
all that matters r the new exploits that came with the updates.. πΌ
how can I deactivate listeners?
i think theres an unregister method
idk what to do
// * Unregisters all listeners for this plugin
HandlerList.unregisterAll(<JavaPlugin>);
[sigh] time to whip out a forge project to test this myself
I'm not sure what to put in the Brackets?
your main class instance
can u send build.gradle bc i cba to ever get mixins working properly in forge lol @proud basin
And how do I define the listener I want to deactivate then?
if u want to only disable one i think u need to call unregisterEvents from Bukkit.getServer().getPluginManager()
Well where JavaPlugin is you can use Listener or JavaPlugin.
Hm okay thanks
oh god i actually dont remember howto like
set up forge lol
setupDecompWorkspace right
why are you using the terminal?
That was 1.12 forge though iirc
i like terminal
you look like a terminal
Windows is without slashes
gradlew (Task)
idk i just did .\gradlew.bat
Which Version?
forge 1.8.9 is using gradle 2.7
Use gradlew.bat I mean
here ale
Using dotslash is bash I think
@buoyant viperwhy do you use 1.8 forge lmao
im trying to help jtx
jtx
if i were me id use fabric idk
uses 1.8?
Yeah, use legacyFabric ...
1.8.9
i think it would be smarter to use forge for legacy versions, ppl that work with fabric tend to just work on latest
but cool people use fabric π
backporting sodium to 1.8 π
no1 backports fml bc mods for fml were already made in those versions π
help me π
workin on it
Yes, so you live with Software that is getting worse by the day
i mean
- we arent forge
- legacy versions arent supported
wait i need to import forge BEFORE running genIntellijRuns? so this is why it never worked for me....
I know that
forge will eat for asking for help with legacy AND mixins
I've experience it
Oh yeah, they are a LOT worse than us
eat my shorts intellij
Coremods worse
i got warned when I tried to get help with 1.12 on forge server
mixins more or less implies coremod doesnt it
It does
I think Mixins Support is baked in Forge, No?
fabric, forge really wants u to use the api
tho even fabric recommends using fabric-api wherever possible
forge is bad
At least forges API is decently usable I guess
its good but it lacks some events here and there
A Lot better for my Bukkit brain to understand
not that the average person needs to do packet manipulation but at least having the events would be nice
froge*
what's not decently usable in regards to fabric's api?
Everything
fabric requires 7 phds
fabric api is rich
Mind elaborating?
it has daily updates almost
It has Like 0 events
Anyone know hwo to change the branding with minxins
fabric itself has close to none, but thats what fabric-api mod is for
Yeah it has changed a bit, although the general fabric approach is just mixins.
literally this is all I have left
Hey guys, I followed this guide to install Spiggot on ubuntu https://www.vultr.com/docs/install-spigot-on-ubuntu-20-04
But I think I messed up since:
- I cant stop the server so I can make some changes
- Installed the wrong version of Spiggot
First of all, how do I stop the server?
But nowadays my brain could comprehend fabric now given that I have worked a Lot with Mixins now
do you use screen @cloud sparrow ?
Tho I also like my ASM Transformers
screen is very useful
yes...
screen basically makes "another console" for your server
so if you exit screen, spigot doesnt stop
ohhhhh!
Tmux is a Bit easier to comprehend for me
Alright, but my problem is I installed the wrong version of Spiggot
the most recent one, for mc 1.18
java -jar buildtools.jar -rev 1.18
Do I need to undo everything i've done so far?
it got you 1.17.1?
Unlikely
1.16.5
How
I was quite dumb following the tutorial letter by letter
transition directly from 1.16 might be breaking
rm -rf spigot.jar
yeah @proud basin idk whats goin on on my end now lol
old gradle and intellij just are not mixing
update gradle then
wont that break forge
no
It's telling me "Unable to acess jarfile Buildtools.jar"
whats the highest version i can go to with gradle for this
Might've messed up quite hard
use the version im using
it means you put wrong name
or wrong foler
that being?..
ah wait ithink i got somewhere with 3.0
?java17
Install Java 17 at https://adoptium.net/?variant=openjdk17&jvmVariant=hotspot
4.10.3
how do I look at non obfuscated NMS methods?
i want to cancel knockback
I've tried: ```diff
- Cancelling the event and dealing damage
- Doesnt keep things like fire ticks, or defense points
- Setting the velocity to a new Vector(0,0,0)
- Stops the player's own velocity
- Recording the player's velocity and in a 0tick RunTaskLater (sync) apply that velocity back to the player
- Randomly stops working (depends on ping as well)
and i think the best solution would be to copy the NMS method for entitydamage and remove the knockback code
can't you not just do a damageEvent listener, copy the velocity before it, copy the normal damage event code, then set the player velocity to that again?
when do I set it back
that is the 3rd solution that I proposed
but it randomly doesnt work
and it is highly affected by ping
dont think that's necessary
???
tried adding a knockback resistance of 1?
org.bukkit.event.entity.EntityDamageEvent.getFinalDamage()
oh wait i forgot that was a thing
record vector, apply that as damage, reapply vector, cancel event
but the first one should work ? if you use event.getFinalDamage()
and then set the players health to (health-event.getFinalDamage()) after canceling and play some fancy effects
also my plugin is acting all funky... does /reload on Spigot call onDisable ?
yes
does that work with fire/poison kb?
yes ... but the other method i wrote should work too
then that is a really clean solution ty
@proud basin my dependencies simply... broke
whats the maven error
maybe try invalidating IntelliJ caches
youd think after recommending that to so many people id try it myself
it works wonders.... sometimes xD
forge or bukkit?
ah
its always a pain for me to work with
its just that by now i know EXACTLY why you dont get the bukkit javadocs
?paste
there are so many things wrong here
how to fix
its 1.17.1
maybe try 1.17 ...
in your plugin you have a plugin.yml with "api-version: 1.17.1"
?paste can you show the full log ?
thats after i changed plugin.yml to 1.17
so either you typd in 1.18 in the plugin yml and are using the 1.17 api or the other way around
and the actual library
the actual api?
you are probably using the Spigot-1.18-api.jar
how did you manage to do that
not really, was just hoping itd... just work
lmao
pulling from stackoverflow
follow this https://github.com/PaceSkids/Mixin-Tutorial
what
how
ItemMeta has getPersistentDataContainer which I believe is a way to store custom metadata on an ItemStack that don't get wiped by server reload. What's alternative of that but on Block?
Nothing
You could in theory use the TileEntity for those blocks who got one
Alternatively rely on BlockBreakEvent and use the chunk pdc
This sounds like a good solution for my problem, thanks. Didnt know PDC is on chunk too
does anyone know what out packet deals with biomes?
How do I exit a screen?
ctrl+a, d
alt f4
hello anybody knows how to use " " inside config.yml in a string
example:
no-permission: 'Unknown command. Type "/help" for help.'
Followed this tutorial to install java17 in ubuntu https://www.linuxcapable.com/how-to-install-java-17-lts-jdk-17-on-ubuntu-20-04/
the only program was that I couldnt use the -version command to check if everything was alright, but while it installed I got no erros.
any help?
is this even normal?
Is there a search bar on github to look through a repo?
escape it
huh?
anyone got a working pom.xml for 1.18? also there something I gotta do to install CB as a artifact for maven to see cant compile a old NMS plugin I made
can you explain
"bla bla bla: \"bla bla\""
its yml...
heh
worked thx
there also just using the # unicode also
i thought thats doesnt works in config.yml
is just comment
can anyone see any difference between these 2 itemstacks?
cause for some reason these 2 itemstacks are not equal
Are you using ==
ItemStack#isSimilar
yeah
ooh
Don't do that. Use isSimilar() or equals(), depending if you care about the amount.
== only will return true if they're the same instance as well.
s h a d o w i t em s
so no maven users got any advice on missing artifact solutions?
actually i dont think mc's instance id is the same as java's
gradle :p
nop, gradle
artifact solutions? intelij?
cant nor am I rebuilding a 10 line plugin for gradle
no just maven cant find 1.18 artifacts
artifacts?
are the repositories correct?
well given works for every other version below 1.18 think so? I cant even find a pom.xml template that is recent to look at
which artifact specifically isn;t working for you?
org.bukkit:bukkit:jar:1.18-R0.1-SNAPSHOT
you should nto be using that
why specifically bukkit
spigot-api is what you should be using
yes and I think I clearly stated bukkit and CB
when you doing a NMS plugin, since when?
since spigot was a thing
since again no API I have to make it hence nms.
looking thru repos listed on spigots site, cant even find a Bukkit > 1.15.2
Im messing with craftarrow.
You do not spcify CB/Bukkit ever, even for NMS
you use Spigot. It contans both
for 1.18 it has changed though
did you read the announcement post about 1.18?
well gl then finding this for me. import org.bukkit.craftbukkit.v1_18_R1.entity.CraftArrow
again Im not using spigot there no API for what Im doing.
i'll say it again, that is a part of Spigot
if you are not using Spigot then you are in the wrong discord
find me craftarrow in spigot src only pls.
no-permission: '&fUnknown command. Type "/help" for help.'
no-permission: '&fUnknown command. Type "/help" for help.'
import org.bukkit.craftbukkit.v1_18_R1.entity.CraftArrow; is there no problem, IF you setup your pom correctly for Spigot
<!--Bukkit/Spigot API -->
<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>spigot-api</artifactId>
<version>${project.spigotVersion}</version>
<scope>provided</scope>
</dependency>
<!-- Spigot Javadocs -->
<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>spigot-api</artifactId>
<version>${project.spigotVersion}</version>
<type>javadoc</type>
<scope>provided</scope>
</dependency>
<!--Bukkit/Spigot NMS -->
<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>spigot</artifactId>
<version>${project.spigotVersion}</version>
<classifier>remapped-mojang</classifier>
<scope>provided</scope>
</dependency>```
look for it yourself?
run buildtools for 1.18, which puts nms into your maven cache
then set spigot instead of spigot-api as a dependency, and done
thats why Im asking for maven help been there done that with BT past two weeks why I dont get its acting like its poof now.
I just gave you my maven pom dependencies
I seen and ty
run BT with the --remapped flag
then go read teh announcement post about 1.18 for teh special source if you need to re-obfuscate
well Im not modding CB Im making a plugin that is purely nothing but NMS level changing stuff spigot or not I just cant find the maven pages but since yas talking about these changes Im guessing they now poof as well as my wiki staff role π€
Does anyone have any idea on how to clear the crafting matrix after crafting?
I tried setting everything that remains in the matrix to Material.AIR but for some reason it also sets the result to air after i've crafted it
also clearing the craftinginventory after crafting also clears the result
awww so close.... but that helped @eternal oxide again thanks, think mapping name changed for e.getEntity()).getHandle().fromPlayer so gotta do some digging but its seeing the constants now
Anyone know how to make a launch json for mixins?
everytime I try the one I made it uses default jar
.
shouldnt 'java -jar BuildTools.jar --rev 1.16.2 --remapped' create files that contains the remapping of mojang to obfuscated ?
what does obfuscated mean?
abcdfgh instead of getPlayerName()
as an example ^^
for 1.18 and 1.17 it will create such stuff ... but not before - was there no mapping in 1.16 ?
nope
oh lol
no so yes no mapping before 1.17 ?
Does anyone know where the server applies velocity on fall damage?
doesn't it stop velocity rather than applying?
you mean apply damage based on velocity?
Perhaps
doesnt it add a little bounce ?
are you the guy that wants to prevent any knockback on dmg ?
I don't think so?
getFinalDamge
cancelEvent
setPlayerHealth-getFinalDamage
add some custom effects to show the player got hurt
There is weird knockback on fall damage
anyways what determines it is probably a function which decides whether the distance you have fallen is enough I can see if I can find anything as I happen to be on my ide
then it probably has to do with lag I believe, where the damage gets applied after the collision with the ground
There's times you can take fall damage multiple times because knockback will shoot you up high enough to take fall damage again.
what ?!?
never seen players jump 3 blocks high after hitting the ground tbh
Yeah, it's pretty rare that it happens but there's been a few times I can take fall damage 3 times.
It's true but not as much as 3 blocks I believe
sounds like your toaster is broke
it did happen on Hypixel, could be a them issue. Don't remember if I've had it happen on a normal Spigot server.
I mean there might have been some plugin adjusting the velocity, then 3 is possible
Lag you say? Hypixel has got that covered 
because of minecraft's sometimes questionable lag compensation
Could it be the velocity that is applied on the damage event?
{
"id": "Test",
"inheritsFrom": "1.8.9",
"time": "2069-08-11T11:13:12+01:00",
"releaseTime": "2069-08-11T11:13:12+01:00",
"type": "release",
"libraries": [
{
"name": "tt.test"
}
],
"mainClass": "net.minecraft.launchwrapper.Launch",
"minecraftArguments": "--username ${auth_player_name} --version ${version_name} --gameDir ${game_directory} --assetsDir ${assets_root} --assetIndex ${assets_index_name} --uuid ${auth_uuid} --accessToken ${auth_access_token} --userProperties ${user_properties} --userType ${user_type} --tweakClass no.NoonTweaker"
}
``` is this right?
Well taking fall damage innocently by simply falling does not cause any knockback, if the server happens to lag a bit where the damage gets applied after the jump then the velocity might get adjusted such that it looks like a bounce.
Whenever I use it it just crashes in launcher
the problem can be solved with this:
https://howoldisminecraft188.today
I always get a velocity on fall damage regardless of lag
Weird just tried falling consecutively taking damage, no "bounce" whatsoever
Do you try to take fall damage while running?
and jumping ? ... well if you jump and sprint it looks like a bounce if there is some lagg ... but its not the dmg
Yes while running and jumping
just dont run and jump
I believe it is the damage event's velocity we notice
Its velocity gets added onto the already existing velocity
and it seems like the fall damage velocity has its direction pointing downwards
so it would make the jump smaller which can be seen as "bouncing" I guess
I agree it has a direction pointing downwards
But how would you prevent it from doing that
already wrote
yeah or well overwrite the velocity possibly
That seems like beating around the bush
but it save prevents your "bounce"
But I want to write solid code, I'm not in a rush
well... its solid ^^ trying to set a velocity null that gets applied AFTER the dmg-event ends is not solid
bump
I'm not saying I want to set the velocity to null
people arent that smart 
I just want to remove the cause itself
what is the goal of this and with what do you run it / achieve smth ?
the cause itself is fall dmg while lag and player jumps+sprint...
you could remove lag or stop players from moving while falling ^^
Well im trying launch a custom jar but whenever I do it it crashes
do you have the crash report ?
no
Lag is most definitely not causing it
A crash report wasn't made
log files ?
stop players from moving
yeah... already wrote a solid way to do this
I think the smoothest way of solving it for now is cancelling velocity event if the last damage cause was fall
no log files
yeah or if you could add the negative velocity of fall damage
as that would neutralize it
public void onPlayerDamage(EntityDamageEvent event) {
if (event.getEntity() instanceof Player) {
Entity damaged = (Player) event.getEntity();
System.out.println("SUCCESFULL");
}
}``` why does this code creates a null exepction thing?
well ... if there is nothing we can check then its hard to help ... dont know about your json for the run
which line
Player damaged not Entity
also do you mean a nullpointer exception?
java.util.concurrent.ExecutionException: java.lang.NullPointerException
at java.util.concurrent.FutureTask.report(FutureTask.java:122) ~[?:1.8.0_51]
at java.util.concurrent.FutureTask.get(FutureTask.java:192) ~[?:1.8.0_51]
at net.minecraft.util.Util.func_181617_a(Util.java:20) [g.class:?]
at net.minecraft.client.Minecraft.func_71411_J(Minecraft.java:1014) [ave.class:?]
at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:349) [ave.class:?]
at net.minecraft.client.main.Main.main(SourceFile:124) [Main.class:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_51]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_51]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_51]
at java.lang.reflect.Method.invoke(Method.java:497) ~[?:1.8.0_51]
at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.12.jar:?]
at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.12.jar:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_51]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_51]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_51]
at java.lang.reflect.Method.invoke(Method.java:497) ~[?:1.8.0_51]
at misc.tweaker.Tweaker.a(Unknown Source) [tweaker-1.2.jar:?]
at misc.tweaker.Tweaker.stubMain(Unknown Source) [tweaker-1.2.jar:?]
at misc.tweaker.StubMain.main(Unknown Source) [tweaker-net.minecraft.launchwrapper.Launch.jar:?]
Caused by: java.lang.NullPointerException
I found this
π₯΅
concurrent exceptions suck
is misc.tweaker your own package?
no
The version manifest is corrupt.
Error details: Library name libs could not be parsed.
oh
so i am making a battle-pass kinda like system and i want it so that for every kill you make you get a reward, so far so good, but how would anyone here suggest that i keep track of claimed rewards?
db
config is the easiest
okay
db or file db
pdc
pdc?
yes true
the player object's persistent storage
pretty sure it stays forever which sucks
guess a config is the best one in my case
so i would use a file db
okay thank y'all
just load the file when the player joins
ye i know how files work just didnt know if there was a better solution
its not a bad solution
never saw many people use json
i use yml
its great for data storage
paper ^^
oop
The version manifest is corrupt.
Error details: Library name something.packge could not be parsed.
Pondering thy orb
ok
did you add a constructor to yoru main class or something?
i dont think so?
im looking for it
yes i mean that
any idea which of these TargetReason is relevant when I want zombies to generally stop following Player if he only walks by
actually nvm, its very unlikely you have experience with this, but if somebody has, ping me then
you can try the second? in teory this happen when the entity target a player because not have a target
which line?
[13:56:25] [main/INFO]: Loading tweak class name yes.launch.NitrousTweaker
[13:56:25] [main/ERROR]: Unable to launch
java.lang.ClassNotFoundException: yes.launch.NitrousTweaker
at java.net.URLClassLoader.findClass(URLClassLoader.java:381) ~[?:1.8.0_51]
at java.lang.ClassLoader.loadClass(ClassLoader.java:424) ~[?:1.8.0_51]
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331) ~[?:1.8.0_51]
at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ~[?:1.8.0_51]
at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:102) ~[launchwrapper-of-2.1.jar:2.1]
at java.lang.ClassLoader.loadClass(ClassLoader.java:424) ~[?:1.8.0_51]
at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ~[?:1.8.0_51]
at java.lang.Class.forName0(Native Method) ~[?:1.8.0_51]
at java.lang.Class.forName(Class.java:348) ~[?:1.8.0_51]
at net.minecraft.launchwrapper.Launch.launch(Launch.java:122) [launchwrapper-of-2.1.jar:2.1]
at net.minecraft.launchwrapper.Launch.main(Launch.java:30) [launchwrapper-of-2.1.jar:2.1]
but the class is there
fixed it π
probably a wrong path to the class. check capital letters and spaces
It's the correct path and letters
the one in the plugin.yml?
idk
probably wrong channel for client questions
wtf is NitrousTweaker kek
a tweaker
is coding a furnace but with this option:
each player has a different one for them
so u cant steal from each other, and u can still use it
does furnace have a tilestate?
if it has, cant you just store the owners uuid inside?
i would store uuid in pdc
but yea his your choice
so is it possible
but like
u dont get the idea
i dont wanna prevent players from stealing
i want them to have a new furnace window
even if the furnace
is being used
by someone else
yeah
You will have to create an inventory when teh player uses teh furnace and pass teh furnace location
oh
Store original furnace in cache or SQL and handle block click event
and how would you store the fuel and stuff?
you would need a runnable to make it work no?
You should be able to attach multiple inventories to a single furnace
https://hub.spigotmc.org/javadocs/spigot/org/bukkit/inventory/FurnaceInventory.html and the furnance
declaration: package: org.bukkit.inventory, interface: FurnaceInventory
Why not just open tile inventory?
but you'd have to track the inventories yourself
so you open teh correct one for each player
oh not a regular inventory, right
wait
elgar cant i make the playre a new inventory whenver he clicks it
and link it with him if he puts anything there
to be a workign furnace I'm fairly certain it has to be attached to a furnace block
o
yes, but if things are left in, when teh player comes back he need to open teh same inventory he had open before
or do the burning stuff yourself with packets?
Guys why not store block location and do something like that
ifΒ (block.getType()Β ==Β Material.FURNACE)Β {
Β Β Furnace furnaceΒ =Β ((Furnace)Β block.getState());
Β Β player.openInventory(furnace.getInventory());
}
```? block is cached furnace of player
isnt that just the same as without the event?
yes
thats literally useless
isnt it
oh
So you want make furnace that not exists in fact
i would cache it somewhere (the furnace inv) and instead of furnace.getIv() i would use map.getOrDefault(uuid, new FurnaceInv())
Ok, i understood
i see
But you will be obligated to tick it by runnable? No?
yes, but attached to an actual furnace so it ticks properly
the burning? yes
Multiple furnace inventories attached to a single furnce (for ticking)
oh even better
it "should" work
and then make you cant break that one rawr
you provide teh furnace block location when you create the inventory
if I'm remembering correctly
Never worked with furnaces, is that really possible?
Just interesting
How you plan to attach inventory to furnace
uh
I'll have to pull up my ide, sec
just listen for PlayerInteractEvent
check if the block is a furnace
check if the player adds something?
and store it in a map
I understand that, it is a child logic. I am interesting in ticking inventory by attaching to furnace
I have a new issue with 1.18..
I upgraded from
net.minecraft.world.item.ItemStack nmsStack = org.bukkit.craftbukkit.v1_17_R1.inventory.CraftItemStack.asNMSCopy(itemStack);
to
net.minecraft.world.item.ItemStack nmsStack = org.bukkit.craftbukkit.v1_18_R1.inventory.CraftItemStack.asNMSCopy(itemStack);
and get
Caused by: java.lang.NoSuchMethodError: 'net.minecraft.nbt.CompoundTag net.minecraft.world.item.ItemStack.getTag()'
But the ide also suggest me to use that method..
You are code under mojang-mapping
?
is there a way to set the times you get damage when you burn to 1?
Bukkit.createInventory(BlockInventoryHolder, InventoryType.FURNACE);
BlockInventoryHolder being the furnace block
is there a Block#getHolder()?
@lapis lark
Which don't exists in 1.18 (the ide can't find it)..
from Furnace there should be
i see
oh
probably attributes
1.18 update is so strange. It forced me to learn maven.. I read your exception and see that there is a CompoundTag class appears. Spigot jar uses another class - NBTTagCompound
wdym
so like the amount of damage u get everytime u get hurt from burns or wha
Maybe you compile plugin for one mojang-mapping and use it on spigot core. No more ideas. Ask for other members
when you burn you get damage 7 times or so but i want to reduce it to 1
Handle damage event?
I can't even find NBTTagCompound in the 1.18 jar...
when someone gets damaged check for source
if its fire and hes not in that arraylist
add him to it
if he is, then cancel event
net.minecraft.nbt.NBTTagCompound
okay ill try it
OR
I know in the 1.17 jar i can find it, but not in the 1.18 jar
Player.setFireTicks(0);
Actual server uses this class. Maybe you are looking to mojang-mapped jar, not actual running
on first hit
and make a scheduler for after the amount of time it takes to get hurt 7 times
and set fire ticks to what it was before
okay haha
Just yesterday i have updated my LuckyBlock to 1.18 and used net.minecraft.nbt.NBTTagCompound and all works. net.minecraft.nbt.CompoundTag is mojang-mapped class
@pastel arrow want a simple solution?
do the arraylist thing
and if hes not in it, put him there and give him a fire resistance for the amount of time it takes to get hit 7 times
and after that time remove him from arraylist
for the time it takes to get hit 7 times idk
u prob gotta test that
what about this? why isn't it easier?
if u do fire ticks
u will have to make a scheduler and give him ticks again and stuff
its just better to use potion effects imo
okay
btw
every 5 ticks player loses 1 actual heart (2 half hearts)
just some info u may need dunno
Could you show me you`re pom ?
I used this https://www.spigotmc.org/threads/9-years-of-spigotmc-spigot-bungeecord-1-18-release.534760/#post-4305163
It should work
I used this too. But with additions
Check your compiled jar
What classes it uses
Mojang-mapped or spigot one
Im trying to add a tabcompleter that offers all blocks, like in /fill or so.
-
I do have a list of all materials that are blocks, but the tabcompleter wont sort it for me and if I try to implement a manual sorting it ignores it.
-
The blocks are called like "BARRIER" or "BEACON", is there a different form of their names, that I can still easily convert back into Materials ?
In my compiled 1.18 Jar it use
public static net.minecraft.world.item.ItemStack asNMSCopy(ItemStack original) {
and
@Nullable
public CompoundTag getTag() {
return this.tag;
}
does any of you guys use labels in java
// Java code
public class Label_Break2 {
public static void main(String[] args)
{
outer:
for (int i = 0; i < 3; i++) // label
{
System.out.print("Pass " + i + ": ");
for (int j = 0; j < 100; j++) {
if (j == 10) {
break outer; // Exit both loops
}
System.out.print(j + " ");
}
System.out.println("This will not be printed");
}
System.out.println("Loops Complete.");
}
}
seems like a goto but in java
well goto would be completely unrestricted as opposed to labels
you can add multiple executions of the jar plugin with different configs
but really it is not normal for the build system to do things like copy to your server. Everyone should be able to build without your specific config
hey people, i have a question about barrier spawn on 1.18
its replaced with BLOCK_MARKER but how to set a texture to this. in coding
it takes a BlockData param doesnt it?
useful for breaking nested loops
i there is no option on spawnParticle
there should be a 'T data' argument
declaration: package: org.bukkit.entity, interface: Player
eg
okay i will look into it
something like this?
world.spawnParticle(Particle.BLOCK_MARKER ,particleLocation, 1, Material.BARRIER.data);
or
world.spawnParticle(Particle.BLOCK_MARKER ,particleLocation, 1, Material.BARRIER.createBlockData());
the latter looks more correct
thanks π
I'm not using maven to allow others to build my plugin. I'm using maven to support the stupid api conversion of 1.18
I want to use the same config just different output directories.
Its either that or just copy them to the directories I want later.
you clearly dont know what the word api means
oh yes, the classpath guy
because nms is not api
it is an api for mojang π
hey
so I'm using the latest version of the mongodb-driver-sync with maven in my spigot plugin
However, I'm getting a noclassdeffound error on it every single time
Can anyone help
you need to shade it or add it as a library in plugin.yml
Oh, ok
Wait, how do I add it to the plugin.yml?
Do I have to put it in the plugins folder?
https://www.spigotmc.org/threads/spigot-bungeecord-1-17-1-17-1.510208/ has a section called "Library Loader"
bump
can you give some context?
Clearly it's not 
bro, he just means he thinks it's there
Yeah, and I'm saying it's not.
well
And so is Java 
dude
I know its there because im looking at it
The person I replied to...?
Lol ok
so yeah
Looking at it where? The decompiled JAR or your IDE
its the correct path because I use that package location when launching it via intellij
Decompiled jar

What dependency format are you using?
works fine via ide
Are you shading it?
Using shadowJar
Sorry, not familiar with that one :/
can I see the jar?
You can but It's obfuscated
...why?
security reasons
oook
Can I have your unobfuscated jar?
it's fine if you don't want to post it here
But I (strongly) doubt anyones fixin to steal your code
Sorry I don't feel comfortable giving that out
but I can assure it its the correct location
that's the location I use when using it via ide
alright
sorry, I don't really know how to help you if that's the case :/
And I don't have much time as is
so
Good luck
At most I can do is screen share
I actually need help with something of my own atm, sorry
I'm getting an NPE when my plugin initializes
Stacktrace^^
Files
Binaries
So sorry, should've put all that in a thread :/
actually wait
need to investigate more
yes
bump
So you level up with exp 30 for each level?
@quaint mantle
if exp = or more then add level
exp => 30
Make multiple pastebins no ones gonna go out their way to download that
Especially when youβre on discord on your phone 
Anyone have advice on this YAML format
https://paste.md-5.net/idojikakow.http
In terms of readability/improvements
int firstvalue =
int secondvalue =
int total = firstvalue / secondvalue;
int remainder = firstvalue % secondvalue;
System.out.println(secondvalue + " goes into " + firstvalue + ", " + total + "times.");
i gotta test myself
Specifically if there is a way to remove the numbers that Iβm brain farting on
Maybe use the plugins classloader?
Idk
oh shit thats old
That's not a plugin
i assume you mean the 1,2β¦
Oh
@quaint mantle
idk if there is a good way to remove them
It's pissing me off though can't get it to work
From where are you loading it
mc launcher
how many times 30 goes into your exp and reminder of exp
Are you making a client?
Oh
you welcome!
no problem i had same issue trying to figure it out :))
Does anyone know how to change the blast level of a blaze shot?
I assume it might have to do with it using the wrong classloader
But i dont know any internals
Of mixins
Im assuming this is the main class net.minecraft.launchwrapper.Launch
Yeah, Iβve realized I can just write it in json and then convert it
Since Iβm more familiar with json
Yes
So its trying to load the class but the launching classloader cant find the class?
Wait why is it using AppClassLoader
I think that may be it
As its not in the launchers environemnt5
Maybe some setting in like the version json file
I dont know it seems to be a problem with the launcher
Oh wait are you trying to create a launcher?
Or interact with it?
Do you need code for that
Im sorry im confused lmao indont know shir about this
Well then its probably a setting in the launch json
public void EntityDamageByEntityEvent(EntityDamageByEntityEvent event){
if(event.getDamager() instanceof Fireball) {
Fireball Fireball = (Fireball)event.getDamager();
if (Fireball.getShooter() instanceof Blaze) {
Blaze shooter = (Blaze)arrow.getShooter();
Damageable entity
(Damageable)event.getEntity();
if (entity instanceof Player) {
Player victim = (Player)entity;
}
}
}
}
Can you send the launch json
Maybe throufh paste
oof sorry i misread it
It says in the wiki that the main class should always be set to net.minecraft.client.main.Main
What wiki?
Idk
I changed it to that and it just crashes with no errors
client.json is the file that accompanies client.jar in .minecraft/versions/<version> and lists the version's attributes. When using the latest version of the Minecraft launcher, it is named <game version>.json. The JSON file for specific versions is located in the version_manifest.json file.
First thinf it foudn
you mean exploding power?
but it may differ for older or ancient versions
What version are you using?
Or trying to make it for
1.8.9
Oh
Oh wait
Ive had problems with older versions when using newer versions of java
Maybe java version?
im using 1.8
Hey, i have coded a custom enchant that kinda marks all players that attacked the player that has the enchant and after a minute it is supposed to unmark them. So every time a player attacks the enchant wearer, i store the unix time + 1 minute and i start a scheduler that after a minute removes the unix time (unless it changed after a new attack) from the map that stores it, removing the "mark" from the player. My question is, is it bad to start that many schedulers?
no?
Is there a decompiler u can use to find the main class
did u switch to a mcp project or something
Ok so you have a client, and you are trying to launch this client in the launcher. The client uses mixins to modify existent code at runtime (if i understood correctly). Its not launching (probably) because of a classloader problem
Like minecrafts client main
so if i have a yaml data: Ignore that's like thism example below
Ignore:
- Player
- AnotherPlayer
how do i check if Ignore contains a player's name
Check if the level is at 60 when ur setting it, if so dont change anything
anyone
config.getStringList("Ignore").contains("name")
I think that will work
thanks
im assuming you donβt know how to fix my issue π¦
If anyone is wondering, this is the cleaned up version without the numbers
https://paste.md-5.net/bapaguvibu.http
But jtx it seems like it cant find the tweak class or whatever that yes.launch.NitrousTweaker is
@quaint mantle you can get a int from a config or..
if you want Minecraft Exp level player.getLevel();
depends on what you want
fx
- Level : 0
- exp : 0
If anyone knows alot of launching custom jars via minecraft launcher or has some knowledge please join this thread
if you're going for custom Level and exp
i would recommend you make config\configs
to store and get exp / set exp
You need to translate it to proper color codes first
Yes
.
you might need to
see the changelog between
1.8.9 - 1.12.2
from 1.8.9 - 1.9, 1.9 - 1.9.1, etc...
ah okay, only if they had an easier way to do it
ugh what exactly are you trying to do
is points a map?
but you're not talking about vanilla XP right?
@quaint mantle do you know if there is a way to quickly see what was changed from the version before