It just means you've already ran that command before and therefore it's just skipping over doing that specific task because it has already been done. Nothing to worry about.
I'm trying to set the LogHelper class, but "Level cannot be resolved to a type." Every time I try to import one items Eclipse recommends It doesn't recognize all of the {log(Level.XXX, object);}
I'm trying to set the LogHelper class, but "Level cannot be resolved to a type." Every time I try to import one items Eclipse recommends It doesn't recognize all of the {log(Level.XXX, object);}
There are several Level imports which can be imported; make sure you are using the right one.
Hi guys. Really Love your work. I was wondering if you can post or make some more Tutorials about setting up more items. I'm trying to make the mod that gives a three resource packs in one feel. The mod i'm working on is on version 1.7.10
too begin i have searched and searched for the answer to this. sadly cant find one, so i'm posting here. i am trying to gen ore in nether which ive already found how to specify the target block which ive set to netherrack so i guess im asking for someone to look over my code to see whats up.
too begin i have searched and searched for the answer to this. sadly cant find one, so i'm posting here. i am trying to gen ore in nether which ive already found how to specify the target block which ive set to netherrack so i guess im asking for someone to look over my code to see whats up.
public class LegendaryMythsWorldGeneration implements IWorldGenerator{
@Override
public void generate(Random random, int chunkX, int chunkZ, World world, IChunkProvider chunkGenerator,
IChunkProvider chunkProvider) {
switch (world.provider.dimensionId){
case 0:
generateSurface(world, random, chunkX * 16, chunkZ * 16);
case -1:
generateNether(world, random, chunkX * 16, chunkZ* 16);
case 1:
generateEnd(world, random, chunkX * 16, chunkZ * 16);
}
}
private void generateSurface(World world, Random random, int x, int z)
{
addNetherOreSpawn(ModBlocks.fireGemOre, world, random, x, z, 16, 16, 1 + random.nextInt(2), 10, 0,
150);
}
private void generateNether(World world, Random random, int x, int z)
{
}
private void generateEnd(World world, Random random, int x, int z)
{
}
private void addOreSpawn(Block block, World world, Random random, int blockXPos, int
blockZPos, int maxX, int maxZ, int maxVeinSize, int chanceToSpawn, int minY, int maxY)
{
for (int i = 0; i < chanceToSpawn; i++)
{
int posX = blockXPos + random.nextInt(maxX);
int posY = minY + random.nextInt(maxY- minY);
int posZ = blockZPos + random.nextInt(maxZ);
new WorldGenMinable(block, maxVeinSize).generate(world, random, posX,
posY, posZ);
}
}
private void addNetherOreSpawn(Block block, World world, Random random, int blockXPos, int blockZPos, int maxX, int maxZ, int maxVeinSize, int chanceToSpawn, int minY, int maxY){
for (int i = 0; i < chanceToSpawn; i++){
int posX = blockXPos + random.nextInt(maxX);
int posY = minY + random.nextInt(maxY - minY);
int posZ = blockZPos + random.nextInt(maxZ);
new WorldGenMinable(block, 0, maxVeinSize, Blocks.netherrack).generate(world, random, posX, posY, posZ);
}
}
@Mod(modid = Reference.MODID, name = Reference.NAME, version = Reference.VERSION)
public class Amass
{
@Mod.EventHandler
public void preInit(FMLPreInitializationEvent event)
{
ModItems.init();
ModBlocks.init(); oreDictionary();
}
@Mod.EventHandler
public void Init(FMLInitializationEvent event)
{ public static Item "pyriteNugget" public void OreDictionary()
{ OreDictionary.registerOre(pyriteNugget){ nuggetPyrite
}
} OreDictionary.registerOre("blockGold", Amass.pyriteBlock); OreDictionary.registerOre("nuggetGold", new ItemStack(pyriteNugget));
}
@Mod.EventHandler
public void postInit(FMLPostInitializationEvent event)
{
I am getting a couple error messages when I launch my code 1: Error: Could not find or load main class GradleStart and 2: Java HotSpot(TM) 64-Bit Server VM warning: Using incremental CMS is deprecated and will likely be removed in a future release.
I'm fairly new to coding in java, so here is my current code.
Main
package mechcraft.main;
import mechcraft.help.Reference;
import mechcraft.init.ModItems;
import cpw.mods.fml.common.Mod;
import cpw.mods.fml.event.FMLPreInitializationEvent;
import cpw.mods.fml.event.FMLInitializationEvent;
import cpw.mods.fml.event.FMLPostInitializationEvent;
@Mod(modid = Reference.MODID, name = Reference.NAME, version = Reference.VERSION)
public class MyMod {
@Mod.EventHandler
public void preInit(FMLPreInitializationEvent event)
{
ModItems.init();
}
@Mod.EventHandler
public void Init(FMLInitializationEvent event)
{
}
@Mod.EventHandler
public void postInit(FMLPostInitializationEvent event)
{
}
}
Mod items
package mechcraft.init;
import mechcraft.help.RegisterHelper;
public class ModItems {
public static Item aluminiumOre = new MechCraftItem().setUnlocalizedName("aluminiumOre");
public static void init()
{
RegisterHelper.registerItem(aluminiumOre);
}
}
package mechcraft.items;
import net.minecraft.item.Item;
import mechcraft.help.Reference;
public class MechCraft_Items extends Item {
public MechCraftAluminiumOre()
{
super();
setCreativeTab(CreativeTabs.tabMisc);
}
}
And the .help code
package mechcraft.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.getUnlocalzedName().substring(5));
}
}
package mechcraft.help;
public class Reference {
public static final String MODID = "EnergyCrafter's_MechCraft";
public static final String NAME = "MechCraft";
public static final String VERSION = "pre-a1.0.0";
}
Thank you for your tutorial, it is very informational.
i love these tutorials! Although i am encountering a few issues with making slabs and rotatable blocks (Think quartz pillars)
Although i'm not making those blocks ATM. i will in the future. I'm currently rebuilding my mod from the ground up (upgrading from 1.7 to 1.8 was really dang confusing).
I followed the tutorial volume 2 (1.8) (with a few really minor adjustments), but for some reason cannot make textures appear in-game for my item.
It still has the default pink-black "missing-texture-look". Has anyone an idea what might have gone wrong?
The code is as follows:
Main class (Tutorial)
package minecraft.mod.tutorial;
import minecraft.mod.tutorial.help.Reference;
import minecraft.mod.tutorial.init.ModItems;
import minecraft.mod.tutorial.proxies.ClientProxy;
import minecraft.mod.tutorial.proxies.CommonProxy;
import net.minecraftforge.fml.common.Mod;
import net.minecraftforge.fml.common.Mod.Instance;
import net.minecraftforge.fml.common.SidedProxy;
import net.minecraftforge.fml.common.event.FMLInitializationEvent;
import net.minecraftforge.fml.common.event.FMLPostInitializationEvent;
import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;
@Mod(modid = Reference.MODID, name = Reference.NAME, version = Reference.VER)
public class Tutorial
{
@SidedProxy(clientSide = Reference.CLIENT_PROXY, serverSide = Reference.COMMON_PROXY)
public static CommonProxy proxy; //Why is proxy a CommonProxy instead of a ClientProxy? The CommonProxy class is basically empty
@Instance(Reference.MODID)
public static Tutorial instance;
@Mod.EventHandler
public void preInit(FMLPreInitializationEvent event)
{
ModItems.regItems(); //registers items that were specified in ModItems
}
@Mod.EventHandler
public void init(FMLInitializationEvent event)
{
proxy.regRends(); //registers renderers, or is at least supposed to
}
@Mod.EventHandler
public void postInit(FMLPostInitializationEvent event)
{
}
}
Reference class
package minecraft.mod.tutorial.help;
public class Reference
{
public static final String MODID = "tutorial"; //internal name, must be all lowercase
public static final String NAME = "Tutorial"; //displayed Mod name
public static final String VER = "0.0.1"; //displayed Mod version
public static final String CLIENT_PROXY = "minecraft.mod.tutorial.proxies.ClientProxy";
public static final String COMMON_PROXY = "minecraft.mod.tutorial.proxies.CommonProxy";
}
ClientProxy class
package minecraft.mod.tutorial.proxies;
import minecraft.mod.tutorial.init.ModItems;
public class ClientProxy extends CommonProxy
{
@Override
public void regRends()
{
ModItems.regItemRends();
}
}
CommonProxy class
package minecraft.mod.tutorial.proxies;
import minecraft.mod.tutorial.init.ModItems;
public class CommonProxy
{
public void regRends()
{
//the tutorial doesn't state to put anything here... that´s weird
}
}
RegisterHelper class (RegiHelp)
package minecraft.mod.tutorial.help;
import net.minecraft.block.Block;
import net.minecraft.client.Minecraft;
import net.minecraft.client.resources.model.ModelResourceLocation;
import net.minecraft.item.Item;
import net.minecraftforge.fml.common.registry.GameRegistry;
public class RegiHelp
{
public static void regBlock(Block block)
{
GameRegistry.registerBlock(block, block.getUnlocalizedName().substring(5));
}
public static void regItem(Item item)
{
GameRegistry.registerItem(item, item.getUnlocalizedName().substring(5));
}
public static void regItemRend(Item item)
{
Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(item, 0,
new ModelResourceLocation(Reference.MODID + ":" + item.getUnlocalizedName().substring(5), "inventory"));
}
public static void regBlockRend(Block block)
{
Item item = Item.getItemFromBlock(block);
Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(item, 0,
new ModelResourceLocation(Reference.MODID + ":" + item.getUnlocalizedName().substring(5), "inventory"));
}
}
ModItems class
package minecraft.mod.tutorial.init;
import minecraft.mod.tutorial.help.RegiHelp;
import minecraft.mod.tutorial.items.ItemTutorial;
import net.minecraft.item.Item;
public class ModItems
{
public static Item roastedSeeds = new ItemTutorial().setUnlocalizedName("roastedSeeds");
public static void regItems()
{
RegiHelp.regItem(roastedSeeds);
}
public static void regItemRends()
{
RegiHelp.regItemRend(roastedSeeds);
}
}
ItemTutorial class, called ItemExodus in the tutorial
package minecraft.mod.tutorial.items;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.Item;
public class ItemTutorial extends Item
{
public ItemTutorial()
{
super();
this.setCreativeTab(CreativeTabs.tabMisc); //all created items (so far) can be found in Creative Mode under the Miscellaneous Tab
}
}
And finally, my Item.json (roastedSeeds.json)
//I really have no idea how this is supposed to work, an explanation would be nice
{
"parent": "builtin/generated",
"textures": {
"layer0": "tutorial:item/roastedSeeds"
},
"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]
}
}
}
Will there a tutorial for 1.9? Since 1.7.10 is going be considered 1.6.4, And I know that Mc Multi Part is not yet to be released for 1.9.
Thanks for responding (Sorry if this is a dupe of someone's comment, If so you can slap me)
EDIT: I checked the 1.8 tutorial and when the part about getting forge's source... There is none it has been replaced with MDK instead of src and the ones that have it are MUCH older then the ones with the MDK but my question is, Is it the MDK that is the source and this some harsh treatment against me for failing to know which one is the source just because of a fancy name change? Anyways the point is Is the MDK the source for forge just in a fancy name.
The MDK is technically more than just the source. It has all the gradle files that support setting up your environment and building your mod. If you want to make a mod the MDK is what you want to get.
Rollback Post to RevisionRollBack
"If It Is To Be It Is Up To Me" simple quote and I don't know where it comes from but I enjoy it.
Current Mod: Armerger | Light Drafter
It just means you've already ran that command before and therefore it's just skipping over doing that specific task because it has already been done. Nothing to worry about.
I'm trying to set the LogHelper class, but "Level cannot be resolved to a type." Every time I try to import one items Eclipse recommends It doesn't recognize all of the {log(Level.XXX, object);}
There are several Level imports which can be imported; make sure you are using the right one.
I've tried using all of them, which one is supposed to work?
-
View User Profile
-
View Posts
-
Send Message
Curse Premiumare you using the correct level import??
Current Mod: Armerger | Light Drafter
I did not see that one! Thanks...
Is there a list of Forge imports?
-
View User Profile
-
View Posts
-
Send Message
Curse PremiumNot that I have found, but when you are importing things and trying to figure out which one to use, always select the bottom one.
Eclipse sorts the suggested imports with your most recently used ones at top, so if there are any you haven't tried they will be at the bottom.
Current Mod: Armerger | Light Drafter
Hi guys. Really Love your work. I was wondering if you can post or make some more Tutorials about setting up more items. I'm trying to make the mod that gives a three resource packs in one feel. The mod i'm working on is on version 1.7.10
Tutorials im after
-Stairs
-Slabs
-Doors
-Chest
-Enchanting tables
-torches
Thanks for your time. Any links would help too
too begin i have searched and searched for the answer to this. sadly cant find one, so i'm posting here. i am trying to gen ore in nether which ive already found how to specify the target block which ive set to netherrack so i guess im asking for someone to look over my code to see whats up.
edit its generating now
... you're trying to generate it on the surface from your code so it obviously won't generate in the nether.
oh wow i feel stupid ive tried different setups. thanks factor
edit. i did move it to nether and it failed then i changed it to addorespawn and moved it to gen surface and it still failed.edit my class files arei got it to gen
How do you register an item with ore Dict? I have found some tutorials but they don't work.
These are the codes I used and the bolded ones are where the errors are.
package com.gmail.zahoover.Amass;
import com.gmail.zahoover.Amass.help.Reference;
import com.gmail.zahoover.Amass.init.ModBlocks;
import com.gmail.zahoover.Amass.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;
import net.minecraft.item.ItemStack;
import net.minecraftforge.oredict.OreDictionary;
@Mod(modid = Reference.MODID, name = Reference.NAME, version = Reference.VERSION)
public class Amass
{
@Mod.EventHandler
public void preInit(FMLPreInitializationEvent event)
{
ModItems.init();
ModBlocks.init();
oreDictionary();
}
@Mod.EventHandler
public void Init(FMLInitializationEvent event)
{
public static Item "pyriteNugget"
public void OreDictionary()
{
OreDictionary.registerOre(pyriteNugget){
nuggetPyrite
}
}
OreDictionary.registerOre("blockGold", Amass.pyriteBlock);
OreDictionary.registerOre("nuggetGold", new ItemStack(pyriteNugget));
}
@Mod.EventHandler
public void postInit(FMLPostInitializationEvent event)
{
}
}
I am getting a couple error messages when I launch my code 1: Error: Could not find or load main class GradleStart and 2: Java HotSpot(TM) 64-Bit Server VM warning: Using incremental CMS is deprecated and will likely be removed in a future release.
I'm fairly new to coding in java, so here is my current code.
Main
package mechcraft.main; import mechcraft.help.Reference; import mechcraft.init.ModItems; import cpw.mods.fml.common.Mod; import cpw.mods.fml.event.FMLPreInitializationEvent; import cpw.mods.fml.event.FMLInitializationEvent; import cpw.mods.fml.event.FMLPostInitializationEvent; @Mod(modid = Reference.MODID, name = Reference.NAME, version = Reference.VERSION) public class MyMod { @Mod.EventHandler public void preInit(FMLPreInitializationEvent event) { ModItems.init(); } @Mod.EventHandler public void Init(FMLInitializationEvent event) { } @Mod.EventHandler public void postInit(FMLPostInitializationEvent event) { } }Mod items
package mechcraft.init; import mechcraft.help.RegisterHelper; public class ModItems { public static Item aluminiumOre = new MechCraftItem().setUnlocalizedName("aluminiumOre"); public static void init() { RegisterHelper.registerItem(aluminiumOre); } }package mechcraft.items; import net.minecraft.item.Item; import mechcraft.help.Reference; public class MechCraft_Items extends Item { public MechCraftAluminiumOre() { super(); setCreativeTab(CreativeTabs.tabMisc); } }And the .help code
package mechcraft.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.getUnlocalzedName().substring(5)); } }package mechcraft.help; public class Reference { public static final String MODID = "EnergyCrafter's_MechCraft"; public static final String NAME = "MechCraft"; public static final String VERSION = "pre-a1.0.0"; }Thank you for your tutorial, it is very informational.
Keep it up!
-
View User Profile
-
View Posts
-
Send Message
Curse PremiumThe second error is not an error and you can ignore it. The first error means your setup with your IDE is incorrect.
i love these tutorials! Although i am encountering a few issues with making slabs and rotatable blocks (Think quartz pillars)
Although i'm not making those blocks ATM. i will in the future. I'm currently rebuilding my mod from the ground up (upgrading from 1.7 to 1.8 was really dang confusing).
Unity, Individuality, Structure, Order
Sounds like the helpful way for me to make the mod myself.
Hi there!
I followed the tutorial volume 2 (1.8) (with a few really minor adjustments), but for some reason cannot make textures appear in-game for my item.
It still has the default pink-black "missing-texture-look". Has anyone an idea what might have gone wrong?
The code is as follows:
Main class (Tutorial)
package minecraft.mod.tutorial; import minecraft.mod.tutorial.help.Reference; import minecraft.mod.tutorial.init.ModItems; import minecraft.mod.tutorial.proxies.ClientProxy; import minecraft.mod.tutorial.proxies.CommonProxy; import net.minecraftforge.fml.common.Mod; import net.minecraftforge.fml.common.Mod.Instance; import net.minecraftforge.fml.common.SidedProxy; import net.minecraftforge.fml.common.event.FMLInitializationEvent; import net.minecraftforge.fml.common.event.FMLPostInitializationEvent; import net.minecraftforge.fml.common.event.FMLPreInitializationEvent; @Mod(modid = Reference.MODID, name = Reference.NAME, version = Reference.VER) public class Tutorial { @SidedProxy(clientSide = Reference.CLIENT_PROXY, serverSide = Reference.COMMON_PROXY) public static CommonProxy proxy; //Why is proxy a CommonProxy instead of a ClientProxy? The CommonProxy class is basically empty @Instance(Reference.MODID) public static Tutorial instance; @Mod.EventHandler public void preInit(FMLPreInitializationEvent event) { ModItems.regItems(); //registers items that were specified in ModItems } @Mod.EventHandler public void init(FMLInitializationEvent event) { proxy.regRends(); //registers renderers, or is at least supposed to } @Mod.EventHandler public void postInit(FMLPostInitializationEvent event) { } }Reference class
package minecraft.mod.tutorial.help; public class Reference { public static final String MODID = "tutorial"; //internal name, must be all lowercase public static final String NAME = "Tutorial"; //displayed Mod name public static final String VER = "0.0.1"; //displayed Mod version public static final String CLIENT_PROXY = "minecraft.mod.tutorial.proxies.ClientProxy"; public static final String COMMON_PROXY = "minecraft.mod.tutorial.proxies.CommonProxy"; }ClientProxy class
package minecraft.mod.tutorial.proxies; import minecraft.mod.tutorial.init.ModItems; public class ClientProxy extends CommonProxy { @Override public void regRends() { ModItems.regItemRends(); } }CommonProxy class
package minecraft.mod.tutorial.proxies; import minecraft.mod.tutorial.init.ModItems; public class CommonProxy { public void regRends() { //the tutorial doesn't state to put anything here... that´s weird } }RegisterHelper class (RegiHelp)
package minecraft.mod.tutorial.help; import net.minecraft.block.Block; import net.minecraft.client.Minecraft; import net.minecraft.client.resources.model.ModelResourceLocation; import net.minecraft.item.Item; import net.minecraftforge.fml.common.registry.GameRegistry; public class RegiHelp { public static void regBlock(Block block) { GameRegistry.registerBlock(block, block.getUnlocalizedName().substring(5)); } public static void regItem(Item item) { GameRegistry.registerItem(item, item.getUnlocalizedName().substring(5)); } public static void regItemRend(Item item) { Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(item, 0, new ModelResourceLocation(Reference.MODID + ":" + item.getUnlocalizedName().substring(5), "inventory")); } public static void regBlockRend(Block block) { Item item = Item.getItemFromBlock(block); Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(item, 0, new ModelResourceLocation(Reference.MODID + ":" + item.getUnlocalizedName().substring(5), "inventory")); } }ModItems class
package minecraft.mod.tutorial.init; import minecraft.mod.tutorial.help.RegiHelp; import minecraft.mod.tutorial.items.ItemTutorial; import net.minecraft.item.Item; public class ModItems { public static Item roastedSeeds = new ItemTutorial().setUnlocalizedName("roastedSeeds"); public static void regItems() { RegiHelp.regItem(roastedSeeds); } public static void regItemRends() { RegiHelp.regItemRend(roastedSeeds); } }ItemTutorial class, called ItemExodus in the tutorial
package minecraft.mod.tutorial.items; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.item.Item; public class ItemTutorial extends Item { public ItemTutorial() { super(); this.setCreativeTab(CreativeTabs.tabMisc); //all created items (so far) can be found in Creative Mode under the Miscellaneous Tab } }And finally, my Item.json (roastedSeeds.json)
//I really have no idea how this is supposed to work, an explanation would be nice { "parent": "builtin/generated", "textures": { "layer0": "tutorial:item/roastedSeeds" }, "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] } } }How would I go about fixing this problem?
And sorry for not mentioning it, but I am doing the volume 1 tutorial.
-
View User Profile
-
View Posts
-
Send Message
Curse PremiumWill there a tutorial for 1.9? Since 1.7.10 is going be considered 1.6.4, And I know that Mc Multi Part is not yet to be released for 1.9.
Thanks for responding (Sorry if this is a dupe of someone's comment, If so you can slap me)
EDIT: I checked the 1.8 tutorial and when the part about getting forge's source... There is none it has been replaced with MDK instead of src and the ones that have it are MUCH older then the ones with the MDK but my question is, Is it the MDK that is the source and this some harsh treatment against me for failing to know which one is the source just because of a fancy name change? Anyways the point is Is the MDK the source for forge just in a fancy name.
-
View User Profile
-
View Posts
-
Send Message
Curse PremiumThe MDK is technically more than just the source. It has all the gradle files that support setting up your environment and building your mod. If you want to make a mod the MDK is what you want to get.
Current Mod: Armerger | Light Drafter