Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

MasterEric

Forge Modder
  • Posts

    15
  • Joined

  • Last visited

Converted

  • Gender
    Male
  • Location
    Minecraftia
  • Personal Text
    I like sour cream and onion chips.

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

MasterEric's Achievements

Tree Puncher

Tree Puncher (2/8)

1

Reputation

  1. I have been attempting to login to #minecraftforge on Espernet to get help from other users, but I am unable to send messages to the channel. I have searched throughout these forums for the reason why, but could not determine the problem. I found this post: I AM registered on Espernet, as EliteMasterEric (15 characters), and I am using mIRC, a standalone Windows IRC client. Here is screenshot proof of the above, displaying my username, that I am currently identified, that I am running mIRC, and that I cannot send to the channel for an unspecified reason. http://i.imgur.com/z7s8jwD.png
  2. Oh yeah, they do! I went into the code(BC is open source), and it uses this GuiAdvancedSlot stuff. I'm going to try to explain it: This appears to be the important part: protected void mouseClicked(int i, int j, int k) { super.mouseClicked(i, j, k); int cornerX = (width - xSize) / 2; int cornerY = (height - ySize) / 2; int position = getSlotAtLocation(i - cornerX, j - cornerY); IInventorySlot slot = null; if (position != -1) { slot = (IInventorySlot) slots[position]; } if (slot != null) { ItemStack playerStack = mc.thePlayer.inventory.getItemStack(); ItemStack newStack; if (playerStack != null) { newStack = playerStack.copy(); newStack.stackSize = 1; } else { newStack = null; } filterInventory.setInventorySlotContents(position, newStack); if (CoreProxy.proxy.isRenderWorld(filterInventory.worldObj)) { PacketSlotChange packet = new PacketSlotChange(PacketIds.EMERALD_PIPE_SELECT, filterInventory.xCoord, filterInventory.yCoord, filterInventory.zCoord, position, newStack); CoreProxy.proxy.sendToServer(packet.getPacket()); } } } When the mouse is clicked in the GUI, it gets the slot at the location that was clicked(int i and int j seem to be the x and y of where they clicked). cornerX and cornerY I think are a thing to determine where the window is so it can know where it's clicked. Once it gets the slot where it's clicked, it checks if the slot number is not -1(I think that's the number that's returned if there's no slot where they clicked). If it isn't -1. it creates a new "slot" and sets it to the slot that was clicked. Then it gets the player's held item stack when they clicked, creates a copy of it, sets the stack size to one, and puts it in at the location. The IInventorySlot is in the buildcraft.core.gui.GuiAdvancedInterface class; it extends the AdvancedSlot class. That class has this method: public ItemStack getItemStack() { return null; } This means that when the player tries to click and access the slot, it gives them nothing. If you want to look at this code in more detail, check out Buildcraft's source code.
  3. I want to make a "ghost" slot for my inventory. By ghost, think about Applied Energistics Level Emitters. When you place an item in, instead of placing the item in the slot, it creates a copy of it, that you can't take out or use. Does anyone know how to do this? Is there an open source mod that does it so I can see how it works?
  4. could someBody please help me with this? i need it for the team fortress 2 mod's armor code i need to be able to make the pyro's armor only activate it's fire protection when all foUr parts are equipped. could soMebody Please tell me how to do it?
  5. I am wondering how to use ISpecialArmor. Can you have an effect activate only when all four of an armor set are equipped? Is there a list of effects? Could someone make a tutorial to make it easier for me and everyone else to use it?
  6. Thanks for the help on this subject! MARKED AS SOLVED
  7. That doesn't sound like it would work. Mostly because there are multiple fields, as you can see in the attached image. However, if I knew where say Minecraft Forge's .info file was I could look at it and use it as a template.
  8. I noticed that a new button(the mods one) has been added. The description thing seems very cool, and a great feature to the API. However, I have a question: How do I add info for myself? At default it says "No mod information found, Ask your mod author to provide a mod .info file". How do I create said .info file?
×
×
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.