Jump to content

Need help with 1.12 ICapability changes


Dizzlepop12

Recommended Posts

I'm trying to get a mana bar to function properly after updating to 1.12, but the main class is riddled with errors due to capabilities being changed a lot since 1.8.9.

 

Here's the mana class: https://github.com/TheSlayerMC/Journey-1.12/blob/master/main/java/net/journey/client/server/DarkEnergyBar.java

 

I didn't touch anything, this is the same code from the 1.8.9 version. It worked almost flawlessly in 1.8.9, but ICabilityProvider changed and the methods that I need to save and load NBT data no longer exist within that class, and there's no longer "registerExtendedProperties()" and "getExtendedProperties()" within the EntityPlayer class. All help is appreciated.

 

Link to comment
Share on other sites

There’s part of the forge docs dedicated to this exact issue I believe? Have a look at the docs on capabilities

About Me

Spoiler

My Discord - Cadiboo#8887

My WebsiteCadiboo.github.io

My ModsCadiboo.github.io/projects

My TutorialsCadiboo.github.io/tutorials

Versions below 1.14.4 are no longer supported on this forum. Use the latest version to receive support.

When asking support remember to include all relevant log files (logs are found in .minecraft/logs/), code if applicable and screenshots if possible.

Only download mods from trusted sites like CurseForge (minecraft.curseforge.com). A list of bad sites can be found here, with more information available at stopmodreposts.org

Edit your own signature at www.minecraftforge.net/forum/settings/signature/ (Make sure to check its compatibility with the Dark Theme)

Link to comment
Share on other sites

3 minutes ago, Cadiboo said:

There’s part of the forge docs dedicated to this exact issue I believe? Have a look at the docs on capabilities

Took a look at it, seems much less complicated than I thought but it's still stressing me out. Is there a src out there for a mod that adds something similar?

Link to comment
Share on other sites

14 minutes ago, Dizzlepop12 said:

Took a look at it, seems much less complicated than I thought but it's still stressing me out. Is there a src out there for a mod that adds something similar?

There are many. I know TInkers Construct adds their own.

VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING

I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect.

Forge and vanilla BlockState generator.

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

Announcements



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • Use your IDE for this. For example, if you are using "IntelliJ IDEA" and you correctly setup your project (jdk, forge mdk, gradle, parchment, etc.), then you can just use Ctrl + B with Block type selected. It will navigate you to class declaration.
    • I need help, my forge server crashes and i don't know where is the problem.    [25sep2023 14:24:30.772] [main/INFO] [cpw.mods.modlauncher.Launcher/MODLAUNCHER]: ModLauncher running: args [--gameDir, ., --launchTarget, fmlserver, --fml.forgeVersion, 36.1.4, --fml.mcpVersion, 20210115.111550, --fml.mcVersion, 1.16.5, --fml.forgeGroup, net.minecraftforge, /home/luka/.local/share/atlauncher/runtimes/minecraft/jre-legacy/linux/jre-legacy/bin/java nogui] [25sep2023 14:24:30.777] [main/INFO] [cpw.mods.modlauncher.Launcher/MODLAUNCHER]: ModLauncher 8.0.9+86+master.3cf110c starting: java version 1.8.0_202 by Oracle Corporation [25sep2023 14:24:31.055] [main/INFO] [net.minecraftforge.fml.loading.FixSSL/CORE]: Added Lets Encrypt root certificates as additional trust [25sep2023 14:24:31.098] [main/INFO] [mixin/]: SpongePowered MIXIN Subsystem Version=0.8.2 Source=file:/home/luka/.local/share/atlauncher/servers/Darksouls/libraries/org/spongepowered/mixin/0.8.2/mixin-0.8.2.jar Service=ModLauncher Env=SERVER [25sep2023 14:24:32.824] [main/INFO] [mixin/]: Successfully loaded Mixin Connector [com.performant.coremod.mixin.Connector] [25sep2023 14:24:32.835] [main/INFO] [cpw.mods.modlauncher.LaunchServiceHandler/MODLAUNCHER]: Launching target 'fmlserver' with arguments [--gameDir, ., /home/luka/.local/share/atlauncher/runtimes/minecraft/jre-legacy/linux/jre-legacy/bin/java nogui] [25sep2023 14:24:32.898] [main/INFO] [com.performant.coremod.Performant/]: Performant configs loaded [25sep2023 14:24:32.996] [main/FATAL] [net.minecraftforge.fml.loading.RuntimeDistCleaner/DISTXFORM]: Attempted to load class net/minecraft/client/renderer/GameRenderer for invalid dist DEDICATED_SERVER [25sep2023 14:24:32.997] [main/WARN] [mixin/]: Error loading class: net/minecraft/client/renderer/GameRenderer (java.lang.RuntimeException: Attempted to load class net/minecraft/client/renderer/GameRenderer for invalid dist DEDICATED_SERVER) [25sep2023 14:24:32.999] [main/WARN] [mixin/]: @Mixin target net.minecraft.client.renderer.GameRenderer was not found shouldersurfing.mixins.json:MixinGameRenderer [25sep2023 14:24:33.011] [main/FATAL] [net.minecraftforge.fml.loading.RuntimeDistCleaner/DISTXFORM]: Attempted to load class net/minecraft/client/GameSettings for invalid dist DEDICATED_SERVER [25sep2023 14:24:33.011] [main/WARN] [mixin/]: Error loading class: net/minecraft/client/GameSettings (java.lang.RuntimeException: Attempted to load class net/minecraft/client/GameSettings for invalid dist DEDICATED_SERVER) [25sep2023 14:24:33.012] [main/WARN] [mixin/]: @Mixin target net.minecraft.client.GameSettings was not found shouldersurfing.mixins.json:MixinGameSettings [25sep2023 14:24:33.034] [main/FATAL] [net.minecraftforge.fml.loading.RuntimeDistCleaner/DISTXFORM]: Attempted to load class net/minecraft/client/gui/IngameGui for invalid dist DEDICATED_SERVER [25sep2023 14:24:33.035] [main/WARN] [mixin/]: Error loading class: net/minecraft/client/gui/IngameGui (java.lang.RuntimeException: Attempted to load class net/minecraft/client/gui/IngameGui for invalid dist DEDICATED_SERVER) [25sep2023 14:24:33.035] [main/WARN] [mixin/]: @Mixin target net.minecraft.client.gui.IngameGui was not found shouldersurfing.mixins.json:MixinIngameGui [25sep2023 14:24:33.128] [main/WARN] [mixin/]: Error loading class: net/optifine/shaders/ShadersRender (java.lang.ClassNotFoundException: null) [25sep2023 14:24:33.130] [main/WARN] [mixin/]: @Mixin target net.optifine.shaders.ShadersRender was not found shouldersurfing.mixins.json:MixinShadersRender [25sep2023 14:24:33.678] [main/INFO] [com.performant.coremod.Performant/]: Not enabling mixin forcom.performant.coremod.mixin.forge.BasicEventHooksMixin as config disables it. [25sep2023 14:24:33.706] [main/INFO] [com.performant.coremod.Performant/]: Not enabling mixin forcom.performant.coremod.mixin.entity.LivingEntityUpdateEventMixin as config disables it. [25sep2023 14:24:33.796] [main/WARN] [mixin/]: @Mixin target net/minecraft/world/server/ChunkManager$EntityTracker is public in performant.mixins.json:world.chunk.ChunkManagerEntityTrackMixin and should be specified in value [25sep2023 14:24:34.092] [main/FATAL] [net.minecraftforge.fml.loading.RuntimeDistCleaner/DISTXFORM]: Attempted to load class com/teamderpy/shouldersurfing/config/Config$ClientConfig for invalid dist DEDICATED_SERVER [25sep2023 14:24:34.092] [main/WARN] [mixin/]: Error loading class: com/teamderpy/shouldersurfing/config/Config$ClientConfig (java.lang.RuntimeException: Attempted to load class com/teamderpy/shouldersurfing/config/Config$ClientConfig for invalid dist DEDICATED_SERVER) [25sep2023 14:24:35.634] [main/FATAL] [net.minecraftforge.fml.loading.RuntimeDistCleaner/DISTXFORM]: Attempted to load class net/minecraft/client/Minecraft for invalid dist DEDICATED_SERVER [25sep2023 14:24:35.634] [main/WARN] [mixin/]: Error loading class: net/minecraft/client/Minecraft (java.lang.RuntimeException: Attempted to load class net/minecraft/client/Minecraft for invalid dist DEDICATED_SERVER) [25sep2023 14:24:35.636] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1052]: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException [25sep2023 14:24:35.636] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1052]:     at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:39) [25sep2023 14:24:35.636] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1052]:     at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:54) [25sep2023 14:24:35.636] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1052]:     at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:72) [25sep2023 14:24:35.637] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1052]:     at cpw.mods.modlauncher.Launcher.run(Launcher.java:82) [25sep2023 14:24:35.637] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1052]:     at cpw.mods.modlauncher.Launcher.main(Launcher.java:66) [25sep2023 14:24:35.638] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1052]:     at net.minecraftforge.server.ServerMain$Runner.runLauncher(ServerMain.java:63) [25sep2023 14:24:35.638] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1052]:     at net.minecraftforge.server.ServerMain$Runner.access$100(ServerMain.java:60) [25sep2023 14:24:35.638] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1052]:     at net.minecraftforge.server.ServerMain.main(ServerMain.java:57) [25sep2023 14:24:35.638] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1061]: Caused by: java.lang.reflect.InvocationTargetException [25sep2023 14:24:35.638] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1061]:     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [25sep2023 14:24:35.639] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1061]:     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) [25sep2023 14:24:35.639] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1061]:     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [25sep2023 14:24:35.639] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1061]:     at java.lang.reflect.Method.invoke(Method.java:498) [25sep2023 14:24:35.640] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1061]:     at net.minecraftforge.fml.loading.FMLServerLaunchProvider.lambda$launchService$0(FMLServerLaunchProvider.java:51) [25sep2023 14:24:35.640] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1061]:     at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:37) [25sep2023 14:24:35.640] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1061]:     ... 7 more [25sep2023 14:24:35.640] [main/INFO] [STDERR/]: [java.lang.Throwable:printStackTrace:643]: Caused by: org.spongepowered.asm.mixin.transformer.throwables.MixinTransformerError: An unexpected critical error was encountered [25sep2023 14:24:35.640] [main/INFO] [STDERR/]: [java.lang.Throwable:printStackTrace:643]:     at org.spongepowered.asm.mixin.transformer.MixinProcessor.applyMixins(MixinProcessor.java:363) [25sep2023 14:24:35.640] [main/INFO] [STDERR/]: [java.lang.Throwable:printStackTrace:643]:     at org.spongepowered.asm.mixin.transformer.MixinTransformer.transformClass(MixinTransformer.java:223) [25sep2023 14:24:35.641] [main/INFO] [STDERR/]: [java.lang.Throwable:printStackTrace:643]:     at org.spongepowered.asm.mixin.transformer.MixinTransformationHandler.processClass(MixinTransformationHandler.java:121) [25sep2023 14:24:35.641] [main/INFO] [STDERR/]: [java.lang.Throwable:printStackTrace:643]:     at org.spongepowered.asm.launch.MixinLaunchPlugin.processClass(MixinLaunchPlugin.java:131) [25sep2023 14:24:35.641] [main/INFO] [STDERR/]: [java.lang.Throwable:printStackTrace:643]:     at cpw.mods.modlauncher.serviceapi.ILaunchPluginService.processClassWithFlags(ILaunchPluginService.java:154) [25sep2023 14:24:35.641] [main/INFO] [STDERR/]: [java.lang.Throwable:printStackTrace:643]:     at cpw.mods.modlauncher.LaunchPluginHandler.offerClassNodeToPlugins(LaunchPluginHandler.java:85) [25sep2023 14:24:35.641] [main/INFO] [STDERR/]: [java.lang.Throwable:printStackTrace:643]:     at cpw.mods.modlauncher.ClassTransformer.transform(ClassTransformer.java:120) [25sep2023 14:24:35.641] [main/INFO] [STDERR/]: [java.lang.Throwable:printStackTrace:643]:     at cpw.mods.modlauncher.TransformingClassLoader$DelegatedClassLoader.findClass(TransformingClassLoader.java:265) [25sep2023 14:24:35.641] [main/INFO] [STDERR/]: [java.lang.Throwable:printStackTrace:643]:     at cpw.mods.modlauncher.TransformingClassLoader.loadClass(TransformingClassLoader.java:136) [25sep2023 14:24:35.641] [main/INFO] [STDERR/]: [java.lang.Throwable:printStackTrace:643]:     at cpw.mods.modlauncher.TransformingClassLoader.loadClass(TransformingClassLoader.java:98) [25sep2023 14:24:35.642] [main/INFO] [STDERR/]: [java.lang.Throwable:printStackTrace:643]:     at java.lang.ClassLoader.loadClass(ClassLoader.java:357) [25sep2023 14:24:35.642] [main/INFO] [STDERR/]: [java.lang.Throwable:printStackTrace:643]:     at net.minecraft.block.Blocks.<clinit>(Blocks.java:30) [25sep2023 14:24:35.642] [main/INFO] [STDERR/]: [java.lang.Throwable:printStackTrace:643]:     at net.minecraft.world.gen.surfacebuilders.SurfaceBuilder.<clinit>(SurfaceBuilder.java:12) [25sep2023 14:24:35.642] [main/INFO] [STDERR/]: [java.lang.Throwable:printStackTrace:643]:     at net.minecraft.world.gen.surfacebuilders.ConfiguredSurfaceBuilders.<clinit>(SourceFile:11) [25sep2023 14:24:35.642] [main/INFO] [STDERR/]: [java.lang.Throwable:printStackTrace:643]:     at net.minecraft.util.registry.WorldGenRegistries.func_243674_g(WorldGenRegistries.java:33) [25sep2023 14:24:35.642] [main/INFO] [STDERR/]: [java.lang.Throwable:printStackTrace:643]:     at net.minecraft.util.registry.WorldGenRegistries.func_243668_a(WorldGenRegistries.java:89) [25sep2023 14:24:35.642] [main/INFO] [STDERR/]: [java.lang.Throwable:printStackTrace:643]:     at java.util.LinkedHashMap.forEach(LinkedHashMap.java:684) [25sep2023 14:24:35.642] [main/INFO] [STDERR/]: [java.lang.Throwable:printStackTrace:643]:     at net.minecraft.util.registry.WorldGenRegistries.<clinit>(WorldGenRegistries.java:88) [25sep2023 14:24:35.643] [main/INFO] [STDERR/]: [java.lang.Throwable:printStackTrace:643]:     at net.minecraft.util.registry.Registry.<clinit>(Registry.java:464) [25sep2023 14:24:35.643] [main/INFO] [STDERR/]: [java.lang.Throwable:printStackTrace:643]:     at net.minecraft.util.registry.Bootstrap.func_151354_b(Bootstrap.java:38) [25sep2023 14:24:35.643] [main/INFO] [STDERR/]: [java.lang.Throwable:printStackTrace:643]:     at net.minecraft.server.Main.main(Main.java:92) [25sep2023 14:24:35.643] [main/INFO] [STDERR/]: [java.lang.Throwable:printStackTrace:643]:     ... 13 more [25sep2023 14:24:35.643] [main/INFO] [STDERR/]: [java.lang.Throwable:printStackTrace:667]: Caused by: org.spongepowered.asm.mixin.throwables.ClassMetadataNotFoundException: net.minecraft.client.Minecraft [25sep2023 14:24:35.644] [main/INFO] [STDERR/]: [java.lang.Throwable:printStackTrace:667]:     at org.spongepowered.asm.mixin.transformer.MixinPreProcessorStandard.transformMethod(MixinPreProcessorStandard.java:741) [25sep2023 14:24:35.644] [main/INFO] [STDERR/]: [java.lang.Throwable:printStackTrace:667]:     at org.spongepowered.asm.mixin.transformer.MixinPreProcessorStandard.transform(MixinPreProcessorStandard.java:726) [25sep2023 14:24:35.644] [main/INFO] [STDERR/]: [java.lang.Throwable:printStackTrace:667]:     at org.spongepowered.asm.mixin.transformer.MixinPreProcessorStandard.attach(MixinPreProcessorStandard.java:297) [25sep2023 14:24:35.644] [main/INFO] [STDERR/]: [java.lang.Throwable:printStackTrace:667]:     at org.spongepowered.asm.mixin.transformer.MixinPreProcessorStandard.createContextFor(MixinPreProcessorStandard.java:267) [25sep2023 14:24:35.644] [main/INFO] [STDERR/]: [java.lang.Throwable:printStackTrace:667]:     at org.spongepowered.asm.mixin.transformer.MixinInfo.createContextFor(MixinInfo.java:1271) [25sep2023 14:24:35.644] [main/INFO] [STDERR/]: [java.lang.Throwable:printStackTrace:667]:     at org.spongepowered.asm.mixin.transformer.MixinApplicatorStandard.apply(MixinApplicatorStandard.java:287) [25sep2023 14:24:35.644] [main/INFO] [STDERR/]: [java.lang.Throwable:printStackTrace:667]:     at org.spongepowered.asm.mixin.transformer.TargetClassContext.applyMixins(TargetClassContext.java:345) [25sep2023 14:24:35.645] [main/INFO] [STDERR/]: [java.lang.Throwable:printStackTrace:667]:     at org.spongepowered.asm.mixin.transformer.MixinProcessor.applyMixins(MixinProcessor.java:569) [25sep2023 14:24:35.645] [main/INFO] [STDERR/]: [java.lang.Throwable:printStackTrace:667]:     at org.spongepowered.asm.mixin.transformer.MixinProcessor.applyMixins(MixinProcessor.java:351) [25sep2023 14:24:35.645] [main/INFO] [STDERR/]: [java.lang.Throwable:printStackTrace:667]:     ... 33 more
    • How can I see the Minecraft Blocks source code?
    • I have installed a minecraft 1.12.2 server and java 8, but the forge-blahblahblah.jar file isnt doing anything, the minecraft server file is opening the server but as expacted, it just launches a vanilla server
  • Topics

×
×
  • Create New...

Important Information

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