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.

TrollTaylor

Members
  • Joined

  • Last visited

  1. Im trying to make a item renderer but whenever i try its just invisible in game here is my code package me.trolltaylor.mod; import org.lwjgl.opengl.GL11; import net.minecraft.client.Minecraft; import net.minecraft.entity.Entity; import net.minecraft.item.ItemStack; import net.minecraft.util.ResourceLocation; import net.minecraftforge.client.IItemRenderer; public class KnifeItemRenderer implements IItemRenderer { protected ModelKnife knife; public KnifeItemRenderer() { knife = new ModelKnife(); } @Override public boolean handleRenderType(ItemStack item, ItemRenderType type) { switch (type) { case EQUIPPED: return true; case EQUIPPED_FIRST_PERSON: return true; default: return false; } } @Override public boolean shouldUseRenderHelper(ItemRenderType type, ItemStack item, ItemRendererHelper helper) { return false; } @Override public void renderItem(ItemRenderType type, ItemStack item, Object... data) { switch (type) { case EQUIPPED: case EQUIPPED_FIRST_PERSON: { GL11.glPushMatrix(); GL11.glScalef(1.4F,1.4F, 1.4F); GL11.glRotatef(90, -1, 0, 0); GL11.glRotatef(85, 0, 0, 1); GL11.glRotatef(180, 0, 1, 0); GL11.glRotatef(135, 1, 0, 0); GL11.glTranslatef(-0.1F, -0.5F, 0.5F); knife.render((Entity) data[1], 0.0F, 0.0F, 0.0F, 0.0F, 0.0F,0.0625F); GL11.glPopMatrix(); } default: break; } } } I found it online so it may be outdated i dont know if that is my problem
  2. Im setting up my modding workspace and i got this error FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':makeStart'. > Cannot find System Java Compiler. Ensure that you have installed a JDK (not ju st a JRE) and configured your JAVA_HOME system variable to point to the accordin g directory. * Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. BUILD FAILED I have jdk and jre installed. *Solved* Apparently i didnt have jdk installed
  3. Im fairly new to modding but im trying to use a model for a tile entity but i used this code but it wont work here is where i got it from http://www.minecraftforge.net/wiki/Rendering_a_Techne_Model_as_a_Block Here is my code Block Class: package me.trolltaylor; import net.minecraft.block.Block; import net.minecraft.block.BlockContainer; import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.tileentity.TileEntity; import net.minecraft.world.World; public class BlockTileEntity extends BlockContainer { public BlockTileEntity (Material material) { super(material); } //You don't want the normal render type, or it wont render properly. @Override public int getRenderType() { return -1; } //It's not an opaque cube, so you need this. @Override public boolean isOpaqueCube() { return false; } //It's not a normal block, so you need this too. public boolean renderAsNormalBlock() { return false; } @Override public TileEntity createNewTileEntity(World arg0, int arg1) { // TODO Auto-generated method stub return new TileEntityTank(); } } TileEntity: package me.trolltaylor; import net.minecraft.tileentity.TileEntity; public class TileEntityE extends TileEntity{ } TileEntityRenderer: package me.trolltaylor.liquid.management.model; import net.minecraft.block.Block; import net.minecraft.client.Minecraft; import net.minecraft.client.renderer.OpenGlHelper; import net.minecraft.client.renderer.Tessellator; import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; import net.minecraft.entity.Entity; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.ResourceLocation; import net.minecraft.world.World; import org.lwjgl.opengl.GL11; public class TileEntityERenderer extends TileEntitySpecialRenderer { //The model of your block private final TileEntityModel model; public TileEntityERenderer() { this.model = new TileEntityModel(); } private void adjustRotatePivotViaMeta(World world, int x, int y, int z) { int meta = world.getBlockMetadata(x, y, z); GL11.glPushMatrix(); GL11.glRotatef(meta * (-90), 0.0F, 0.0F, 1.0F); GL11.glPopMatrix(); } @Override public void renderTileEntityAt(TileEntity te, double x, double y, double z, float scale) { //The PushMatrix tells the renderer to "start" doing something. GL11.glPushMatrix(); //This is setting the initial location. GL11.glTranslatef((float) x + 0.5F, (float) y + 1.5F, (float) z + 0.5F); //This is the texture of your block. It's pathed to be the same place as your other blocks here. //Outdated bindTextureByName("/mods/roads/textures/blocks/TrafficLightPoleRed.png"); //Use in 1.6.2 this ResourceLocation textures = (new ResourceLocation("lq:textures/blocks/New.png")); //the ':' is very important //binding the textures Minecraft.getMinecraft().renderEngine.bindTexture(textures); //This rotation part is very important! Without it, your model will render upside-down! And for some reason you DO need PushMatrix again! GL11.glPushMatrix(); GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F); //A reference to your Model file. Again, very important. this.model.render((Entity)null, 0.0F, 0.0F, -0.1F, 0.0F, 0.0F, 0.0625F); //Tell it to stop rendering for both the PushMatrix's GL11.glPopMatrix(); GL11.glPopMatrix(); } //Set the lighting stuff, so it changes it's brightness properly. private void adjustLightFixture(World world, int i, int j, int k, Block block) { Tessellator tess = Tessellator.instance; //float brightness = block.getBlockBrightness(world, i, j, k); //As of MC 1.7+ block.getBlockBrightness() has become block.getLightValue(): float brightness = block.getLightValue(world, i, j, k); int skyLight = world.getLightBrightnessForSkyBlocks(i, j, k, 0); int modulousModifier = skyLight % 65536; int divModifier = skyLight / 65536; tess.setColorOpaque_F(brightness, brightness, brightness); OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, (float) modulousModifier, divModifier); } } My Registers and stuff : GameRegistry.registerTileEntity(me.trolltaylor.TileEntityE.class, "tileentitye"); GameRegistry.registerBlock(tileentitye, "tileentitye"); ClientRegistry.bindTileEntitySpecialRenderer(TileEntityE.class, new TileEntityERenderer()); My problem is that there is no model and no texture i see a hitbox but there is nothing there
  4. How would i make a upside down player like dinnerbone / grumm if you dont know what im talking about heres a picture. http://media-mcw.cursecdn.com/thumb/8/8f/Minecraft_1.6_2013-06-27_15-48-39.J39858193.png/800px-Minecraft_1.6_2013-06-27_15-48-39.J39858193.png[/img]
  5. TrollTaylor posted a topic in Modder Support
    How do i make capes appear on a player? Like the minecon / mojang capes but with my own custom texture.
  6. Well how do i make the handler itself?
  7. How do i register event handlers i dont think ive done that
  8. Did not work heres my code public class ClientProxy extends CommonProxy { ModelCrown m; @ForgeSubscribe public void onRender(RenderPlayerEvent ev){ GL11.glPushMatrix(); m.render(ev.entity, 0, 0, 0, 0, 0, 0); GL11.glPopMatrix(); }
  9. Hello im fairly new to modding but i know java well and i wanna know how do i render a 3d model on a player when they load a world and how would i make it compatible with multiplayer
  10. Gives me a error "Cannot make static reference to non static method getLocationSkin() from the type AbstractClientPlayer"
  11. How would i get a players skin and then put it in a resource location?
  12. I did wanna know how to randomly generate structures with a schematic file
  13. Hello im looking for someone to teach me some of the forge api i know the basics like making a mob , items , blocks ect and i know most of the bukkit api.

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.