Jump to content

1.12.2 Block.setCreativeTab cannot be found when mod is within a Technic modpack


Cilka

Recommended Posts

As the title says, I have been able to run the mod in my IDE successfully and test it. Whenever I build the mod and run it with the current modpack I'm testing, I get this: Initializing game java.lang.NoSuchMethodError: net.minecraft.block.Block.setCreativeTab.

 

Here is the crash report with the offending code. I'm kinda lost as to why this is happening now of all times.

Spoiler

---- Minecraft Crash Report ----

WARNING: coremods are present:
  AppleCore (AppleCore-mc1.12.2-3.1.3.jar)
Contact their authors BEFORE contacting forge

// I bet Cylons wouldn't have this problem.

Time: 9/8/19 7:18 PM
Description: Initializing game

java.lang.NoSuchMethodError: net.minecraft.block.Block.setCreativeTab(Lnet/minecraft/creativetab/CreativeTabs;)Lnet/minecraft/block/Block;
    at com.cilka.telgt.Utils.AddBlocksToTab(Utils.java:88)
    at com.cilka.telgt.init.ModBlocks.<clinit>(ModBlocks.java:12)
    at sun.misc.Unsafe.ensureClassInitialized(Native Method)
    at sun.reflect.UnsafeFieldAccessorFactory.newFieldAccessor(UnsafeFieldAccessorFactory.java:43)
    at sun.reflect.ReflectionFactory.newFieldAccessor(ReflectionFactory.java:156)
    at java.lang.reflect.Field.acquireFieldAccessor(Field.java:1088)
    at java.lang.reflect.Field.getFieldAccessor(Field.java:1069)
    at java.lang.reflect.Field.get(Field.java:393)
    at com.cilka.telgt.EventSubscriber.registerBlocks(EventSubscriber.java:51)
    at net.minecraftforge.fml.common.eventhandler.ASMEventHandler_119_EventSubscriber_registerBlocks_Register.invoke(.dynamic)
    at net.minecraftforge.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:90)
    at net.minecraftforge.fml.common.eventhandler.EventBus$1.invoke(EventBus.java:144)
    at net.minecraftforge.fml.common.eventhandler.EventBus.post(EventBus.java:182)
    at net.minecraftforge.registries.GameData.fireRegistryEvents(GameData.java:775)
    at net.minecraftforge.fml.common.Loader.preinitializeMods(Loader.java:628)
    at net.minecraftforge.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:252)
    at net.minecraft.client.Minecraft.func_71384_a(Minecraft.java:466)
    at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:377)
    at net.minecraft.client.main.Main.main(SourceFile:123)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at net.minecraft.launchwrapper.Launch.launch(Launch.java:135)
    at net.minecraft.launchwrapper.Launch.main(Launch.java:28)


A detailed walkthrough of the error, its code path and all known details is as follows:
---------------------------------------------------------------------------------------

-- Head --
Thread: Client thread
Stacktrace:
    at com.cilka.telgt.Utils.AddBlocksToTab(Utils.java:88)
    at com.cilka.telgt.init.ModBlocks.<clinit>(ModBlocks.java:12)
    at sun.misc.Unsafe.ensureClassInitialized(Native Method)
    at sun.reflect.UnsafeFieldAccessorFactory.newFieldAccessor(UnsafeFieldAccessorFactory.java:43)
    at sun.reflect.ReflectionFactory.newFieldAccessor(ReflectionFactory.java:156)
    at java.lang.reflect.Field.acquireFieldAccessor(Field.java:1088)
    at java.lang.reflect.Field.getFieldAccessor(Field.java:1069)
    at java.lang.reflect.Field.get(Field.java:393)
    at com.cilka.telgt.EventSubscriber.registerBlocks(EventSubscriber.java:51)
    at net.minecraftforge.fml.common.eventhandler.ASMEventHandler_119_EventSubscriber_registerBlocks_Register.invoke(.dynamic)
    at net.minecraftforge.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:90)
    at net.minecraftforge.fml.common.eventhandler.EventBus$1.invoke(EventBus.java:144)
    at net.minecraftforge.fml.common.eventhandler.EventBus.post(EventBus.java:182)
    at net.minecraftforge.registries.GameData.fireRegistryEvents(GameData.java:775)
    at net.minecraftforge.fml.common.Loader.preinitializeMods(Loader.java:628)
    at net.minecraftforge.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:252)
    at net.minecraft.client.Minecraft.func_71384_a(Minecraft.java:466)

-- Initialization --
Details:
Stacktrace:
    at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:377)
    at net.minecraft.client.main.Main.main(SourceFile:123)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at net.minecraft.launchwrapper.Launch.launch(Launch.java:135)
    at net.minecraft.launchwrapper.Launch.main(Launch.java:28)

public static BaseBlock[] AddBlocksToTab(BaseBlock[] blocks, CreativeTabs tab)
	{
		for(Block block : blocks)
		{
			block.setCreativeTab(tab);
		}
		return blocks;
	}

 

Here is the link to my github in case this does not have enough depth https://github.com/Cilka/Telgttatium/tree/master/java/com/cilka/telgt .

Link to comment
Share on other sites

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.

Announcements



×
×
  • Create New...

Important Information

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