Jump to content

Mistram

Members
  • Posts

    35
  • Joined

  • Last visited

Everything posted by Mistram

  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. thank you very much to all
  9. 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
  10. 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); }
  11. I used that, just not to find all fields. thank you found my mistake
  12. 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
  13. could i get some more information on how to do that?
  14. 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?
  15. EntityConstruct event
  16. the problem is that that way is hackable
  17. Hey guys, I am triing to make a skilltree. Which means I need an effective way of enabling recipes depending on booleans. Is there a good way of doing that? I could imagine doing GameRegistry.addRecipe when they skill the points, but I am not sure about that
  18. That code is still like 90% obfuscated stuff no1 can read
  19. Perfect, thank you! Still I dont know why it isnt taking the "blocks/bricks", rest is now working fine!
  20. So I made a multitextured block and want to have a texture for the particles when the block breaks, but it seems that I got something wrong with the particles, since they have the" missing texture" texture Also accessing minecraft textures is bugging me quite a bit, since they arent shown correct too Any ideas?
  21. i thinked i can fix it but i can't Dont delete your threads. others can learn from it
  22. I am not sure why u deleted ur old thread and created a new one.
  23. Hello everyone, I got a GUI in which I need to read data from a furnace. So I am delivering the ISidedInventory of the furnace via a container. My Problem right now is that for some reason ISidedInventory.getField(2) is ALWAYS returning 0, even if it should be the cook time of the current item.. Of course I placed coal and iron ore in the furnace to make it burn public class FurnacesGui extends GuiContainer{ private final ResourceLocation background = new ResourceLocation("advancedfurnaces:textures/gui/allfurnaces.png"); private int furnaceSlots; private ISidedInventory[] furnaces; public FurnacesGui(ContainerAllFurnaces container) { super(container); furnaceSlots = container.getAllFurnaceSlots(); furnaces=container.getFurnaces(); } @Override protected void drawGuiContainerBackgroundLayer(float partialTicks, int mouseX, int mouseY) { GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F); mc.renderEngine.bindTexture(background); int k = (this.width - this.xSize) /2 ; int l = (this.height - this.xSize) /2 ; drawTexturedModalRect(k, l, 0, 0, xSize, ySize); int pixelToDraw; for(int i=0; i<furnaceSlots; i++) { pixelToDraw= 22*furnaces[i].getField(2)/furnaces[i].getField(3); System.out.println(furnaces[i].getField(2)); System.out.println(furnaces[i]); drawTexturedModalRect(k+10+20*i, l+10, 206, 0, 16, 60); drawTexturedModalRect(k+11+20*i, l+29, 224, 0, 16, pixelToDraw); } } }
  24. So. Just so I dont get this wrong. The important part is that I queue up the processing of the message to the queue from minecraft minecraft.addScheduledTask(new Runnable() { public void run() { processMessage(worldClient, message); } }); Right?
  25. I just got it. I was reading bits all the time but it says bytes. Still thank you
×
×
  • Create New...

Important Information

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