Jump to content

COM8

Members
  • Posts

    7
  • Joined

  • Last visited

Converted

  • Gender
    Undisclosed
  • Personal Text
    No!

COM8's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  1. Thanks for the fast reply! I tried to disable it but nothing changes GlStateManager.pushMatrix(); GL11.glDisable(GL11.GL_LIGHTING); Tessellator tessellator = Tessellator.getInstance(); VertexBuffer vertexbuffer = tessellator.getBuffer(); vertexbuffer.begin(7, DefaultVertexFormats.POSITION_TEX); vertexbuffer.pos((double)(xCoord + 0.0F), (double)(yCoord + (float)maxV), 0).tex((double)((float)(minU + 0) * 0.00390625F), (double)((float)(minV + maxV) * 0.00390625F)).endVertex(); vertexbuffer.pos((double)(xCoord + (float)maxU), (double)(yCoord + (float)maxV), 0).tex((double)((float)(minU + maxU) * 0.00390625F), (double)((float)(minV + maxV) * 0.00390625F)).endVertex(); vertexbuffer.pos((double)(xCoord + (float)maxU), (double)(yCoord + 0.0F), 0).tex((double)((float)(minU + maxU) * 0.00390625F), (double)((float)(minV + 0) * 0.00390625F)).endVertex(); vertexbuffer.pos((double)(xCoord + 0.0F), (double)(yCoord + 0.0F), 0).tex((double)((float)(minU + 0) * 0.00390625F), (double)((float)(minV + 0) * 0.00390625F)).endVertex(); tessellator.draw(); GlStateManager.popMatrix();
  2. Hi, I'm trying to render a texture in a gui. I'm using the following method and everything renders just fine, but the texture is really dark. The lighting is not correct. Is there a way to fix this? Tessellator tessellator = Tessellator.getInstance(); VertexBuffer vertexbuffer = tessellator.getBuffer(); vertexbuffer.begin(7, DefaultVertexFormats.POSITION_TEX); vertexbuffer.pos((double)(xCoord + 0.0F), (double)(yCoord + (float)maxV), 0).tex((double)((float)(minU + 0) * 0.00390625F), (double)((float)(minV + maxV) * 0.00390625F)).endVertex(); vertexbuffer.pos((double)(xCoord + (float)maxU), (double)(yCoord + (float)maxV), 0).tex((double)((float)(minU + maxU) * 0.00390625F), (double)((float)(minV + maxV) * 0.00390625F)).endVertex(); vertexbuffer.pos((double)(xCoord + (float)maxU), (double)(yCoord + 0.0F), 0).tex((double)((float)(minU + maxU) * 0.00390625F), (double)((float)(minV + 0) * 0.00390625F)).endVertex(); vertexbuffer.pos((double)(xCoord + 0.0F), (double)(yCoord + 0.0F), 0).tex((double)((float)(minU + 0) * 0.00390625F), (double)((float)(minV + 0) * 0.00390625F)).endVertex(); tessellator.draw(); Any help / information is appreciated.
  3. I'm not really understanding why in the class "BlockFurnace", in the method "public static void setState(boolean active, World worldIn, BlockPos pos)" the method "worldIn.setBlockState(...)" is called twice. if (active) { worldIn.setBlockState(pos, Blocks.LIT_FURNACE.getDefaultState().withProperty(FACING, iblockstate.getValue(FACING)), 3); worldIn.setBlockState(pos, Blocks.LIT_FURNACE.getDefaultState().withProperty(FACING, iblockstate.getValue(FACING)), 3); } Whole method: public static void setState(boolean active, World worldIn, BlockPos pos) { IBlockState iblockstate = worldIn.getBlockState(pos); TileEntity tileentity = worldIn.getTileEntity(pos); keepInventory = true; if (active) { worldIn.setBlockState(pos, Blocks.LIT_FURNACE.getDefaultState().withProperty(FACING, iblockstate.getValue(FACING)), 3); worldIn.setBlockState(pos, Blocks.LIT_FURNACE.getDefaultState().withProperty(FACING, iblockstate.getValue(FACING)), 3); } else { worldIn.setBlockState(pos, Blocks.FURNACE.getDefaultState().withProperty(FACING, iblockstate.getValue(FACING)), 3); worldIn.setBlockState(pos, Blocks.FURNACE.getDefaultState().withProperty(FACING, iblockstate.getValue(FACING)), 3); } keepInventory = false; if (tileentity != null) { tileentity.validate(); worldIn.setTileEntity(pos, tileentity); } } Any help / information is appreciated.
  4. I'm trying to return an itemBlock for a specific block and it's TileEntity. I want to store the data from the TileEntity on the itemBlock. I'm trying to use the "getDrops" method from the Block class and override it. But when ever I try to get the TileEntity with :"TileEntity tE = world.getTileEntity(pos);" it returns null. It looks like the TileEntity got already removed from the world when the "getDrops" method is called. Is there a way to get the TileEntity? Or is there an other way to do this? Any help is appreciated.
×
×
  • Create New...

Important Information

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