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. Woops try + 1 instead of - 1. Also: @Override public boolean hasContainerItem() { return true; }
  3. 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.
  4. Same thing. In your processing: if(event.entityLiving instanceof EntityPlayer) { EntityPlayer player = (EntityPlayer) event.entityLiving; String name = player.username; }
  5. Show me the new ResourceLocation you are using, and the Exception it is showing in the console again.
  6. if(event.entityLiving instanceof EntityPlayer) { EntityPlayer player = (EntityPlayer) event.entityLiving; //do stuff here }
  7. Files names should be what the file names are. Just change your mschouses to lowercase and also change the folder to lowercase.
  8. Make sure your tick handler is Client side, and Minecraft.getMinecraft() will work fine.
  9. Minecraft is not a variable, it is a class. getMinecraft() will return the running instance of the client which is a field.
  10. Anywhere you have: iconRegister.registerIcon("MscHouses:ingotcopper"); MscHouses needs to be all lowercase: iconRegister.registerIcon("mschouses:ingotcopper");
  11. 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.
  12. Do a clean install and copy over your source.
  13. 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.
  14. Like I said, change: ResourceFile.houseGen_Img = new ResourceLocation("MscHouses:BlockBase.png"); to ResourceFile.houseGen_Img = new ResourceLocation("mschouses", "directory/to/BlockBase.png);
  15. My guess is that Forge didn't set up correctly, unless you changed any of these files: Packet133TileEditorOpen.java WorldClientINNER3.java WorldClientINNER4.java
  16. 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.
  17. 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.
  18. Only client-side: GameSettings settings = Minecraft.getMinecraft().gameSettings; KeyBinding jump = settings.keyBindJump;
  19. 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
  20. Here is the easiest return for you: modID:textures/armor/armorType_" + (this.armorType == 2 ? 2 : 1) + ".png"
  21. Did you add a mapping to your tile entity? During an FMLEvent: TileEntity.addMapping(TileEntityPipe.class, "TileEntityPipe")
  22. 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.
  23. 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.