my block seems to show uo as tile.null.name when launched
package com.gmail.dakingcartoon.TestMod.init;
import com.gmail.dakingcartoon.mods.TestMod.blocks.BlockClusteredPearlBlock;
import com.gmail.dakingcartoon.mods.TestMod.help.RegisterHelper;
import net.minecraft.block.Block;
public class ModBlocks
{
public static Block clusteredPearlBlock = new BlockClusteredPearlBlock();
public static void init()
{
RegisterHelper.registerBlock(clusteredPearlBlock);
}
}
package com.gmail.dakingcartoon.mods.TestMod.blocks;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.creativetab.CreativeTabs;
public class BlockClusteredPearlBlock extends Block
{
public BlockClusteredPearlBlock()
{
super(Material.glass);
my block seems to show uo as tile.null.name when launched
package com.gmail.dakingcartoon.TestMod.init;
import com.gmail.dakingcartoon.mods.TestMod.blocks.BlockClusteredPearlBlock;
import com.gmail.dakingcartoon.mods.TestMod.help.RegisterHelper;
import net.minecraft.block.Block;
public class ModBlocks
{
public static Block clusteredPearlBlock = new BlockClusteredPearlBlock();
public static void init()
{
RegisterHelper.registerBlock(clusteredPearlBlock);
}
}
package com.gmail.dakingcartoon.mods.TestMod.blocks;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.creativetab.CreativeTabs;
public class BlockClusteredPearlBlock extends Block
{
public BlockClusteredPearlBlock()
{
super(Material.glass);
I love the tutorial but im having a problem. After i make the Reference Class I cant import any "Reference" thing. When i scroll over the Referece.MODID, it doesnt give me the choice to import? How do i fix this?
I love the tutorial but im having a problem. After i make the Reference Class I cant import any "Reference" thing. When i scroll over the Referece.MODID, it doesnt give me the choice to import? How do i fix this?
Manually import it. Just right down your package name plus the class: e.g. import com.thexfactor117.ascension.help.Reference;
Make sure they are spelled correctly because you may have forgotten the 'n' based on your post.
public class ModItems
{
public static Item rawBacon = new PigTasticItem().setUnlocalizedName("rawBacon");
public static void init()
{
RegisterHelper.registerItem(rawBacon);
}
}
Do you know wats wrong? Also heres the error log:
Caused by: java.lang.Error: Unresolved compilation problem:
ModItems cannot be resolved.
******AND*****
Caused by: java.lang.Error: Unresolved compilation problem:
The method registerItems(WeightedRandom.Item) is undefined for the type RegisterHelper
Can I see the full error log, and also the RegisterHelper class. Also, I prefer if you use pastebin for posting code/logs; just my preference, but you can do whatever.
@Mod(modid = Reference.MODID, name = Reference.NAME, version = Reference.VERSION)
public class PigtasticMod
{
@Mod.EventHandler
public void preInit(FMLPreInitializationEvent event)
{
ModItems.init();
}
@Mod.EventHandler
public void Init(FMLInitializationEvent event)
{
}
@Mod.EventHandler
public void postInit(FMLPostInitializationEvent event)
{
}
}
Error Log:(this is long)
---- Minecraft Crash Report ----
// Why is it breaking
Time: 2/10/15 3:33 PM
Description: There was a severe problem during mod loading that has caused the game to fail
cpw.mods.fml.common.LoaderException: java.lang.Error: Unresolved compilation problem:
The method registerItem(Item) in the type RegisterHelper is not applicable for the arguments (WeightedRandom.Item)
at cpw.mods.fml.common.LoadController.transition(LoadController.java:162)
at cpw.mods.fml.common.Loader.preinitializeMods(Loader.java:515)
at cpw.mods.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:239)
at net.minecraft.client.Minecraft.startGame(Minecraft.java:522)
at net.minecraft.client.Minecraft.run(Minecraft.java:931)
at net.minecraft.client.main.Main.main(Main.java:164)
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:483)
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:78)
at GradleStart.main(GradleStart.java:45)
Caused by: java.lang.Error: Unresolved compilation problem:
The method registerItem(Item) in the type RegisterHelper is not applicable for the arguments (WeightedRandom.Item)
at com.Geoffrey.pigtasticmod.init.ModItems.init(ModItems.java:14)
at com.Geoffrey.pigtasticmod.PigtasticMod.preInit(PigtasticMod.java:16)
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:483)
at cpw.mods.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:513)
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:483)
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 cpw.mods.fml.common.LoadController.sendEventToModContainer(LoadController.java:208)
at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:187)
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:483)
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 cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:118)
at cpw.mods.fml.common.Loader.preinitializeMods(Loader.java:513)
... 12 more
A detailed walkthrough of the error, its code path and all known details is as follows:
---------------------------------------------------------------------------------------
-- System Details --
Details:
Minecraft Version: 1.7.10
Operating System: Windows 8.1 (amd64) version 6.3
Java Version: 1.8.0_31, Oracle Corporation
Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
Memory: 961216248 bytes (916 MB) / 1056309248 bytes (1007 MB) up to 1056309248 bytes (1007 MB)
JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M
AABB Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used
IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0
FML: MCP v9.05 FML v7.10.85.1291 Minecraft Forge 10.13.2.1291 4 mods loaded, 4 mods active
mcp{9.05} [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed->Pre-initialized
FML{7.10.85.1291} [Forge Mod Loader] (forgeSrc-1.7.10-10.13.2.1291.jar) Unloaded->Constructed->Pre-initialized
Forge{10.13.2.1291} [Minecraft Forge] (forgeSrc-1.7.10-10.13.2.1291.jar) Unloaded->Constructed->Pre-initialized
geoffrey_pigtastic{1.0} [PigTastic] (bin) Unloaded->Constructed->Errored
PS i dont know how to use pastebin.(im so stupid)I would if i could. SRY
@Mod(modid = Reference.MODID, name = Reference.NAME, version = Reference.VERSION)
public class PigtasticMod
{
@Mod.EventHandler
public void preInit(FMLPreInitializationEvent event)
{
ModItems.init();
}
@Mod.EventHandler
public void Init(FMLInitializationEvent event)
{
}
@Mod.EventHandler
public void postInit(FMLPostInitializationEvent event)
{
}
}
Error Log:(this is long)
---- Minecraft Crash Report ----
// Why is it breaking
Time: 2/10/15 3:33 PM
Description: There was a severe problem during mod loading that has caused the game to fail
cpw.mods.fml.common.LoaderException: java.lang.Error: Unresolved compilation problem:
The method registerItem(Item) in the type RegisterHelper is not applicable for the arguments (WeightedRandom.Item)
at cpw.mods.fml.common.LoadController.transition(LoadController.java:162)
at cpw.mods.fml.common.Loader.preinitializeMods(Loader.java:515)
at cpw.mods.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:239)
at net.minecraft.client.Minecraft.startGame(Minecraft.java:522)
at net.minecraft.client.Minecraft.run(Minecraft.java:931)
at net.minecraft.client.main.Main.main(Main.java:164)
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:483)
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:78)
at GradleStart.main(GradleStart.java:45)
Caused by: java.lang.Error: Unresolved compilation problem:
The method registerItem(Item) in the type RegisterHelper is not applicable for the arguments (WeightedRandom.Item)
at com.Geoffrey.pigtasticmod.init.ModItems.init(ModItems.java:14)
at com.Geoffrey.pigtasticmod.PigtasticMod.preInit(PigtasticMod.java:16)
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:483)
at cpw.mods.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:513)
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:483)
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 cpw.mods.fml.common.LoadController.sendEventToModContainer(LoadController.java:208)
at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:187)
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:483)
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 cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:118)
at cpw.mods.fml.common.Loader.preinitializeMods(Loader.java:513)
... 12 more
A detailed walkthrough of the error, its code path and all known details is as follows:
---------------------------------------------------------------------------------------
-- System Details --
Details:
Minecraft Version: 1.7.10
Operating System: Windows 8.1 (amd64) version 6.3
Java Version: 1.8.0_31, Oracle Corporation
Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
Memory: 961216248 bytes (916 MB) / 1056309248 bytes (1007 MB) up to 1056309248 bytes (1007 MB)
JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M
AABB Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used
IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0
FML: MCP v9.05 FML v7.10.85.1291 Minecraft Forge 10.13.2.1291 4 mods loaded, 4 mods active
mcp{9.05} [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed->Pre-initialized
FML{7.10.85.1291} [Forge Mod Loader] (forgeSrc-1.7.10-10.13.2.1291.jar) Unloaded->Constructed->Pre-initialized
Forge{10.13.2.1291} [Minecraft Forge] (forgeSrc-1.7.10-10.13.2.1291.jar) Unloaded->Constructed->Pre-initialized
geoffrey_pigtastic{1.0} [PigTastic] (bin) Unloaded->Constructed->Errored
PS i dont know how to use pastebin.(im so stupid)I would if i could. SRY
Okay, I'm following Tutorial #3 Building an item. I have no visible errors in the code, but it doesn't seem to want to compile when I try and run it, and I'm not sure how to read the console window for helpful information yet. "Unable to launch" doesn't quite tell me where my issue is. Your beautiful mind for assistance would be greatly appreciated.
console window:
[19:06:57] [main/INFO] [LaunchWrapper]: Loading tweak class name cpw.mods.fml.common.launcher.FMLTweaker
[19:06:57] [main/INFO] [LaunchWrapper]: Using primary tweak class name cpw.mods.fml.common.launcher.FMLTweaker
[19:06:57] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.common.launcher.FMLTweaker
[19:06:57] [main/INFO] [FML]: Forge Mod Loader version 7.2.211.1121 for Minecraft 1.7.2 loading
[19:06:57] [main/INFO] [FML]: Java is Java HotSpot(TM) 64-Bit Server VM, version 1.8.0_31, running on Windows 8.1:amd64:6.3, installed at C:\Program Files\Java\jre1.8.0_31
[19:06:57] [main/INFO] [FML]: Managed to load a deobfuscated Minecraft name- we are in a deobfuscated environment. Skipping runtime deobfuscation
[19:06:57] [main/INFO] [LaunchWrapper]: Loading tweak class name cpw.mods.fml.common.launcher.FMLInjectionAndSortingTweaker
[19:06:57] [main/INFO] [LaunchWrapper]: Loading tweak class name cpw.mods.fml.common.launcher.FMLDeobfTweaker
[19:06:57] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.common.launcher.FMLInjectionAndSortingTweaker
[19:06:57] [main/ERROR] [LaunchWrapper]: Unable to launch
java.util.ConcurrentModificationException
at java.util.ArrayList$Itr.checkForComodification(Unknown Source) ~[?:1.8.0_31]
at java.util.ArrayList$Itr.remove(Unknown Source) ~[?:1.8.0_31]
at net.minecraft.launchwrapper.Launch.launch(Launch.java:117) [launchwrapper-1.9.jar:?]
at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.9.jar:?]
Java HotSpot(TM) 64-Bit Server VM warning: Using incremental CMS is deprecated and will likely be removed in a future release
@Mod(modid = Reference.MODID, name = Reference.NAME, version = Reference.VERSION)
public class EnderGods
{
@Mod.EventHandler
public void preInit(FMLPreInitializationEvent event)
{
ModItems.init();
}
@Mod.EventHandler
public void Init(FMLInitializationEvent event)
{
}
@Mod.EventHandler
public void postInit(FMLPostInitializationEvent event)
{
public class ModItems
{
public static Item waxCandle = new EnderGodsItem().setUnlocalizedName("waxCandle");
public static void init()
{
RegisterHelper.registerItem(waxCandle);
}
}
public class RegisterHelper
{
public static void registerBlock(Block block)
{
GameRegistry.registerBlock(block, Reference.MODID +
block.getUnlocalizedName().substring(5));
}
public class EnderGodsItem extends Item
{
public EnderGodsItem()
{
super();
setCreativeTab(CreativeTabs.tabMisc);
}
}
filename: Reference.java
package com.github.impdesign.endergods.help;
public class Reference
{
public static final String MODID = "impdeisgn_endergods";
public static final String NAME = "EnderGods";
public static final String VERSION = "1.0.0.0";
}
Also, I think it would be helpful if you told people in Tutorial #1 to download a JDK from Java/Oracle when you're having us download eclipse and forge. Other than that, I'm liking the tutorial, thank you so much for making it!
@Mod(modid = Reference.MODID, name = Reference.NAME, version = Reference.VERSION)
public class PigtasticMod
{
@Mod.EventHandler
public void preInit(FMLPreInitializationEvent event)
{
ModItems.init();
}
@Mod.EventHandler
public void Init(FMLInitializationEvent event)
{
}
@Mod.EventHandler
public void postInit(FMLPostInitializationEvent event)
{
}
}
Reference.java:
package com.Geoffrey.pigtasticmod.help;
public class Reference
{
public static final String MODID = "geoffrey_pigtastic";
public static final String NAME = "PigTastic";
public static final String VERSION = "1.0";
}
public class RegisterHelper
{
public static void registerBlock(Block block)
{
GameRegistry.registerBlock(block, Reference.MODID + block.getUnlocalizedName().substring(5));
}
Thank you so much it worked perfectly. Well except no textures yet. But YAY! Um one last question. the name shows up as item.rawBacon.name. Can i change this later in another tutorial?
Thank you so much it worked perfectly. Well except no textures yet. But YAY! Um one last question. the name shows up as item.rawBacon.name. Can i change this later in another tutorial?
I was just going to start over because my set up might be a little bit wrong. So I deleted everything and am following the steps in tutorial #1 to get my work space in eclipse set up again. From the tutorial:
[quote]This should pull up Eclipse; there should also be a “Minecraft” folder in the Project Explorer on the far left. If all of this checks up, everything has been setup correctly!
And I assume right here, without making any changes, I should be able to hit the "Run Client" button and have a fresh, new, unadulterated, unmodded version of Minecraft come up. But I get the same thing that happened when I tried to run the client after I went through all of Tutorial #3. Minecraft doesn't even launch, and all I get in the console window is the following:
[08:42:23] [main/INFO] [LaunchWrapper]: Loading tweak class name cpw.mods.fml.common.launcher.FMLTweaker
[08:42:23] [main/INFO] [LaunchWrapper]: Using primary tweak class name cpw.mods.fml.common.launcher.FMLTweaker
[08:42:23] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.common.launcher.FMLTweaker
[08:42:23] [main/INFO] [FML]: Forge Mod Loader version 7.2.211.1121 for Minecraft 1.7.2 loading
[08:42:23] [main/INFO] [FML]: Java is Java HotSpot(TM) 64-Bit Server VM, version 1.8.0_31, running on Windows 8.1:amd64:6.3, installed at C:\Program Files\Java\jre1.8.0_31
[08:42:23] [main/INFO] [FML]: Managed to load a deobfuscated Minecraft name- we are in a deobfuscated environment. Skipping runtime deobfuscation
[08:42:23] [main/INFO] [LaunchWrapper]: Loading tweak class name cpw.mods.fml.common.launcher.FMLInjectionAndSortingTweaker
[08:42:23] [main/INFO] [LaunchWrapper]: Loading tweak class name cpw.mods.fml.common.launcher.FMLDeobfTweaker
[08:42:23] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.common.launcher.FMLInjectionAndSortingTweaker
[08:42:23] [main/ERROR] [LaunchWrapper]: Unable to launch
java.util.ConcurrentModificationException
at java.util.ArrayList$Itr.checkForComodification(Unknown Source) ~[?:1.8.0_31]
at java.util.ArrayList$Itr.remove(Unknown Source) ~[?:1.8.0_31]
at net.minecraft.launchwrapper.Launch.launch(Launch.java:117) [launchwrapper-1.9.jar:?]
at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.9.jar:?]
Java HotSpot(TM) 64-Bit Server VM warning: Using incremental CMS is deprecated and will likely be removed in a future release
Please note the last two lines before the error message which might be related
[08:42:23] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.common.launcher.FMLInjectionAndSorti...
[08:42:23] [main/ERROR] [LaunchWrapper]: Unable to launch
I'm not sure what it is, if I had gotten the wrong JDK file or what... Have you heard of this or know how to fix it?
Ok so i fixed the Names and added so far cooked bacon, raw bacon, bacon bits, and bacon ore(see a trend? ) i want the bacon ore to act like coal and drop 4 bacon bits(which are crafted into bacon) when its mined. Right now all it does is drop the ore/block. How do i fix this? Im assuming there is a command/code line that goes with the other block specifications? If so what is it?
Ok so i fixed the Names and added so far cooked bacon, raw bacon, bacon bits, and bacon ore(see a trend? ) i want the bacon ore to act like coal and drop 4 bacon bits(which are crafted into bacon) when its mined. Right now all it does is drop the ore/block. How do i fix this? Im assuming there is a command/code line that goes with the other block specifications? If so what is it?
Yeah, there is a method that you can override (Block#dropBlockAsItem) which you can override to drop items instead. Give yourself a challenge and see if you can figure it out :). If not, I can provide some code for you.
I was just going to start over because my set up might be a little bit wrong. So I deleted everything and am following the steps in tutorial #1 to get my work space in eclipse set up again. From the tutorial:
I've never had that error before, so I can't provide a lot of help, but I did notice this:
[08:42:23] [main/INFO] [FML]: Forge Mod Loader version 7.2.211.1121 for Minecraft 1.7.2 loading
I would assume you are loading up a 1.7.2 environment, correct?
package com.gmail.dakingcartoon.TestMod.init;
import com.gmail.dakingcartoon.mods.TestMod.blocks.BlockClusteredPearlBlock;
import com.gmail.dakingcartoon.mods.TestMod.help.RegisterHelper;
import net.minecraft.block.Block;
public class ModBlocks
{
public static Block clusteredPearlBlock = new BlockClusteredPearlBlock();
public static void init()
{
RegisterHelper.registerBlock(clusteredPearlBlock);
}
}
package com.gmail.dakingcartoon.mods.TestMod.blocks;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.creativetab.CreativeTabs;
public class BlockClusteredPearlBlock extends Block
{
public BlockClusteredPearlBlock()
{
super(Material.glass);
setCreativeTab(CreativeTabs.tabBlock);
}
}
Look at the en_US.lang tutorial
will do boss! but first i want to make the textures first
Manually import it. Just right down your package name plus the class: e.g. import com.thexfactor117.ascension.help.Reference;
Make sure they are spelled correctly because you may have forgotten the 'n' based on your post.
heres the text:
package com.Geoffrey.pigtasticmod.init;
import com.Geoffrey.pigtasticmod.help.RegisterHelper;
import com.Geoffrey.pigtasticmod.items.PigTasticItem;
public class ModItems
{
public static Item rawBacon = new PigTasticItem().setUnlocalizedName("rawBacon");
public static void init()
{
RegisterHelper.registerItem(rawBacon);
}
}
Do you know wats wrong? Also heres the error log:
Caused by: java.lang.Error: Unresolved compilation problem:
ModItems cannot be resolved.
******AND*****
Caused by: java.lang.Error: Unresolved compilation problem:
The method registerItems(WeightedRandom.Item) is undefined for the type RegisterHelper
Can I see the full error log, and also the RegisterHelper class. Also, I prefer if you use pastebin for posting code/logs; just my preference, but you can do whatever.
Registry Helper:
package com.Geoffrey.pigtasticmod;
import com.Geoffrey.pigtasticmod.help.Reference;
import com.Geoffrey.pigtasticmod.init.ModItems;
import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.event.FMLInitializationEvent;
import cpw.mods.fml.common.event.FMLPostInitializationEvent;
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
@Mod(modid = Reference.MODID, name = Reference.NAME, version = Reference.VERSION)
public class PigtasticMod
{
@Mod.EventHandler
public void preInit(FMLPreInitializationEvent event)
{
ModItems.init();
}
@Mod.EventHandler
public void Init(FMLInitializationEvent event)
{
}
@Mod.EventHandler
public void postInit(FMLPostInitializationEvent event)
{
}
}
Error Log:(this is long)
---- Minecraft Crash Report ----
// Why is it breaking
Time: 2/10/15 3:33 PM
Description: There was a severe problem during mod loading that has caused the game to fail
cpw.mods.fml.common.LoaderException: java.lang.Error: Unresolved compilation problem:
The method registerItem(Item) in the type RegisterHelper is not applicable for the arguments (WeightedRandom.Item)
at cpw.mods.fml.common.LoadController.transition(LoadController.java:162)
at cpw.mods.fml.common.Loader.preinitializeMods(Loader.java:515)
at cpw.mods.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:239)
at net.minecraft.client.Minecraft.startGame(Minecraft.java:522)
at net.minecraft.client.Minecraft.run(Minecraft.java:931)
at net.minecraft.client.main.Main.main(Main.java:164)
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:483)
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:78)
at GradleStart.main(GradleStart.java:45)
Caused by: java.lang.Error: Unresolved compilation problem:
The method registerItem(Item) in the type RegisterHelper is not applicable for the arguments (WeightedRandom.Item)
at com.Geoffrey.pigtasticmod.init.ModItems.init(ModItems.java:14)
at com.Geoffrey.pigtasticmod.PigtasticMod.preInit(PigtasticMod.java:16)
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:483)
at cpw.mods.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:513)
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:483)
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 cpw.mods.fml.common.LoadController.sendEventToModContainer(LoadController.java:208)
at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:187)
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:483)
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 cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:118)
at cpw.mods.fml.common.Loader.preinitializeMods(Loader.java:513)
... 12 more
A detailed walkthrough of the error, its code path and all known details is as follows:
---------------------------------------------------------------------------------------
-- System Details --
Details:
Minecraft Version: 1.7.10
Operating System: Windows 8.1 (amd64) version 6.3
Java Version: 1.8.0_31, Oracle Corporation
Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
Memory: 961216248 bytes (916 MB) / 1056309248 bytes (1007 MB) up to 1056309248 bytes (1007 MB)
JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M
AABB Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used
IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0
FML: MCP v9.05 FML v7.10.85.1291 Minecraft Forge 10.13.2.1291 4 mods loaded, 4 mods active
mcp{9.05} [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed->Pre-initialized
FML{7.10.85.1291} [Forge Mod Loader] (forgeSrc-1.7.10-10.13.2.1291.jar) Unloaded->Constructed->Pre-initialized
Forge{10.13.2.1291} [Minecraft Forge] (forgeSrc-1.7.10-10.13.2.1291.jar) Unloaded->Constructed->Pre-initialized
geoffrey_pigtastic{1.0} [PigTastic] (bin) Unloaded->Constructed->Errored
PS i dont know how to use pastebin.(im so stupid)I would if i could. SRY
I need to see the RegisterHelper clas file.
Glad you find it interesting
console window:
[19:06:57] [main/INFO] [LaunchWrapper]: Loading tweak class name cpw.mods.fml.common.launcher.FMLTweaker
[19:06:57] [main/INFO] [LaunchWrapper]: Using primary tweak class name cpw.mods.fml.common.launcher.FMLTweaker
[19:06:57] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.common.launcher.FMLTweaker
[19:06:57] [main/INFO] [FML]: Forge Mod Loader version 7.2.211.1121 for Minecraft 1.7.2 loading
[19:06:57] [main/INFO] [FML]: Java is Java HotSpot(TM) 64-Bit Server VM, version 1.8.0_31, running on Windows 8.1:amd64:6.3, installed at C:\Program Files\Java\jre1.8.0_31
[19:06:57] [main/INFO] [FML]: Managed to load a deobfuscated Minecraft name- we are in a deobfuscated environment. Skipping runtime deobfuscation
[19:06:57] [main/INFO] [LaunchWrapper]: Loading tweak class name cpw.mods.fml.common.launcher.FMLInjectionAndSortingTweaker
[19:06:57] [main/INFO] [LaunchWrapper]: Loading tweak class name cpw.mods.fml.common.launcher.FMLDeobfTweaker
[19:06:57] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.common.launcher.FMLInjectionAndSortingTweaker
[19:06:57] [main/ERROR] [LaunchWrapper]: Unable to launch
java.util.ConcurrentModificationException
at java.util.ArrayList$Itr.checkForComodification(Unknown Source) ~[?:1.8.0_31]
at java.util.ArrayList$Itr.remove(Unknown Source) ~[?:1.8.0_31]
at net.minecraft.launchwrapper.Launch.launch(Launch.java:117) [launchwrapper-1.9.jar:?]
at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.9.jar:?]
Java HotSpot(TM) 64-Bit Server VM warning: Using incremental CMS is deprecated and will likely be removed in a future release
filename: EnderGods.java
package com.github.impdesign.endergods;
import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.event.FMLInitializationEvent;
import cpw.mods.fml.common.event.FMLPostInitializationEvent;
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
import com.github.impdesign.endergods.help.Reference;
import com.github.impdesign.endergods.init.ModItems;
@Mod(modid = Reference.MODID, name = Reference.NAME, version = Reference.VERSION)
public class EnderGods
{
@Mod.EventHandler
public void preInit(FMLPreInitializationEvent event)
{
ModItems.init();
}
@Mod.EventHandler
public void Init(FMLInitializationEvent event)
{
}
@Mod.EventHandler
public void postInit(FMLPostInitializationEvent event)
{
}
}
filename: ModItems.java
package com.github.impdesign.endergods.init;
import com.github.impdesign.endergods.help.RegisterHelper;
import com.github.impdesign.endergods.items.EnderGodsItem;
import net.minecraft.item.Item;
public class ModItems
{
public static Item waxCandle = new EnderGodsItem().setUnlocalizedName("waxCandle");
public static void init()
{
RegisterHelper.registerItem(waxCandle);
}
}
filename: RegisterHelper.java
package com.github.impdesign.endergods.help;
import net.minecraft.block.Block;
import net.minecraft.item.Item;
import cpw.mods.fml.common.registry.GameRegistry;
public class RegisterHelper
{
public static void registerBlock(Block block)
{
GameRegistry.registerBlock(block, Reference.MODID +
block.getUnlocalizedName().substring(5));
}
public static void registerItem(Item item)
{
GameRegistry.registerItem(item, Reference.MODID +
item.getUnlocalizedName().substring(5));
}
}
filename: EnderGodsItem.java
package com.github.impdesign.endergods.items;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.Item;
import com.github.impdesign.endergods.help.Reference;
public class EnderGodsItem extends Item
{
public EnderGodsItem()
{
super();
setCreativeTab(CreativeTabs.tabMisc);
}
}
filename: Reference.java
package com.github.impdesign.endergods.help;
public class Reference
{
public static final String MODID = "impdeisgn_endergods";
public static final String NAME = "EnderGods";
public static final String VERSION = "1.0.0.0";
}
Also, I think it would be helpful if you told people in Tutorial #1 to download a JDK from Java/Oracle when you're having us download eclipse and forge. Other than that, I'm liking the tutorial, thank you so much for making it!
~Summon Your Cheeky Creations~
PS how do i use the "Spoiler" green box things?
PigTasticMod.java:
package com.Geoffrey.pigtasticmod;
import com.Geoffrey.pigtasticmod.help.Reference;
import com.Geoffrey.pigtasticmod.init.ModItems;
import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.event.FMLInitializationEvent;
import cpw.mods.fml.common.event.FMLPostInitializationEvent;
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
@Mod(modid = Reference.MODID, name = Reference.NAME, version = Reference.VERSION)
public class PigtasticMod
{
@Mod.EventHandler
public void preInit(FMLPreInitializationEvent event)
{
ModItems.init();
}
@Mod.EventHandler
public void Init(FMLInitializationEvent event)
{
}
@Mod.EventHandler
public void postInit(FMLPostInitializationEvent event)
{
}
}
Reference.java:
package com.Geoffrey.pigtasticmod.help;
public class Reference
{
public static final String MODID = "geoffrey_pigtastic";
public static final String NAME = "PigTastic";
public static final String VERSION = "1.0";
}
RegisterHelper.java:
package com.Geoffrey.pigtasticmod.help;
import cpw.mods.fml.common.registry.GameRegistry;
import net.minecraft.block.Block;
import net.minecraft.item.Item;
public class RegisterHelper
{
public static void registerBlock(Block block)
{
GameRegistry.registerBlock(block, Reference.MODID + block.getUnlocalizedName().substring(5));
}
public static void registerItem(Item item)
{
GameRegistry.registerItem(item, Reference.MODID + item.getUnlocalizedName().substring(5));
}
}
ModItems.java:(this is where Eclipse says the error is.)
package com.Geoffrey.pigtasticmod.init;
import net.minecraft.util.WeightedRandom.Item;
import com.Geoffrey.pigtasticmod.help.RegisterHelper;
import com.Geoffrey.pigtasticmod.items.PigTasticItem;
public class ModItems
{
public static Item rawBacon = new PigTasticItem().setUnlocalizedName("rawBacon");
public static void init()
{
RegisterHelper.registerItem(rawBacon);
}
}
PigTasticItem.java:
package com.Geoffrey.pigtasticmod.items;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.Item;
import com.Geoffrey.pigtasticmod.help.Reference;
public class PigTasticItem extends Item
{
public PigTasticItem()
{
super();
setCreativeTab(CreativeTabs.tabMisc);
}
}
So i hope this helps more. Sorry about earlier. I just signed up to the forums today to ask you questions on your tutorial.
PS: I know nothing about mods. Sry if im such a noob.
Was there an crash report, and if so, can you post that. Also, is that the complete log, or is there more?
Thanks for the tips as well; I'll put it on my to do list to fix.
You imported the wrong Item class in your ModItems class. You need "net.minecraft.item.Item" instead.
Yup. The en_US.lang tutorial will go over that
[quote]This should pull up Eclipse; there should also be a “Minecraft” folder in the Project Explorer on the far left. If all of this checks up, everything has been setup correctly!
And I assume right here, without making any changes, I should be able to hit the "Run Client" button and have a fresh, new, unadulterated, unmodded version of Minecraft come up. But I get the same thing that happened when I tried to run the client after I went through all of Tutorial #3. Minecraft doesn't even launch, and all I get in the console window is the following:
[08:42:23] [main/INFO] [LaunchWrapper]: Using primary tweak class name cpw.mods.fml.common.launcher.FMLTweaker
[08:42:23] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.common.launcher.FMLTweaker
[08:42:23] [main/INFO] [FML]: Forge Mod Loader version 7.2.211.1121 for Minecraft 1.7.2 loading
[08:42:23] [main/INFO] [FML]: Java is Java HotSpot(TM) 64-Bit Server VM, version 1.8.0_31, running on Windows 8.1:amd64:6.3, installed at C:\Program Files\Java\jre1.8.0_31
[08:42:23] [main/INFO] [FML]: Managed to load a deobfuscated Minecraft name- we are in a deobfuscated environment. Skipping runtime deobfuscation
[08:42:23] [main/INFO] [LaunchWrapper]: Loading tweak class name cpw.mods.fml.common.launcher.FMLInjectionAndSortingTweaker
[08:42:23] [main/INFO] [LaunchWrapper]: Loading tweak class name cpw.mods.fml.common.launcher.FMLDeobfTweaker
[08:42:23] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.common.launcher.FMLInjectionAndSortingTweaker
[08:42:23] [main/ERROR] [LaunchWrapper]: Unable to launch
java.util.ConcurrentModificationException
at java.util.ArrayList$Itr.checkForComodification(Unknown Source) ~[?:1.8.0_31]
at java.util.ArrayList$Itr.remove(Unknown Source) ~[?:1.8.0_31]
at net.minecraft.launchwrapper.Launch.launch(Launch.java:117) [launchwrapper-1.9.jar:?]
at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.9.jar:?]
Java HotSpot(TM) 64-Bit Server VM warning: Using incremental CMS is deprecated and will likely be removed in a future release
Please note the last two lines before the error message which might be related
[08:42:23] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.common.launcher.FMLInjectionAndSorti...
[08:42:23] [main/ERROR] [LaunchWrapper]: Unable to launch
I'm not sure what it is, if I had gotten the wrong JDK file or what... Have you heard of this or know how to fix it?
~Summon Your Cheeky Creations~
Yeah, there is a method that you can override (Block#dropBlockAsItem) which you can override to drop items instead. Give yourself a challenge and see if you can figure it out :). If not, I can provide some code for you.
I've never had that error before, so I can't provide a lot of help, but I did notice this:
I would assume you are loading up a 1.7.2 environment, correct?