Jump to content

Replacing base class


sep87x

Recommended Posts

So, last question: the Methods.class in your patch method ... does it contain a method it should be replaced with?

yes. It has the renderFirstPersonArm() as it is in the jar. THATS VERY IMPORTANT. If there's a return, etc, you still need to do that return.

My function's parameters that I gave you are as follows:

name: the name of the method you need, obfuscated or not. (do both, call it twice)

bytes the bytes you recived from the transform method

desc is the methods description

iFile is the path to the class containing the replacement methods.

rname is the name of the replacement method.

Hope I could help.

Link to comment
Share on other sites

And I don't see it in your code spoiler :P

It is there. Its in the transform method below the first code. It is right under the print saying what kind of transformation is being done and what kind of environment the game is in.

Link to comment
Share on other sites

Yes, I know, but I wanted to know what the newimport method looks like. I have the call setup in my class now:

 

		if (arg0.equals("acv")) {
		System.out.println("******** INSIDE OBFUSCATED BIOMEGENDESERT TRANSFORMER ABOUT TO PATCH: " + arg0);
		newimport("", arg2);

 

But there must be somewhere the code for the newimport method, you know, the

 

	private void newimport(String string, byte[] arg2) {

}

 

thing, or am I literally unable to spot it?

Link to comment
Share on other sites

dude....... you're returning null in

 

@Override
        public byte[] transform(String arg0, String arg1, byte[] arg2) {
                if (arg0.equals("acv")) {
                        System.out.println("******** INSIDE OBFUSCATED BIOMEGENDESERT TRANSFORMER ABOUT TO PATCH: " + arg0);
                        try {
                                return patch("a", arg2, "(Lue;)V", "/net/sep87x/desertwells/ASMMethods.class", "decorate");
                        } catch (IOException e) {
                                e.printStackTrace();
                        }
                }
               
                if (arg0.equals("net.minecraft.world.biome.BiomeGenDesert")) {
                        System.out.println("******** INSIDE BIOMEGENDESERT TRANSFORMER ABOUT TO PATCH: " + arg0);
                        try {
                                return patch("decorate", arg2, "(Lnet/minecraft/world/World;Ljava/util/Random;II)V", "/net/sep87x/desertwells/ASMMethods.class", "decorate");
                        } catch (IOException e) {
                                e.printStackTrace();
                        }
                }
               
                return null;
        }

 

change that "return null" to "return arg2"

Link to comment
Share on other sites

I would never had thought that the fault lies in the return of the transform method. Shut up and take all my Thank-you's :)

 

One last question before beta testing. This works absolutely sweet in a deobfuscated environment, but I am a bit worried about the functionality in an obfuscated environment.

 

return patch("a", arg2, "(Lue;)V", "/net/sep87x/desertwells/ASMMethods.class", "decorate");

 

What does the description "(Lue;)V" stand for? I know what the V means, but what does Lue; mean? Is that the obfuscated name of the RenderPlayer class? And if so, how do I need to make it fit the unobfuscated description "(Lnet/minecraft/world/World;Ljava/util/Random;II)V". Does it stay the same?

Link to comment
Share on other sites

i'm too lazy to check what class it is, but yes, it's the obfuscated name of some class, and yes, you need to change it. you need to find out the obfuscated name of World.class and use that. so, for example:

 

if World.class's obfuscated name is "asdfasdf.class"

 

(Lnet/minecraft/world/World;Ljava/util/Random;II)V

 

will turn into

 

(Lasdfasdf;Ljava/util/Random;II)V

 

that goes for all classes that get obfuscated.

 

 

 

EDIT:

 

if i remember right, "arg1" in

 

public byte[] transform(String arg0, String arg1, byte[] arg2)

 

is already the unobfuscated name. if it is, that would make things much easier. normally, i use the obfuscated names whenever i recompile and run my coremods in mc. i don't remember why i opted not to use that second argument. i'll have to look into again and do some testing to see if it is and if it's safe. i'll get back here if i find anything useful

Link to comment
Share on other sites

Wow, it's done crashing and it doesn't seem to works just fine. It seems like the replacement method returns null, but this shouldn't be happening.

 

java.lang.NoClassDefFoundError: net/minecraft/world/biome/BiomeGenDesert
at net.minecraft.world.biome.BiomeGenBase.<clinit>(BiomeGenBase.java:43)
at net.minecraft.world.WorldType.<clinit>(WorldType.java:23)
at net.minecraft.world.storage.WorldInfo.<init>(WorldInfo.java:88)
at net.minecraft.world.storage.SaveFormatOld.func_75803_c(SourceFile:59)
at net.minecraft.world.chunk.storage.AnvilSaveConverter.func_75799_b(SourceFile:57)
at net.minecraft.client.gui.GuiSelectWorld.func_74073_h(SourceFile:75)
at net.minecraft.client.gui.GuiSelectWorld.func_73866_w_(SourceFile:54)
at net.minecraft.client.gui.GuiScreen.func_73872_a(SourceFile:94)
at net.minecraft.client.Minecraft.func_71373_a(Minecraft.java:720)
at net.minecraft.client.gui.GuiMainMenu.func_73875_a(GuiMainMenu.java:297)
at net.minecraft.client.gui.GuiScreen.func_73864_a(SourceFile:69)
at net.minecraft.client.gui.GuiMainMenu.func_73864_a(GuiMainMenu.java:619)
at net.minecraft.client.gui.GuiScreen.func_73867_d(SourceFile:128)
at net.minecraft.client.gui.GuiScreen.func_73862_m(SourceFile:107)
at net.minecraft.client.Minecraft.func_71407_l(Minecraft.java:1554)
at net.minecraft.client.Minecraft.func_71411_J(Minecraft.java:898)
at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:826)
at net.minecraft.client.main.Main.main(SourceFile:101)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at net.minecraft.launchwrapper.Launch.launch(Launch.java:57)
at net.minecraft.launchwrapper.Launch.main(Launch.java:18)
Caused by: java.lang.ClassNotFoundException: net.minecraft.world.biome.BiomeGenDesert
at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:179)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 24 more
Caused by: java.lang.NullPointerException
at net.sep87x.desertwells.DesertGenClassTransformer.patch(DesertGenClassTransformer.java:80)
at net.sep87x.desertwells.DesertGenClassTransformer.transform(DesertGenClassTransformer.java:23)
at net.minecraft.launchwrapper.LaunchClassLoader.runTransformers(LaunchClassLoader.java:267)
at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:165)
... 26 more

 

Again, I have no idea what could be the error. The method exists and is NOT null. Could it be caused by the super-call? http://gw.minecraftforge.net/9j8v http://gw.minecraftforge.net/SQLk

(Done in an obfuscated environment)

 

Edit: The error has been created because there wasn't a replacement method. It exists though. What could be the source of the error?

 

Edit 2: Oh man, I forgot that the method name inside the ASMMethods class is also obfuscated. Changed it. Works. Thanks to anyonw who has helped :)

Link to comment
Share on other sites

Wow, it's done crashing and it doesn't seem to works just fine. It seems like the replacement method returns null, but this shouldn't be happening.

 

java.lang.NoClassDefFoundError: net/minecraft/world/biome/BiomeGenDesert
at net.minecraft.world.biome.BiomeGenBase.<clinit>(BiomeGenBase.java:43)
at net.minecraft.world.WorldType.<clinit>(WorldType.java:23)
at net.minecraft.world.storage.WorldInfo.<init>(WorldInfo.java:88)
at net.minecraft.world.storage.SaveFormatOld.func_75803_c(SourceFile:59)
at net.minecraft.world.chunk.storage.AnvilSaveConverter.func_75799_b(SourceFile:57)
at net.minecraft.client.gui.GuiSelectWorld.func_74073_h(SourceFile:75)
at net.minecraft.client.gui.GuiSelectWorld.func_73866_w_(SourceFile:54)
at net.minecraft.client.gui.GuiScreen.func_73872_a(SourceFile:94)
at net.minecraft.client.Minecraft.func_71373_a(Minecraft.java:720)
at net.minecraft.client.gui.GuiMainMenu.func_73875_a(GuiMainMenu.java:297)
at net.minecraft.client.gui.GuiScreen.func_73864_a(SourceFile:69)
at net.minecraft.client.gui.GuiMainMenu.func_73864_a(GuiMainMenu.java:619)
at net.minecraft.client.gui.GuiScreen.func_73867_d(SourceFile:128)
at net.minecraft.client.gui.GuiScreen.func_73862_m(SourceFile:107)
at net.minecraft.client.Minecraft.func_71407_l(Minecraft.java:1554)
at net.minecraft.client.Minecraft.func_71411_J(Minecraft.java:898)
at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:826)
at net.minecraft.client.main.Main.main(SourceFile:101)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at net.minecraft.launchwrapper.Launch.launch(Launch.java:57)
at net.minecraft.launchwrapper.Launch.main(Launch.java:18)
Caused by: java.lang.ClassNotFoundException: net.minecraft.world.biome.BiomeGenDesert
at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:179)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 24 more
Caused by: java.lang.NullPointerException
at net.sep87x.desertwells.DesertGenClassTransformer.patch(DesertGenClassTransformer.java:80)
at net.sep87x.desertwells.DesertGenClassTransformer.transform(DesertGenClassTransformer.java:23)
at net.minecraft.launchwrapper.LaunchClassLoader.runTransformers(LaunchClassLoader.java:267)
at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:165)
... 26 more

 

Again, I have no idea what could be the error. The method exists and is NOT null. Could it be caused by the super-call? http://gw.minecraftforge.net/9j8v http://gw.minecraftforge.net/SQLk

(Done in an obfuscated environment)

 

Edit: The error has been created because there wasn't a replacement method. It exists though. What could be the source of the error?

 

Edit 2: Oh man, I forgot that the method name inside the ASMMethods class is also obfuscated. Changed it. Works. Thanks to anyonw who has helped :)

I knew your problem was in the returning of the bytes xD. Guess I just missed that, because I assumed after you changed your code it would be fixed. Glad you got this worked out.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.

Announcements



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • 20 SLOT DEMO GRATIS PRAGMATIC PLAY x500 RUPIAH ANTI LAG & 20 DEMO SLOT MAHJONG WAYS PG SOFT GRATIS ANTI RUNGKAD KLIK DISINI DAFTAR DISINI SLOT VVIP << KLIK DISINI DAFTAR DISINI SLOT VVIP << KLIK DISINI DAFTAR DISINI SLOT VVIP << KLIK DISINI DAFTAR DISINI SLOT VVIP << SITUS SLOT GACOR 88 MAXWIN X500 HARI INI TERBAIK DAN TERPERCAYA GAMPANG MENANG Dunia Game gacor terus bertambah besar seiring berjalannya waktu, dan sudah tentu dunia itu terus berkembang serta merta bersamaan dengan berkembangnya SLOT GACOR sebagai website number #1 yang pernah ada dan tidak pernah mengecewakan sekalipun. Dengan banyaknya member yang sudah mempercayakan untuk terus menghasilkan uang bersama dengan SLOT GACOR pastinya mereka sudah percaya untuk bermain Game online bersama dengan kami dengan banyaknya testimoni yang sudah membuktikan betapa seringnya member mendapatkan jackpot besar yang bisa mencapai ratusan juta rupiah. Best online Game website that give you more money everyday, itu lah slogan yang tepat untuk bermain bersama SLOT GACOR yang sudah pasti menang setiap harinya dan bisa menjadikan bandar ini sebagai patokan untuk mendapatkan penghasilan tambahan yang efisien dan juga sesuatu hal yang fix setiap hari nya. Kami juga mendapatkan julukan sebagai Number #1 website bocor yang berarti terus memberikan member uang asli dan jackpot setiap hari nya, tidak lupa bocor itu juga bisa diartikan dalam bentuk berbagi promosi untuk para official member yang terus setia bermain bersama dengan kami. Berbagai provider Game terus bertambah banyak setiap harinya dan terus melakukan support untuk membuat para official member terus bisa menang dan terus maxwin dalam bentuk apapun maka itu langsung untuk feel free to try yourself, play with SLOT GACOR now or never !
    • BOCORAN POLA SLOT GACOR MAHJONG WAYS MAXWIN x500 PETIR MERAH HARI INI HINGGA MALAM INI KLIK DISINI DAFTAR SLOT VVIP << KLIK DISINI DAFTAR SLOT VVIP << KLIK DISINI DAFTAR SLOT VVIP << KLIK DISINI DAFTAR SLOT VVIP << SITUS SLOT GACOR 88 MAXWIN X500 HARI INI TERBAIK DAN TERPERCAYA GAMPANG MENANG Dunia Game gacor terus bertambah besar seiring berjalannya waktu, dan sudah tentu dunia itu terus berkembang serta merta bersamaan dengan berkembangnya SLOT GACOR sebagai website number #1 yang pernah ada dan tidak pernah mengecewakan sekalipun. Dengan banyaknya member yang sudah mempercayakan untuk terus menghasilkan uang bersama dengan SLOT GACOR pastinya mereka sudah percaya untuk bermain Game online bersama dengan kami dengan banyaknya testimoni yang sudah membuktikan betapa seringnya member mendapatkan jackpot besar yang bisa mencapai ratusan juta rupiah. Best online Game website that give you more money everyday, itu lah slogan yang tepat untuk bermain bersama SLOT GACOR yang sudah pasti menang setiap harinya dan bisa menjadikan bandar ini sebagai patokan untuk mendapatkan penghasilan tambahan yang efisien dan juga sesuatu hal yang fix setiap hari nya. Kami juga mendapatkan julukan sebagai Number #1 website bocor yang berarti terus memberikan member uang asli dan jackpot setiap hari nya, tidak lupa bocor itu juga bisa diartikan dalam bentuk berbagi promosi untuk para official member yang terus setia bermain bersama dengan kami. Berbagai provider Game terus bertambah banyak setiap harinya dan terus melakukan support untuk membuat para official member terus bisa menang dan terus maxwin dalam bentuk apapun maka itu langsung untuk feel free to try yourself, play with SLOT GACOR now or never !
    • Museumbola merupakan wadah judi online terkhusus untuk sbobet atau judi bola. Dengan daftar dan deposit menggunakan BANK BCA, Anda berkesempatan mendapatkan prediksi jitu pertandingan secara update setiap hari yang bisa anda jadikan acuan untuk bermain judi bola. Hanya dengan 10 ribu rupiah dan anda bermain Mix Parlay menggunakan prediksi yang telah di sediakan oleh kami, anda akan memenangkan jutaan rupiah. Yuk segera klik DAFTAR sekarang juga.
    • I was just trying to play my modded world when i randomly got this crash for no reason. I sorted through like every mod and eventually I realized it was LLibrary but I can't seem to find a solution to fix the crashing. I can't lose the world that I have that uses this mod please help me. Here's the report: https://pastebin.com/0D00B79i If anyone has a solution please let me know.  
    • 🤑DAFTAR & LOGIN🤑 🤑DAFTAR & LOGIN🤑 🤑DAFTAR & LOGIN🤑   Daftar Slot Ligawin88 adalah bocoran slot rekomendasi gacor dari Ligawin88 yang bisa anda temukan di SLOT Ligawin88. Situs SLOT Ligawin88 hari ini yang kami bagikan di sini adalah yang terbaik dan bersiaplah untuk mengalami sensasi tak terlupakan dalam permainan slot online. Temukan game SLOT Ligawin88 terbaik dengan 100 pilihan provider ternama yang dipercaya akan memberikan kepuasan dan kemenangan hari ini untuk meraih x500. RTP SLOT Ligawin88 merupakan SLOT Ligawin88 hari ini yang telah menjadi pilihan utama bagi pemain judi online di seluruh Indonesia. Setiap harinya jutaan pemain memasuki dunia maya untuk memperoleh hiburan seru dan kemenangan besar dalam bermain slot dengan adanya bocoran RTP SLOT Ligawin88. Tidak ada yang lebih menyenangkan daripada mengungguli mesin slot dan meraih jackpot x500 yang menggiurkan di situs SLOT Ligawin88 hari ini yang telah disediakan SLOT Ligawin88. Menangkan jackpot besar x500 rajanya maxwin dari segala slot dan raih kemenangan spektakuler di situs Ligawin88 terbaik 2024 adalah tempat yang menyediakan mesin slot dengan peluang kemenangan lebih tinggi daripada situs slot lainnya. Bagi anda yang mencari pengalaman judi slot paling seru dan mendebarkan, situs bo SLOT Ligawin88 terbaik 2024 adalah pilihan yang tepat. Jelajahi dunia slot online melalui situs SLOT Ligawin88 di link SLOT Ligawin88.
  • Topics

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.