Closed AngryCarrot789 closed 3 years ago
Follow the examples and you wont have this issue: https://www.spigotmc.org/threads/spigot-bungeecord-1-17-1-17-1.510208/#post-4184317
im not sure those will help tbh, thats for minecraft 1.17 but im using 1.6.4 :( ive also tried using some of the command parameters from one of the replies, but they dont seem to help either
Same thing, you need an MC jar in your classpath or as a remapped depend if using the maven plugin
i still cant get it to work :(
my full command is: java -classpath minecraft_server-mcpremap.jar -jar specialsource.jar --live --in-jar ModFileMCP.jar --out-jar ModFileObfus.jar --srg-in obf2srg.srg --reverse
. all of these files are in the same directory too
it remapps the class names (converts EntityPlayer
to uf
, but the methods that were inherited aren't). on that forum they used the --live
parameter, but it still doesn't work. i even tried changing the classpath from the minecraft_server-mcpremap (containing MCP class names/methods/fields) to the obfuscated version (obfuscated everything, no packages), but none of that works
and ive also tried supplying --srg-in
with a folder which contains files like fields.csv, joined.srg, packaged.srg, etc. that didn't work either
You can't mix -classpath and -jar. Read the forum post example closely.
ah i see. i managed to get it to remap the function :) using java -cp specialsource.jar;minecraft_server-mcpremap.jar net.md_5.specialsource.SpecialSource --live -i ModFileMCP.jar -o ModFileObfus.jar -m obf2srg.srg --reverse
thanks for helping too :)))
It seems that the issue raised applies when using SpecialSource jar in BuildTools.jar directory ./BuildData/bin/SpecialSource.jar
, even with the manual commands presented in https://www.spigotmc.org/threads/spigot-bungeecord-1-17-1-17-1.510208/#post-4184317
im trying to reobfuscate a minecraft mod, and i have the srg file all setup, and this is my code:
player.setSprinting(true)
the
setSprinting
function is found in the classLivingEntity
. but theplayer
variable is anEntityPlayer
which is in a different package, but it extendsLivingEntity
(so,public class EntityPlayer extends LivingEntity
). and as a result, thesetSprinting
method never gets remapped, even when using the--reverse
parameter when remapping. the only fix i've found, is to manually edit the .srg file, and change the method location fromLivingEntity
toEntityPlayer
(and also change the obfuscated class and method names too), but that would break other things too...i've heard another fix is to deliberately cast the
EntityPlayer
method toLivingEntity
(in my case atleast), so the code would look like this:((LivingEntity) player).setSprinting(true)
. i haven't tried that, but i assume it does work. but i dont really want to have to do that for every line of code. or maybe there's an option in the compiler to make it do this? im not sureis this fixable? or do i just have to do the above; manually cast the derived class to the base classes