Everything posted by BadBoy6767
-
[1.8] Not generating anything.
I am generating a block on a world using some code in my main class. Here is the main class: package org.midnightas.forge.lightmod; import java.util.Random; import net.minecraft.block.state.pattern.BlockHelper; import net.minecraft.init.Blocks; import net.minecraft.util.BlockPos; import net.minecraft.world.World; import net.minecraft.world.chunk.IChunkProvider; import net.minecraft.world.gen.feature.WorldGenMinable; import net.minecraftforge.fml.common.IWorldGenerator; 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.event.FMLPreInitializationEvent; import net.minecraftforge.fml.common.registry.GameRegistry; @Mod(modid = LightMod.MODID, version = LightMod.VERSION) public class LightMod implements IWorldGenerator { public static final String MODID = "lightmod"; public static final String VERSION = "1.0"; public static final String client_proxy_class = "org.midnightas.forge.lightmod.ClientProxy"; public static final String common_proxy_class = "org.midnightas.forge.lightmod.CommonProxy"; @SidedProxy(clientSide = client_proxy_class, serverSide = common_proxy_class) public static CommonProxy proxy; @EventHandler public void preInit(FMLPreInitializationEvent event) { LightModThings.init(); LightModThings.register(); GameRegistry.registerWorldGenerator(this, 5); } @EventHandler public void init(FMLInitializationEvent event) { proxy.registerRenders(); } @Override public void generate(Random random, int chunkX, int chunkZ, World world, IChunkProvider chunkGenerator, IChunkProvider chunkProvider) { switch (world.provider.getDimensionId()) { case 0: generateSurface(world, random, chunkX * 16, chunkZ * 16); } } private void generateSurface(World world, Random random, int blockX, int blockZ) { for (int i = 0; i < 12; i++) { int Xcoord = blockX + random.nextInt(16); int Ycoord = random.nextInt(60) + 4; int Zcoord = blockZ + random.nextInt(16); new WorldGenMinable(LightModThings.light_ore.getDefaultState(), 1) .generate(world, random, new BlockPos(Xcoord, Ycoord, Zcoord)); } } } LightModThings.light_ore is not generating. I've searched everywhere in the world but I never found it. It exists because I can use /give Player??? lightmod:light_ore 1 How should I go about fixing this?
-
Creating a Mod Loader that is compatible with Forge.
The title says it all, I know this isn't really Modder Support, but it is kind of. How would I go about developing a mod loader that would be compatible with Forge?
-
[1.8] Item not rendering (textures)
Oh, sorry. package org.midnightas.mc.mod.itemsostupidity; import net.minecraft.client.Minecraft; import net.minecraft.client.resources.model.ModelResourceLocation; public class StupidClientProxy extends StupidCommonProxy { @Override public void registerRenderers() { Minecraft .getMinecraft() .getRenderItem() .getItemModelMesher() .register( ItemsOStupidity.itemMultiplier, 0, new ModelResourceLocation( "itemsofstupidity:stupidMultiplier", "inventory")); } } (StupidClientProxy.java)
-
[1.8] Item not rendering (textures)
I tried to do this: ItemsOStupidity.java package org.midnightas.mc.mod.itemsostupidity; import net.minecraft.block.Block; import net.minecraft.client.Minecraft; import net.minecraft.client.renderer.entity.RenderItem; import net.minecraft.client.resources.model.ModelResourceLocation; import net.minecraft.init.Blocks; import net.minecraft.init.Items; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraftforge.fml.common.FMLCommonHandler; 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.event.FMLPreInitializationEvent; import net.minecraftforge.fml.common.registry.GameRegistry; import net.minecraftforge.fml.relauncher.Side; @Mod(modid = ItemsOStupidity.MODID, version = ItemsOStupidity.VERSION) public class ItemsOStupidity { public static final String MODID = "itemsofstupidity"; public static final String VERSION = "1.0"; public static Item itemMultiplier; public static Item itemRodCore; @SidedProxy(clientSide = "org.midnightas.mc.mod.itemsostupidity.StupidClientProxy", serverSide = "org.midnightas.mc.mod.itemsostupidity.StupidCommonProxy") public static StupidCommonProxy proxy; @EventHandler public void preinit(FMLPreInitializationEvent event) { itemMultiplier = new ItemMultiplier(); // itemRodCore = new ItemRodCore(); } @EventHandler public void init(FMLInitializationEvent event) { proxy.registerRenderers(); } } ItemMultiplier i did not change. StupidCommonProxy.java package org.midnightas.mc.mod.itemsostupidity; public class StupidCommonProxy { public void registerRenderers() { } } StupidClientProxy.java package org.midnightas.mc.mod.itemsostupidity; public class StupidCommonProxy { public void registerRenderers() { } } stupidMultiplier.json I did not change.
-
[1.8] Item not rendering (textures)
But what if it's on a server? It would crash then, if i place register in the clientproxy, how do i call it from the init if i only have the CommonProxy?
-
[1.8] Item not rendering (textures)
Hello?
-
[1.7.10] [Solved] Sound files other than OGG?
No, unfortunately if you want to play MP3 files you're going to have to write your own Java player or download a library which is going to make people need to download that library. However you can use http://www.convertfiles.com/ which i find very useful. It allows max 100 MB.
-
[1.8] Item not rendering (textures)
But I didn't change anything, ItemsOStupidity.java package com.example.examplemod; import net.minecraft.block.Block; import net.minecraft.client.Minecraft; import net.minecraft.client.renderer.entity.RenderItem; import net.minecraft.client.resources.model.ModelResourceLocation; import net.minecraft.init.Blocks; import net.minecraft.init.Items; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraftforge.fml.common.FMLCommonHandler; import net.minecraftforge.fml.common.Mod; import net.minecraftforge.fml.common.Mod.EventHandler; import net.minecraftforge.fml.common.event.FMLInitializationEvent; import net.minecraftforge.fml.common.event.FMLPreInitializationEvent; import net.minecraftforge.fml.common.registry.GameRegistry; import net.minecraftforge.fml.relauncher.Side; @Mod(modid = ItemsOStupidity.MODID, version = ItemsOStupidity.VERSION) public class ItemsOStupidity { public static final String MODID = "itemsofstupidity"; public static final String VERSION = "1.0"; public static Item itemMultiplier; public static Item itemRodCore; @EventHandler public void preinit(FMLPreInitializationEvent event) { itemMultiplier = new ItemMultiplier(); // itemRodCore = new ItemRodCore(); if (event.getSide() == Side.CLIENT) { Minecraft .getMinecraft() .getRenderItem() .getItemModelMesher() .register( itemMultiplier, 0, new ModelResourceLocation("itemsofstupidity:stupidMultiplier", "inventory")); } } @EventHandler public void init(FMLInitializationEvent event) { } } ItemMultiplier.java package com.example.examplemod; import java.lang.reflect.Field; import java.util.ArrayList; import java.util.Iterator; import java.util.LinkedList; import java.util.List; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.init.Items; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraftforge.fml.common.registry.GameRegistry; import net.minecraftforge.fml.common.registry.LanguageRegistry; import scala.actors.threadpool.Arrays; public class ItemMultiplier extends Item { private final String name = "stupidMultiplier"; public ItemMultiplier() { GameRegistry.registerItem(this, name); LanguageRegistry.addName(this, "Multiplier"); setUnlocalizedName(ItemsOStupidity.MODID + ":" + name); setCreativeTab(CreativeTabs.tabTools); Iterator iterator = Item.itemRegistry.iterator(); while(iterator.hasNext()) { Item i = (Item) iterator.next(); for(int meta = 0; meta < 100; meta++) { GameRegistry.addShapelessRecipe(new ItemStack(i, 2, meta), new ItemStack(i, 1, meta), this); } } } public String getName() { return name; } } stupidMultiplier.json { "parent": "builtin/generated", "textures": { "layer0": "itemsofstupidity:items/stupidMultiplier" }, "display": { "thirdperson": { "rotation": [ -90, 0, 0 ], "translation": [ 0, 1, -3 ], "scale": [ 0.55, 0.55, 0.55 ] }, "firstperson": { "rotation": [ 0, -135, 25 ], "translation": [ 0, 4, 2 ], "scale": [ 1.7, 1.7, 1.7 ] } } }
-
[1.8] Item not rendering (textures)
I forgot how to use proxies though, and the tutorials are outdated. What is the difference between getSide and proxies? Also this is my log: [21:06:29] [main/INFO] [GradleStart]: Extra: [] [21:06:30] [main/INFO] [GradleStart]: Running with arguments: [--userProperties, {}, --accessToken, {REDACTED}, --assetIndex, 1.8, --assetsDir, C:/Users/Gaming/.gradle/caches/minecraft/assets, --version, 1.8, --tweakClass, net.minecraftforge.fml.common.launcher.FMLTweaker, --tweakClass, net.minecraftforge.gradle.GradleStartCommon$GradleStartTweaker] [21:06:30] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.FMLTweaker [21:06:30] [main/INFO] [LaunchWrapper]: Using primary tweak class name net.minecraftforge.fml.common.launcher.FMLTweaker [21:06:30] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.gradle.GradleStartCommon$GradleStartTweaker [21:06:30] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLTweaker [21:06:30] [main/INFO] [FML]: Forge Mod Loader version 8.0.20.1023 for Minecraft 1.8 loading [21:06:30] [main/INFO] [FML]: Java is Java HotSpot(TM) 64-Bit Server VM, version 1.7.0_71, running on Windows 7:amd64:6.1, installed at C:\Program Files\Java\jre7 [21:06:30] [main/INFO] [FML]: Managed to load a deobfuscated Minecraft name- we are in a deobfuscated environment. Skipping runtime deobfuscation [21:06:30] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.gradle.GradleStartCommon$GradleStartTweaker [21:06:30] [main/INFO] [GradleStart]: Injecting location in coremod net.minecraftforge.fml.relauncher.FMLCorePlugin [21:06:30] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.FMLInjectionAndSortingTweaker [21:06:30] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.FMLDeobfTweaker [21:06:30] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLInjectionAndSortingTweaker [21:06:30] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLInjectionAndSortingTweaker [21:06:30] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.relauncher.CoreModManager$FMLPluginWrapper [21:06:30] [main/ERROR] [FML]: The binary patch set is missing. Either you are in a development environment, or things are not going to work! [21:06:32] [main/ERROR] [FML]: FML appears to be missing any signature data. This is not a good thing [21:06:32] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLDeobfTweaker [21:06:33] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.TerminalTweaker [21:06:33] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.TerminalTweaker [21:06:33] [main/INFO] [LaunchWrapper]: Launching wrapped minecraft {net.minecraft.client.main.Main} [21:06:34] [Client thread/INFO]: Setting user: Player808 [21:06:34] [Client thread/INFO]: (Session ID is token:FML:Player808) [21:06:38] [Client thread/INFO]: LWJGL Version: 2.9.1 [21:06:39] [Client thread/INFO] [MinecraftForge]: Attempting early MinecraftForge initialization [21:06:39] [Client thread/INFO] [MinecraftForge]: Completed early MinecraftForge initialization [21:06:39] [Client thread/INFO] [FML]: Searching C:\Users\Gaming\Downloads\The Items of Stupidity\eclipse\mods for mods [21:06:39] [Client thread/INFO] [itemsofstupidity]: Mod itemsofstupidity is missing the required element 'name'. Substituting itemsofstupidity [21:06:43] [Client thread/INFO] [FML]: Forge Mod Loader has identified 3 mods to load [21:06:43] [Client thread/INFO] [FML]: Attempting connection with missing mods [mcp, FML, itemsofstupidity] at CLIENT [21:06:43] [Client thread/INFO] [FML]: Attempting connection with missing mods [mcp, FML, itemsofstupidity] at SERVER [21:06:43] [Client thread/INFO]: Reloading ResourceManager: Default, FMLFileResourcePack:Forge Mod Loader, FMLFileResourcePack:itemsofstupidity [21:06:44] [Client thread/INFO] [FML]: Processing ObjectHolder annotations [21:06:44] [Client thread/INFO] [FML]: Found 384 ObjectHolder annotations [21:06:44] [Client thread/INFO] [FML]: Applying holder lookups [21:06:44] [Client thread/INFO] [FML]: Holder lookups applied [21:06:44] [Client thread/ERROR] [FML]: Fatal errors were detected during the transition from PREINITIALIZATION to INITIALIZATION. Loading cannot continue [21:06:44] [Client thread/ERROR] [FML]: mcp{9.05} [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed->Pre-initialized FML{8.0.20.1023} [Forge Mod Loader] (fmlSrc-1.8-8.0.20.1023-1.8.jar) Unloaded->Constructed->Pre-initialized itemsofstupidity{1.0} [itemsofstupidity] (bin) Unloaded->Constructed->Errored [21:06:44] [Client thread/ERROR] [FML]: The following problems were captured during this phase [21:06:44] [Client thread/ERROR] [FML]: Caught exception from itemsofstupidity java.lang.NullPointerException at com.example.examplemod.ItemsOStupidity.preinit(ItemsOStupidity.java:34) ~[bin/:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.7.0_71] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0_71] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0_71] at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.7.0_71] at net.minecraftforge.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:515) ~[fmlSrc-1.8-8.0.20.1023-1.8.jar:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.7.0_71] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0_71] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0_71] at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.7.0_71] at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74) ~[guava-17.0.jar:?] at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47) ~[guava-17.0.jar:?] at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322) ~[guava-17.0.jar:?] at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304) ~[guava-17.0.jar:?] at com.google.common.eventbus.EventBus.post(EventBus.java:275) ~[guava-17.0.jar:?] at net.minecraftforge.fml.common.LoadController.sendEventToModContainer(LoadController.java:208) ~[fmlSrc-1.8-8.0.20.1023-1.8.jar:?] at net.minecraftforge.fml.common.LoadController.propogateStateMessage(LoadController.java:187) ~[fmlSrc-1.8-8.0.20.1023-1.8.jar:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.7.0_71] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0_71] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0_71] at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.7.0_71] at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74) ~[guava-17.0.jar:?] at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47) ~[guava-17.0.jar:?] at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322) ~[guava-17.0.jar:?] at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304) ~[guava-17.0.jar:?] at com.google.common.eventbus.EventBus.post(EventBus.java:275) ~[guava-17.0.jar:?] at net.minecraftforge.fml.common.LoadController.distributeStateMessage(LoadController.java:118) [LoadController.class:?] at net.minecraftforge.fml.common.Loader.preinitializeMods(Loader.java:514) [Loader.class:?] at net.minecraftforge.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:243) [FMLClientHandler.class:?] at net.minecraft.client.Minecraft.startGame(Minecraft.java:413) [Minecraft.class:?] at net.minecraft.client.Minecraft.run(Minecraft.java:326) [Minecraft.class:?] at net.minecraft.client.main.Main.main(Main.java:117) [Main.class:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.7.0_71] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0_71] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0_71] at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.7.0_71] at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.11.jar:?] at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.11.jar:?] at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:85) [start/:?] at GradleStart.main(GradleStart.java:45) [start/:?] [21:06:44] [Client thread/INFO] [sTDOUT]: [net.minecraft.init.Bootstrap:printToSYSOUT:568]: ---- Minecraft Crash Report ---- // Shall we play a game? Time: 26.02.15 21:06 Description: Initializing game java.lang.NullPointerException: Initializing game at com.example.examplemod.ItemsOStupidity.preinit(ItemsOStupidity.java:34) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at net.minecraftforge.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:515) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74) at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47) at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322) at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304) at com.google.common.eventbus.EventBus.post(EventBus.java:275) at net.minecraftforge.fml.common.LoadController.sendEventToModContainer(LoadController.java:208) at net.minecraftforge.fml.common.LoadController.propogateStateMessage(LoadController.java:187) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74) at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47) at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322) at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304) at com.google.common.eventbus.EventBus.post(EventBus.java:275) at net.minecraftforge.fml.common.LoadController.distributeStateMessage(LoadController.java:118) at net.minecraftforge.fml.common.Loader.preinitializeMods(Loader.java:514) at net.minecraftforge.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:243) at net.minecraft.client.Minecraft.startGame(Minecraft.java:413) at net.minecraft.client.Minecraft.run(Minecraft.java:326) at net.minecraft.client.main.Main.main(Main.java:117) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) at net.minecraft.launchwrapper.Launch.main(Launch.java:28) at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:85) at GradleStart.main(GradleStart.java:45) A detailed walkthrough of the error, its code path and all known details is as follows: --------------------------------------------------------------------------------------- -- Head -- Stacktrace: at com.example.examplemod.ItemsOStupidity.preinit(ItemsOStupidity.java:34) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at net.minecraftforge.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:515) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74) at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47) at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322) at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304) at com.google.common.eventbus.EventBus.post(EventBus.java:275) at net.minecraftforge.fml.common.LoadController.sendEventToModContainer(LoadController.java:208) at net.minecraftforge.fml.common.LoadController.propogateStateMessage(LoadController.java:187) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74) at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47) at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322) at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304) at com.google.common.eventbus.EventBus.post(EventBus.java:275) at net.minecraftforge.fml.common.LoadController.distributeStateMessage(LoadController.java:118) at net.minecraftforge.fml.common.Loader.preinitializeMods(Loader.java:514) at net.minecraftforge.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:243) at net.minecraft.client.Minecraft.startGame(Minecraft.java:413) -- Initialization -- Details: Stacktrace: at net.minecraft.client.Minecraft.run(Minecraft.java:326) at net.minecraft.client.main.Main.main(Main.java:117) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) at net.minecraft.launchwrapper.Launch.main(Launch.java:28) at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:85) at GradleStart.main(GradleStart.java:45) -- System Details -- Details: Minecraft Version: 1.8 Operating System: Windows 7 (amd64) version 6.1 Java Version: 1.7.0_71, Oracle Corporation Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation Memory: 650921608 bytes (620 MB) / 1038876672 bytes (990 MB) up to 1038876672 bytes (990 MB) JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0 FML: MCP v9.10 FML v8.0.20.1023 3 mods loaded, 3 mods active mcp{9.05} [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed->Pre-initialized FML{8.0.20.1023} [Forge Mod Loader] (fmlSrc-1.8-8.0.20.1023-1.8.jar) Unloaded->Constructed->Pre-initialized itemsofstupidity{1.0} [itemsofstupidity] (bin) Unloaded->Constructed->Errored Launched Version: 1.8 LWJGL: 2.9.1 OpenGL: GeForce GT 630/PCIe/SSE2 GL version 4.4.0 NVIDIA 344.75, NVIDIA Corporation GL Caps: Using GL 1.3 multitexturing. Using GL 1.3 texture combiners. Using framebuffer objects because OpenGL 3.0 is supported and separate blending is supported. Shaders are available because OpenGL 2.1 is supported. VBOs are available because OpenGL 1.5 is supported. Using VBOs: No Is Modded: Definitely; Client brand changed to 'fml' Type: Client (map_client.txt) Resource Packs: [] Current Language: English (US) Profiler Position: N/A (disabled) [21:06:44] [Client thread/INFO] [sTDOUT]: [net.minecraft.init.Bootstrap:printToSYSOUT:568]: #@!@# Game crashed! Crash report saved to: #@!@# C:\Users\Gaming\Downloads\The Items of Stupidity\eclipse\.\crash-reports\crash-2015-02-26_21.06.44-client.txt
-
[1.8] Item not rendering (textures)
Hey everyone, I have an item that when the constructor is called, it registers a new crafting recipe for every item in the entire game (including metadata). However it's texture is not working, it renders as a block with the missing texture texture. This is my main code: package com.example.examplemod; import net.minecraft.block.Block; import net.minecraft.client.Minecraft; import net.minecraft.client.renderer.entity.RenderItem; import net.minecraft.client.resources.model.ModelResourceLocation; import net.minecraft.init.Blocks; import net.minecraft.init.Items; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraftforge.fml.common.FMLCommonHandler; import net.minecraftforge.fml.common.Mod; import net.minecraftforge.fml.common.Mod.EventHandler; import net.minecraftforge.fml.common.event.FMLInitializationEvent; import net.minecraftforge.fml.common.event.FMLPreInitializationEvent; import net.minecraftforge.fml.common.registry.GameRegistry; import net.minecraftforge.fml.relauncher.Side; @Mod(modid = ItemsOStupidity.MODID, version = ItemsOStupidity.VERSION) public class ItemsOStupidity { public static final String MODID = "itemsofstupidity"; public static final String VERSION = "1.0"; public static Item itemMultiplier; public static Item itemRodCore; @EventHandler public void preinit(FMLPreInitializationEvent event) { itemMultiplier = new ItemMultiplier(); // itemRodCore = new ItemRodCore(); if (event.getSide() == Side.CLIENT) { Minecraft .getMinecraft() .getRenderItem() .getItemModelMesher() .register( itemMultiplier, 0, new ModelResourceLocation("itemsofstupidity:stupidMultiplier", "inventory")); } } @EventHandler public void init(FMLInitializationEvent event) { } } This is my item class: package com.example.examplemod; import java.lang.reflect.Field; import java.util.ArrayList; import java.util.Iterator; import java.util.LinkedList; import java.util.List; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.init.Items; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraftforge.fml.common.registry.GameRegistry; import net.minecraftforge.fml.common.registry.LanguageRegistry; import scala.actors.threadpool.Arrays; public class ItemMultiplier extends Item { private final String name = "stupidMultiplier"; public ItemMultiplier() { GameRegistry.registerItem(this, name); LanguageRegistry.addName(this, "Multiplier"); setUnlocalizedName(ItemsOStupidity.MODID + ":" + name); setCreativeTab(CreativeTabs.tabTools); Iterator iterator = Item.itemRegistry.iterator(); while(iterator.hasNext()) { Item i = (Item) iterator.next(); for(int meta = 0; meta < 100; meta++) { GameRegistry.addShapelessRecipe(new ItemStack(i, 2, meta), new ItemStack(i, 1, meta), this); } } } public String getName() { return name; } } And this is my JSON file: { "parent": "builtin/generated", "textures": { "layer0": "itemsofstupidity:items/stupidMultiplier" }, "display": { "thirdperson": { "rotation": [ -90, 0, 0 ], "translation": [ 0, 1, -3 ], "scale": [ 0.55, 0.55, 0.55 ] }, "firstperson": { "rotation": [ 0, -135, 25 ], "translation": [ 0, 4, 2 ], "scale": [ 1.7, 1.7, 1.7 ] } } } And this is what's in the package explorer:
-
[1.8] For Each Item add a crafting recipe.
Ah, I get it now, thank you alot!
-
[1.8] For Each Item add a crafting recipe.
I checked out a bunch of websites, and I do not see anything wrong with my code.
-
[1.8] For Each Item add a crafting recipe.
This is my code now: public ItemMultiplier() { GameRegistry.registerItem(this, name); setUnlocalizedName(ItemsOStupidity.MODID + ":" + name); setCreativeTab(CreativeTabs.tabTools); while(Item.itemRegistry.iterator().hasNext()) { Item i = (Item) Item.itemRegistry.iterator().next(); GameRegistry.addShapelessRecipe(new ItemStack(i, 2), this, i); } } But now i see the console stuck on this: [23:09:06] [Client thread/INFO] [FML]: Processing ObjectHolder annotations [23:09:06] [Client thread/INFO] [FML]: Found 384 ObjectHolder annotations and Minecraft has a black screen.
-
[1.8] For Each Item add a crafting recipe.
That way is possible too, just more laggy though.
-
[1.8] For Each Item add a crafting recipe.
Hello everyone, i am creating a multiplier item that when registered/the constructor is called, it uses reflections to get all the fields that are an Item or extends Item and creates a shapeless recipe based off it. I would post this in Stack Overflow but I do not think that they would understand since most of them probably to not create modifications in Forge. Here is the constructor code: public ItemMultiplier() { GameRegistry.registerItem(this, name); setUnlocalizedName(ItemsOStupidity.MODID + ":" + name); setCreativeTab(CreativeTabs.tabTools); Field[] items0 = Items.class.getFields(); Field[] items1 = new Field[] {}; for (Field f : items0) { if (f.getType() == Item.class || f.getType().getSuperclass() == Item.class) { List<Field> items_list = new LinkedList<Field>( Arrays.asList(items1)); items_list.add(f); items1 = items_list.toArray(new Field[items_list.size()]); } } for (Field f : items1) { try { Item i = (Item) f.get(this); } catch (IllegalArgumentException e) { e.printStackTrace(); } catch (IllegalAccessException e) { e.printStackTrace(); } } } I checked out and only a few items were working with my multiplier class. What's the problem?
-
An item that prevents death once?
It now works, except i still die
-
An item that prevents death once?
Ok, i have a problem, i need to make an item that prevents death from any source. except, it dosent work, i just die while its in my inventory when its supposed to disappear while regenerating me. This is my code for the main file: package org.lvivtotoro.sus; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayerMP; import net.minecraft.init.Items; import net.minecraft.inventory.IInventory; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.item.crafting.CraftingManager; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.event.entity.living.LivingDeathEvent; import cpw.mods.fml.common.Mod; import cpw.mods.fml.common.Mod.EventHandler; import cpw.mods.fml.common.event.FMLPreInitializationEvent; import cpw.mods.fml.common.eventhandler.EventBus; import cpw.mods.fml.common.registry.GameRegistry; import cpw.mods.fml.common.registry.LanguageRegistry; @Mod(modid = Suj.MODID, name = "Sylvestr's Useless Junk", version = Suj.VERSION) public class Suj { public static final String MODID = "suj"; public static final String VERSION = "0.2dev"; public static Block cookieB = new CookieBlock(Material.cloth).setBlockName( "cookieblock").setBlockTextureName("suj:cookieblock"); public static Item undeadprotectionI = new ItemUndeadProtection() .setUnlocalizedName("medicitem").setTextureName( "suj:undeadprotection"); @EventHandler public void init(FMLPreInitializationEvent event) { event.getModMetadata().authorList.add("BadBoy6767"); event.getModMetadata().description = "Does what the title is about."; MinecraftForge.EVENT_BUS.register(this); GameRegistry.registerBlock(cookieB, "cookieblocksuj"); LanguageRegistry.addName(cookieB, "Cookie Block"); GameRegistry.registerItem(undeadprotectionI, "undeadprotectionsuj"); LanguageRegistry.addName(undeadprotectionI, "Undead Protector"); cookieB.setCreativeTab(CreativeTabs.tabFood); undeadprotectionI.setCreativeTab(CreativeTabs.tabCombat); CraftingManager.getInstance().addRecipe(new ItemStack(cookieB, 1), new Object[] { "ZZZ", "ZZZ", "ZZZ", 'Z', Items.cookie }); } public void removeItem(EntityPlayer ep, ItemStack removeitem) { IInventory inv = ep.inventory; for (int i = 0; i < inv.getSizeInventory(); i++) { if (inv.getStackInSlot(i) != null) { ItemStack j = inv.getStackInSlot(i); if (j.getItem() != null && j.getItem() == removeitem.getItem()) { inv.setInventorySlotContents(i, null); } } } } @EventHandler public void onDeath(LivingDeathEvent e) { if(e.entityLiving instanceof EntityPlayer && !e.entityLiving.worldObj.isRemote) { EntityPlayerMP pmp = (EntityPlayerMP) e.entityLiving; if(pmp.inventory.hasItem(undeadprotectionI)) { removeItem(pmp, new ItemStack(undeadprotectionI, 1)); e.setCanceled(true); } } } } And this is my item class: package org.lvivtotoro.sus; import net.minecraft.item.Item; public class ItemUndeadProtection extends Item { } What should i do?
-
NullPointerException - Ticks - getHeldItem()
Guys, 60% of your posts were pointless , i inserted the onUpdate method in the item class, the same thing is happening!
-
NullPointerException - Ticks - getHeldItem()
Hey everyone, i have a NullPointerException problem, i know what it is an all since i experienced java for 4 years, though, i have no idea how to avoid it since i rarely had this problem, im trying to check the item held by the player in a tick event. This is the main file: This is the event:
-
Toggle rain in the world?
Dosent work. p_149699_1_ is a world variable decleared as a method parameter. minutes is how many minutes you want it to rain. The minutes variable increases on right click of the block.
-
Toggle rain in the world?
bump
-
Toggle rain in the world?
sadly, it dosent work. This is my code: public void onBlockClicked(World p_149699_1_, int p_149699_2_, int p_149699_3_, int p_149699_4_, EntityPlayer p_149699_5_) { if (used == 0) { p_149699_1_.getWorldInfo().setRainTime((minutes * 20) * 60); if (p_149699_1_.getWorldInfo().isRaining()) { p_149699_1_.getWorldInfo().setRainTime(0); p_149699_1_.getWorldInfo().setRaining(false); } else { p_149699_1_.getWorldInfo().setRaining(true); } p_149699_5_.addChatMessage(new ChatComponentText( "Will be raining: " + p_149699_1_.getWorldInfo().isRaining())); if (p_149699_1_.getWorldInfo().isRaining()) p_149699_5_.addChatMessage(new ChatComponentText( "Rain time: " + minutes + " minutes")); used = 1; } else { used = 0; } }
-
Toggle rain in the world?
public void onBlockClicked(World p_149699_1_, int p_149699_2_, int p_149699_3_, int p_149699_4_, EntityPlayer p_149699_5_) { if (used == 0) { if(p_149699_1_.getWorldInfo().isRaining()) { p_149699_1_.getWorldInfo().setRaining(false); } else { p_149699_1_.getWorldInfo().setRaining(true); } p_149699_5_.addChatMessage(new ChatComponentText( "RAINING BOOLEAN: " + p_149699_1_.getWorldInfo().isRaining())); used = 1; } else { used = 0; } } i changed it to on block left click.
-
Toggle rain in the world?
I said i already did that. It didnt work.
-
Toggle rain in the world?
Hey guys, i have a block that on right click, toggles rain. This is my code: p_149727_1_.getWorldInfo().setRaining(!p_149727_1_.getWorldInfo().isRaining()); p_149727 is the world. Unfortunetly, this dosent work, it dosent get sunny, and it dosent get rainy. Any solutions?
IPS spam blocked by CleanTalk.