Jump to content

actsof3000

Members
  • Posts

    15
  • Joined

  • Last visited

Everything posted by actsof3000

  1. That did it! Thank you.
  2. There is no gui to the block as of yet. I'm changing the data on server side from onBlockActivated.
  3. Yes, I do. Even with using the S35PacketUpdateTileEntity, the data is not being save on closing the window. Updated Tile:
  4. I use the SendRecv in for changing the texture of my block.
  5. I'm having troubles with my NBT data being lost when I close the window. I have a packet handler set up for my tile, and it will save the data after exiting and reentering the world, but if I close Minecraft and reopen it, the data is lost. Did I set up the packet handler wrong? I will note the packethandler is being initialized in preInit.
  6. Indeed that seemed to do the trick. Final Code:
  7. I suppose it isn't necessarily a clipping issue if that didn't work. This is the result: http://i1381.photobucket.com/albums/ah231/actsof000/Untitled_zps96c5a5fd.png[/img] Code: After further observation of the screenshots, it seems as though the block is rendered above the overlay texture. Could that be due to it being render in pass 1?
  8. Okay, so i transferred my renders over to an ISBRH. And if i'm not mistaken I deleted all of the GLenable/disable stuff because the ISBRH does that for you. Is there a way to fix the clipping of textures between each other Code: http://i1381.photobucket.com/albums/ah231/actsof000/2014-12-25_164445_zps0cdc85ed.png[/img]
  9. Okay. Well I'm definitely taking this step by step. How do I render the texture on the outside versus the inside of the block like it is doing on the bottom? http://i1381.photobucket.com/albums/ah231/actsof000/2014-12-25_1023431_zps9c6d2afc.png[/img] Code:
  10. Oh okay! So when I get the IIcon I would get the U/V from the texture I wish to display correct? and I would use the U/V Max/Min corresponding to the x,y,z point I am drawing on the block? Okay, how would I go about using both the TESR and the ISRH in the same class? Why does my block not render as a block in my inventory? (sorry for the numerous questions. It seems as connections are made, more are broken haha)
  11. Okay. How do I use the IIcon in the TESR then?
  12. I'm confused on the differences and uses of the TileEntitySpecialRenderer vs the ISimpleRenderingHandler (yes I understand that TESR is a class and ISRH is an interface) I've tried both options for what I wish to do, but I can't seem to find the solution. I want to render a standard block with 3 textures (separate files) overlain on each other on each side. The first texture is completely transparent, the second is a semi-transparent, and the third is one that will switch between icons depending on the block's settings (In, out, or off). I've searched and searched to find a way to use separate files for the textures, and the closest I've gotten is using the default block texture map in the bindtexture for a TileEntitySpecialRenderer. @Override public void renderTileEntityAt(TileEntity tile, double x, double y, double z, float f) { bindTexture(TextureMap.locationBlocksTexture); Tessellator tessellator = Tessellator.instance; GL11.glPushMatrix(); GL11.glTranslated(x,y,z); tessellator.startDrawingQuads(); // tessellator.addVertexWithUV(0, 0, 0, 0, 0); // tessellator.addVertexWithUV(0, 1, 0, 0, 1); // tessellator.addVertexWithUV(1, 1, 0, 1, 1); // tessellator.addVertexWithUV(1, 0, 0, 1, 0); tessellator.addVertexWithUV(0, 0, 0, 0, 0); tessellator.addVertexWithUV(1, 0, 0, 1, 0); tessellator.addVertexWithUV(1, 1, 0, 1, 1); tessellator.addVertexWithUV(0, 1, 0, 0, 1); tessellator.draw(); GL11.glPopMatrix(); } but I'm can't figure out how to point to my textures in that texture map. Current Rendering: http://i1381.photobucket.com/albums/ah231/actsof000/2014-12-24_152702_zpsd7d4e443.png[/img] Here are my textures, the red is the semi-transparent, and the clearer one is the third overlay(Sorry for the crude paint job) http://i1381.photobucket.com/albums/ah231/actsof000/2014-12-24_1527021_zpse7894145.png[/img] Overall, I am simply guessing on what I am doing in this method. If you can suggest a good tutorial, example, explanation, etc please do so.
  13. Well that didn't really help too much. I'm pretty rookie when it comes to rendering. I don't quite understand the difference between using the ISimpleRenderingHandler and the TileEntitySpecialRenderer and when to use them. I'm just trying to render a standard block(1m x 1m x 1m), but overlay my textures and I can't figure out how to complete that with either the RenderBlocks or the Tesselator. Edit: I have to specify, my textures are in separate files. i.e. RedCell_Side.png(semi-transparent) and RedCell_in.png(Overlain texture)
  14. Thank you for the suggestions. Can you point me in the direction of a good tutorial for using the TileEntitySpecialRenderer?
  15. I can't seem to figure out or find a source to know if I can have more than 2 render passes (pass 0 and 1), 0 for opaque textures, 1 for transparent. My goal is to have a semi-transparent texture, and then an overlayed texture that will rotate between states much like Thermal Expansion. If I set the render pass for 2, then the renderer never seems to get there, it stops at 1 which is when I render my semi-Transparent texture, and then it never renders the overlay to that. @Override public IIcon getTexture(int side, int pass) { if(pass == 0) { return IconRegistry.getIcon("Cell_Side_0"); } if(pass == 1) { if(side <= 1) return IconRegistry.getIcon("Cell_Top_Red"); else return IconRegistry.getIcon("Cell_Side_Red"); } if(side < 6){ return IconRegistry.getIcon("Cell_Side_" + this.getSendRecv(side)); } return null; } @Override public boolean canRenderInPass(int pass) { renderPass = pass; return true; } @Override public int getRenderBlockPass() { return renderPass; }
×
×
  • Create New...

Important Information

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