Jump to content

Danickar

Members
  • Posts

    31
  • Joined

  • Last visited

Converted

  • Gender
    Undisclosed
  • Personal Text
    I am new!

Danickar's Achievements

Tree Puncher

Tree Puncher (2/8)

-1

Reputation

  1. I can assure you that if an easier way existed he would have suggested that first.
  2. Yes, I know it isn't saving it, I wasn't concerned with this particular version with that part. I meant keeping track so that when one cube is activated it is X and the next cube is O, etc.
  3. My thought behind the Entity itself was a central place to keep track of the game. For TTT, a rather simple game for sure, it is keeping track of whose turn it is, so that clicking on any of the blocks creates the appropriate X or O. I wasn't sure of the best way to get a blocks to find a TileEntity to figure out whose turn it was.
  4. So I just finished a simple mod that creates and plays a game of Tic Tac Toe in the world. The board, made of 9 blocks containing their tile entities is created by using a ttt item. This is my first attempt at something more complicated than a block or item and with code that requires multiple parts talking to each other. I am sure there are better ways to do a lot of what I have done, so I am posting all of the code here for anyone to review and critique. Main file: Block files: Entity: Tile Entity: Item:
  5. Ok. So I finally got my model rendering, using Techne and creating a model that way rather than trying to figure out every vertex and UV point with the addVertexWithUV method. Since it is a circurlar object Techne seemed like the easier way to go (at least with my skill/knowledge level). So, the question now is: I know with the "pure code" approach using the Tessellator approach you can do some things like change lighting values and color without having to have a lot of textures. Is there a way to do this when rendering with a model?
  6. Ok. I got my vehicle to move in the directions I was trying to get it to work. Now, the only problem is, the movement is extremely choppy and "warp" like. I am sure someone here has experienced this and can point me in the right direction to solving this.
  7. Also, along similar lines. I want my player to always face forward in the vehicle. I thought something like: this.riddenByEntity.rotationYaw = this.rotationYaw; in the onUpdate() method of the vehicle would do the trick, however it appears to make no difference at all.
  8. In my custom vehicle I am creating I want to change the character position from a seated (the default) position to one where he is lying down on his stomach, like in a hang glider. My first thought is that this would involved extending RenderPlayer and setting up some custom code in there, perhaps modifying parts of sleeping and rotateplayer. Is this the best way to go? If so, what do I need to register so the player gets my new renderer instead of the default one?
  9. You have both been very helpful, thank you. I think I have a pretty good idea now how to tackle what I was trying to accomplish.
  10. I guess what I am really having a hard time figure out is how the UV numbers are telling the pixel what part of the texture file to render. Since the UV are floats, are they percentages where .5 .5 would represent half the texture file? Or maybe 1/4 of the texture file if it is half of the U(x) direction and half of the V(y) direction so the bottom left 1/4th of the texture file?
  11. At the risk of sounding stupid, can anyone help me understand this method better? I have been searching for opengl tutorials and looking through all sorts of code people have in their renderers trying to figure this out. I know the first 3 arguments it takes are x,y,z coordinates of the given vertex, and that the last 2 are u,v for that vertex. I know, or at least I think I know, that u and v refer to the texture. What I am really unclear on is how exactly the u and v refer to the texture and how that relates to its vertex.
  12. Well, I suppose I meant more feasible than possible. I know most things can be done with the right amount of code. The goal being a slot for a specific item, but one that could be easily accessed by scrolling the mouse wheel, etc.
  13. Is this something that can be done?
  14. I've tried all sorts of combinations of numbers messing with rotateY and rotateX. I can get "close" to what I would be looking for, but no real success. Part of the problem seems to be that the item is completely flat when thrown. Is there a way to give it thickness so that when it is flat like a frisbee you can still see it?
  15. private void func_77026_a(Tessellator par1Tessellator, Icon par2Icon) { float f = par2Icon.getMinU(); float f1 = par2Icon.getMaxU(); float f2 = par2Icon.getMinV(); float f3 = par2Icon.getMaxV(); float f4 = 1.0F; float f5 = 0.5F; float f6 = 0.25F; GL11.glRotatef(180.0F - this.renderManager.playerViewY, 0.0F, 1.0F, 0.0F); GL11.glRotatef(-this.renderManager.playerViewX, 1.0F, 0.0F, 0.0F); par1Tessellator.startDrawingQuads(); par1Tessellator.setNormal(0.0F, 1.0F, 0.0F); par1Tessellator.addVertexWithUV((double)(0.0F - f5), (double)(0.0F - f6), 0.0D, (double)f, (double)f3); par1Tessellator.addVertexWithUV((double)(f4 - f5), (double)(0.0F - f6), 0.0D, (double)f1, (double)f3); par1Tessellator.addVertexWithUV((double)(f4 - f5), (double)(f4 - f6), 0.0D, (double)f1, (double)f2); par1Tessellator.addVertexWithUV((double)(0.0F - f5), (double)(f4 - f6), 0.0D, (double)f, (double)f2); par1Tessellator.draw(); } So, if I take out the 180.0F from the rotateY I was able to get it to go flat. I seem to get the same response if I add 180.0F in front of the rotateX. I am not sure this is the best method or not. I took this render code from the RenderSnowball code.
×
×
  • Create New...

Important Information

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