Jump to content

Bishamonten

Members
  • Posts

    21
  • Joined

  • Last visited

Converted

  • Gender
    Male
  • Personal Text
    Meet the Creeper

Bishamonten's Achievements

Tree Puncher

Tree Puncher (2/8)

2

Reputation

  1. I'm in 1.7.10, I'm coming across the same issue. I was going to ignore it for the time being (because my gf wants to play and not watch me code), but thought I would do some rudimentary research on the matter to see if there was a "quick" fix. I thought I'd post in your thread instead of writing my own.
  2. If i understand the question correctly. You want to add an on item right click method to your armor class and get the armor slot type and move them that way. Not sure theres a built in command.
  3. I'm not sure if its true for 1.8 but after some lengthy research I came across the solution for 1.7.10. Remove that getIsRepairable from your itemarmor class and put this in your main registry class/method put the following. //your enum name fallowed by the .customCraftingMaterial, than just set it to your item you want it to repair. ARMORCOPPER.customCraftingMaterial = ingotCopper; I use a register method, and I put this after everything was set in that method. So [Made in short hand]: Main class @mod() public void preInit() MyModsItemClass.registerItems(); MyModsItemClass class public static final ItemArmor.ArmorMaterial ARMORCOPPER = EnumHelper.addArmorMaterial("COPPER", 10, new int[]{2,3,2,2}, 12); public static Item myArmor; public static Item ingotCopper public static void registerItems(){ myArmor = new MyArmor(ARMORCOPPER, 0, 0, "", ""); ingotCopper = new MyItems(); ARMORCOPPER.customCraftingMaterial = ingotCopper; }
  4. couldn't you create an item array with all your items in it and when you generate chests just have it pick from one in the list at random with 100% per chest?
  5. Sometimes my textures don't load when I test my mod in Eclipse. I have to stress the Sometimes part. Here's what's happening: 1.) I click Run, everything loads up, no errors. Textures work great. 2.) I close Minecraft (using the Close button at the top or doing exit, if that matters, sometimes using the stop button in the console). 3.) I do Absolutely Nothing to my code. 4.) Click Run again, error's for missing textures everywhere. 5.) Repeat 2 & 3 6.) Sometimes Some of the textures load, Sometimes All the textures load, but mostly, they don't load. Relevant Code: Main: import net.minecraft.creativetab.CreativeTabs; import net.minecraft.init.Items; import net.minecraft.item.Item; import net.t1junox.alpoh.block.AlpohBlocks; import net.t1junox.alpoh.item.AlpohItems; import cpw.mods.fml.common.Mod; import cpw.mods.fml.common.Mod.EventHandler; import cpw.mods.fml.common.Mod.Instance; import cpw.mods.fml.common.SidedProxy; import cpw.mods.fml.common.event.FMLPreInitializationEvent; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; @Mod(modid = Alpoh.MODID, name = Alpoh.NAME, version = Alpoh.VERSION, acceptedMinecraftVersions = "[1.7.10]") public class Alpoh { @SidedProxy(clientSide = "net.t1junox.alpoh.ClientProxy", serverSide = "net.t1junox.alpoh.CommonProxy") public static CommonProxy proxy; public static final String MODID = "t1junox_alpoh"; public static final String NAME = "A Little Piece of Haven"; public static final String VERSION = "v0.0.1"; @Instance(MODID) public static Alpoh instance; public static CreativeTabs alpohTabs; AlpohBlocks alpohBlocks = new AlpohBlocks(); AlpohItems alpohItems = new AlpohItems(); @EventHandler public void PreInit(FMLPreInitializationEvent preEvent){ alpohTabs = new CreativeTabs(MODID){ @SideOnly(Side.CLIENT) public Item getTabIconItem(){ return Items.apple; } }; alpohBlocks.loadBlocks(); alpohItems.loadItems(); } BlocksClass: import cpw.mods.fml.common.registry.GameRegistry; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraftforge.common.MinecraftForge; import net.t1junox.alpoh.Alpoh; public class AlpohBlocks{ //Ore Blocks public static Block oreCopper; //textured public void loadBlocks(){ oreCopper = new AlpohBlockOre("oreCopper"); registerBlock(oreCopper); } public void registerBlock(Block block){ GameRegistry.registerBlock(block, block.getUnlocalizedName().substring(5)); } } BlockOre Class 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.t1junox.alpoh.Alpoh; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; public class AlpohBlockOre extends Block{ public AlpohBlockOre(String name) { super(Material.rock); this.setHardness(3F); this.setResistance(5.0F); this.setBlockName(name); this.setCreativeTab(Alpoh.alpohTabs); } @Override @SideOnly(Side.CLIENT) public void registerBlockIcons(IIconRegister iconRegister){ this.blockIcon = iconRegister.registerIcon(Alpoh.MODID + ":" + this.getUnlocalizedName().substring(5)); System.out.println(Alpoh.MODID + ".Block Registered: " + Alpoh.MODID + ":" + this.getUnlocalizedName().substring(5)); } } The Error I SOMETIMES get in the Console (Error occurs During loading up minecraft before the title screen): [16:50:31] [Client thread/ERROR]: Using missing texture, unable to load t1junox_alpoh:textures/blocks/oreCopper.png java.io.FileNotFoundException: t1junox_alpoh:textures/blocks/oreCopper.png at net.minecraft.client.resources.FallbackResourceManager.getResource(FallbackResourceManager.java:65) ~[FallbackResourceManager.class:?] at net.minecraft.client.resources.SimpleReloadableResourceManager.getResource(SimpleReloadableResourceManager.java:67) ~[simpleReloadableResourceManager.class:?] at net.minecraft.client.renderer.texture.TextureMap.loadTextureAtlas(TextureMap.java:126) [TextureMap.class:?] at net.minecraft.client.renderer.texture.TextureMap.loadTexture(TextureMap.java:91) [TextureMap.class:?] at net.minecraft.client.renderer.texture.TextureManager.loadTexture(TextureManager.java:89) [TextureManager.class:?] at net.minecraft.client.renderer.texture.TextureManager.loadTickableTexture(TextureManager.java:71) [TextureManager.class:?] at net.minecraft.client.renderer.texture.TextureManager.loadTextureMap(TextureManager.java:58) [TextureManager.class:?] at net.minecraft.client.Minecraft.startGame(Minecraft.java:592) [Minecraft.class:?] at net.minecraft.client.Minecraft.run(Minecraft.java:941) [Minecraft.class:?] at net.minecraft.client.main.Main.main(Main.java:164) [Main.class:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.7.0_10] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) ~[?:1.7.0_10] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.7.0_10] at java.lang.reflect.Method.invoke(Method.java:601) ~[?:1.7.0_10] at net.minecraft.launchwrapper.Launch.launch(Launch.java:134) [launchwrapper-1.9.jar:?] at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.9.jar:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.7.0_10] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) ~[?:1.7.0_10] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.7.0_10] at java.lang.reflect.Method.invoke(Method.java:601) ~[?:1.7.0_10] at GradleStart.bounce(GradleStart.java:107) [start/:?] at GradleStart.startClient(GradleStart.java:100) [start/:?] at GradleStart.main(GradleStart.java:55) [start/:?] There are no other Error Messages besides these (I Have more than 1 block/item, I just posted the one for the sample). All the other Errors are Identical except its the name of my other block/item textures. And my textures are saved in: src/main/resources/assets/t1junox_alpoh/textures/blocks And named correctly. My only idea of what it could be is: 1.) Because I pass a string into my Block Ore Class its messing things up. 2.) I Use two different classes to load/register my Items and Blocks separately. (However I have tried loading a block or two into the preinit, before calling my blockloads, like any normal block tutorial would do, and still have the same issue.) I quit for a week because it was giving me a headache and for the life of me couldn't find anything wrong. I can not stress enough that SOMETIMES they work.
  6. ScratchForFuns GUI furnace tutorials are halfway written in 1.6.2 and than later written in 1.6.4 and while i understand there should be very little difference, he doesn't account for any of it. The 7+ hours of commentary aside, I'd recommend you find another source for learning who to copy GUI's from. I had nothing but trouble myself while trying to fallow along and the end result was buggy. I found a different tutorial from a user on MCF. http://www.minecraftforum.net/forums/mapping-and-modding/mapping-and-modding-tutorials/1571592-forge-1-6-4-micros-furnace-tutorials-will-update Only problem I have was having to use his render class. But given I'm a pleb and was only looking for a quick fix (like you are), i just went with it and it worked just fine.
  7. I'm not sure if it's changed in 1.7, but when you lightBlueMagicLeaves = new BlockExtender("FoglieMagicheAzzurre", CryTabs.crystaliaDecorativeTab).setHardness(0.2F).setStepSound(Block.soundTypeGrass); I don't know what your BlockExtender class looks like and why your setting the customTab as a part of the constructor. In 1.6 mine would look something like this oreCopper = new BlockRE(oreCopperID, Material.rock).setUnlocalizedName("oreCopper"); and my BlockRE would be like public BlockRE(int id, Material material) { super(id, material); this.setCreativeTab(RegistryRE.tabRE); } Also, are you registering the name in the language registry? I know its different in 1.7, but i know you still have to do it a certain way.
  8. 1.6.4 or 1.7? i'm not sure it makes a difference, but someone else might know and need to know this.
  9. I'm not really that great when it comes to coding and what not. but in the: setBlockHarvestLevel(Block, "tool", lvl); I had a small light of inspiration. Would it be possible to in the "tool" couldn't you do like "myPickaxe". only problem is where you set up your tools, you have set your tool to be both "pickaxe" and "myPickaxe" (that way your tool will still function like the default tool.) There may be another way of going about what i'm talking about. But it just randomly occurred to me and i thought i'd throw that out there. But i think Mecblader has the two most likely solutions. The block break listener being the least likely approach as i believe that would be called every single time a block is broken anywhere. Again I'm just a novice.
  10. 1.) Set the hardness to 2000000 or whatever obsidian is set to. 2.) Dig a hole straight down. 3.) Spawn in TNT to fill said hole. 4.) Light it up. 5.) Repeat steps 3 & 4. I do this to also test spawning frequency as well.
  11. relevant main class information, and 1.6 or ?
  12. any number of basic modding tutorials should be able to show you how to set this up. if i'm understanding the problem correctly. even the outdated tutorials. google is good, and so is youtube. imports @Mod @NetworkMod public class mainModClass { //===blocks/ores=== public static Block oreBlock; //===Event Manager=== public static EventManager eventManager = new EventManager(); @PreInit public void preInit(FMLPreInitializationEvent event) { oreBlock = new modBlock(oreBlockID, Material.rock).setUnlocalizedName("oreBlock"); } @Init public void load(FMLInitializationEvent event) { //===Register World=== GameRegistry.registerWorldGenerator(eventManager); } }
  13. I think i'm not registering my renders? package mods.alpoh.common; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.item.EnumToolMaterial; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraftforge.common.Configuration; import net.minecraftforge.common.EnumHelper; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.event.Event.Result; import net.minecraftforge.event.ForgeSubscribe; import net.minecraftforge.event.terraingen.OreGenEvent.GenerateMinable; import net.minecraftforge.oredict.OreDictionary; import cpw.mods.fml.common.Mod; import cpw.mods.fml.common.Mod.Init; import cpw.mods.fml.common.Mod.Instance; import cpw.mods.fml.common.Mod.PostInit; import cpw.mods.fml.common.Mod.PreInit; 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.network.NetworkRegistry; import cpw.mods.fml.common.registry.GameRegistry; import cpw.mods.fml.common.registry.LanguageRegistry; @Mod(modid = "t1junox_ALPOH", name = "Alexander's Little Ponys of Horror", version = "0.1") @NetworkMod(clientSideRequired = true, serverSideRequired = false, channels = "ALPOHChannel", packetHandler = PacketHandlerALPOH.class) public class ALPOH { @Instance public static ALPOH instance = new ALPOH(); private GuiHandlerALPOH guihandler = new GuiHandlerALPOH(); //===CreativeTab=== public static CreativeTabs tabALPOH = new CreativeTabALPOH(CreativeTabs.getNextID(), "tabALPOH"); //===Event Manager=== public static EventManagerALPOH eventManager = new EventManagerALPOH(); //=============== //PreLoad Method //=============== @PreInit public void preInit(FMLPreInitializationEvent event) { //Blocks ALPOHBlocks.loadBlocks(); //Items ALPOHItems.loadItems(); Configuration config = new Configuration(event.getSuggestedConfigurationFile()); config.load(); //Blocks ALPOHBlocks.oreCopperID = config.get(config.CATEGORY_BLOCK, "Copper Ore", 2750).getInt(); ALPOHBlocks.oreTinID = config.get(config.CATEGORY_BLOCK, "Tin Ore", 2751).getInt(); ALPOHBlocks.oreSilverID = config.get(config.CATEGORY_BLOCK, "Silver Ore", 2752).getInt(); ALPOHBlocks.lifeStoneID = config.get(config.CATEGORY_BLOCK, "Life Stone", 2755).getInt(); //Items ALPOHItems.ingotCopperID = config.get(config.CATEGORY_ITEM, "Copper Ingot", 5500).getInt(); ALPOHItems.ingotTinID = config.get(config.CATEGORY_ITEM, "Tin Ingot", 5501).getInt(); ALPOHItems.ingotBronzeID = config.get(config.CATEGORY_ITEM, "Bronze Ingot", 5502).getInt(); ALPOHItems.ingotSilverID = config.get(config.CATEGORY_ITEM, "Silver Ingot", 5503).getInt(); ALPOHItems.ingotSteelID = config.get(config.CATEGORY_ITEM, "Steel Ingot", 5504).getInt(); ALPOHItems.lifeStoneDustID = config.get(config.CATEGORY_ITEM, "Life Stone Dust", 5509).getInt(); ALPOHItems.rodIronID = config.get(config.CATEGORY_ITEM, "Iron Rod", 5510).getInt(); //===Foods (5511-5525)=== ALPOHItems.milkBottleID = config.get(config.CATEGORY_ITEM, "Milk Bottle", 5511).getInt(); ALPOHItems.flourID = config.get(config.CATEGORY_ITEM, "Flour", 5512).getInt(); ALPOHItems.doughBreadID = config.get(config.CATEGORY_ITEM, "Bread Dough", 5513).getInt(); ALPOHItems.mixCakeID = config.get(config.CATEGORY_ITEM, "Cake Mix", 5514).getInt(); ALPOHItems.doughCookieID = config.get(config.CATEGORY_ITEM, "Cookie Dough", 5515).getInt(); //===Tools (5526-)=== //Copper ALPOHItems.axeCopperID = config.get(config.CATEGORY_ITEM, "Copper Axe", 5526).getInt(); ALPOHItems.hoeCopperID = config.get(config.CATEGORY_ITEM, "Copper Hoe", 5527).getInt(); ALPOHItems.pickaxeCopperID = config.get(config.CATEGORY_ITEM, "Copper Pickaxe", 5528).getInt(); ALPOHItems.spadeCopperID = config.get(config.CATEGORY_ITEM, "Copper Shovel", 5529).getInt(); ALPOHItems.swordCopperID = config.get(config.CATEGORY_ITEM, "Copper Sword", 5530).getInt(); //Bronze ALPOHItems.axeBronzeID = config.get(config.CATEGORY_ITEM, "Bronze Axe", 5531).getInt(); ALPOHItems.hoeBronzeID = config.get(config.CATEGORY_ITEM, "Bronze Hoe", 5532).getInt(); ALPOHItems.pickaxeBronzeID = config.get(config.CATEGORY_ITEM, "Bronze Pickaxe", 5533).getInt(); ALPOHItems.spadeBronzeID = config.get(config.CATEGORY_ITEM, "Bronze Shovel", 5534).getInt(); ALPOHItems.swordBronzeID = config.get(config.CATEGORY_ITEM, "Bronze Sword", 5535).getInt(); //Silver5536-5540 //Steel ALPOHItems.axeSteelID = config.get(config.CATEGORY_ITEM, "Steel Axe", 5541).getInt(); ALPOHItems.hoeSteelID = config.get(config.CATEGORY_ITEM, "Steel Hoe", 5542).getInt(); ALPOHItems.pickaxeSteelID = config.get(config.CATEGORY_ITEM, "Steel Pickaxe", 5543).getInt(); ALPOHItems.spadeSteelID = config.get(config.CATEGORY_ITEM, "Steel Shovel", 5544).getInt(); ALPOHItems.swordSteelID = config.get(config.CATEGORY_ITEM, "Steel Sword", 5545).getInt(); config.save(); } //============ //Load Method //============ @Init public void load(FMLInitializationEvent event) { MinecraftForge.ORE_GEN_BUS.register(this); //===Register World=== GameRegistry.registerWorldGenerator(eventManager); //Registry for Kiln GameRegistry.registerTileEntity(TileEntityKilnALPOH.class, "tileEntityKilnALPOH"); NetworkRegistry.instance().registerGuiHandler(this, guihandler); } //========== //Post Init //========== @PostInit public void postInit(FMLPostInitializationEvent event){ } //Remove Vanilla Iron World Generation @ForgeSubscribe public void generateMineable(GenerateMinable event) { switch(event.type) { case IRON: event.setResult(Result.DENY); break; default: } } }
  14. I've been having problems with my custom furnace I've created. I don't get any errors, but when i right click on my furnace in game nothing happens. I've tried adding system out lines at every step, everything right up to the point the gui should be drawn. the only part (so far) that i think i have wrong is here: this.mc.renderEngine.bindTexture("alpoh:kilnGui.png"); I think I'm not calling my texture the right way. I've various combinations of "mod/alpoh/textures/gui/kilnGui.png" and such. Even when i left it at its defualt ("/gui/furnace.png") nothing would happen. my onBlockActivated. public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int par6, float par7, float par8, float par9) { System.out.println("Kiln was left clicked"); if (world.isRemote){ System.out.println("world is remote"); return true; } else { TileEntityKilnALPOH te = (TileEntityKilnALPOH)world.getBlockTileEntity(x, y , z); if (te != null){ System.out.println("player gui should open"); player.openGui(ALPOH.instance, 0, world, x, y, z); } return true; } } I have all the proper registers in the main class and have the guiHandler set up just like the one post in this thread. I can set the block, it's just the right click function that doesn't seem to work. edit: yes this is also for 1.5.2
  15. Found part of my answer on the Minecraft Forums. Was able to just use my own worldgen class to respawn the ore at my desired amount. Original Post.
×
×
  • Create New...

Important Information

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