Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

mrkirby153

Members
  • Joined

  • Last visited

Everything posted by mrkirby153

  1. but how would i get the lang from the default language file?
  2. I cannot do that because I am already using that to give the item its name. I want to give it a custom lore WITHOUT having to hard code the item names/lore into it manually.
  3. Hello, I was wondering if it was possible for me to get a localized block name. I am trying to get the block name as the lore but it shows up as "blockEmerald" if i was to add an emerald. I was wondering how to localize the name so it would display as "Emerald Block", the localized version of the block. My Item code:
  4. To put your mods back into your MCP folder to recompile it, you go to where your Eclipse workspace is stored. Mine is stored at "C:\Develpoment\Eclipse" You then open the folder that should be the name of your project. Mine is "MscHouses" Inside the folder there (should be) the following items: .settings (a folder) .classpath .project bin (a folder) open up your bin folder. You should now be in "C:\<PATH TO YOUR ECLIPSE WORKSPCE>\<YOUR PROJECT NAME>\bin" In the bin folder there is a folder that has the start of your package. So if the package was "com.blah.blah1" you wouold see "com" as the folder. copy the folder and ALL its contents to your <MCP DIRECTORY>\src Run Recompile.bat/.sh and reobfuscate/sh DONE!
  5. Hello, I was wondering how I would add inventory slot tooltips. My Container code: package mrkirby153.MscHouses.block.Container; import mrkirby153.MscHouses.block.TileEntity.TileEntityBlockBase; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.inventory.Container; import net.minecraft.inventory.Slot; import net.minecraft.item.ItemStack; public class ContainerBlockBase extends Container{ public ContainerBlockBase(InventoryPlayer inventoryPlayer, TileEntityBlockBase block_base) { // Add the Moduel slot to the base this.addSlotToContainer(new Slot(block_base, 0, 81, 18)); // Add the fuel slot to the Block Base this.addSlotToContainer(new Slot(block_base, 1, 81, 64)); //Add the material modifyer to the block base this.addSlotToContainer(new Slot(block_base, 2, 81, 39)); // Add the player's inventory slots to the container for (int inventoryRowIndex = 0; inventoryRowIndex < 3; ++inventoryRowIndex) { for (int inventoryColumnIndex = 0; inventoryColumnIndex < 9; ++inventoryColumnIndex) { this.addSlotToContainer(new Slot(inventoryPlayer, inventoryColumnIndex + inventoryRowIndex * 9 + 9, 8 + inventoryColumnIndex * 18, 94 + inventoryRowIndex * 18)); } } // Add the player's action bar slots to the container for (int actionBarSlotIndex = 0; actionBarSlotIndex < 9; ++actionBarSlotIndex) { this.addSlotToContainer(new Slot(inventoryPlayer, actionBarSlotIndex, 8 + actionBarSlotIndex * 18, 152)); } } @Override public boolean canInteractWith(EntityPlayer player) { return true; } // TODO Write our own version - this is taken from ContainerFurnace @Override public ItemStack transferStackInSlot(EntityPlayer par1EntityPlayer, int par2) { ItemStack var3 = null; Slot var4 = (Slot) inventorySlots.get(par2); if (var4 != null && var4.getHasStack()) { ItemStack var5 = var4.getStack(); var3 = var5.copy(); if (par2 == 2) { if (!this.mergeItemStack(var5, 3, 39, true)) return null; var4.onSlotChange(var5, var3); } else if (!this.mergeItemStack(var5, 3, 39, false)) return null; if (var5.stackSize == 0) { var4.putStack((ItemStack) null); } else { var4.onSlotChanged(); } if (var5.stackSize == var3.stackSize) return null; var4.onPickupFromSlot(par1EntityPlayer, var5); } return var3; } }
  6. I tried that, it didn't work
  7. mrkirby153 replied to mnn's topic in Modder Support
    What's Scala?
  8. Hello, So today, when i went and re organized my code, i found that I kept crashing with an "Out of memory error" whenever i try to load a world. Crashlog: https://dl.dropboxusercontent.com/u/121954827/ForgeModLoader-client-0.log CODE: I started with https://github.com/mrkirby153/MscHouses/tree/7b3982890946d3bef8f768d9ba171e2c0f21e8c1 and ended up with https://github.com/mrkirby153/MscHouses/tree/64a015aa0dab5d81e16e46602d232aac4dde15ce
  9. I believe they are still in there. And may I please see your code? (Pastebin)
  10. Try deleting your MCP folder and running the forge install script again. It automatically downloads MCP
  11. I know this is kinda unrelated, but what version of forge? EDIT: Try using this for your icon register method and not passing in the texture string @Override @SideOnly(Side.CLIENT) public void updateIcons(IconRegister iconRegister) { // TODO Auto-generated method stub iconIndex = iconRegister.registerIcon("MscHouses:HouseTool"); } FYI icon index is a pre defined variable
  12. My folder structure is just fine, though I appreciate the input. My packaging goes "tynarus.theinfectionmod.*" with the folder structure inside my ZIP file being "tynarus/theinfectionmod/*", so I believe that to be correct. Had been for my other revisions anyways. I see alot of different errors. For example: "class format exception" you might have a duplicate class. Also, are you using Eclipse or notepad ++?
  13. It seems like there's a problem on line 18 of bbTool. What's on line 18? (Hint: put your code in a pastebin. It's easier to read. [http://www.pastebin.com]) And line 50 of bbBlocks.
  14. It looks like there is something messed up in your tool class. May I please see the bbPickaxe and bbBlocks code?
  15. Hello, Today I was trying to make a village generate from a block. However, the method I am using requires "IChunkProvider chunkGenerator". I was wondering what I pass into the method. My code is provided Below: BlockVillage: http://pastebin.com/7tWBrMXW VillageGenerator : http://pastebin.com/KMUTJi0U ~mrkirby153
  16. Hello, I was trying to use infinite terrain and sprite indexes for an item. However, it would not work\. It just showed a white square with a black dot. In older versions, you impliment ItextureProvider. I was wondering what the equivlent was for 1.3.2. I have attached my code. capsuels.java package mrkirby153.capsuels; import java.io.File; import net.minecraft.client.Minecraft; import net.minecraft.src.Block; import net.minecraft.src.ItemStack; import net.minecraft.src.ModLoader; import net.minecraftforge.client.MinecraftForgeClient; import net.minecraftforge.common.Configuration; import cpw.mods.fml.common.*; import cpw.mods.fml.common.Mod.Item; import cpw.mods.fml.common.Mod.*; import cpw.mods.fml.common.event.FMLInitializationEvent; import cpw.mods.fml.common.registry.GameRegistry; import cpw.mods.fml.common.registry.LanguageRegistry; @Mod(modid= "Capsuels Mod", name = "Capsuels Mod", version = "Alpha 0.1") public class Capsuels { @Init public void load(FMLInitializationEvent event){ File file = new File(Minecraft.getMinecraftDir(), "/config/Capsuels.cfg"); Configuration cfg = new Configuration(file); cfg.load(); int EmptyID = cfg.getOrCreateBlockIdProperty("Empty Capsuels", 500).getInt(); int EXPID = cfg.getOrCreateBlockIdProperty("EXP Capsuels", 501).getInt(); final net.minecraft.src.Item emptyCap= (new ItemEmptyCap(EmptyID)).setFull3D().setIconCoord(0, 0).setItemName("ItemEmptyCap"); final net.minecraft.src.Item capEXP; MinecraftForgeClient.preloadTexture("/mrkirby153/Capsuels/Capsuels.png"); LanguageRegistry.addName(emptyCap, "Empty Cap"); GameRegistry.addShapelessRecipe(new ItemStack(emptyCap, 1), new Object[] {Block.dirt}); } } ItemEmptyCap.java package mrkirby153.capsuels; import net.minecraft.src.EntityPlayer; import net.minecraft.src.EnumAction; import net.minecraft.src.Item; import net.minecraft.src.ItemStack; import net.minecraft.src.World; public class ItemEmptyCap extends Item { public ItemEmptyCap (int par1){ super(par1); this.setMaxStackSize(3); } public ItemStack onFoodEaten(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer){ --par1ItemStack.stackSize; if(!par2World.isRemote){ par3EntityPlayer.clearActivePotions(); } return par1ItemStack; } public int getMaxItemUseDuration(ItemStack par1ItemStack) { return 32; } public EnumAction getItemUseAction(ItemStack par1ItemStack){ return EnumAction.drink; } public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EnttyPlayer){ par3EnttyPlayer.setItemInUse(par1ItemStack, this.getMaxItemUseDuration(par1ItemStack)); return par1ItemStack; } public String getTextureFile(){ return "/mrkirby153/Capsuels/Capsuels.png"; } }
  17. Also, the empty capsuel naming is broken and when i try to craft an empty capsuel, i get an exp capsuel. updated code:
  18. I personally would try removing public int idDropped(int i, Random random, int j){ return blockID; } When I need help fixing item drops, I look at other classes. EX. BlockDirt.java, BlockClay.java
  19. Ok. So i looked at the iron chests code and i tryed to to that but without some of the stuff. But, It crashes with this error: can you look at my code and tell me whats wrong? mod_File ItemCapsuelsEXP file ItemEmptyCap File
  20. Make sure that you are preloading the textures using MinecraftForgeClient.preloadTexture(texture file location); and your creatxdarkbrick implements ITexture provider. I could help you more if you attached your source code -mrkirby153
  21. Hi, I need help using configuration files for my mod. I tried the wiki article and it wasn't very detailed. I am a kind of person who learns by example. The wiki article has no examples of the finished project. I hope someone can give me an example on how to do it. Also, I tried looking at some other mods and it was no help. If someone could please help me out, I would appreciate it!

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.