Jump to content

Kore

Forge Modder
  • Posts

    239
  • Joined

  • Last visited

Everything posted by Kore

  1. I would like to know how you can add text to a block face w/out needing to make 1000 different textures
  2. I am using the metadata to store info about the block and so far I resets to 0 after i hit 15, heres my code
  3. Well, an easy way to do it is to just edit it to have more potions, this will only conflict with mods that also edit that class, or you could make a mod specifically for that purpose(such as 4096 BlockID fix) or you could ask Lex or Eloraam to add a hook to forge
  4. This may be caused by a low tick rate that has the Fall speed set to negative when you lag downward into a block and therefore creating a jumping effect, an easy way to test this is do a System.out.println(FallSpeed) and see if that changes anything
  5. I have not really looked at models much, but here is code I puled from ModelBat If not, then just take a look at the model that you are basing it off of and make sure that you have made it with all the right params and variables
  6. did you put annotation @Init above load()? If so thats probably the easy fix, otherwise I will have to look more into this Edit:Or is it just showing up as the wrong textures?
  7. Is there any way that I can create a new Enum Tool Material without editing the EnumToolMaterial, I searched the EnumToolMaterial class to see if there was any forge hook to add one, is there an easy way that I didn't see?
  8. My furnace GUI works, but any time I try to pull an item out of my inventory it will put it back into the slot and I cannot move items! Code:
  9. Try to change the maxStackSize to 1, that could be the problem and change the 5 to a 3, because i think the game does not handle anything over a 3! If this helps, please leave a Thanks!
  10. I fixed that, and it had nothing to do with the furnace part, but I now have the block rendered have a recipe and have the gui, but when I open it and try to play an item in the slot the item just gets put back in my inv(after 1ms of holding it)
  11. well... If you actually thought about it, that was my problem and I need to know how to make a new displayGUI!
  12. Alright, so I have made a machine that has to deal with a bucket as fuel and Black Sand as the input... I have created everything correctly but I do not know how to open the GUI Here is my Error Report So what I narrowed it down to is: Here is the method it is referring to Anyone have any ideas?
  13. inside of your sword class, put in: public String getTextureFile() { return ""; //put the texture file in /MCP/eclipse/Minecraft/bin AND start with a /, end with .png }
  14. Do you have a new furnace/machine in your mod? Because the newest forge has a new way of handling a container.
  15. what im saying is when he right clicks with his tool, then it will delete the block and spawn 3 quarter blocks in that block so that it looks like 1/4 was removed Edit: Also, I think that you could check the position of the block you right click, and then get the texture based on ID, then put in the ID as the metadata so that you can drop the item with correct texture when destroyed
  16. I have not tested this completely, but you may need to make a BlockPartLeft and in the consructor put this.setBlockBounds(); and also include a get texture from side one, and in the code that I sent you, you might have to get the direction you are looking and spawn in 3 of the 4 quarter blocks Hope this made sense! Please +1 Karma if it helped you!
  17. If you want help don't ask for the mod... I wouldn't make code for a mod just so you could publish it!
  18. Alright, so do you mean having multiple bounding boxes? or do you mean the texturing
  19. Alright, so an easy way to get a chunk loader is to make a method with IChunkProvider, and have a code such that chunkProvider.loadChunk(posX, posZ) so posX and posZ would be the coordinates of your chunk loader. Done! Please Leave a thanks, and/or a +1 Karma if this helped!
  20. you could try using a code for onEntityKilled, I think there is something like that
  21. you could make a method in your tool that is public boolean tryPlaceIntoWorld(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, World par3World, int par4, int par5, int par6, int par7, float par8, float par9, float par10) { if (!par2EntityPlayer.canPlayerEdit(par4, par5, par6)) { return false; } else { UseHoeEvent event = new UseHoeEvent(par2EntityPlayer, par1ItemStack, par3World, par4, par5, par6); if (MinecraftForge.EVENT_BUS.post(event)) { return false; } if (event.isHandeled()) { par1ItemStack.damageItem(1, par2EntityPlayer);//If you want the Item damaged return true; } int var11 = par3World.getBlockId(par4, par5, par6); if ((par7 == 0 || var11 != Block.BlocksAbleToBeCut)) { return false; } else { Block var13 = Block.BlockToBecome; if (par3World.isRemote) { return true; } else { par3World.setBlockWithNotify(par4, par5, par6, var13.blockID); par1ItemStack.damageItem(1, par2EntityPlayer);//If you want it damaged return true; } } } } Hope this helps, If you need clarification just ask!
  22. try using some of the code that I already made, put GameRegistry.registerCraftingHandler(new NewCraftingHandler()); into your base class PreInit Method Then, you will need to have something check all your inv slots: public class NewCraftingHandler implements ICraftingHandler { public NewCraftingHandler() { } @Override public void onCrafting(EntityPlayer player, ItemStack item, IInventory inv) { for(int i=0; i < inv.getSizeInventory(); i++) { if(inv.getStackInSlot(i) != null) { ItemStack j = inv.getStackInSlot(i); if(j.getItem() != null && j.getItem() == TestMod.item) { ItemStack k = new ItemStack(TestMod.item, 2, (j.getItemDamage() + 1));//makes 2 items, 1 that is used and 1 that is damaged inv.setInventorySlotContents(i, k);//i is slot, k is Item } } } } } @Override public void onSmelting(EntityPlayer player, ItemStack item) { } } then press ctrl + Shift + O, and that will import all needed things Hope this helps!
  23. alright, so I want to have an item such as the extractor in IC2 that can produce resin... so I have modified the ItemHoe class so I have my own and it changes clay to dirt, now I just need for it to drop an item
  24. do you mean just a new block? or a custom animated block?
  25. In your base class: public void keyPressed(KeyEvent e) { int keyCode = e.getKeyCode(); switch( keyCode ) { case KeyEvent.VK_a: boolean isOn = true; break; case KeyEvent.VK_b: boolean isOn = false; break; } }
×
×
  • Create New...

Important Information

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