Jump to content

yesod30

Members
  • Posts

    22
  • Joined

  • Last visited

Everything posted by yesod30

  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. Bump for help!
  3. It's strange, since i actually copied the code from vanilla arrow . Well, it works, so it's ok i suppose
  4. This actually work, ty. Just a question: why without it the arrow was rendered in the wrong position?
  5. Still have the issue, after they hit or after 1 sec they hit they are rendered in the wrong position.
  6. 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);
  7. 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
  8. 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?
  9. 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
  10. 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:
  11. 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?
  12. 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
  13. 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); } }
  14. hmm, that's sound interesting. I will try to see what i can do >.<
  15. 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
  16. I was trying to make some new fluid, a water of every one of the color. I tried to use for statement, to avoid doing 16 class, one for every fluid block. It creates correctly the fluid, with different names and inventory space , but it set the texture always to the first fluid texture. I can't understand why, since it should take different name for every time it creates the block. I also check the png name, and they are correct. General fluid class: http://pastebin.com/Ud5Qz3VC Colored water class: http://pastebin.com/2fv2U1EM
  17. I tried to copypaste the delete the mcmeta file from my texture folder and put the one of the water, changing the name of the file. Now it work . i think the mcmeta file were corrupted. ty anyway for the help >.<
  18. I try to create a custom fluid(a sort of liquid glowstone), and it works all fine, but it doesn't have a texture when I hold it and also when it's in the world. I can't understand what is wrong. Main class: http://pastebin.com/UeXX6A4r LiquidGlowstoneBlock class: http://pastebin.com/9hp1qTuJ
  19. I was trying to make the crafting for a bow i made. It worked fine till yesterday, but now when i place the last items the game crash and i can't find where is the error. This is the main class: http://pastebin.com/yfL2sw3p This is the bow class: http://pastebin.com/PTnvAHC3 Crash report: http://pastebin.com/rXkVbRFn Ty for the help.
×
×
  • Create New...

Important Information

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