Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Posted

(Using latest Minecraft forge v10.12.0.1034).

I am registering textures in registerBlockIcons(IIconRegister), but in fact tests shows that it isn't invoked during initializations.

 

P.S. i see strange output in console, like forge trying to load mods from java's rt.jar file.

 

 

[18:26:41] [Client thread/INFO]: MinecraftForge v10.12.0.1034 Initialized

[18:26:41] [Client thread/INFO]: Replaced 128 ore recipies

[18:26:41] [Client thread/INFO]: Completed early MinecraftForge initialization

[18:26:41] [Client thread/INFO]: Searching /home/cds/Dev/mcp/forge_172/eclipse/mods for mods

[18:26:46] [Client thread/WARN]: Zip file rt.jar failed to read properly, it will be ignored

java.lang.NullPointerException

at cpw.mods.fml.common.discovery.asm.ASMModParser.isBaseMod(ASMModParser.java:130) ~[ASMModParser.class:?]

at cpw.mods.fml.common.ModContainerFactory.build(ModContainerFactory.java:34) ~[ModContainerFactory.class:?]

at cpw.mods.fml.common.discovery.JarDiscoverer.discover(JarDiscoverer.java:83) [JarDiscoverer.class:?]

at cpw.mods.fml.common.discovery.ContainerType.findMods(ContainerType.java:42) [ContainerType.class:?]

at cpw.mods.fml.common.discovery.ModCandidate.explore(ModCandidate.java:71) [ModCandidate.class:?]

at cpw.mods.fml.common.discovery.ModDiscoverer.identifyMods(ModDiscoverer.java:123) [ModDiscoverer.class:?]

at cpw.mods.fml.common.Loader.identifyMods(Loader.java:338) [Loader.class:?]

at cpw.mods.fml.common.Loader.loadMods(Loader.java:460) [Loader.class:?]

at cpw.mods.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:201) [FMLClientHandler.class:?]

at net.minecraft.client.Minecraft.startGame(Minecraft.java:498) [Minecraft.class:?]

at net.minecraft.client.Minecraft.run(Minecraft.java:853) [Minecraft.class:?]

at net.minecraft.client.main.Main.main(Main.java:103) [Main.class:?]

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.7.0_21]

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) ~[?:1.7.0_21]

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.7.0_21]

at java.lang.reflect.Method.invoke(Method.java:601) ~[?:1.7.0_21]

at net.minecraft.launchwrapper.Launch.launch(Launch.java:134) [launchwrapper-1.9.jar:?]

at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.9.jar:?]

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.7.0_21]

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) ~[?:1.7.0_21]

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.7.0_21]

at java.lang.reflect.Method.invoke(Method.java:601) ~[?:1.7.0_21]

at com.intellij.rt.execution.application.AppMain.main(AppMain.java:120) [idea_rt.jar:?]

[18:26:51] [Client thread/ERROR]: FML has detected a mod that is using a package name based on 'net.minecraft.src' : net.minecraft.src.FMLRenderAccessLibrary. This is generally a severe programming error.  There should be no mod code in the minecraft namespace. MOVE YOUR MOD! If you're in eclipse, select your source code and 'refactor' it into a new package. Go on. DO IT NOW!

[18:26:51] [Client thread/ERROR]: FML has detected a mod that is using a package name based on 'net.minecraft.src' : net.minecraft.src.Start. This is generally a severe programming error.  There should be no mod code in the minecraft namespace. MOVE YOUR MOD! If you're in eclipse, select your source code and 'refactor' it into a new package. Go on. DO IT NOW!

 

 

 

  • Author

Experimentaly, i founded that following code works, but i think it is not the right way.

 

 

@SideOnly(Side.CLIENT)

public void invokeClientSetup()//invoke during Initialisation.

{

TextureMap iconRegister = Minecraft.getMinecraft().getTextureMapBlocks();

Minecraft.getMinecraft().getTextureManager().onResourceManagerReload(Minecraft.getMinecraft().getResourceManager()); //reload the atlas.

block1.registerBlockIcons(iconRegister);

block2.registerBlockIcons(iconRegister);

///.........

}

 

 

Maybe you've just included the wrong class in your header, for example there are multiple Block classes, only two of them are part of Minecraft.

https://github.com/MinecraftForge/FML/commit/b7ad532ab5eb3e00d77ffde946d25675c9f69cf7

For some reason cpw disabled this important reload {done after all loading has finished}

Next time I sync FML it'll be pulled in. For now you can either call cpw.mods.fml.common.FMLCommonHandler.updateResourcePackList() manually once in like.. post init. {But please only if your function hasnt already been called to prevent multiple mods reloading it}

I do Forge for free, however the servers to run it arn't free, so anything is appreciated.
Consider supporting the team on Patreon

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...

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.