Jump to content

timoteo2000

Forge Modder
  • Posts

    30
  • Joined

  • Last visited

Converted

  • Gender
    Male
  • Location
    USA
  • Personal Text
    I am not new!

timoteo2000's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  1. Thank you so much! Another thing I had to do was have EntityPlayer.inventory rather than InventoryPlayer when I called Container and GuiEnhancementTable. Also, I have no clue why I was making sure the world was remote, but before removing that I couldn't remove the items so yeah. Thanks again :3
  2. Sorry to bump, but I still really need to know how to do this. At the time, I have no more information or ideas for a fix for this.
  3. As I said before, I'm not saving any data to the block, it is not an inventory. I already have all the transfer stuff setup for shift clicking and the for loops I had were exactly the same. I am still running into both of my problems. Thank you though, I may need these later.
  4. Hey guys! I was recently working with a block in my mod that opens a GUI when rightclicked. I successfully added 1 slot in the upper part of the GUI (the part that would be special to the block.) After that, I snooped in the enchantment table GUI code and added all the inventory slots. I've encountered 2 problems though: The slots do not display the real inventory items, but it seems I can pick up items and place them back down in a glitchy manner. The slots are offset by 1 row down, causing the hotbar items to be inaccessible and a blank row to exist. I've already looked through the Gits of a few other mods with containers to see if they have anything different than I do in any relevant classes, but to no avail. Here are some links to gits for my mod: BlockEnhancementTable ContainerEnhancementTable GuiHandler GuiEnhancementTable TileEntityEnhancementTable (Currently empty, and it doesn't implement IInventory because this table acts like a crafting bench, dropping items when closed) I know that the place all the inventory slots are added in is the 2 for loops in ContainerEnhancementTable's constructor (the first is for the inventory, the second the hotbar) but this is exactly how it was done in the Enchanting Table's Container class. I also see no other methods in the Enchanting Table's container class that make the items appear. Thanks in advance for the help, and if you need to look at any other classes in the project, everything is available in this repo.
  5. Hello people of the internet! Looking for an LP that's just starting up? Want to help me start up my channel? You can do both of those if you watch this LP! [embed=640,360]http://www.youtube.com/watch?v=PyXkKgliDFU[/embed] It would be very cool that, if you liked this video, and want to see more, that you like, comment and subscribe. I've already got 3 episodes, the first is only 13 minutes, but the other two are 30 minutes. I talk about myself a bit in this video. Watch, and enjoy!
  6. Hello people of the internet! Looking for an LP that's just starting up? Want to help me start up my channel? You can do both of those if you watch this LP! [embed=640,360]http://www.youtube.com/watch?v=PyXkKgliDFU[/embed] It would be very cool that, if you liked this video, and want to see more, that you like, comment and subscribe. I've already got 3 episodes, the first is only 13 minutes, but the other two are 30 minutes. I talk about myself a bit in this video. Watch, and enjoy!
  7. I guess I really didn't think of that >.< Well, don't I still need to tell the client something? Edit: Yay! it finally works! So, I changed the first thing that defined Set<BlockQueue> as queue into a public static rather than void and it all works fine. I right click a block with Fire Powder, and believe it or not, 1/2 a second later the fire that appeared went away! Thanks for all your help diesie, and I hope to release this mod before 1.5 comes out. Now to add the items that Fire Powder crafts into
  8. Here it is: I had to make the first method just public because the void there gave me errors, saying "volatile expected."
  9. Okay, so that all helped. But, the code stopped right at the tick() method. I know this, as I put a println() inside of tick() and one inside of if(ticks == 10) and the one in tick responded but not the one in the if statement. So it doesn't increment the ticks, I guess? Also, I had to change one thing to the thing you wanted me to put in onItemUse. It didn't work, and it threw errors, so I turned it from: YourMod.getTickHandler().addElement(new BlockQueue(world, x, y, z)); to ClientTickHandler.addElement(new BlockQueue(world, x, y, z)); And it didn't throw errors, luckily, but still didn't clear the fire, as it never reached the if statement. So either the Set isn't enumerating the object I gave it or the ticks never increment.
  10. So what method in Set would I use? I thought .add(Object) was right, but you can't store 3 co-ords at one time (x, y, z) only a single one (x) (y) (z). I have a wrapper class, and it's pretty much what you showed me with a different name. package com.lesterhouse.timo; import net.minecraft.world.World; public class BlockQueue { public final World w; public final int x; public final int y; public final int z; private int ticks; public BlockQueue(World w, int x, int y, int z) { this.w = w; this.x = x; this.y = y; this.z = z; } public boolean tick() { ticks++; if (ticks == 10) { //All 80 instances of w.setBlock that mimics the 80 in ItemFirePowder, but with air return true; } else { return false; } } } So I guess all I'm asking is: Where would I implement my new set and how to record the three different set co-ords of the block right clicked, which if the user isn't stupid is right below them.
  11. Thanks for that, but again, how am I supposed to tell it all of the coordinates of the block? Since I have exactly 80 times a block needs to be set to fire, it would be rather annoying to use a Set.add() method for all of them, but I'm assuming that is what I'll have to do. I can't do, say "Set.add(x + 0, y + 1, z + 0)" because it only wants one object, or "Set.add(x + 0); [next line] Set.add(y + 1); [next line] Set.add(z + 0);" because it won't see that as one object. I do know it's probably somewhat irritating dealing with my still-learning intelligence level, and I am sorry for that.
  12. So something like this? public boolean blockWait(Set<Object> s, Object obj){ //s.add methods here return true; if(tickCounter == 0){ tickCounter ++; } if(tickCounter >= 10){ s.clear(); } } This is in ItemFirePowder. Also:
  13. Oh... that makes a lot more sense than what I was thinking of... I thought I could store what all my 30 or so lines said. But after I've stored it, how can I replace all of them with air in 10 ticks? (Also, I do mean 10 ticks, or 1/2 a second.) Edit: Also, how can I store all three co-ords at once? The Set.add() method only likes to have one object.
  14. So how am I supposed to list all my 30 or so fire blocks in the List<> thing?
  15. Okay, you were helpful before, but now you are kind of getting in the way I really just want to know what I would do, not what I can't. I understand how his wouldn't work kinda, but what do you mean only a single use? The item is a single use item.
×
×
  • Create New...

Important Information

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