Jump to content

webik150

Forge Modder
  • Posts

    17
  • Joined

  • Last visited

Converted

  • Gender
    Male
  • Personal Text
    I'm a modder too!

webik150's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  1. Um.. I feel really stupid now. I spend whole day looking into your code, and trying stuff out, and I think that I will probably try to find a way of storing in temporary BlockContainer in WorldStorage
  2. Hey, I'm currently re-engineering your AbstractInventory class and there's one thing that doesn't work for me. The method getStackInSlot() returns JavaUtils.get(), but my JavaUtils doesn't have get(). Any way to fix this? EDIT: Also the NBT.asList doesn't exist. (In Inventories)
  3. Thanks, it's late here so I'll look into it in tomorrow (after school).
  4. Hey. I'm trying to create an Item that can hold other items. Right now I'm using MrrGingerNinja's Inventory tutorial, however, every tutorial I've found is using block and tileentity for the container. How can I save an inventory without a tileentity?
  5. Oh! That's great! Thanks a lot
  6. Hey I want to ask how can I store contents of custom container per player. I'm currently going through coolAlias's IExtendedEntityProperties tutorial, but as far as I know, NBT allows only storage of int, string, ect... Should I rather use WorldData and a Map? I'm already using it to store coordiantes.
  7. Ok. Managed to make it work. Locking and Thanks!
  8. Ok so I've got a problem. How can I render my texture OVER the button? Whatever I tried rendered the texture below the button so I couldn't see it.
  9. Hey! I finally managed to create and understand a GUI. Currently I'm trying to create buttons for it. I would really like to have custom ones. That means button with custom background/icon or an clickable item. Currently I'm thinking of achieving the first one by rendering another texture over the button and changing it on mousePressed, however that isn't doable with the item if it has transparency. Is there some easier way to do it?
  10. Yeah, I've noticed that in the morning. Just forgot to lock this.
  11. Hey, It's me again and I have another question about storing things. Since my generated structure is spawned rarely, I want to make a command that will print out known locations of the structure. I figured out I have to save the coordinates when generating the structure. I think the MapStorage would be best to use, but I can't figure out how it works. These are my classes: Data I'm Saving Part of the code where I edit the data and the save it: My processCommand method: And This is the error I get (It crashes always when the structure should be generated):
  12. Black's way is working perfectly. Thank you to you. Also here's the code if anyone wants: @SubscribeEvent public void OnRightClick(PlayerInteractEvent event){ if (!event.world.isRemote) { if (event.action == PlayerInteractEvent.Action.RIGHT_CLICK_BLOCK) { if (event.world.getBlock(event.x, event.y, event.z) == CollectiblesBlocks.collectionBookshelf) { if (!(event.entityPlayer.getEntityData().hasKey("GOTBOOKON.X."+event.x)&&event.entityPlayer.getEntityData().hasKey("GOTBOOKON.Y."+event.y)&&event.entityPlayer.getEntityData().hasKey("GOTBOOKON.Z."+event.z))) event.entityPlayer.inventory.addItemStackToInventory(new ItemStack(CollectiblesItems.collectionBook, 1)); event.entityPlayer.getEntityData().setBoolean("GOTBOOKON.X."+event.x,true); event.entityPlayer.getEntityData().setBoolean("GOTBOOKON.Y."+event.y,true); event.entityPlayer.getEntityData().setBoolean("GOTBOOKON.Z."+event.z,true); } } } }
  13. Thank you both. I will probably try Black's method because it might be easier (Well we'll see).
  14. Hey. I'm trying to make a block on which a player can right-click, but only once (every player can do it once). Is there any better way to do it that store the UUIDs in NBT? The idea is there are 5 structures generated on random places, every one of them has a special block. A player comes, clicks on the block and gets a special item. Now, he cannot click on the block again. If he wants to get the special item again, he has to find some of the other four structures. Currently I have a TileEntity: I'm using the PlayerInteractEvent in my EventHandler to detect right-clicks. I can also post here my Block class and EventHandler if you want. Any suggestions? Also sorry for any errors in my English.
  15. I guess I should not expect any help from anyone.
×
×
  • Create New...

Important Information

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