
Mistram
Members-
Posts
35 -
Joined
-
Last visited
Everything posted by Mistram
-
Reading the docs helps a lot.. How can I work around that?
-
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); } } } }
-
wait. not enough items does NOT support minecraft 1.8.9?
-
I added the dev version of CodeChickenCore and NotEnoughItems and its throwing a ClassNotFoundException at me.. Any ideas..?
-
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"?
-
not possible without serious hacking. we already had this topic once here. why do you need a stack size bigger then 64?
-
thank you very much to all
-
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
-
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); }
-
I used that, just not to find all fields. thank you found my mistake
-
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
-
could i get some more information on how to do that?
-
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?
-
EntityConstruct event
-
the problem is that that way is hackable
-
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
-
[SOLVED][1.7.10]Custom Tree wont spawn from custom sapling
Mistram replied to AOSPLolipop's topic in Modder Support
That code is still like 90% obfuscated stuff no1 can read -
[1.8] Problems with breaking particles of multitextured blocks
Mistram replied to Mistram's topic in Modder Support
Perfect, thank you! Still I dont know why it isnt taking the "blocks/bricks", rest is now working fine! -
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?
-
[1.7.10] My custom furnace doesn't save item when i restar minecraft
Mistram replied to TheTroop's topic in Modder Support
i thinked i can fix it but i can't Dont delete your threads. others can learn from it -
[1.7.10] My custom furnace doesn't save item when i restar minecraft
Mistram replied to TheTroop's topic in Modder Support
I am not sure why u deleted ur old thread and created a new one. -
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); } } }
-
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?
-
I just got it. I was reading bits all the time but it says bytes. Still thank you