Jump to content

Coder

Members
  • Posts

    94
  • Joined

  • Last visited

Everything posted by Coder

  1. Btw, did it change? I remember getting Boss name in 1.11.2 was much different
  2. is mapBossInfos a thing? can't find it.
  3. I know this sounds a little weird, but I would like to have an event listener for when the boss name in the boss bar on the top of the screen is changed. This is a client-side only mod so I can't do anything with the server to inform the client about a name change. Is it possible that there's a listener for something like this?
  4. I am trying to send a client-side message to the user upon successful connection to any Minecraft server. I am listening to ClientConnectedToServerEvent, when it happens I use player.sendMessage() to send a client-side only message. Unfortunately, I get a null pointer exception when doing so. Can it possibly happen because it sends the message too early?
  5. I am trying to get the number of how many empty inventory slots there are, we are talking about hotbar + regular inventory, without armor and without the second hand. Just all of these: http://prntscr.com/jh0ucf I tried using player.inventory.getFirstEmptyStack() But as you can tell it will tell me if there is any space in the inventory, not how many slots there are empty.
  6. That's what I don't understand here. How can I get the full Lore array modify it and set it back again, without messing around with the "Name" or anything else. As I said, it's inside display and inside Lore, how can I get it using the other stuff you mentioned, from what I see there you enter the nbt comp and an index.
  7. I know, it's fine. I just want to know how to change it for the moment. It would be much easier if I could just target the entry and change it. But looks like it's not possible, thus meaning I need to recreate the nbt compound.
  8. Changing the Lore client side? why not? I just did it.
  9. So I should just recreate it. Alright.
  10. Let's say I get the tag comp from ToolTipEvent.getItemStack().getTagCompound(), then store it inside a variable. Can I change one entry inside that array and push it back to the tag compound?
  11. Yeah I know, I would like this to be client side only for the session only (or to whenever the server changes it).
  12. I would like to change one Lore array entry inside an existing item (Lore set by server, not in my control), so I get the ItemStack and what I would like to do it enter display > Lore > index of my choice, and set it to something else.
  13. Is there a way I can edit the exact entry? Doesn't that mean all other tags will be deleted? Or you can somehow directly go to the Lore taglist
  14. I am getting the nbtcompound from ItemStack, and I would like to edit one entry in the Lore array without needing to recreate everything.. Is editing one entry in the Lore array inside the item NBT possible? Perhaps somehow converting the existing nbt to a variable and changing it that way?
  15. Latest version number, other config parameters etc
  16. Hi guys, I was wondering the other day when would be the best time to load a configuration file (probably in a JSON format) from a web API. PostInit can be an option, but do you think there is another better way?
  17. I am trying to get information about an item entity via listening to EntityJoinWorldEvent. When there is a new item on the ground I get a confirmation in the console, but when I try getting the items data entries I an array of these: net.minecraft.network.datasync.EntityDataManager$DataEntry@79d5182f Can I somehow view what these are? I get these via event.getEntity().getDataManager().getAll()
  18. Can I get this using the EntityJoinWorldEvent? This is what I managed to do so far: @SubscribeEvent public void entityIn(EntityJoinWorldEvent event) { if (event.getEntity() instanceof EntityItem) { System.out.println("New entity item "+event.getEntity()); } } ----- Oh, oops!
  19. Imagine there's an item on the ground right (Entity) I would like to get that items lure (the text people can add to items using command blocks) or just the custom name of the item if you anvil it for example.
  20. I am trying to get the name (custom name that is not the original item name) and the item lure from getDataManager().get when the item spawnes. I need some sort of a key to put inside getDataManager().get but I don't know where can I find all the possible keys.
  21. Hi, Is it possible to get the items NBT information while holding it? (when hovering above items there is a text that says how many tags are there inside the item, but I would like to know what's inside those tags)
  22. Hi, I am trying to make it so the player will be able to see an item's name when the item is on the ground. All I found in the EntityItem class is the getName() but it just gives me the name back, nothing else. Can I somehow iterate though all the item entities there are and enable the Display Name parameter like in the vanilla /entitydata command? Thank you.
×
×
  • Create New...

Important Information

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