Jump to content

redstonedude

Members
  • Posts

    40
  • Joined

  • Last visited

Converted

  • Gender
    Undisclosed
  • Location
    Infront of the place behind me
  • Personal Text
    Redstone

redstonedude's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  1. There is a problem with setTextureOffset i think, reguardless of what values i pass it it displays the same texture, code: DeskItem1.setTextureSize( tile.inventory[1].getItem().getIconIndex(tile.inventory[1]).getIconWidth()*4, tile.inventory[1].getItem().getIconIndex(tile.inventory[1]).getIconHeight()+1); DeskItem1.setTextureOffset( (int) tile.inventory[1].getItem().getIconIndex(tile.inventory[1]).getMinU()*16, (int) tile.inventory[1].getItem().getIconIndex(tile.inventory[1]).getMinV()*16); DeskItem1.render(f); ive tried changing the numbers at the end, i even changed it to +500 yet it displayed exctly the same thing
  2. the contructor ItemStack is not visible
  3. thank you, didn't know i needed an instance
  4. I've made a method which requires 5 items to be given to it as parameters however sometimes i need to pass gravel to it, I've looked in Block, Item, and ItemBlock and i can't find any way to do this, is there a way to get an item instance of a block or allow either a Block or Item to be given to a function (Like forge does with registering recipes)?
  5. IDK what im doing wrong but it's not showing for me (btw i used TextureManager.class because there was only .class or .this)
  6. getResorceLocation doesnt exist just getResource and getResourceAsStream both of whch require a string not an integer, also how would i do the U/V coordinates thing? would i do part.setTextureOffset(Item.getSpriteNumber(),Item.getSpriteNumber());
  7. Hi, I need to get the iconString of an item but i notice the field is protected, is there any way to get the iconString of the item? (I think i need to get the iconString at least, i want to be able to get the texture of an item to use it as part of a model, i know how to do this by binding different textures but i need to be able to get the string to get the resourcelocation unless there is some other way which allows me to get the resource location, also if someone could tell me which class gets the resource location from an item(like a hotbar rendering class) that would be good so i can see how to do it)
  8. would i do something like this (pseudocode): TextureManager.bindTexture(BlockSand.getTextureFile()); partThatLooksLikeSand.setXTextureOffset(BlockSand.getXTectureOffset()); partThatLooksLikeSand.setYTextureOffset(BlockSand.getYTectureOffset()); partThatLooksLikeSand.render(); TextureManager.bindTexture(BlockGravel.getTextureFile()); partThatLooksLikeGravel.setXTextureOffset(BlockGravel.getXTectureOffset()); partThatLooksLikeGravel.setYTextureOffset(BlockGravel.getYTectureOffset()); partThatLooksLikeGravel.render(); TextureManager.bindTexture("textures/tileEntity/genericName"); restOfModel.render()
  9. i'd suggest creating a sapling block, then catch when a randomblockupdate happens and do some algorithms to spawn a tree-like structure
  10. Hi, basically i have a model with 2 parts to it, one part renders always the same from a texture file but i want one of the boxes to take on the texture of a block in the game (based on some values in the tileentity that the model renders from), is there any way to make one of the boxes use a different texture file and have the correct x and y offsets or is it impossible?
  11. just noticed, GL_Rotate doesn't exist, i presume you mean glRotatef?
  12. okay, will add that now, also thansk for the reminder about the matrix i was getting stack overflows cos i didn't pop it. also i know this is a bit off-topic but can you please explain pushing and popping matrixes to me quickly; i use pre-made rendering code and techne for all my modelling however i'm starting to understand how to manipulate it 'manually' quite well, my current understanding is pushing and popping matrixes is like creating and deleting variables, am I right?
  13. that goes in the renderer class i presume?
  14. Hi, I've made a block with a TileEntity and given the TileEntity a model so that i can get a block that's not got fixed 1x1x1 dimensions, however is there an easy way to rotate the model around the 4 directions (N,E,S,W) easily? Ive made the model in Techne but some of the boxes are at angles and some rotate so it would be possible to just use .setRotationAngle on the boxes but i woudl require some complex trigonomety to rotate and translate the boxes which in turn would take up lots of cpu and lag the game probably, is there a parameter in any other function like .render that i can use to rotate the model?
×
×
  • Create New...

Important Information

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