Everything posted by mrkirby153
-
Localizing Block Name
but how would i get the lang from the default language file?
-
Localizing Block Name
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.
-
Localizing Block Name
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:
-
Transfering old mods to eclipse
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!
-
Adding inventory slot tooltips
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; } }
-
[1.5.1] Out of memory error
I tried that, it didn't work
- Scala
-
[1.5.1] Out of memory error
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
-
setBlockWithMetadata and setBlockNotify replacement?
I believe they are still in there. And may I please see your code? (Pastebin)
-
Minecraft Forge Decompile Error
Try deleting your MCP folder and running the forge install script again. It automatically downloads MCP
-
Mod not load.
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
-
Mod only working in MCP/Eclipse
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 ++?
-
Mod not load.
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.
-
Mod not load.
It looks like there is something messed up in your tool class. May I please see the bbPickaxe and bbBlocks code?
-
Village Generation Help
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
-
Infinite terain and sprite indexes 1.3.2
oops thanks
-
Infinite terain and sprite indexes 1.3.2
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"; } }
-
Configuration file help
Also, the empty capsuel naming is broken and when i try to craft an empty capsuel, i get an exp capsuel. updated code:
-
[Help]Block Drops
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
-
Configuration file help
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
-
Creating a block with infinite terrain files
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
-
Configuration file help
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!
IPS spam blocked by CleanTalk.