Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Xcox123

Members
  • Joined

  • Last visited

  1. Oh my god I am so stupid It works now thanks for helping me!
  2. Hmm.. maybe try giving your costume stone a dress. Oooooh, maybe a party hat! Make it look fabulous!
  3. Yeah, I was only half way through testing when I noticed the texture issue so the quads are all messed up And still nothing. I'm about to github the whole mod, so maybe something's up there? https://github.com/Xcox123/TehFoodMod
  4. package com.xcox123.tehfoodmod.renderer.tileentity; import org.lwjgl.opengl.GL11; import com.xcox123.tehfoodmod.tehfoodmod; import com.xcox123.tehfoodmod.Block.BlockWindmill; import cpw.mods.fml.common.FMLCommonHandler; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.client.renderer.Tessellator; import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; import net.minecraft.init.Blocks; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.ResourceLocation; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; /** * Created by Adam on 20/08/2014. */ public class TileEntityRenderWindmill extends TileEntitySpecialRenderer { private final ResourceLocation textureWindmill = new ResourceLocation("tehfoodmod", "textures/model/windmill.png"); private int textureWidth = 64; private int textureHeight = 32; @Override public void renderTileEntityAt(TileEntity tileentity, double x, double y, double z, float f) { GL11.glPushMatrix(); GL11.glTranslatef((float)x, (float)y, (float)z); Tessellator tess = Tessellator.instance; this.bindTexture(textureWindmill); IBlockAccess world = tileentity.getWorldObj(); tess.startDrawingQuads(); //Starts drawing { tess.addVertexWithUV(0, 0, 1, 1, 1); tess.addVertexWithUV(1, 1, 1, 1, 0); tess.addVertexWithUV(0, 1, 0, 0, 0); tess.addVertexWithUV(0, 0, 0, 0, 1); } tess.draw(); //Draws int brightness = tehfoodmod.blockWindmill.getMixedBrightnessForBlock(world, tileentity.xCoord, tileentity.yCoord, tileentity.zCoord); tess.setBrightness(brightness); tess.setColorOpaque_F(1.0F, 1.0F, 1.0F); /* * Tried brightness code above outside of GL11.glPopMatrix() and same effect happens */ GL11.glPopMatrix(); } } Texture: Just saying, ^^ is found at this path: C:\Users\Adam\Desktop\Modding\1.7\TehFoodMod\Source\src\main\resources\assets\tehfoodmod\textures\model
  5. anyone else got a solution?
  6. Yup it's there. It's loading a texture, just its rendering black(no purple)
  7. I did that ^^ and still no differance.
  8. Theres plenty of tutorials out there for this.
  9. Well guessing from previous releases, no freaking way a pre-release forge, and 1.8, due to the rendering/handling changes, will take AT LEAST 3 months estimate for 1.8 forge to be released
  10. Yeah thats why I wanted the world...
  11. Nope, still black, heres my code now public void renderTileEntityAt(TileEntity tileentity, double x, double y, double z, float f) { GL11.glPushMatrix(); GL11.glTranslatef((float)x, (float)y, (float)z); Tessellator tess = Tessellator.instance; this.bindTexture(textureWindmill); IBlockAccess world = tileentity.getWorldObj(); int brightness = tehfoodmod.blockWindmill.getMixedBrightnessForBlock(world, tileentity.xCoord, tileentity.yCoord, tileentity.zCoord); tess.setBrightness(brightness); tess.setColorOpaque_F(1.0F, 1.0F, 1.0F); tess.startDrawingQuads(); //Starts drawing { tess.addVertexWithUV(0, 0, 1, 1, 1); tess.addVertexWithUV(1, 1, 1, 1, 0); tess.addVertexWithUV(0, 1, 0, 0, 0); tess.addVertexWithUV(0, 0, 0, 0, 1); } tess.draw(); //Draws GL11.glPopMatrix(); }
  12. Thanks! And thanks for clearing up the multiple world things
  13. renderTileEntityAt extending TileEntitySpecialRenderer. And I'm not sure specifically what world. I know that it has IBlockAccess built into it(thats what I need access to). I'd assume the main world, the one you have as World world in your method params.
  14. Hey, simple question. How do I get an instance 9f the world when I do not have it in my method params(not sure what they're called, but the "public void method(method params){"
  15. Awesome thanks! One question though(prob nooby), where do I get my IBlockAccess from in a TESR?

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.