Classes:
package org.nukreeper64.testMod;
import net.minecraft.init.Blocks;
import net.minecraftforge.fml.common.Mod;
import net.minecraftforge.fml.common.Mod.EventHandler;
import net.minecraftforge.fml.common.SidedProxy;
import net.minecraftforge.fml.common.event.FMLInitializationEvent;
import net.minecraftforge.fml.common.registry.GameRegistry;
@Mod(modid = TestMod.MODID, version = TestMod.VERSION)
public class TestMod
{
public static final String MODID = "testmod";
public static final String VERSION = "1.0";
@SidedProxy(serverSide = "org.nukreeper64.testMod.CommonProxy", clientSide = "org.nukreeper64.testMod.ClientProxy")
public static CommonProxy proxy;
@EventHandler
public void init(FMLInitializationEvent event)
{
// some example code
System.out.println("DIRT BLOCK >> "+Blocks.DIRT.getUnlocalizedName());
Food food = new Food();
GameRegistry.register(food);
}
}
package org.nukreeper64.testMod;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.ItemFood;
public class Food extends ItemFood
{
public static final int AMOUNT = 2;
public static final String NAME = "food";
public Food()
{
super(AMOUNT, false);
TestMod.proxy.registerItemRenderer(this, 0, NAME);
this.setCreativeTab(CreativeTabs.FOOD);
setUnlocalizedName(NAME);
setRegistryName(NAME);
}
}
package org.nukreeper64.testMod;
import net.minecraft.item.Item;
public class CommonProxy
{
public void registerItemRenderer(Item item, int meta, String id) {}
}
package org.nukreeper64.testMod;
import net.minecraft.client.renderer.block.model.ModelResourceLocation;
import net.minecraft.item.Item;
import net.minecraftforge.client.model.ModelLoader;
public class ClientProxy extends CommonProxy
{
@Override
public void registerItemRenderer(Item item, int meta, String name)
{
System.out.println("TEST1");
ModelLoader.setCustomModelResourceLocation(item, meta, new ModelResourceLocation("testmod:food"));
System.out.println("TEST2");
}
}
Command run:
gradlew runClient
Full log, from when command was run to game start:
C:\Users\Pyotr\Desktop\forge-1.11.2-13.20.0.2216-mdk>gradlew runClient
Picked up _JAVA_OPTIONS: -Djava.net.preferIPv4Stack=true
To honour the JVM settings for this build a new JVM will be forked. Please consider using the daemon: https://docs.gradle.org/2.14/userguide/gradle_daemon.html.
This mapping 'snapshot_20161220' was designed for MC 1.11! Use at your own peril.
#################################################
ForgeGradle 2.2-SNAPSHOT-35fdca6
https://github.com/MinecraftForge/ForgeGradle
#################################################
Powered by MCP unknown
http://modcoderpack.com
by: Searge, ProfMobius, Fesh0r,
R4wk, ZeuX, IngisKahn, bspkrs
#################################################
:deobfCompileDummyTask
:deobfProvidedDummyTask
:sourceApiJava UP-TO-DATE
:compileApiJava UP-TO-DATE
:processApiResources UP-TO-DATE
:apiClasses UP-TO-DATE
:sourceMainJava UP-TO-DATE
:compileJava
warning: [options] bootstrap class path not set in conjunction with -source 1.6
1 warning
:processResources UP-TO-DATE
:classes
:jar UP-TO-DATE
:getVersionJson
:extractNatives SKIPPED
:extractUserdev UP-TO-DATE
:getAssetIndex UP-TO-DATE
:getAssets
Current status: 272/1196 22%
Current status: 543/1196 45%
Current status: 858/1196 71%
Current status: 1130/1196 94%
:makeStart
:runClient
2017-01-21 15:51:51,588 WARN Unable to instantiate org.fusesource.jansi.WindowsAnsiOutputStream
2017-01-21 15:51:51,590 WARN Unable to instantiate org.fusesource.jansi.WindowsAnsiOutputStream
[15:51:51] [main/INFO] [GradleStart]: Extra: []
[15:51:51] [main/INFO] [GradleStart]: Running with arguments: [--userProperties, {}, --assetsDir, C:/Users/Pyotr/.gradle/caches/minecraft/assets, --assetIndex, 1.11, --accessToken{REDACTED}, --version, 1.11.2, --tweakClass, net.minecraftforge.fml.common.launcher.FMLTweaker, --tweakClass, net.minecraftforge.gradle.tweakers.CoremodTweaker]
[15:51:51] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.FMLTweaker
[15:51:51] [main/INFO] [LaunchWrapper]: Using primary tweak class name net.minecraftforge.fml.common.launcher.FMLTweaker
[15:51:51] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.gradle.tweakers.CoremodTweaker
[15:51:51] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLTweaker
[15:51:51] [main/INFO] [FML]: Forge Mod Loader version 13.20.0.2216 for Minecraft 1.11.2 loading
[15:51:51] [main/INFO] [FML]: Java is Java HotSpot(TM) 64-Bit Server VM, version 1.8.0_91, running on Windows 10:amd64:10.0, installed at C:\Program Files\Java\jdk1.8.0_91\jre
[15:51:51] [main/INFO] [FML]: Managed to load a deobfuscated Minecraft name- we are in a deobfuscated environment. Skipping runtime deobfuscation
[15:51:51] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.gradle.tweakers.CoremodTweaker
[15:51:51] [main/INFO] [GradleStart]: Injecting location in coremod net.minecraftforge.fml.relauncher.FMLCorePlugin
[15:51:51] [main/INFO] [GradleStart]: Injecting location in coremod net.minecraftforge.classloading.FMLForgePlugin
[15:51:51] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.FMLInjectionAndSortingTweaker
[15:51:51] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.FMLDeobfTweaker
[15:51:51] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.gradle.tweakers.AccessTransformerTweaker
[15:51:51] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLInjectionAndSortingTweaker
[15:51:51] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLInjectionAndSortingTweaker
[15:51:51] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.relauncher.CoreModManager$FMLPluginWrapper
[15:51:51] [main/ERROR] [FML]: The binary patch set is missing. Either you are in a development environment, or things are not going to work!
[15:51:52] [main/ERROR] [FML]: FML appears to be missing any signature data. This is not a good thing
[15:51:52] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.relauncher.CoreModManager$FMLPluginWrapper
[15:51:52] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLDeobfTweaker
[15:51:52] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.gradle.tweakers.AccessTransformerTweaker
[15:51:52] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.TerminalTweaker
[15:51:52] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.TerminalTweaker
[15:51:52] [main/INFO] [LaunchWrapper]: Launching wrapped minecraft {net.minecraft.client.main.Main}
2017-01-21 15:51:53,007 WARN Unable to instantiate org.fusesource.jansi.WindowsAnsiOutputStream
2017-01-21 15:51:53,025 WARN Unable to instantiate org.fusesource.jansi.WindowsAnsiOutputStream
2017-01-21 15:51:53,027 WARN Unable to instantiate org.fusesource.jansi.WindowsAnsiOutputStream
[15:51:53] [Client thread/INFO]: Setting user: Player705
[15:51:55] [Client thread/WARN]: Skipping bad option: lastServer:
[15:51:55] [Client thread/INFO]: LWJGL Version: 2.9.4
[15:51:56] [Client thread/INFO]: [sTDOUT]: ---- Minecraft Crash Report ----
// I blame Dinnerbone.
Time: 1/21/17 3:51 PM
Description: Loading screen debug info
This is just a prompt for computer specs to be printed. THIS IS NOT A ERROR
> Building 94% > :runClient
A detailed walkthrough of the error, its code path and all known details is as follows:
---------------------------------------------------------------------------------------
-- System Details --
Details:
Minecraft Version: 1.11.2
Operating System: Windows 10 (amd64) version 10.0
Java Version: 1.8.0_91, Oracle Corporation
Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
Memory: 515590296 bytes (491 MB) / 735576064 bytes (701 MB) up to 1900019712 bytes (1812 MB)
JVM Flags: 0 total;
IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0
FML:
Loaded coremods (and transformers):
GL info: ' Vendor: 'ATI Technologies Inc.' Version: '4.5.14008 Compatibility Profile Context 21.19.137.1' Renderer: 'AMD Radeon (TM) R9 380 Series'
[15:51:56] [Client thread/INFO] [FML]: MinecraftForge v13.20.0.2216 Initialized
[15:51:56] [Client thread/INFO] [FML]: Replaced 232 ore recipes
[15:51:56] [Client thread/INFO] [FML]: Found 0 mods from the command line. Injecting into mod discoverer
[15:51:56] [Client thread/INFO] [FML]: Searching C:\Users\Pyotr\Desktop\forge-1.11.2-13.20.0.2216-mdk\run\mods for mods
[15:51:57] [Client thread/INFO] [testmod]: Mod testmod is missing the required element 'name'. Substituting testmod
[15:51:57] [Client thread/INFO] [FML]: Forge Mod Loader has identified 5 mods to load
[15:51:57] [Client thread/INFO] [FML]: Attempting connection with missing mods [minecraft, mcp, FML, forge, testmod] at CLIENT
[15:51:57] [Client thread/INFO] [FML]: Attempting connection with missing mods [minecraft, mcp, FML, forge, testmod] at SERVER
[15:51:58] [Client thread/INFO]: Reloading ResourceManager: Default, FMLFileResourcePack:Forge Mod Loader, FMLFileResourcePack:Minecraft Forge, FMLFileResourcePack:testmod
[15:51:58] [Client thread/INFO] [FML]: Processing ObjectHolder annotations
[15:51:58] [Client thread/INFO] [FML]: Found 444 ObjectHolder annotations
[15:51:58] [Client thread/INFO] [FML]: Identifying ItemStackHolder annotations
[15:51:58] [Client thread/INFO] [FML]: Found 0 ItemStackHolder annotations
[15:51:58] [Client thread/INFO] [FML]: Applying holder lookups
[15:51:58] [Client thread/INFO] [FML]: Holder lookups applied
[15:51:58] [Client thread/INFO] [FML]: Applying holder lookups
[15:51:58] [Client thread/INFO] [FML]: Holder lookups applied
[15:51:58] [Client thread/INFO] [FML]: Applying holder lookups
[15:51:58] [Client thread/INFO] [FML]: Holder lookups applied
[15:51:58] [Client thread/INFO] [FML]: Configured a dormant chunk cache size of 0
[15:51:58] [Client thread/INFO] [FML]: Applying holder lookups
[15:51:58] [Forge Version Check/INFO] [ForgeVersionCheck]: [forge] Starting version check at http://files.minecraftforge.net/maven/net/minecraftforge/forge/promotions_slim.json
[15:51:58] [Client thread/INFO] [FML]: Holder lookups applied
[15:51:58] [Client thread/INFO] [FML]: Injecting itemstacks
[15:51:58] [Client thread/INFO] [FML]: Itemstack injection complete
[15:51:58] [Forge Version Check/INFO] [ForgeVersionCheck]: [forge] Found status: BETA_OUTDATED Target: 13.20.0.2224
[15:51:59] [sound Library Loader/INFO]: Starting up SoundSystem...
[15:51:59] [Thread-8/INFO]: Initializing LWJGL OpenAL
[15:51:59] [Thread-8/INFO]: (The LWJGL binding of OpenAL. For more information, see http://www.lwjgl.org)
[15:51:59] [Thread-8/INFO]: OpenAL initialized.
[15:51:59] [sound Library Loader/INFO]: Sound engine started
[15:52:01] [Client thread/INFO] [FML]: Max texture size: 16384
[15:52:01] [Client thread/INFO]: Created: 16x16 textures-atlas
[15:52:02] [Client thread/INFO]: [sTDOUT]: DIRT BLOCK >> tile.dirt
[15:52:02] [Client thread/INFO]: [sTDOUT]: TEST1
[15:52:02] [Client thread/INFO]: [sTDOUT]: TEST2
[15:52:02] [Client thread/INFO] [FML]: Injecting itemstacks
[15:52:02] [Client thread/INFO] [FML]: Itemstack injection complete
[15:52:02] [Client thread/INFO] [FML]: Forge Mod Loader has successfully loaded 5 mods
[15:52:02] [Client thread/INFO]: Reloading ResourceManager: Default, FMLFileResourcePack:Forge Mod Loader, FMLFileResourcePack:Minecraft Forge, FMLFileResourcePack:testmod
[15:52:03] [Client thread/INFO]: SoundSystem shutting down...
[15:52:03] [Client thread/WARN]: Author: Paul Lamb, www.paulscode.com
[15:52:03] [sound Library Loader/INFO]: Starting up SoundSystem...
[15:52:03] [Thread-10/INFO]: Initializing LWJGL OpenAL
[15:52:03] [Thread-10/INFO]: (The LWJGL binding of OpenAL. For more information, see http://www.lwjgl.org)
[15:52:03] [Thread-10/INFO]: OpenAL initialized.
[15:52:04] [sound Library Loader/INFO]: Sound engine started
[15:52:05] [Client thread/INFO] [FML]: Max texture size: 16384
[15:52:05] [Client thread/INFO]: Created: 512x512 textures-atlas
[15:52:06] [Client thread/WARN]: Skipping bad option: lastServer:
[15:52:06] [Realms Notification Availability checker #1/INFO]: Could not authorize you against Realms server: Invalid session id