Jump to content

tminor1

Members
  • Posts

    103
  • Joined

  • Last visited

Everything posted by tminor1

  1. Ok then but how would I go about doing that? So lets start with the glass drop mod how can I tell minecraft to make glass drop itself when mined with out silk touch? Also, how would I make obsidian quicker to mine?
  2. Hi so before I started using forge to make my mod pack I used MCP Which allowed me to make mods by base editing. However my mods would only work for the sever and I could not do all the things I wanted to do. So I started using forge so I could do more and make my mods work on both server and client. The thing is now I need to know how I can override base minecraft code with forge so I can include my old mods in to my new mod pack. Some of my mods include making glass drop its self when destroyed with out a silktouch pickaxe, making a boat drop 5 planks if it smashes in to something that causes it to break so you can re-make i with ease, making some of the mobs drop more Xp when killed, making some of the command names shorter for faster typing them, and allowing people in survival mode to fly. How can I override base minecraft code so I can bring my old mods to work with forge?
  3. Thank you.
  4. So I am wanting to add a crafting recipe to the game that uses lapis and lime green dye. What to I type for lapis and lime green dye? I do know how to add crafting I am not that stupid I just don't know what I should put after the Items. to make it use lapis or lime green dye.( Items.itemname what do I add for itemname to make it use lapis or lime green dye?) Also how do I make my block emit light?
  5. Hey so I am now trying to get my ore to generate in the world and he guy in the video started to confuse me. I was able to get a start on the code but I was unable to finish it. Can someone help me finish up this code so my ore will generate? Thanks. package net.Cristalore.mod; import java.util.Random; import net.minecraft.block.Block; import net.minecraft.world.World; import net.minecraft.world.chunk.IChunkProvider; import cpw.mods.fml.common.IWorldGenerator; public class cristalGen implements IWorldGenerator { @Override public void generate(Random random, int chunkX, int chunkZ, World world, IChunkProvider chunkGenerator, IChunkProvider chunkProvider) { switch(world.provider.dimensionId) { case 0 : //Generate generateSurface(world, random, chunkX*16, chunkZ*16); } } private void generateSurface(World world, Random random, int x, int z) { this.addOreSpawn(cristalore.Blockcristalore, world, random, x, z, 16, 16, 4+random.nextInt(6), 25, 38, 100); } private void addOreSpawn(Block blockcristalore, World world, Random random, int x, int z, int i, int j, int k, int l, int m, int n) { for(int i = 0; 1 < k; i++) { } } }
  6. thank you that worked.
  7. Ok this is my code for the ore. As you can see I want to have it drop Itemcristal that is my item that I added to the game. I want it to 2 of them but it is not excepting my item. I have the cristal.java imported and my main java imported(cristalore.java). But it will not except Itemcristal package net.Cristalore.mod.ore; import java.util.Random; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import net.Cristalore.mod.cristalore; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.init.Items; import net.minecraft.item.Item; import net.Cristalore.mod.items.cristal; public class Cristaloreblock extends Block { public Cristaloreblock(Material material) { super(material); this.setHardness(10.0F); this.setResistance(2000.0F); this.setHarvestLevel("pickaxe", 3); this.setStepSound(soundTypePiston); this.setCreativeTab(CreativeTabs.tabBlock);} public Item getItemDropped(int p_149650_1_, Random p_149650_2_, int p_149650_3_) { return Itemcristal; } /** * Returns the quantity of items to drop on block destruction. */ public int quantityDropped(Random p_149745_1_) { return 2; } @SideOnly(Side.CLIENT) public void registerBlockIcons(IIconRegister iconRegister){ this.blockIcon = iconRegister.registerIcon(cristalore.modid + ":" + this.getUnlocalizedName().substring(5)); } }
  8. ok. But what do I add after them?
  9. I am having a new problem now. I was using miecraft code from the blocks classes to test out my block and I was just having it drop 2 clay balls. But now I have my own custom item that I want it to drop. How do I make it drop 2 of my Itemcristal on destruction?
  10. What is the material obsidian uses? I want to add a new ore to the game that can only be mined with a diamond pickaxe but what ever material I set it as I can mine it with all the pickaxes. I even set the resistance to 2000.0F but that does not help ether.
  11. Thank you I am new to all this, and the videos I am using to help me did not show how to add stairs. One more thing though. How do I fix the lighting bug. I found on someone else's topic to add this in my stairs class this.useNeighborBrightness[id] = true; but it is telling me The type of expression must be an array type but it resolved to a boolean.
  12. No. You see the way I have been adding my other blocks is first in my classicBlocks.java I add Public static Block blockname so for the stairs I do Public static Block blockClassicStairs then I go under the preInit event and add blockClassicBrickStairs = new ClassicBrickStairs(Material.rock).setBlockName("classicBrickStairs") and then I register the block GameRegistry.registerBlock(blockClassicBrickStairs, "classicBrickStairs"). Then I must make the ClassicBrickStaris.java and it wants me to make it like this. package net.classicBlocks.mod; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.block.Block; import net.minecraft.block.BlockStairs; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.creativetab.CreativeTabs; public class ClassicBrickStairs extends BlockStairs { public ClassicBrickStairs(Block p_i45428_1_, int p_i45428_2_) { super(p_i45428_1_, p_i45428_2_); this.setHardness(2.0F); this.setResistance(10.0F); this.setStepSound(soundTypePiston); this.setCreativeTab(CreativeTabs.tabBlock); } @SideOnly(Side.CLIENT) public void registerBlockIcons(IIconRegister iconRegister){ this.blockIcon = iconRegister.registerIcon(classicBlock.modid + ":" + this.getUnlocalizedName().substring(5)); } } However then in the classicBlocks.java it gives me an error with blockClassicBrickStairs = new ClassicBrickStairs(Material.rock).setBlockName("classicBrickStairs"). The error is with ClassicBrickStairs(Material.rock) and I don't know how to fix it. I have tried to add Material material to public ClassicBrickStairs(Block p_i45428_1_, int p_i45428_2_) but that does nothing because I also have to add material to super(p_i45428_1_, p_i45428_2_) which it will not let me do. And none of the quick fixes will help me.
  13. Hey so I am now working on a mod that adds some new blocks to minecraft, and I figured out how to make normal blocks and slabs but I cant get stairs working. It seems that to add stairs it is a little different than adding other blocks and I need some help with it.
  14. Thanks.
  15. Thanks diesieben07, that worked. One question though. When you run the gradlew build where does it put the .jar file also how do I add a mcmod.info file? I can't figure out how to do that.
  16. Hey so I don't think it has any thing to do with my code at all. You see I wanted to see if it would work so I tried to create a new workspace, and when I ran gradlew setupDecompWorkspace it then game me the same message. When I first created my workspace I have now I had java7 32-bit but I decided to change that to 64-bit because I was tiered of minecraft messing up all the time. So when I upgraded it it then changed the dir from Program Files (x86) to Program files so I had to change my JAVA_HOME. And now it is giving me that problem. this is how I have my JAVA_HOME set C:\Program Files\Java\jdk1.7.0_65 and this is how I have it in my system path "C:\Program Files\Java\jdk1.7.0_65\bin" Could it be because of java 64-bit or do I have something wrong with my Variables?
  17. Do you suggest that I delete my current work space and rebuild my mod in a new one to see if that works?
  18. Alright well I removed classicBlocks from the workspace but when I use gradlew build it gives me the same error. What does unterminated string mean?
  19. Ok but if I should not put 2 mods in one workspace then what should I do? If I have to create a new workspace for every mod then I will have to go through the gradlew setupDecompWorkspace for every mod I want to make and my computer will be workspaces every where. but could this be the problem?
  20. It says. Build failed with an eception. * What went wrong: A problem occured configuring root project 'SandItems'. com.google.gson.stream.MalformedJsonException: Unterminated string at line 3485 column 49. I am working on a mod pack so I have two mods. This is the code for both the mods. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ package net.SandItems.mod; import net.SandItems.mod.items.SandAxe; import net.SandItems.mod.items.SandHoe; import net.SandItems.mod.items.SandPickaxe; import net.SandItems.mod.items.SandShovel; import net.SandItems.mod.items.SandSword; import net.minecraft.init.Blocks; import net.minecraft.init.Items; import net.minecraft.item.Item; import net.minecraft.item.Item.ToolMaterial; import net.minecraft.item.ItemStack; import net.minecraftforge.common.util.EnumHelper; import net.minecraftforge.oredict.OreDictionary; import cpw.mods.fml.common.Mod; import cpw.mods.fml.common.Mod.EventHandler; 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.registry.GameRegistry; @Mod(modid = SandItems.modid, version = SandItems.version, name = SandItems.name) public class SandItems { public static final String modid = "sandItems"; public static final String version = "v1.0"; public static final String name = "SandStoneItems"; public static ToolMaterial Sandy = EnumHelper.addToolMaterial("Sandy", 1, 125, 4.0F, 1.0F, 10); public static Item itemSandPickaxe; public static Item itemSandSword; public static Item itemSandShovel; public static Item itemSandAxe; public static Item itemSandHoe; @EventHandler public void PreInit(FMLPreInitializationEvent preEvent){ itemSandPickaxe = new SandPickaxe(Sandy).setUnlocalizedName("SandPick"); itemSandSword = new SandSword(Sandy).setUnlocalizedName("SandSword"); itemSandShovel = new SandShovel(Sandy).setUnlocalizedName("SandShovel"); itemSandAxe = new SandAxe(Sandy).setUnlocalizedName("SandAxe"); itemSandHoe = new SandHoe(Sandy).setUnlocalizedName("SandHoe"); GameRegistry.registerItem(itemSandPickaxe, "SandPickaxe"); GameRegistry.registerItem(itemSandSword, "SandSword"); GameRegistry.registerItem(itemSandShovel, "SandShovel"); GameRegistry.registerItem(itemSandAxe, "SandAxe"); GameRegistry.registerItem(itemSandHoe, "SandHoe"); } @EventHandler public void Init(FMLInitializationEvent event){ GameRegistry.addRecipe(new ItemStack(itemSandPickaxe), new Object[]{"ccc", " x ", " x ", 'x', Items.stick, 'c',new ItemStack(Blocks.sandstone, 1, OreDictionary.WILDCARD_VALUE)}); GameRegistry.addRecipe(new ItemStack(itemSandSword), new Object[]{" c ", " c ", " x ", 'x', Items.stick, 'c',new ItemStack(Blocks.sandstone, 1, OreDictionary.WILDCARD_VALUE)}); GameRegistry.addRecipe(new ItemStack(itemSandShovel), new Object[]{" c ", " x ", " x ", 'x', Items.stick, 'c',new ItemStack(Blocks.sandstone, 1, OreDictionary.WILDCARD_VALUE)}); GameRegistry.addRecipe(new ItemStack(itemSandAxe), new Object[]{"cc ", "cx ", " x ", 'x', Items.stick, 'c',new ItemStack(Blocks.sandstone, 1, OreDictionary.WILDCARD_VALUE)}); GameRegistry.addRecipe(new ItemStack(itemSandHoe), new Object[]{"cc ", " x ", " x ", 'x', Items.stick, 'c',new ItemStack(Blocks.sandstone, 1, OreDictionary.WILDCARD_VALUE)}); } @EventHandler public void PostInit(FMLPostInitializationEvent PostEvent){ } ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } package net.SandItems.mod.items; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import net.SandItems.mod.SandItems; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.item.ItemAxe; import net.minecraft.creativetab.CreativeTabs; public class SandAxe extends ItemAxe { public SandAxe(ToolMaterial p_i45327_1_) { super(p_i45327_1_); this.setCreativeTab(CreativeTabs.tabTools); } @SideOnly(Side.CLIENT) public void registerIcons(IIconRegister iconRegister) { this.itemIcon = iconRegister.registerIcon(SandItems.modid + ":" + this.getUnlocalizedName().substring(5)); } ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } package net.SandItems.mod.items; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import net.SandItems.mod.SandItems; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.item.ItemHoe; import net.minecraft.creativetab.CreativeTabs; public class SandHoe extends ItemHoe { public SandHoe(ToolMaterial p_i45343_1_) { super(p_i45343_1_); this.setCreativeTab(CreativeTabs.tabTools); } @SideOnly(Side.CLIENT) public void registerIcons(IIconRegister iconRegister) { this.itemIcon = iconRegister.registerIcon(SandItems.modid + ":" + this.getUnlocalizedName().substring(5)); } ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } package net.SandItems.mod.items; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import net.SandItems.mod.SandItems; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.item.ItemPickaxe; import net.minecraft.creativetab.CreativeTabs; public class SandPickaxe extends ItemPickaxe { public SandPickaxe(ToolMaterial p_i45347_1_) { super(p_i45347_1_); this.setCreativeTab(CreativeTabs.tabTools); } @SideOnly(Side.CLIENT) public void registerIcons(IIconRegister iconRegister) { this.itemIcon = iconRegister.registerIcon(SandItems.modid + ":" + this.getUnlocalizedName().substring(5)); } ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } package net.SandItems.mod.items; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import net.SandItems.mod.SandItems; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.item.ItemSpade; import net.minecraft.creativetab.CreativeTabs; public class SandShovel extends ItemSpade { public SandShovel(ToolMaterial p_i45353_1_) { super(p_i45353_1_); this.setCreativeTab(CreativeTabs.tabTools); } @SideOnly(Side.CLIENT) public void registerIcons(IIconRegister iconRegister) { this.itemIcon = iconRegister.registerIcon(SandItems.modid + ":" + this.getUnlocalizedName().substring(5)); } ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } package net.SandItems.mod.items; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import net.SandItems.mod.SandItems; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.item.ItemSword; import net.minecraft.creativetab.CreativeTabs; public class SandSword extends ItemSword { public SandSword(ToolMaterial p_i45356_1_) { super(p_i45356_1_); this.setCreativeTab(CreativeTabs.tabCombat); } @SideOnly(Side.CLIENT) public void registerIcons(IIconRegister iconRegister) { this.itemIcon = iconRegister.registerIcon(SandItems.modid + ":" + this.getUnlocalizedName().substring(5)); } ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } package net.classicBlocks.mod; import net.classicBlocks.mod.blocks.ClassicBrick; import net.classicBlocks.mod.blocks.ClassicCobble; import net.classicBlocks.mod.blocks.ClassicMossy; import net.minecraft.init.Blocks; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.init.Items; import net.minecraft.item.Item; import net.minecraft.item.Item.ToolMaterial; import net.minecraft.item.ItemStack; import net.minecraftforge.common.util.EnumHelper; import net.minecraftforge.oredict.OreDictionary; import cpw.mods.fml.common.Mod; import cpw.mods.fml.common.Mod.EventHandler; 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.registry.GameRegistry; @Mod(modid = classicBlock.modid, version = classicBlock.version, name = classicBlock.name) public class classicBlock { public static final String modid = "classicBlocks"; public static final String version = "v1.0"; public static final String name = "ClassicBlocks"; public static Block blockClassicBrick; public static Block blockClassicCobble; public static Block blockClassicMossy; @EventHandler public void PreInit(FMLPreInitializationEvent preEvent){ blockClassicBrick = new ClassicBrick(Material.rock).setBlockName("classicBrick"); blockClassicCobble = new ClassicCobble(Material.rock).setBlockName("ClassicStoneCobble"); blockClassicMossy = new ClassicMossy(Material.rock).setBlockName("ClassicStoneMossy"); GameRegistry.registerBlock(blockClassicBrick, "ClassicBrick"); GameRegistry.registerBlock(blockClassicCobble, "ClassicCobbleStone"); GameRegistry.registerBlock(blockClassicMossy, "ClassicMossyStone"); } @EventHandler public void Init(FMLInitializationEvent event){ GameRegistry.addShapelessRecipe(new ItemStack(blockClassicBrick), Blocks.brick_block); GameRegistry.addShapelessRecipe(new ItemStack(blockClassicCobble), Blocks.cobblestone); GameRegistry.addShapelessRecipe(new ItemStack(blockClassicMossy), Blocks.mossy_cobblestone); } @EventHandler public void PostInit(FMLPostInitializationEvent PostEvent){ } ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } package net.classicBlocks.mod.blocks; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import net.SandItems.mod.SandItems; import net.classicBlocks.mod.classicBlock; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.creativetab.CreativeTabs; public class ClassicBrick extends Block { public ClassicBrick(Material material) { super(material); this.setHardness(2.0F); this.setResistance(10.0F); this.setStepSound(soundTypePiston); this.setCreativeTab(CreativeTabs.tabBlock); } @SideOnly(Side.CLIENT) public void registerBlockIcons(IIconRegister iconRegister){ this.blockIcon = iconRegister.registerIcon(classicBlock.modid + ":" + this.getUnlocalizedName().substring(5)); } ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } package net.classicBlocks.mod.blocks; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import net.classicBlocks.mod.classicBlock; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.creativetab.CreativeTabs; public class ClassicCobble extends Block { public ClassicCobble(Material material) { super(material); this.setHardness(2.0F); this.setResistance(10.0F); this.setStepSound(soundTypePiston); this.setCreativeTab(CreativeTabs.tabBlock); } @SideOnly(Side.CLIENT) public void registerBlockIcons(IIconRegister iconRegister){ this.blockIcon = iconRegister.registerIcon(classicBlock.modid + ":" + this.getUnlocalizedName().substring(5)); } ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } package net.classicBlocks.mod.blocks; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import net.classicBlocks.mod.classicBlock; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.creativetab.CreativeTabs; public class ClassicMossy extends Block { public ClassicMossy(Material material) { super(material); this.setHardness(2.0F); this.setResistance(10.0F); this.setStepSound(soundTypePiston); this.setCreativeTab(CreativeTabs.tabBlock); } @SideOnly(Side.CLIENT) public void registerBlockIcons(IIconRegister iconRegister){ this.blockIcon = iconRegister.registerIcon(classicBlock.modid + ":" + this.getUnlocalizedName().substring(5)); } }
  21. Ok I did that and it fails and tells me com.google.gson.stream.MalformedJsonExption: Unterminated string. What does that mean?
  22. Hey I don't know if this helps but in eclipse I clicked the button to run the sever and it gave me the same message. [EDIT] never mind about this I changed (getCreativeTab().tabTools) back to (CreativeTabs.tabTools); and every thing in the eclipse development sever and client but it is still giving me problems when I make my mod in to a jar file and run it with the real minecraft. Would it help if I post the crash report? also I am working on a different mod as well and it is giving me problems too.
×
×
  • Create New...

Important Information

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