Jump to content

Mistram

Members
  • Posts

    35
  • Joined

  • Last visited

Converted

  • Gender
    Undisclosed

Mistram's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  1. Reading the docs helps a lot.. How can I work around that?
  2. I guess I will be using JEI then, since it supports 1.8.9. Another problem I stumpled upon was adding the information to the itemstacks nbt. I am triing to add 10 charges to each blaze rod that get depleted when doing stuff. The problem is that the TagCompound is null the next tick, even if I set it in my code (This is running inside a ServerTickHandler) ArrayList<EntityPlayer> player = Helper.getAllPlayer(); for (EntityPlayer entityPlayer : player) { for (ItemStack itemStack : entityPlayer.openContainer.inventoryItemStacks) { if(itemStack==null) continue; if(itemStack.getItem() ==Items.blaze_rod) { NBTTagCompound compound = itemStack.getTagCompound(); if(compound==null) { compound = new NBTTagCompound(); itemStack.setTagCompound(compound); } if(!compound.hasKey("charges")) { System.out.println("setting compound"); compound.setLong("charges", 10); } } } }
  3. wait. not enough items does NOT support minecraft 1.8.9?
  4. I added the dev version of CodeChickenCore and NotEnoughItems and its throwing a ClassNotFoundException at me.. Any ideas..?
  5. Is there a way to add a subtext for vanilla itemstacks, depending on some data written in the nbt stack? So lets say you could infuse a blaze rod with some stuff (written in the nbt) and then you would have the tooltip "This item has 4 infusions left"?
  6. not possible without serious hacking. we already had this topic once here. why do you need a stack size bigger then 64?
  7. I feel like this is not the forum to report problems with ForgeEssentials, since it is not ur creation
  8. U sure? bc i wanted my backpacks to store specific items on pickup, which means that i need to check every time a player picks an item up if there is space in the backpack. which means a lot of nbt reading. rip processor
  9. Hey guys, I started creating my own backpack and stumpled upon a problem. I created the Inventory for it (not posting all methods because unnecessary) Now I wonder. I can save and read it from nbt. Do I need to create the inventory from the nbt every time I want to access it, and save it after I created it? If not where do I store it? Since I cant store it in the item class im confused.. public class InventoryBackpack implements IInventory{ public static InventoryBackpack readFromNBT(NBTTagCompound compound) { InventoryBackpack backpack = new InventoryBackpack(); NBTTagList list = compound.getTagList(LIST_TAG, 10); if(list!=null) { for( byte b=0; b<list.tagCount(); b++) { NBTTagCompound comp = (NBTTagCompound) list.get(b); backpack.setInventorySlotContents(comp.getByte("id"), ItemStack.loadItemStackFromNBT(comp)); } } return backpack; } private static final String LIST_TAG="BACKPACK_TAG"; private ItemStack[] items; public void writeToNBT(NBTTagCompound compound) { NBTTagList tag = new NBTTagList(); for (byte b = 0; b < items.length; b++) { if(items[b]==null) continue; NBTTagCompound comp = new NBTTagCompound(); comp.setByte("id", b); items[b].writeToNBT(comp); tag.appendTag(comp); } compound.setTag(LIST_TAG, tag); }
  10. I used that, just not to find all fields. thank you found my mistake
  11. the mcpbot seems to let me down.. I get this from the mcpbot [16:15] -MCPBot_Reborn- === MC 1.8: net/minecraft/entity/projectile/EntityArrow.yTile (ahj.e) UNLOCKED === [16:15] -MCPBot_Reborn- Name : e => field_145792_e => yTile But I know that this cant be correct , bc 1. I get a NoSuchFieldException 2. I used this code snippet to find all fields Field[] fields = EntityArrow.class.getFields(); for (Field field : fields) { System.out.println(field.getName()); } And the output is this
  12. could i get some more information on how to do that?
  13. Hey guys, I am triing to use a technique I read here not long ago. My problem is that I am unable to find the obfuscated field names for xTile, yTile, and zTile for the EntityArrow class.. is there any good way of finding these?
×
×
  • Create New...

Important Information

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