Jump to content

Guff

Members
  • Posts

    159
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by Guff

  1. For pickaxe you'll want to change the way it handles blocks being harvested/destroyed. It should be handled to check whether the item being dropped has a smelting recipe, and if it does, it should drop that instead of the normal drop (look at FurnaceRecipes.java). For axe just check all above blocks and see if they are also wood/logs, etc, and have them affected as well.
  2. Show MoreTools.java.
  3. Woops try + 1 instead of - 1. Also: @Override public boolean hasContainerItem() { return true; }
  4. No need for a crafting handler. In your ItemKnife.java: @Override public ItemStack getContainerItemStack(ItemStack itemStack) { int alter = itemStack.getItemDamage() - 1; if(alter >= itemStack.getMaxDamage()) { return null; } itemStack.setItemDamage(alter); return itemStack; } Will return the same stack that was used with the damage minus 1. If the changed damage is greater/equal compared to the maximum allowed damage, will 'break' the item by returning null.
  5. Same thing. In your processing: if(event.entityLiving instanceof EntityPlayer) { EntityPlayer player = (EntityPlayer) event.entityLiving; String name = player.username; }
  6. Show me the new ResourceLocation you are using, and the Exception it is showing in the console again.
  7. if(event.entityLiving instanceof EntityPlayer) { EntityPlayer player = (EntityPlayer) event.entityLiving; //do stuff here }
  8. Files names should be what the file names are. Just change your mschouses to lowercase and also change the folder to lowercase.
  9. Make sure your tick handler is Client side, and Minecraft.getMinecraft() will work fine.
  10. Minecraft is not a variable, it is a class. getMinecraft() will return the running instance of the client which is a field.
  11. Anywhere you have: iconRegister.registerIcon("MscHouses:ingotcopper"); MscHouses needs to be all lowercase: iconRegister.registerIcon("mschouses:ingotcopper");
  12. When you package your mod, make sure your assets folder and class folders are separate from one another. I use these: com/mod/modname/.class files assets/modname/textures/items,blocks,gui/.png files So when it is packaged, the two are distinguished. I don't know about your items, I'd have to see how you are initializing them.
  13. Do a clean install and copy over your source.
  14. I'm asking if you did. If you didn't, something else screwed them up. I'd recommend a clean install of forge and copy over your source.
  15. Like I said, change: ResourceFile.houseGen_Img = new ResourceLocation("MscHouses:BlockBase.png"); to ResourceFile.houseGen_Img = new ResourceLocation("mschouses", "directory/to/BlockBase.png);
  16. My guess is that Forge didn't set up correctly, unless you changed any of these files: Packet133TileEditorOpen.java WorldClientINNER3.java WorldClientINNER4.java
  17. ResourceLocation texture = new ResourceLocation("mschouses", "directory/to/BlockBase.png); And in your src, you will have a package like this: assets.mschouses.directory.to, containing BlockBase.png. Here's the setup I use: ResourceLocation texture = new ResourceLocation("mymod", "textures/gui/myGuiTexture.png") muGuiTexture.png is located in assets.mymod.textures.gui.
  18. Easy. Make a class that extends ItemPickaxe, and copy the code from ItemSnowball (onItemRightClick) and paste it into your class. Then change the code to fit what you want, it changing anything like EntitySnowball, etc. to EntityPickaxe, then copy and paste EntitySnowball/RenderSnowball and name it EntityPickaxe and RenderPickaxe, and change it. it's not hard, really just a bunch of copy and paste.
  19. Show me the stack trace.
  20. Only client-side: GameSettings settings = Minecraft.getMinecraft().gameSettings; KeyBinding jump = settings.keyBindJump;
  21. You are trying to add a name to an object that is not a Block, Item, or ItemStack. LanguageRegistry.addName(Block.stone, "Stone"); //works LanguageRegistry.addName(new HashMap(), "Some Map"); //first param is not an instance of Block, Item, or ItemStack, will not work
  22. Here is the easiest return for you: modID:textures/armor/armorType_" + (this.armorType == 2 ? 2 : 1) + ".png"
  23. Did you add a mapping to your tile entity? During an FMLEvent: TileEntity.addMapping(TileEntityPipe.class, "TileEntityPipe")
  24. Did you install Risugami's ModLoader? I would assume you did and you shouldn't do that if you're using. Get the version of forge (src) you want from the downloads, extract the forge folder somewhere, then open it and run install.cmd.
  25. Items are static objects that are used to define behavior of that item, and ItemStacks are the actual Item. When you look in your inventory, you're actually looking at ItemStack instances that have the data of the Item or Block that is passed to them. The addSmelting() method requires an ItemStack parameter as the output, so give it one that contains the data of the item you want to receive (new ItemStack(myFoodCooked)).
×
×
  • Create New...

Important Information

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