Jump to content
Search In
  • More options...
Find results that contain...
Find results in...


  • Posts

  • Joined

  • Last visited


  • Gender
  • Personal Text
    I am new!

yesod30's Achievements

Tree Puncher

Tree Puncher (2/8)



  1. I don't think someone will give you the code. Just explain what are the error/problems you have, like the others said
  2. It's strange, since i actually copied the code from vanilla arrow . Well, it works, so it's ok i suppose
  3. This actually work, ty. Just a question: why without it the arrow was rendered in the wrong position?
  4. Still have the issue, after they hit or after 1 sec they hit they are rendered in the wrong position.
  5. Hi all, i have a problem with rendering a custom arrow entity. If i shoot it 6 block or near the block i aim, the arrow is rendered in the wrong position. In the spoiler i put two image to explain myself better. EntityArrow Class: http://pastebin.com/wNX8imZy RenderEntityArrow Class: http://pastebin.com/Sp0yL7qF i registered the entity with: EntityRegistry.registerGlobalEntityID(EntityExplosiveArrow.class, "explosiveArrow", EntityRegistry.findGlobalUniqueEntityId()); EntityRegistry.registerModEntity(EntityExplosiveArrow.class, "explosiveArrow", 1, Yesodmod.instance, 100, 50, true);
  6. I try to understand what can be the problem, but i can't understand the cause. I think i'll put my code in a try catch code and see if it works anyway, at least till someone tell me what is the cause EDIT: I think it has something about the vertex. Since when you put block on all faces it has no face to render, the rawBuffer it's 0, since it has no vertex to "analyze". Still I don't know how to fix it
  7. Ok so this actually works, thanks a lot. I still have the IllegalArgumentException crash when i put blocks around all the 6 faces. Any idea of why it crash?
  8. Yes and no. I watched here http://greyminecraftcoder.blogspot.it/2013/08/the-tessellator.html to have an idea of how to work with tassellator. I watched the code for renderStandardBlock, and it has a color multiplier in it. In fact if i place it in a standard superflat world, the texture become green-ish, and after placing a block near it become normal again. Maybe it's that? The strangest thing it's that the texture become darker only if you place a block at the west or north, other face are ok
  9. Tried and nope, still texture is darker when i place a block on WEST or NORTH direction. I have also a crash when i surround it with block, but the crash report refer to vanilla code . Maybe it's that that is causing my "bug"? Crash Report:
  10. Hi all, i'm here again . I did a custom rendering for a block ( a "smaller" lava block inside glass). The face are renderer correctly except for the light level. when i place a block on one of two particular face the lava texture become darker. I tried to set the light level of the block at the max, but doing this it always give the darker texture. in the spoiler i put some image. And these are my block and render class: Block: http://pastebin.com/btwt8xaC Render : http://pastebin.com/DqUTc5ZX Any idea?
  11. I understand what you are suggesting, and i think i'll go for that way. Just for curiosity, i'll try ti explain my code so maybe you can help me figure out what's wrong. It takes the starting coordinate block and the last coordinate block( two angles of a cuboid), and it scans all the block i sode the area with the for loop, it take the di of the block in the coordinate given by the loop, and store it inside the array and set the block to air. The "error" is present only when i use the list to store the array
  12. So i actually try, and i understand how to simulate a 3D array. I just have a problem: The array inserted in the list it's always the same. If i print the single array it actually works, but when it's put in the list It's just the same array repeated. This is the code of the method. Any clue? private void storeBlock(ItemStack itemStack, World world) { if (itemStack.stackTagCompound.hasKey("FirstBlock") && itemStack.stackTagCompound.hasKey("LastBlock")) { //acquisizione coordinate NBTTagList firstPositionTagList = (NBTTagList)itemStack.stackTagCompound.getTag("FirstBlock"); NBTTagList lastPositionTagList = (NBTTagList)itemStack.stackTagCompound.getTag("LastBlock"); NBTTagCompound firstPositionTag = (NBTTagCompound) firstPositionTagList.getCompoundTagAt(0); NBTTagCompound lastPositionTag = (NBTTagCompound) lastPositionTagList.getCompoundTagAt(0); int firstX = firstPositionTag.getInteger("xFirstBlock"); int firstY = firstPositionTag.getInteger("yFirstBlock"); int firstZ = firstPositionTag.getInteger("zFirstBlock"); int lastX = lastPositionTag.getInteger("xLastBlock"); int lastY = lastPositionTag.getInteger("yLastBlock"); int lastZ = lastPositionTag.getInteger("zLastBlock"); //controllo di quale è maggiore e quale minore int diffX = lastX - firstX; int diffY = lastY - firstY; int diffZ = lastZ - firstZ; if (firstX > lastX) { diffX = firstX - lastX; int tmp = firstX; firstX = lastX; lastX = tmp; } if (firstY > lastY) { diffY = firstY - lastY; int tmp = firstY; firstY = lastY; lastY = tmp; } if (firstZ > lastZ) { diffZ = firstZ - lastZ; int tmp = firstZ; firstZ = lastZ; lastZ = tmp; } //acquisizione blocchi int [] xArrayBlock = new int[(diffX + 1)]; NBTTagList zLayerList = new NBTTagList(); NBTTagCompound zLayer = new NBTTagCompound(); NBTTagList xLayerList = new NBTTagList(); NBTTagCompound xLayer = new NBTTagCompound(); // Just for reference // NBTTagList positionTagList = (NBTTagList)itemStack.stackTagCompound.getTag(block); // NBTTagCompound positionTag = new NBTTagCompound(); // // positionTag.setInteger("x" + block, xBlockPos); // positionTag.setInteger("y" + block, yBlockPos); // positionTag.setInteger("z" + block, zBlockPos); // positionTagList.appendTag(positionTag); for (int i = firstY; i <= lastY; i++) { for (int j = firstZ; j <= lastZ ; j++) { // for (int l = 0 ; l < xArrayBlock.length ; l++) // { for (int k = firstX , l = 0 ; k <= lastX; k++, l++) { xArrayBlock[l] = Block.getIdFromBlock(world.getBlock(k, i, j)); //world.setBlockToAir(k, i, j); } xLayer.setIntArray("xLayer" + j, xArrayBlock); xLayerList.appendTag(xLayer); // } //zLayer.setTag("zLayer", xLayerList); //zLayerList.appendTag(zLayer); } } if (!world.isRemote) System.out.println(xLayerList); itemStack.stackTagCompound.setIntArray("blockArray", xArrayBlock ); itemStack.stackTagCompound.setBoolean("blockStored", true); } }
  13. hmm, that's sound interesting. I will try to see what i can do >.<
  14. i'm trying to have an item that can "store" an area, selected by the player, and than place the block in another place choosed by the player. I already have the code to store block, but i need an help for the placing part. I wanted to use a tri-dimensional array, but it seems that nbt can store only normal array. So, there is actually a way to store a tri-dimensinal array, or i need to store more information(like the dimension of the selected cuboid) in the nbt? Item class: http://pastebin.com/PdCywmtN
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.