
mrkirby153
Members-
Posts
186 -
Joined
-
Last visited
Everything posted by mrkirby153
-
[1.6.2] Player Not Taking Fall Damage Properly
mrkirby153 replied to ItsTheRuski's topic in Modder Support
Might be a de-sync from client and server. Remember that the server has priority on what a client does. -
AppliedOne, If you want a sample for a build.xml and a build.properties, you might want to try taking a look at [ur=https://github.com/pahimar/Equivalent-Exchange-3]Pahimar's Code[/url]
-
[solved]Forge in Eclipse not working properly
mrkirby153 replied to vdvman1's topic in Modder Support
What are your entries for Run->Run Configuration->Classpath? -
Try adding this method to your item class.
-
No offence Kakarotvg but that build.xml you provided is a little confusing to understand. You might want to look at this (mine) or this (pahimar's) AppliedOne Edit: It also doesn't clue in to anything about jarsigning and fingerprinting while pahimar's does. (I based my build.xml off of his)
-
Here's an idea: Go Learn Scala
-
Read the javadoc. Any good API ought to come with one.
-
As I can see??!?? See What?? There's no link to code or anything
-
IIRC if you are using eclipse kepler, you can use the "Git repo Explorer" to clone in your project from github. There, you can add the .claspath and .project to your repo and all they have to do when cloning in the repo is click "Import Project after clone"
-
Hey, After spending two hours in an Ubuntu Virtual Machine, alas! I have come up with nothing! Here's something i just thought of: Remove your source code and run updatemd5.sh and then put your source back in and try again.
-
Ok. I'll have a look at the problem you are having. I'll let you know if I do or do not find anything.
-
Did you at least try what I suggested?
-
There's probably a problem with the md5. Try backing up your code, re installing forge, put your code back in, and run recompile.sh and reobfuscate_srg.sh
-
Yes, I do have a language file and item names (i think) This might be helpful: https://github.com/mrkirby153/MscHouses
-
Sure package mrkirby153.MscHouses.block.Container; import mrkirby153.MscHouses.block.tileEntity.TileEntityHouseGen; 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; import net.minecraft.item.crafting.FurnaceRecipes; import net.minecraft.tileentity.TileEntityFurnace; /** * * Msc Houses * * ContainerBlockBase * * @author mrkirby153 * @license Lesser GNU Public License v3 (http://www.gnu.org/licenses/lgpl.html) */ public class ContainerHouseGenerator extends Container{ public ContainerHouseGenerator(InventoryPlayer inventoryPlayer, TileEntityHouseGen block_base) { // Add the Moduel slot to the base this.addSlotToContainer(new Slot(block_base, 0, 81, 18)); //Add the material modifyer to the block base this.addSlotToContainer(new Slot(block_base, 2, 81, 40)); // Add the fuel slot to the Block Base this.addSlotToContainer(new Slot(block_base, 1, 81, 63)); // 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; } @Override public ItemStack transferStackInSlot(EntityPlayer par1EntityPlayer, int par2) { ItemStack itemstack = null; Slot slot = (Slot)this.inventorySlots.get(par2); if (slot != null && slot.getHasStack()) { ItemStack itemstack1 = slot.getStack(); itemstack = itemstack1.copy(); if (par2 == 2) { if (!this.mergeItemStack(itemstack1, 3, 39, true)) { return null; } slot.onSlotChange(itemstack1, itemstack); } else if (par2 != 1 && par2 != 0) { if (FurnaceRecipes.smelting().getSmeltingResult(itemstack1) != null) { if (!this.mergeItemStack(itemstack1, 0, 1, false)) { return null; } } else if (TileEntityFurnace.isItemFuel(itemstack1)) { if (!this.mergeItemStack(itemstack1, 1, 2, false)) { return null; } } else if (par2 >= 3 && par2 < 30) { if (!this.mergeItemStack(itemstack1, 30, 39, false)) { return null; } } else if (par2 >= 30 && par2 < 39 && !this.mergeItemStack(itemstack1, 3, 30, false)) { return null; } } else if (!this.mergeItemStack(itemstack1, 3, 39, false)) { return null; } if (itemstack1.stackSize == 0) { slot.putStack((ItemStack)null); } else { slot.onSlotChanged(); } if (itemstack1.stackSize == itemstack.stackSize) { return null; } slot.onPickupFromSlot(par1EntityPlayer, itemstack1); } return itemstack; } }
-
Ok, that fixed it but if moved my container slots to the top left instead of center https://www.dropbox.com/s/3g782qkxl2nfxg2/2013-09-22_16.53.03.png
-
Hello, Lately I've been trying to localize my mod. However, my Items/Blocks aren't translating correctly. They are getting set as the value Strings.ITEM_NAME instead of the localized name. Strings.ITEM_NAME is equal to itemName and the item name is being set to itemName even though it's going through StatCollector.translateToLocal(Strings.ITEM_NAME). (Sorry, a bit confusing)
-
Hello, When I click on a button on my GUI, it runs the actionPreformed method 5 times. Why? package mrkirby153.MscHouses.block.GUI; import mrkirby153.MscHouses.block.Container.ContainerHouseGenerator; import mrkirby153.MscHouses.block.tileEntity.TileEntityHouseGen; import mrkirby153.MscHouses.lib.ResourceFile; import mrkirby153.MscHouses.lib.Strings; import net.minecraft.client.gui.GuiButton; import net.minecraft.client.gui.GuiScreen; import net.minecraft.client.gui.inventory.GuiContainer; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.util.StatCollector; import org.lwjgl.opengl.GL11; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; /** * * Msc Houses * * GuiBlockBase * * @author mrkirby153 * @license Lesser GNU Public License v3 (http://www.gnu.org/licenses/lgpl.html) */ @SideOnly(Side.CLIENT) public class GuiHouseGenerator extends GuiContainer{ private GuiButton generate; public GuiHouseGenerator (InventoryPlayer inventoryPlayer, TileEntityHouseGen tileEntity) { //the container is instanciated and passed to the superclass for handling super(new ContainerHouseGenerator(inventoryPlayer, tileEntity)); this.ySize = 176; this.xSize = 176; } @Override protected void drawGuiContainerForegroundLayer(int param1, int param2) { //draw text and stuff here //the parameters for drawString are: string, x, y, color fontRenderer.drawString(StatCollector.translateToLocal(Strings.RESOURCE_PREFIX+Strings.TILE_HOUSE_GEN), 8, 6, 4210752); //draws "Inventory" or your regional equivalent fontRenderer.drawString(StatCollector.translateToLocal("container.inventory"), 8, ySize - 96 + 2, 4210752); this.buttonList.add(generate = new GuiButton(0, this.width /2 + 20, this.height /2 - 65, 60, 20, "Generate")); } @Override protected void actionPerformed(GuiButton button) { if(button.id==0){ this.mc.displayGuiScreen((GuiScreen)null); } } @Override protected void drawGuiContainerBackgroundLayer(float par1, int par2, int par3) { //draw your Gui here, only thing you need to change is the path GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); this.mc.getTextureManager().bindTexture(ResourceFile.houseGen_Img); int x = (width - xSize) / 2; int y = (height - ySize) / 2; this.drawTexturedModalRect(x, y, 0, 0, xSize, ySize); } }
-
Like the Buildcraft's "fake items" that show that an items in a stack but it isn't
-
How would I get the coordinate
-
Hey, How would I center a GUI button on my GUI?
-
Hey, Can anyone explain to me how to register a ghost item with a custom tooltip EX: Coal with a tooltip "Fuel" Thanks
-
Hey, I have an open source mod and I want to create a fingerprint for it. Can anyone direct me to a good tutorial for this?
-
The Scala Path error is (I think) normal. I've been getting the same error for a while and I can re/decompile, reobfuscate, ect. without a hitch. Also, I have been unable to reproduce this bug. I followed your steps exactly and cannot reproduce the error.