Jump to content

[Solved]Reverse engineering


chubel10

Recommended Posts

I'm a beginner modder and a concept seems to keep popping up due to its importance is reading the source code. I have also hear it being called "reverse engineering". Is there a guide or could someone help me not get lost in the giant sea that source code can be?

 

Additionally, I'm using eclipse by the way and it seems like the file search feature does not search stuff in external dependencies (where the minecraft source code is). Am I missing something?

 

Help would be greatly appreciated.

Thanks.

Link to comment
Share on other sites

The code for minecraft entities, blocks, etc are all in forge, and that is on your computer. For external dependencies just look up their github.

 

If you don't know Java, or just an inexperienced programmer, diving into Forge with a complex idea isn't going to work out. Anyhow, implement something trivial, for example maybe a new zombie extension, to figure out the ins and outs of what you're working with.

  • Like 1
Link to comment
Share on other sites

1 hour ago, Turtledove said:

The code for minecraft entities, blocks, etc are all in forge, and that is on your computer. For external dependencies just look up their github.

 

If you don't know Java, or just an inexperienced programmer, diving into Forge with a complex idea isn't going to work out. Anyhow, implement something trivial, for example maybe a new zombie extension, to figure out the ins and outs of what you're working with.

Thanks for the reply!

 

My question was more like if anyone had some tips on how to use eclipse-related tools and general navigation things that make reverse engineering easier (like command clicking a method to go to its definition and that kind of stuff)

 

Thanks in advance!

Link to comment
Share on other sites

The right-click menu is great.

Find references, open type hierarchy, navigate to definition and so on.

  • Like 1

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Link to comment
Share on other sites

  • chubel10 changed the title to [Solved]Reverse engineering

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • I tried installing several mods that improves fps with other several gameplay mods that i have added previously and tested to be playable. But when I have added the new mods that improves the fps, Java crashes. (version is 1.20.1)   Here is the crash log:    ---- Minecraft Crash Report ---- // But it works on my machine. Time: 2023-12-08 17:22:22 Description: Initializing game java.lang.IncompatibleClassChangeError: class net.coderbot.iris.gui.option.ShadowDistanceOption cannot inherit from final class net.minecraft.client.OptionInstance     at java.lang.ClassLoader.defineClass1(Native Method) ~[?:?] {}     at java.lang.ClassLoader.defineClass(ClassLoader.java:1017) ~[?:?] {}     at cpw.mods.cl.ModuleClassLoader.readerToClass(ModuleClassLoader.java:119) ~[securejarhandler-2.1.10.jar:?] {}     at cpw.mods.cl.ModuleClassLoader.lambda$findClass$15(ModuleClassLoader.java:219) ~[securejarhandler-2.1.10.jar:?] {}     at cpw.mods.cl.ModuleClassLoader.loadFromModule(ModuleClassLoader.java:229) ~[securejarhandler-2.1.10.jar:?] {}     at cpw.mods.cl.ModuleClassLoader.findClass(ModuleClassLoader.java:219) ~[securejarhandler-2.1.10.jar:?] {}     at cpw.mods.cl.ModuleClassLoader.loadClass(ModuleClassLoader.java:135) ~[securejarhandler-2.1.10.jar:?] {}     at java.lang.ClassLoader.loadClass(ClassLoader.java:525) ~[?:?] {}     at net.coderbot.iris.config.IrisConfig.load(IrisConfig.java:142) ~[oculus-mc1.20.1-1.6.9.jar%23179!/:?] {re:classloading}     at net.coderbot.iris.config.IrisConfig.initialize(IrisConfig.java:58) ~[oculus-mc1.20.1-1.6.9.jar%23179!/:?] {re:classloading}     at net.coderbot.iris.Iris.onEarlyInitialize(Iris.java:146) ~[oculus-mc1.20.1-1.6.9.jar%23179!/:?] {re:mixin,re:classloading}     at net.minecraft.client.Options.handler$zgi000$iris$beforeLoadOptions(Options.java:1430) ~[client-1.20.1-20230612.114412-srg.jar%23189!/:?] {re:mixin,pl:accesstransformer:B,pl:runtimedistcleaner:A,re:classloading,pl:accesstransformer:B,pl:mixin:APP:mixins.oculus.json:MixinOptions_Entrypoint,pl:mixin:APP:mixins.oculus.fixes.maxfpscrash.json:MixinMaxFpsCrashFix,pl:mixin:APP:mixins.oculus.json:sky.MixinOptions_CloudsOverride,pl:mixin:A,pl:runtimedistcleaner:A}     at net.minecraft.client.Options.m_92140_(Options.java) ~[client-1.20.1-20230612.114412-srg.jar%23189!/:?] {re:mixin,pl:accesstransformer:B,pl:runtimedistcleaner:A,re:classloading,pl:accesstransformer:B,pl:mixin:APP:mixins.oculus.json:MixinOptions_Entrypoint,pl:mixin:APP:mixins.oculus.fixes.maxfpscrash.json:MixinMaxFpsCrashFix,pl:mixin:APP:mixins.oculus.json:sky.MixinOptions_CloudsOverride,pl:mixin:A,pl:runtimedistcleaner:A}     at net.minecraft.client.Options.<init>(Options.java:888) ~[client-1.20.1-20230612.114412-srg.jar%23189!/:?] {re:mixin,pl:accesstransformer:B,pl:runtimedistcleaner:A,re:classloading,pl:accesstransformer:B,pl:mixin:APP:mixins.oculus.json:MixinOptions_Entrypoint,pl:mixin:APP:mixins.oculus.fixes.maxfpscrash.json:MixinMaxFpsCrashFix,pl:mixin:APP:mixins.oculus.json:sky.MixinOptions_CloudsOverride,pl:mixin:A,pl:runtimedistcleaner:A}     at net.minecraft.client.Minecraft.<init>(Minecraft.java:425) ~[client-1.20.1-20230612.114412-srg.jar%23189!/:?] {re:mixin,pl:accesstransformer:B,pl:runtimedistcleaner:A,re:classloading,pl:accesstransformer:B,pl:mixin:APP:rubidium_extras.mixins.json:FrameCounter.FpsAccessorMixin,pl:mixin:APP:rubidium.mixins.json:core.MinecraftClientMixin,pl:mixin:APP:mixins.oculus.json:MixinMinecraft_PipelineManagement,pl:mixin:A,pl:runtimedistcleaner:A}     at net.minecraft.client.main.Main.main(Main.java:182) ~[1.20.1-forge-47.2.0.jar:?] {re:classloading,pl:runtimedistcleaner:A}     at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?] {}     at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) ~[?:?] {}     at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?] {}     at java.lang.reflect.Method.invoke(Method.java:568) ~[?:?] {}     at net.minecraftforge.fml.loading.targets.CommonLaunchHandler.runTarget(CommonLaunchHandler.java:111) ~[fmlloader-1.20.1-47.2.0.jar:?] {}     at net.minecraftforge.fml.loading.targets.CommonLaunchHandler.clientService(CommonLaunchHandler.java:99) ~[fmlloader-1.20.1-47.2.0.jar:?] {}     at net.minecraftforge.fml.loading.targets.CommonClientLaunchHandler.lambda$makeService$0(CommonClientLaunchHandler.java:25) ~[fmlloader-1.20.1-47.2.0.jar:?] {}     at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:30) ~[modlauncher-10.0.9.jar:?] {}     at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:53) ~[modlauncher-10.0.9.jar:?] {}     at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:71) ~[modlauncher-10.0.9.jar:?] {}     at cpw.mods.modlauncher.Launcher.run(Launcher.java:108) ~[modlauncher-10.0.9.jar:?] {}     at cpw.mods.modlauncher.Launcher.main(Launcher.java:78) ~[modlauncher-10.0.9.jar:?] {}     at cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:26) ~[modlauncher-10.0.9.jar:?] {}     at cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:23) ~[modlauncher-10.0.9.jar:?] {}     at cpw.mods.bootstraplauncher.BootstrapLauncher.main(BootstrapLauncher.java:141) ~[bootstraplauncher-1.1.2.jar:?] {} A detailed walkthrough of the error, its code path and all known details is as follows: --------------------------------------------------------------------------------------- -- Head -- Thread: Render thread Stacktrace:     at java.lang.ClassLoader.defineClass1(Native Method) ~[?:?] {}     at java.lang.ClassLoader.defineClass(ClassLoader.java:1017) ~[?:?] {}     at cpw.mods.cl.ModuleClassLoader.readerToClass(ModuleClassLoader.java:119) ~[securejarhandler-2.1.10.jar:?] {}     at cpw.mods.cl.ModuleClassLoader.lambda$findClass$15(ModuleClassLoader.java:219) ~[securejarhandler-2.1.10.jar:?] {}     at cpw.mods.cl.ModuleClassLoader.loadFromModule(ModuleClassLoader.java:229) ~[securejarhandler-2.1.10.jar:?] {}     at cpw.mods.cl.ModuleClassLoader.findClass(ModuleClassLoader.java:219) ~[securejarhandler-2.1.10.jar:?] {}     at cpw.mods.cl.ModuleClassLoader.loadClass(ModuleClassLoader.java:135) ~[securejarhandler-2.1.10.jar:?] {}     at java.lang.ClassLoader.loadClass(ClassLoader.java:525) ~[?:?] {}     at net.coderbot.iris.config.IrisConfig.load(IrisConfig.java:142) ~[oculus-mc1.20.1-1.6.9.jar%23179!/:?] {re:classloading}     at net.coderbot.iris.config.IrisConfig.initialize(IrisConfig.java:58) ~[oculus-mc1.20.1-1.6.9.jar%23179!/:?] {re:classloading}     at net.coderbot.iris.Iris.onEarlyInitialize(Iris.java:146) ~[oculus-mc1.20.1-1.6.9.jar%23179!/:?] {re:mixin,re:classloading}     at net.minecraft.client.Options.handler$zgi000$iris$beforeLoadOptions(Options.java:1430) ~[client-1.20.1-20230612.114412-srg.jar%23189!/:?] {re:mixin,pl:accesstransformer:B,pl:runtimedistcleaner:A,re:classloading,pl:accesstransformer:B,pl:mixin:APP:mixins.oculus.json:MixinOptions_Entrypoint,pl:mixin:APP:mixins.oculus.fixes.maxfpscrash.json:MixinMaxFpsCrashFix,pl:mixin:APP:mixins.oculus.json:sky.MixinOptions_CloudsOverride,pl:mixin:A,pl:runtimedistcleaner:A}     at net.minecraft.client.Options.m_92140_(Options.java) ~[client-1.20.1-20230612.114412-srg.jar%23189!/:?] {re:mixin,pl:accesstransformer:B,pl:runtimedistcleaner:A,re:classloading,pl:accesstransformer:B,pl:mixin:APP:mixins.oculus.json:MixinOptions_Entrypoint,pl:mixin:APP:mixins.oculus.fixes.maxfpscrash.json:MixinMaxFpsCrashFix,pl:mixin:APP:mixins.oculus.json:sky.MixinOptions_CloudsOverride,pl:mixin:A,pl:runtimedistcleaner:A}     at net.minecraft.client.Options.<init>(Options.java:888) ~[client-1.20.1-20230612.114412-srg.jar%23189!/:?] {re:mixin,pl:accesstransformer:B,pl:runtimedistcleaner:A,re:classloading,pl:accesstransformer:B,pl:mixin:APP:mixins.oculus.json:MixinOptions_Entrypoint,pl:mixin:APP:mixins.oculus.fixes.maxfpscrash.json:MixinMaxFpsCrashFix,pl:mixin:APP:mixins.oculus.json:sky.MixinOptions_CloudsOverride,pl:mixin:A,pl:runtimedistcleaner:A}     at net.minecraft.client.Minecraft.<init>(Minecraft.java:425) ~[client-1.20.1-20230612.114412-srg.jar%23189!/:?] {re:mixin,pl:accesstransformer:B,pl:runtimedistcleaner:A,re:classloading,pl:accesstransformer:B,pl:mixin:APP:rubidium_extras.mixins.json:FrameCounter.FpsAccessorMixin,pl:mixin:APP:rubidium.mixins.json:core.MinecraftClientMixin,pl:mixin:APP:mixins.oculus.json:MixinMinecraft_PipelineManagement,pl:mixin:A,pl:runtimedistcleaner:A} -- Initialization -- Details:     Modules:  Stacktrace:     at net.minecraft.client.main.Main.main(Main.java:182) ~[1.20.1-forge-47.2.0.jar:?] {re:classloading,pl:runtimedistcleaner:A}     at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?] {}     at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) ~[?:?] {}     at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?] {}     at java.lang.reflect.Method.invoke(Method.java:568) ~[?:?] {}     at net.minecraftforge.fml.loading.targets.CommonLaunchHandler.runTarget(CommonLaunchHandler.java:111) ~[fmlloader-1.20.1-47.2.0.jar:?] {}     at net.minecraftforge.fml.loading.targets.CommonLaunchHandler.clientService(CommonLaunchHandler.java:99) ~[fmlloader-1.20.1-47.2.0.jar:?] {}     at net.minecraftforge.fml.loading.targets.CommonClientLaunchHandler.lambda$makeService$0(CommonClientLaunchHandler.java:25) ~[fmlloader-1.20.1-47.2.0.jar:?] {}     at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:30) ~[modlauncher-10.0.9.jar:?] {}     at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:53) ~[modlauncher-10.0.9.jar:?] {}     at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:71) ~[modlauncher-10.0.9.jar:?] {}     at cpw.mods.modlauncher.Launcher.run(Launcher.java:108) ~[modlauncher-10.0.9.jar:?] {}     at cpw.mods.modlauncher.Launcher.main(Launcher.java:78) ~[modlauncher-10.0.9.jar:?] {}     at cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:26) ~[modlauncher-10.0.9.jar:?] {}     at cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:23) ~[modlauncher-10.0.9.jar:?] {}     at cpw.mods.bootstraplauncher.BootstrapLauncher.main(BootstrapLauncher.java:141) ~[bootstraplauncher-1.1.2.jar:?] {} -- System Details -- Details:     Minecraft Version: 1.20.1     Minecraft Version ID: 1.20.1     Operating System: Mac OS X (aarch64) version 14.1.2     Java Version: 17.0.8, Microsoft     Java VM Version: OpenJDK 64-Bit Server VM (mixed mode), Microsoft     Memory: 285189552 bytes (271 MiB) / 536870912 bytes (512 MiB) up to 2147483648 bytes (2048 MiB)     CPUs: 8     Processor Vendor: Apple Inc.     Processor Name: Apple M1     Identifier: Apple Inc. Family 0x1b588bb3 Model 0 Stepping 0     Microarchitecture: ARM64 SoC: Firestorm + Icestorm     Frequency (GHz): 3.20     Number of physical packages: 1     Number of physical CPUs: 8     Number of logical CPUs: 8     Graphics card #0 name: Apple M1     Graphics card #0 vendor: Apple (0x106b)     Graphics card #0 VRAM (MB): 0.00     Graphics card #0 deviceId: unknown     Graphics card #0 versionInfo: unknown     Memory slot #0 capacity (MB): 0.00     Memory slot #0 clockSpeed (GHz): 0.00     Memory slot #0 type: unknown     Virtual memory max (MB): 11264.00     Virtual memory used (MB): 7656.59     Swap memory total (MB): 3072.00     Swap memory used (MB): 1509.94     JVM Flags: 7 total; -Xmx2G -XX:+UnlockExperimentalVMOptions -XX:+UseG1GC -XX:G1NewSizePercent=20 -XX:G1ReservePercent=20 -XX:MaxGCPauseMillis=50 -XX:G1HeapRegionSize=32M     Launched Version: 1.20.1-forge-47.2.0     Backend library: LWJGL version 3.3.1 build 7     Backend API: Unknown     Window size: <not initialized>     GL Caps: Using framebuffer using OpenGL 3.2     GL debug messages: <disabled>     Using VBOs: Yes     Is Modded: Definitely; Client brand changed to 'forge'     Type: Client (map_client.txt)     CPU: <unknown>
    • I have created a mod which applies x shader to the player after consuming x item for a certain time, but if the player presses f5 to change the camera the shader stops working. The only way I have found to prevent the shader from being deactivated is to load it on all ticks until it is disabled but this greatly reduces the performance of the game. I have also tried to cancel the event of changing the camera but this is not cancelable. Any advice, I've been trying to solve this for several days 😵‍💫  
    • Minecraft 1.20.1 Forge 47.2.0 log and crash report: https://pastebin.com/P7tQymQS ; (crash report) I launch the game and i got this error: Someone could help me please?  
  • Topics

×
×
  • Create New...

Important Information

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