Jump to content

Tyler_Watson

Members
  • Posts

    15
  • Joined

  • Last visited

Converted

  • Gender
    Undisclosed
  • Personal Text
    I am new!

Tyler_Watson's Achievements

Tree Puncher

Tree Puncher (2/8)

-1

Reputation

  1. As far as I'm aware the code is correct an I have no errors but the pineapple won't spawn. Is anything wrong with my code? Thanks for all the help so far. WorldGenPineapple package TylerWatson.Mod; import java.util.Random; import net.minecraft.block.Block; import net.minecraft.world.World; import net.minecraft.world.gen.feature.WorldGenerator; public class WorldGenPineapple extends WorldGenerator { public boolean generate(World par1World, Random par2Random, int X, int Y, int Z) { if (par1World.isAirBlock(X, Y, Z) && PenguinMod.flowerPineapple.canBlockStay(par1World, X, Y, Z)) par1World.setBlock(X, Y, Z, PenguinMod.flowerPineapple.blockID); return true; } } PenguinWorldGenerator: package TylerWatson.Mod; import java.util.Random; import net.minecraft.world.World; import net.minecraft.world.biome.BiomeGenBase; import net.minecraft.world.biome.BiomeGenDesert; import net.minecraft.world.chunk.IChunkProvider; import net.minecraft.world.gen.feature.WorldGenMinable; import cpw.mods.fml.common.IWorldGenerator; public class PenguinWorldGenerator implements IWorldGenerator { @Override public void generate(Random random, int chunkX, int chunkZ, World world, IChunkProvider chunkGenerator, IChunkProvider chunkProvider) { switch(world.provider.dimensionId){ case -1: generateNether(world, random, chunkX * 16, chunkZ * 16); break; case 0: generateSurface(world, random, chunkX * 16, chunkZ * 16); break; case 1: generateEnd(world, random, chunkX * 16, chunkZ * 16); break; } } private void generateEnd(World world, Random random, int i, int j) { } private void generateSurface(World world, Random random, int i, int j) { for(int k = 0; k < 5; k++){ int firstBlockXCoord = i + random.nextInt(16); int firstBlockYCoord = random.nextInt(30); int firstBlockZCoord = j + random.nextInt(16); (new WorldGenMinable(PenguinMod.quicksilverOre.blockID, 3)).generate(world, random, firstBlockXCoord, firstBlockYCoord, firstBlockZCoord); for(int p = 0; p < 10; p++){ int x = i + random.nextInt(16); int y = random.nextInt(30); int z = j + random.nextInt(16); (new WorldGenMinable(PenguinMod.copperOre.blockID, 5)).generate(world, random, firstBlockXCoord, firstBlockYCoord, firstBlockZCoord); } for(int q = 0; q < 10; q++){ int x = i + random.nextInt(16); int y = random.nextInt(30); int z = j + random.nextInt(16); (new WorldGenMinable(PenguinMod.cobaltOre.blockID, 4)).generate(world, random, firstBlockXCoord, firstBlockYCoord, firstBlockZCoord); } for(int l = 0; l < 10; l++){ int x = i + random.nextInt(16); int y = random.nextInt(30); int z = j + random.nextInt(16); (new WorldGenMinable(PenguinMod.rubyOre.blockID, 4)).generate(world, random, firstBlockXCoord, firstBlockYCoord, firstBlockZCoord); } for(int c = 0; c < 10; c++){ int x = i + random.nextInt(16); int y = random.nextInt(30); int z = j + random.nextInt(16); (new WorldGenPineapple()).generate(world, random, firstBlockXCoord, firstBlockYCoord, firstBlockZCoord); } } } private void generateNether(World world, Random random, int i, int j) { } } FlowerPineapple: package TylerWatson.Mod; import net.minecraft.block.Block; import net.minecraft.block.BlockFlower; public class FlowerPineapple extends BlockFlower{ public FlowerPineapple(int par1) { super(par1); } public boolean canThisPlantGrowOnThisBlockID(int par1) { return par1 == Block.grass.blockID || par1 == Block.dirt.blockID || par1 == Block.sand.blockID; } }
  2. I'm at a loss when it comes to fixing things in forge. Should it look like this? BiomeGenBase biomegenbase = world.getWorldChunkManager().getBiomeGenAt(firstBlockXCoord, firstBlockZCoord); if(biomegenbase instanceof BiomeGenDesert) for(int l = 0; l < 10; l++){ int x = i + random.nextInt(16); int y = random.nextInt(30); int z = j + random.nextInt(16); (new WorldGenMinable(PenguinMod.flowerPineapple.blockID, 4)).generate(world, random, firstBlockXCoord, firstBlockYCoord, firstBlockZCoord); }
  3. I have an intermediate knowledge of java but where do I put that code? In my main class, flowerPineapple class or my world generator class?
  4. I've implemented 3 mobs currently in my mod but for some reason they are all rendering the same. They also are spawning way too much. Here is my code: Main class: EntityRegistry.registerModEntity(EntityTurkey.class, "Turkey", 1, this, 80, 3, true); EntityRegistry.addSpawn(EntityTurkey.class, 5, 1, 3, EnumCreatureType.ambient, BiomeGenBase.forest, BiomeGenBase.forestHills); LanguageRegistry.instance().addStringLocalization("entity.PenguinMod.Turkey.name", "Turkey"); registerEntityEgg(EntityTurkey.class, 0x895D42, 0xDD2B1F); RenderingRegistry.registerEntityRenderingHandler(EntityTurkey.class, new RenderTurkey(new ModelTurkey(), 0.3f)); EntityRegistry.registerModEntity(EntityPenguin.class, "Penguin", 1, this, 80, 3, true); EntityRegistry.addSpawn(EntityPenguin.class, 5, 1, 3, EnumCreatureType.ambient, BiomeGenBase.frozenRiver, BiomeGenBase.iceMountains, BiomeGenBase.taiga, BiomeGenBase.taigaHills, BiomeGenBase.icePlains); LanguageRegistry.instance().addStringLocalization("entity.PenguinMod.Penguin.name", "Penguin"); registerEntityEgg(EntityPenguin.class, 0x4D4D4D, 0xFFFFFF); RenderingRegistry.registerEntityRenderingHandler(EntityPenguin.class, new RenderPenguin(new ModelPenguin(), 0.3f)); EntityRegistry.registerModEntity(EntityCoconut.class, "Coconut", 1, this, 80, 3, true); EntityRegistry.addSpawn(EntityCoconut.class, 5, 1, 10, EnumCreatureType.ambient, BiomeGenBase.desert, BiomeGenBase.beach, BiomeGenBase.desertHills); LanguageRegistry.instance().addStringLocalization("entity.PenguinMod.Coconut.name", "Coconut"); registerEntityEgg(EntityCoconut.class, 0x895400, 0x000000); RenderingRegistry.registerEntityRenderingHandler(EntityCoconut.class, new RenderCoconut(new ModelCoconut(), 0.3f)); Client Proxy: package TylerWatson.Mod; import cpw.mods.fml.client.registry.RenderingRegistry; import net.minecraftforge.client.MinecraftForgeClient; public class ClientProxy extends CommonProxy { @Override public void registerRenderers() { // This is for rendering entities and so forth later on //MinecraftForgeClient.preloadTexture("/tutorialblocks.png"); RenderingRegistry.registerEntityRenderingHandler(EntityTurkey.class, new RenderTurkey(new ModelTurkey(), 0.3F)); RenderingRegistry.registerEntityRenderingHandler(EntityPenguin.class, new RenderPenguin(new ModelPenguin(), 0.3F)); RenderingRegistry.registerEntityRenderingHandler(EntityCoconut.class, new RenderCoconut(new ModelCoconut(), 0.3F)); } } RenderTurkey: package TylerWatson.Mod; import net.minecraft.client.model.ModelBase; import net.minecraft.client.renderer.entity.Render; import net.minecraft.client.renderer.entity.RenderLiving; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLiving; import net.minecraft.util.ResourceLocation; public class RenderTurkey extends RenderLiving { protected ModelTurkey model; public RenderTurkey(ModelBase par1ModelBase, float par2){ super(par1ModelBase, par2); model = ((ModelTurkey)mainModel); } public void renderTurkey(EntityTurkey entity, double par2, double par4, double par6, float par8, float par9){ super.doRenderLiving(entity, par2, par4, par6, par8, par9); } public void doRenderLiving(EntityLiving par1EntityLiving, double par2, double par4, double par6, float par8, float par9){ renderTurkey((EntityTurkey) par1EntityLiving, par2, par4, par6, par8, par9); } @Override public void doRender(Entity entity, double d0, double d1, double d2, float f, float f1) { renderTurkey((EntityTurkey)entity, d0, d1, d2, f, f1); } @Override protected ResourceLocation getEntityTexture(Entity entity) { return new ResourceLocation("penguinmod:textures/models/mob/Turkey.png"); } } RenderPenguin: ackage TylerWatson.Mod; import net.minecraft.client.model.ModelBase; import net.minecraft.client.renderer.entity.Render; import net.minecraft.client.renderer.entity.RenderLiving; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLiving; import net.minecraft.util.ResourceLocation; public class RenderPenguin extends RenderLiving { protected ModelPenguin model; public RenderPenguin(ModelBase par1ModelBase, float par2){ super(par1ModelBase, par2); model = ((ModelPenguin)mainModel); } public void renderPenguin(EntityPenguin entity, double par2, double par4, double par6, float par8, float par9){ super.doRenderLiving(entity, par2, par4, par6, par8, par9); } public void doRenderLiving(EntityLiving par1EntityLiving, double par2, double par4, double par6, float par8, float par9){ renderPenguin((EntityPenguin) par1EntityLiving, par2, par4, par6, par8, par9); } @Override public void doRender(Entity entity, double d0, double d1, double d2, float f, float f1) { renderPenguin((EntityPenguin)entity, d0, d1, d2, f, f1); } @Override protected ResourceLocation getEntityTexture(Entity entity) { return new ResourceLocation("penguinmod:textures/models/mob/Penguin.png"); } } RenderCoconut: package TylerWatson.Mod; import net.minecraft.client.model.ModelBase; import net.minecraft.client.renderer.entity.Render; import net.minecraft.client.renderer.entity.RenderLiving; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLiving; import net.minecraft.util.ResourceLocation; public class RenderCoconut extends RenderLiving { protected ModelCoconut model; public RenderCoconut(ModelBase par1ModelBase, float par2){ super(par1ModelBase, par2); model = ((ModelCoconut)mainModel); } public void renderCoconut(EntityCoconut entity, double par2, double par4, double par6, float par8, float par9){ super.doRenderLiving(entity, par2, par4, par6, par8, par9); } public void doRenderLiving(EntityLiving par1EntityLiving, double par2, double par4, double par6, float par8, float par9){ renderCoconut((EntityCoconut) par1EntityLiving, par2, par4, par6, par8, par9); } @Override public void doRender(Entity entity, double d0, double d1, double d2, float f, float f1) { renderCoconut((EntityCoconut)entity, d0, d1, d2, f, f1); } @Override protected ResourceLocation getEntityTexture(Entity entity) { return new ResourceLocation("penguinmod:textures/models/mob/Coconut.png"); } } If you need to see anymore code just ask for it and I'll post it. Why do all of mobs look like my Turkey mob and why do they spawn all over the place?
  5. I created a new flower for my mod and I can generate it in a custom biome but how do I generate it so it spawns on biomes already in the game? Also is there a forge hook that allows a custom flower to spawn when bonemeal is used on grass? I'll be thankful for any help.
  6. I downloaded forge again and let it install itself and MCP and I added jre7/bin to my PATH and it is working now.
  7. I haven't touched the ChatMessageComponent or SoundManager. I updated java but that did nothing. Should I redownload MCP and forge and try with a clean install? Also the error in ChatMessageComponent says: The argument for type String[] should explicitly be cast to Object[] for the invocation of the varags method translateToLocalFormatted(String, Object...) from type StatCollector. It could alternatively be cast to Object for a varags invocation. Also in SoundManager there are no errors even though the console says there is an error on live 70 when there is no text at all on line 70. Should I just do a clean install of Forge and MCP? I want to release my mod today and can't if I can't this working.
  8. I recently updated my mod to 1.6.4 and I went to recompile for the first release of the mod and the console put out this error: == MCP 8.09 (data: 8.11, client: 1.6.4, server: 1.6.4) == "scalac" is not found on the PATH. Scala files will not be recompiled == Recompiling client == > Cleaning bin > Recompiling '"C:\Program Files\Java\jdk1.7.0_13\bin\javac" -Xlint:-options -deprecation -g - source 1.6 -target 1.6 -classpath "jars\versions\1.6.4\1.6.4.jar;lib;lib\*;lib;l ib\*;jars\bin\minecraft.jar;jars\bin\jinput.jar;jars\bin\lwjgl.jar;jars\bin\lwjg l_util.jar;jars\libraries\net\java\jinput\jinput\2.0.5\jinput-2.0.5.jar;jars\lib raries\org\lwjgl\lwjgl\lwjgl-platform\2.9.0\lwjgl-platform-2.9.0-natives-windows .jar;jars\libraries\org\lwjgl\lwjgl\lwjgl_util\2.9.0\lwjgl_util-2.9.0.jar;jars\l ibraries\com\paulscode\codecwav\20101023\codecwav-20101023.jar;jars\libraries\ne t\java\jinput\jinput-platform\2.0.5\jinput-platform-2.0.5-natives-windows.jar;ja rs\libraries\argo\argo\2.25_fixed\argo-2.25_fixed.jar;jars\libraries\com\paulsco de\codecjorbis\20101023\codecjorbis-20101023.jar;jars\libraries\org\bouncycastle \bcprov-jdk15on\1.47\bcprov-jdk15on-1.47.jar;jars\libraries\org\apache\commons\c ommons-lang3\3.1\commons-lang3-3.1.jar;jars\libraries\com\paulscode\soundsystem\ 20120107\soundsystem-20120107.jar;jars\libraries\org\lwjgl\lwjgl\lwjgl\2.9.0\lwj gl-2.9.0.jar;jars\libraries\commons-io\commons-io\2.4\commons-io-2.4.jar;jars\li braries\com\paulscode\libraryjavasound\20101123\libraryjavasound-20101123.jar;ja rs\libraries\net\sf\jopt-simple\jopt-simple\4.5\jopt-simple-4.5.jar;jars\librari es\com\paulscode\librarylwjglopenal\20100824\librarylwjglopenal-20100824.jar;jar s\libraries\com\google\guava\guava\14.0\guava-14.0.jar;jars\libraries\com\google \code\gson\gson\2.2.2\gson-2.2.2.jar;jars\libraries\net\java\jutils\jutils\1.0.0 \jutils-1.0.0.jar" -sourcepath src\minecraft -d bin\minecraft src\minecraft\*.ja va src\minecraft\net\minecraft\client\*.java src\minecraft\net\minecraft\client\ main\*.java src\minecraft\net\minecraft\server\*.java src\minecraft\net\minecraf t\src\*.java' failed : 1 == ERRORS FOUND in JAVA CODE == src\minecraft\net\minecraft\src\ChatMessageComponent.java:266: warning: non-vara rgs call of varargs method with inexact argument type for last parameter; var7.append(StatCollector.translateToLocalFormatted(this.transla tionKey, var13)); ^ cast to Object for a varargs call cast to Object[] for a non-varargs call and to suppress this warning src\minecraft\net\minecraft\src\SoundManager.java:70: error: exception SoundSyst emException is never thrown in body of corresponding try statement catch (SoundSystemException var5) ^ 1 error 1 warning ================== Client recompile failed, correct source then rerun updatemd5 !! Can not find server sources, try decompiling !! Press any key to continue . . . Any ideas how to fix these errors? Also I looked at ChatMessageComponent and there is an error on line 270 but I have no idea how to fix these errors. How can I package my mod or fix these errors? Any help is welcome.
  9. I fixed the issue. My id was conflicting with Quarts block but it's fixed now. Thanks for all your help.
  10. I went back to the tutorial and followed the code exactly and I have no errors in my code but in the console it says ~~ERROR~~ NullPointerException: null Code: MainClass //Liquids TODO fix public static Block blockSewageWater; public static Fluid fluidSewageWater; public static Material materialSewageWater; public static final int idSewageWater = 155; And fluidSewageWater = new Fluid("FluidSewageWater").setBlockID(idSewageWater); FluidRegistry.registerFluid(fluidSewageWater); materialSewageWater = new MaterialLiquid(MapColor.dirtColor); blockSewageWater = new BlockSewageWater(idSewageWater, fluidSewageWater, materialSewageWater).setUnlocalizedName("SewageWater"); registerBLock(blockSewageWater, "FluidSewageWater"); BlockSewageWater package TylerWatson.Mod; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IconRegister; import net.minecraft.util.Icon; import net.minecraft.world.IBlockAccess; import net.minecraftforge.fluids.BlockFluidClassic; import net.minecraftforge.fluids.Fluid; public class BlockSewageWater extends BlockFluidClassic{ public BlockSewageWater(int id, Fluid fluid, Material material) { super(id, fluid, material); this.setCreativeTab(PenguinMod.tabPenguin); } @Override @SideOnly(Side.CLIENT) public Icon getIcon(int side, int meta){ return Block.waterMoving.getIcon(side, meta); } @Override public int colorMultiplier(IBlockAccess iblockaccess, int x, int y, int z) { return 0x8E2D00; // HEX color code as indicated by the 0x infront. This is a greenish color. <---No } } I'm sorry if it seems like I don't know what I'm doing. I have an intermediate knowledge of java, but I'm at a loss when it comes to fixing issues in forge.
  11. I tried that but I get the error: The constructor BlockSewageWater(int, string) is undefined Also in my BlockSewageWater class i'm getting an error: package TylerWatson.Mod; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IconRegister; import net.minecraft.util.Icon; import net.minecraft.world.IBlockAccess; import net.minecraftforge.fluids.BlockFluidClassic; import net.minecraftforge.fluids.Fluid; public class BlockSewageWater extends BlockFluidClassic{ public BlockSewageWater(int id) { super(id, PenguinMod.fluidSewageWater, Material.water); this.setCreativeTab(PenguinMod.tabPenguin); } @Override @SideOnly(Side.CLIENT) public Icon getIcon(int side, int meta){ return Block.waterMoving.getIcon(side, meta); } @Override public int colorMultiplier(IBlockAccess iblockaccess, int x, int y, int z) { return 0x8E2D00; // HEX color code as indicated by the 0x infront. This is a greenish color. <---No } } The super gives me an error on PenguinMod.fluidSewageWater that says: fluidSewageWater can't be resolved or is not a field. I have no idea how to fix this because I'm not too familiar with Forge yet.
  12. I'm trying to create a custom liquid and I can get the game running but I cant give myself the liquid and the tutorial I followed didn't explain anything very well. I get a crash file but I can't figure out whats wrong with it. Any help would be great. Here's my code: BlockSewageWater package TylerWatson.Mod; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IconRegister; import net.minecraft.util.Icon; import net.minecraft.world.IBlockAccess; import net.minecraftforge.fluids.BlockFluidClassic; import net.minecraftforge.fluids.Fluid; public class BlockSewageWater extends BlockFluidClassic{ public BlockSewageWater(int id) { super(id, PenguinMod.fluidSewageWater, Material.water); this.setCreativeTab(PenguinMod.tabPenguin); } @Override @SideOnly(Side.CLIENT) public Icon getIcon(int side, int meta){ return Block.waterMoving.getIcon(side, meta); } @Override public int colorMultiplier(IBlockAccess iblockaccess, int x, int y, int z) { return 0x8E2D00; // HEX color code as indicated by the 0x infront. This is a greenish color. <---No } } FluidSewageWater package TylerWatson.Mod; import net.minecraftforge.fluids.Fluid; import net.minecraftforge.fluids.FluidRegistry; public class FluidSewageWater extends Fluid{ public FluidSewageWater(String fluidName) { super("SewageWater"); setDensity(10); // How thick the fluid is, affects movement inside the liquid. setViscosity(1000); // How fast the fluid flows. FluidRegistry.registerFluid(this); // Registering inside it self, keeps things neat } } Main Class //Liquids public static Fluid fluidSewageWater; public static Block blockSewageWater; public static final int idSewageWater = 155; And inside my @EventHandler //Liquids TODO fix fluidSewageWater = new Fluid("FluidSewageWater").setBlockID(idSewageWater); fluidSewageWater = new FluidSewageWater(null); blockSewageWater = BlockSewageWater(155, "BlockSewageWater"); //Line 264 GameRegistry.registerBlock(blockSewageWater, "BlockSewageWater"); LanguageRegistry.addName(blockSewageWater, "Sewage Water"); Crash log ---- Minecraft Crash Report ---- // Everything's going to plan. No, really, that was supposed to happen. Time: 11/23/13 5:36 PM Description: There was a severe problem during mod loading that has caused the game to fail cpw.mods.fml.common.LoaderException: java.lang.NullPointerException at cpw.mods.fml.common.registry.GameRegistry.registerBlock(GameRegistry.java:232) at cpw.mods.fml.common.registry.GameRegistry.registerBlock(GameRegistry.java:195) at cpw.mods.fml.common.registry.GameRegistry.registerBlock(GameRegistry.java:171) at TylerWatson.Mod.PenguinMod.load(PenguinMod.java:265) 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 cpw.mods.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:540) 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.EventHandler.handleEvent(EventHandler.java:74) at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45) at com.google.common.eventbus.EventBus.dispatch(EventBus.java:313) at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:296) at com.google.common.eventbus.EventBus.post(EventBus.java:267) at cpw.mods.fml.common.LoadController.sendEventToModContainer(LoadController.java:193) at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:173) 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.EventHandler.handleEvent(EventHandler.java:74) at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45) at com.google.common.eventbus.EventBus.dispatch(EventBus.java:313) at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:296) at com.google.common.eventbus.EventBus.post(EventBus.java:267) at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:104) at cpw.mods.fml.common.Loader.initializeMods(Loader.java:697) at cpw.mods.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:222) at net.minecraft.client.Minecraft.startGame(Minecraft.java:506) at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:796) at net.minecraft.client.main.Main.main(Main.java:93) 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:57) at net.minecraft.launchwrapper.Launch.main(Launch.java:18) Caused by: java.lang.NullPointerException at cpw.mods.fml.common.registry.GameRegistry.registerBlock(GameRegistry.java:214) ... 40 more A detailed walkthrough of the error, its code path and all known details is as follows: --------------------------------------------------------------------------------------- -- System Details -- Details: Minecraft Version: 1.6.2 Operating System: Windows 8 (amd64) version 6.2 Java Version: 1.7.0_13, Oracle Corporation Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation Memory: 957589488 bytes (913 MB) / 1037959168 bytes (989 MB) up to 1037959168 bytes (989 MB) JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M AABB Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used Suspicious classes: FML and Forge are installed IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0 FML: MCP v8.04 FML v6.2.19.789 Minecraft Forge 9.10.0.789 4 mods loaded, 4 mods active mcp{8.04} [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed->Pre-initialized->Initialized FML{6.2.19.789} [Forge Mod Loader] (coremods) Unloaded->Constructed->Pre-initialized->Initialized Forge{9.10.0.789} [Minecraft Forge] (coremods) Unloaded->Constructed->Pre-initialized->Initialized penguinmod{Pre-Alpha v0.001} [Penguin & Coconut Mod] (bin) Unloaded->Constructed->Pre-initialized->Errored Anyone that has a good tutorial or can fix my issue would be appreciated.
  13. I've been following the Generic tutorials but when I go to add a smelting recipe the error says: "The method addSmelting(int, ItemStack, float) in the type GameRegistry is not applicable for the arguments (Block, Item, float)" My code is: package TylerWatson.Mod; // This Import list will grow longer with each additional tutorial. // It's not pruned between full class postings, unlike other tutorial code. import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.item.crafting.FurnaceRecipes; import net.minecraftforge.common.MinecraftForge; import cpw.mods.fml.common.Mod; import cpw.mods.fml.common.Mod.Instance; import cpw.mods.fml.common.Mod.EventHandler; //Added for 1.6.X import cpw.mods.fml.common.SidedProxy; import cpw.mods.fml.common.event.FMLInitializationEvent; import cpw.mods.fml.common.event.FMLPostInitializationEvent; import cpw.mods.fml.common.event.FMLPreInitializationEvent; import cpw.mods.fml.common.network.NetworkMod; import cpw.mods.fml.common.registry.GameRegistry; import cpw.mods.fml.common.registry.LanguageRegistry; @Mod(modid="penguinmod", name="Penguin & Coconut Mod", version="1.0.0") @NetworkMod(clientSideRequired=true, serverSideRequired=false) public class PenguinMod { @Instance("Generic") public static PenguinMod instance; //Items public final static Item penguinSkin = new PenguinSkin(15001); public final static Item quicksilverIngot = new QuicksilverIngot(15002); //Blocks public final static Block quicksilverOre = new QuicksilverOre(1501, Material.rock); @SidedProxy(clientSide="TylerWatson.Mod.ClientProxy", serverSide="TylerWatson.Mod.CommonProxy") public static CommonProxy proxy; @EventHandler public void preInit(FMLPreInitializationEvent event) { // Stub Method } @EventHandler public void load(FMLInitializationEvent event) { proxy.registerRenderers (); //Item Names LanguageRegistry.addName(penguinSkin, "Penguin Skin"); LanguageRegistry.addName(quicksilverIngot, "Qicksilver Ingot"); //Block names and atributes LanguageRegistry.addName(quicksilverOre, "QuickSilver Ore"); MinecraftForge.setBlockHarvestLevel(quicksilverOre, "pickaxe", 3); GameRegistry.registerBlock(quicksilverOre, "quicksilverOre"); //Shaped Crafting //Shapeless crafting //Smelting GameRegistry.addSmelting(quicksilverOre, quicksilverIngot, 0.5f); } @EventHandler public void postInit(FMLPostInitializationEvent event) { // Stub Method } } Why is it not letting me add a smelting recipe that smelts a block?
  14. I am currently developing a mod that I had in Modloader and decided to switch over to Forge and I'm folloing the ones provided on the Forge website but when I tried making a new item I get these errors [embed=425,349]2013-07-30 20:52:39 [iNFO] [sTDOUT] Syntax error on token ".", { expected 2013-07-30 20:52:39 [iNFO] [sTDOUT] Syntax error on token "(", ; expected 2013-07-30 20:52:39 [iNFO] [sTDOUT] Syntax error on token ")", ; expected 2013-07-30 20:52:39 [iNFO] [sTDOUT] Syntax error on token "(", ; expected 2013-07-30 20:52:39 [iNFO] [sTDOUT] Syntax error on token ")", ; expected 2013-07-30 20:52:39 [iNFO] [sTDOUT] Syntax error on token "(", ; expected 2013-07-30 20:52:39 [iNFO] [sTDOUT] Syntax error on token ")", ; expected[/embed] My code is: [embed=425,349]package TylerWatson.Mod; // This Import list will grow longer with each additional tutorial. // It's not pruned between full class postings, unlike other tutorial code. import net.minecraft.block.Block; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import cpw.mods.fml.common.Mod; import cpw.mods.fml.common.Mod.Instance; import cpw.mods.fml.common.Mod.EventHandler; //Added for 1.6.X import cpw.mods.fml.common.SidedProxy; import cpw.mods.fml.common.event.FMLInitializationEvent; import cpw.mods.fml.common.event.FMLPostInitializationEvent; import cpw.mods.fml.common.event.FMLPreInitializationEvent; import cpw.mods.fml.common.network.NetworkMod; import cpw.mods.fml.common.registry.GameRegistry; import cpw.mods.fml.common.registry.LanguageRegistry; @Mod(modid="Generic", name="Generic", version="0.0.0") @NetworkMod(clientSideRequired=true, serverSideRequired=false) public class PenguinMod { @Instance("Generic") public static PenguinMod instance; private final static Item penguinSkin = new PenguinSkin(15001); .setMaxStackSize(64).setUnlocalizedName("PenguinSKin"); @SidedProxy(clientSide="tutorial.generic.client.ClientProxy", serverSide="tutorial.generic.CommonProxy") public static CommonProxy proxy; @EventHandler public void preInit(FMLPreInitializationEvent event) { // Stub Method } @EventHandler public void load(FMLInitializationEvent event) { LanguageRegistry.addName(penguinSkin, "Penguin Skin"); } @EventHandler public void postInit(FMLPostInitializationEvent event) { // Stub Method } } } [/embed] Any help?
×
×
  • Create New...

Important Information

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