Jump to content

How do I learn to make a coremod? (Dun dun dun...)


SuperGeniusZeb
 Share

Recommended Posts

See title. Specifically, I want to be able to override just 1 method in BlockPistonStructureHelper... addBlockLine() to be specific. I'm trying to increase the piston push limit from 12 to 16, and having taken a look at the vanilla code, I can see that it's literally a 2-line change to do it. I am well aware that coremodding is by far no easy task (especially for someone with as little experience as myself), and is one of the most complex and hated aspects of modding. But I want to try anyway and hopefully learn something and gain some experience, even if I fail. Where do I start, and also, what are the alternatives to using a coremod? I know Forge replaces vanilla buckets with custom ones, but I'm not sure how I would do something like that and ensure compatiblity with mods requiring pistons in recipes and stuff like that, or how difficult it would be in comparison to coremodding.

Colore - The mod that adds monochrome blocks in every color of the rainbow!

http://www.minecraftforge.net/forum/index.php?topic=35149

 

If you're looking to learn how to make mods for 1.9.4, I wrote a helpful article with links to a lot of useful resources for learning Minecraft 1.9.4 modding!

 

http://supergeniuszeb.com/mods/a-helpful-list-of-minecraft-1-9-4-modding-resources/

Link to comment
Share on other sites

what are the alternatives to using a coremod? I know Forge replaces vanilla buckets with custom ones, but I'm not sure how I would do something like that and ensure compatiblity with mods requiring pistons in recipes and stuff like that, or how difficult it would be in comparison to coremodding.

 

Skipping over the "where to start" because don't.  You will not find Forge-specific details on starting to coremod.  There used to be slight hint here and there, but the Forge team is working to make it so that coremodding is not needed at all.  Instead, make a pull request to get the change you want implemented into Forge itself.  I recently did that myself.

 

On to the other question, alternatives:

Block/Item substitution

OreDictionary ("requiring pistons in recipes") or outright modifying the list of recipes to find entries that don't use oredict recipes.

Events - almost everything you'd want to be able to do as a result of coremodding has an event.  If it doesn't:

Make a pull request

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

As Draco said, in almost all cases, you have an alternative. In in the worst case, when events don't exist, registry aliases don't work, you can try finding another way. For example, overriding the class and using reflection to subsitue instances.

 

@Draco

make a pull request to get the change you want implemented into Forge itself.

There's one problem though... Sometimes (*cough* *cough*) it may take a few months before forge either rejects or accepts your PR... Or it may never ever get neither accepted nor rejected...

Link to comment
Share on other sites

There's one problem though... Sometimes (*cough* *cough*) it may take a few months before forge either rejects or accepts your PR... Or it may never ever get neither accepted nor rejected...

 

As I've found it large comes down to "if it's been a few days, post a comment asking why it's not been accepted."

The entire process is ungodly tedious with several points of failure that it is very easy as a programmer to overlook and which Lex will come along and go "You did X wrong" and then proceed to mark every occurrence with "..." as if you're somehow only barely intelligent.

 

The "how to do this properly" list of guidelines is very sparse and doesn't teach you how to look at the patch file and find these problems on your own.  Took at least four rounds of review before I fully understood how I was supposed to be doing things.

 

Or in one case for me, "rejected because it alters vanilla behavior" which I thought was the whole point (as opposed to "rejected because you should have gone about it in by doing X instead of Y").

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

Guest
This topic is now closed to further replies.
 Share



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • Got this Issue here. Tried a few things but nothing really helpd.     [08Dec2022 10:35:03.461] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1052]: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException 3668[08Dec2022 10:35:03.461] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1052]: at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:39) 3669[08Dec2022 10:35:03.461] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1052]: at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:54) 3670[08Dec2022 10:35:03.461] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1052]: at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:72) 3671[08Dec2022 10:35:03.461] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1052]: at cpw.mods.modlauncher.Launcher.run(Launcher.java:82) 3672[08Dec2022 10:35:03.461] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1052]: at cpw.mods.modlauncher.Launcher.main(Launcher.java:66) 3673[08Dec2022 10:35:03.462] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1052]: at net.minecraftforge.server.ServerMain$Runner.runLauncher(ServerMain.java:49) 3674[08Dec2022 10:35:03.462] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1052]: at net.minecraftforge.server.ServerMain$Runner.access$100(ServerMain.java:46) 3675[08Dec2022 10:35:03.462] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1052]: at net.minecraftforge.server.ServerMain.main(ServerMain.java:43) 3676[08Dec2022 10:35:03.462] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1061]: Caused by: java.lang.reflect.InvocationTargetException 3677[08Dec2022 10:35:03.462] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1061]: at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 3678[08Dec2022 10:35:03.462] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1061]: at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) 3679[08Dec2022 10:35:03.462] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1061]: at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) 3680[08Dec2022 10:35:03.462] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1061]: at java.lang.reflect.Method.invoke(Method.java:498) 3681[08Dec2022 10:35:03.462] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1061]: at net.minecraftforge.fml.loading.FMLServerLaunchProvider.lambda$launchService$0(FMLServerLaunchProvider.java:37) 3682[08Dec2022 10:35:03.462] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1061]: at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:37) 3683[08Dec2022 10:35:03.462] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1061]: ... 7 more 3684[08Dec2022 10:35:03.462] [main/INFO] [STDERR/]: [java.lang.Throwable:printStackTrace:644]: Caused by: org.spongepowered.asm.mixin.transformer.throwables.MixinTransformerError: An unexpected critical error was encountered 3685[08Dec2022 10:35:03.462] [main/INFO] [STDERR/]: [java.lang.Throwable:printStackTrace:644]: at org.spongepowered.asm.mixin.transformer.MixinProcessor.applyMixins(MixinProcessor.java:392) 3686[08Dec2022 10:35:03.462] [main/INFO] [STDERR/]: [java.lang.Throwable:printStackTrace:644]: at org.spongepowered.asm.mixin.transformer.MixinTransformer.transformClass(MixinTransformer.java:250) 3687[08Dec2022 10:35:03.463] [main/INFO] [STDERR/]: [java.lang.Throwable:printStackTrace:644]: at org.spongepowered.asm.service.modlauncher.MixinTransformationHandler.processClass(MixinTransformationHandler.java:131) 3688[08Dec2022 10:35:03.463] [main/INFO] [STDERR/]: [java.lang.Throwable:printStackTrace:644]: at org.spongepowered.asm.launch.MixinLaunchPluginLegacy.processClass(MixinLaunchPluginLegacy.java:131) 3689[08Dec2022 10:35:03.463] [main/INFO] [STDERR/]: [java.lang.Throwable:printStackTrace:644]: at cpw.mods.modlauncher.serviceapi.ILaunchPluginService.processClassWithFlags(ILaunchPluginService.java:154) 3690[08Dec2022 10:35:03.463] [main/INFO] [STDERR/]: [java.lang.Throwable:printStackTrace:644]: at cpw.mods.modlauncher.LaunchPluginHandler.offerClassNodeToPlugins(LaunchPluginHandler.java:85) 3691[08Dec2022 10:35:03.463] [main/INFO] [STDERR/]: [java.lang.Throwable:printStackTrace:644]: at cpw.mods.modlauncher.ClassTransformer.transform(ClassTransformer.java:120) 3692[08Dec2022 10:35:03.463] [main/INFO] [STDERR/]: [java.lang.Throwable:printStackTrace:644]: at cpw.mods.modlauncher.TransformingClassLoader$DelegatedClassLoader.findClass(TransformingClassLoader.java:265) 3693[08Dec2022 10:35:03.463] [main/INFO] [STDERR/]: [java.lang.Throwable:printStackTrace:644]: at cpw.mods.modlauncher.TransformingClassLoader.loadClass(TransformingClassLoader.java:136) 3694[08Dec2022 10:35:03.463] [main/INFO] [STDERR/]: [java.lang.Throwable:printStackTrace:644]: at cpw.mods.modlauncher.TransformingClassLoader.loadClass(TransformingClassLoader.java:98) 3695[08Dec2022 10:35:03.463] [main/INFO] [STDERR/]: [java.lang.Throwable:printStackTrace:644]: at java.lang.ClassLoader.loadClass(ClassLoader.java:351) 3696[08Dec2022 10:35:03.463] [main/INFO] [STDERR/]: [java.lang.Throwable:printStackTrace:644]: at net.minecraft.block.Blocks.<clinit>(Blocks.java:30) 3697[08Dec2022 10:35:03.463] [main/INFO] [STDERR/]: [java.lang.Throwable:printStackTrace:644]: at net.minecraft.world.gen.surfacebuilders.SurfaceBuilder.<clinit>(SurfaceBuilder.java:12) 3698[08Dec2022 10:35:03.463] [main/INFO] [STDERR/]: [java.lang.Throwable:printStackTrace:644]: at net.minecraft.world.gen.surfacebuilders.ConfiguredSurfaceBuilders.<clinit>(SourceFile:11) 3699[08Dec2022 10:35:03.463] [main/INFO] [STDERR/]: [java.lang.Throwable:printStackTrace:644]: at net.minecraft.util.registry.WorldGenRegistries.func_243674_g(WorldGenRegistries.java:33) 3700[08Dec2022 10:35:03.463] [main/INFO] [STDERR/]: [java.lang.Throwable:printStackTrace:644]: at net.minecraft.util.registry.WorldGenRegistries.func_243668_a(WorldGenRegistries.java:89) 3701[08Dec2022 10:35:03.463] [main/INFO] [STDERR/]: [java.lang.Throwable:printStackTrace:644]: at java.util.LinkedHashMap.forEach(LinkedHashMap.java:684) 3702[08Dec2022 10:35:03.463] [main/INFO] [STDERR/]: [java.lang.Throwable:printStackTrace:644]: at net.minecraft.util.registry.WorldGenRegistries.<clinit>(WorldGenRegistries.java:88) 3703[08Dec2022 10:35:03.463] [main/INFO] [STDERR/]: [java.lang.Throwable:printStackTrace:644]: at net.minecraft.util.registry.Registry.<clinit>(Registry.java:464) 3704[08Dec2022 10:35:03.464] [main/INFO] [STDERR/]: [java.lang.Throwable:printStackTrace:644]: at net.minecraft.util.registry.Bootstrap.func_151354_b(Bootstrap.java:38) 3705[08Dec2022 10:35:03.464] [main/INFO] [STDERR/]: [java.lang.Throwable:printStackTrace:644]: at net.minecraft.server.Main.main(Main.java:92) 3706[08Dec2022 10:35:03.464] [main/INFO] [STDERR/]: [java.lang.Throwable:printStackTrace:644]: ... 13 more 3707[08Dec2022 10:35:03.464] [main/INFO] [STDERR/]: [java.lang.Throwable:printStackTrace:668]: Caused by: org.spongepowered.asm.mixin.injection.throwables.InjectionError: Critical injection failure: Redirector pehkui$tickCramming$getBoundingBox(Lnet/minecraft/entity/LivingEntity;)Lnet/minecraft/util/math/AxisAlignedBB; in pehkui.mixins.json:LivingEntityMixin failed injection check, (0/1) succeeded. Scanned 1 target(s). Using refmap Pehkui-refmap.json 3708[08Dec2022 10:35:03.464] [main/INFO] [STDERR/]: [java.lang.Throwable:printStackTrace:668]: at org.spongepowered.asm.mixin.injection.struct.InjectionInfo.postInject(InjectionInfo.java:468) 3709[08Dec2022 10:35:03.464] [main/INFO] [STDERR/]: [java.lang.Throwable:printStackTrace:668]: at org.spongepowered.asm.mixin.transformer.MixinTargetContext.applyInjections(MixinTargetContext.java:1362) 3710[08Dec2022 10:35:03.464] [main/INFO] [STDERR/]: [java.lang.Throwable:printStackTrace:668]: at org.spongepowered.asm.mixin.transformer.MixinApplicatorStandard.applyInjections(MixinApplicatorStandard.java:1051) 3711[08Dec2022 10:35:03.464] [main/INFO] [STDERR/]: [java.lang.Throwable:printStackTrace:668]: at org.spongepowered.asm.mixin.transformer.MixinApplicatorStandard.applyMixin(MixinApplicatorStandard.java:400) 3712[08Dec2022 10:35:03.464] [main/INFO] [STDERR/]: [java.lang.Throwable:printStackTrace:668]: at org.spongepowered.asm.mixin.transformer.MixinApplicatorStandard.apply(MixinApplicatorStandard.java:325) 3713[08Dec2022 10:35:03.464] [main/INFO] [STDERR/]: [java.lang.Throwable:printStackTrace:668]: at org.spongepowered.asm.mixin.transformer.TargetClassContext.apply(TargetClassContext.java:383) 3714[08Dec2022 10:35:03.464] [main/INFO] [STDERR/]: [java.lang.Throwable:printStackTrace:668]: at org.spongepowered.asm.mixin.transformer.TargetClassContext.applyMixins(TargetClassContext.java:365) 3715[08Dec2022 10:35:03.464] [main/INFO] [STDERR/]: [java.lang.Throwable:printStackTrace:668]: at org.spongepowered.asm.mixin.transformer.MixinProcessor.applyMixins(MixinProcessor.java:363) 3716[08Dec2022 10:35:03.464] [main/INFO] [STDERR/]: [java.lang.Throwable:printStackTrace:668]: ... 33 more 3717       Modlist: https://pastebin.com/pMMqiLeq
    • The error does not really identify a mod. But it could be flywheel since that modifies the code in this area, or it could be a conflict with optifine? Check you have the latest version of flywheel and try without optifine.
    • Issue with jeed, check you have the latest version then contact the mod author.
    • I'm looking to disable this auto-jumping that happens in certain mobs (e.g. fish) so that they don't jump out of the water when they are swimming in 1 block deep water.  
    • I have items that use a reference to potions to get mob effects and a machine to make them. I can't simply use a potion as an input for the recipe since the player doesn't directly interact with potions but potion items. I can get the registry location for the potion easily enough.  How do I get a reference to the actual potion item to set an an input for the recipe?
  • Topics

×
×
  • Create New...

Important Information

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