Posted September 17, 201510 yr So with open custom rendered blocks I decided to make a second one (A trophy) and for some reason in the render class for it, it is throwing a fit at this bit of code "this.model.renderModel(0.0625F);" Working custom block no errors/Table/First Custom Rendered block package com.northcraft.mod.renderer; import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.ResourceLocation; import org.lwjgl.opengl.GL11; import com.northcraft.mod.Northcraft; import com.northcraft.mod.model.ModelTable; public class RenderTable extends TileEntitySpecialRenderer{ private static final ResourceLocation texture = new ResourceLocation(Northcraft.modid + ":" + "textures/model/Table.png"); private ModelTable model; public RenderTable() { this.model = new ModelTable(); } @Override public void renderTileEntityAt(TileEntity tileentity, double x, double y, double z, float f) { GL11.glPushMatrix(); GL11.glTranslatef((float)x + 0.5F, (float) y + 1.5F, (float) z + 0.5F); GL11.glRotatef(180, 0F, 0F, 1F); this.bindTexture(texture); GL11.glPushMatrix(); this.model.renderModel(0.0625F); GL11.glPopMatrix(); GL11.glPopMatrix(); } } Error Code/Second Custom Rendered Block/Trophy package com.northcraft.mod.renderer; import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.ResourceLocation; import org.lwjgl.opengl.GL11; import com.northcraft.mod.Northcraft; import com.northcraft.mod.model.ModelTable; import com.northcraft.mod.model.ModelTrophy; public class RenderTrophy extends TileEntitySpecialRenderer{ private static final ResourceLocation texture = new ResourceLocation(Northcraft.modid + ":" + "textures/model/Table.png"); private ModelTrophy model; public RenderTrophy() { this.model = new ModelTrophy(); } @Override public void renderTileEntityAt(TileEntity tileentity, double x, double y, double z, float f) { GL11.glPushMatrix(); GL11.glTranslatef((float)x + 0.5F, (float) y + 1.5F, (float) z + 0.5F); GL11.glRotatef(180, 0F, 0F, 1F); this.bindTexture(texture); GL11.glPushMatrix(); this.model.renderModel(0.0625F); GL11.glPopMatrix(); GL11.glPopMatrix(); } }
September 17, 201510 yr Your Renderers are justfine, although you don't need to do the push/pomatrix stuff between binding the texture and rendering the model. Also, have you registered the tileentity?
September 17, 201510 yr Author I have registered the tile entity and I was working on it for a few hours and I got the hit box loading and nothing else
September 17, 201510 yr Author Anyone that can maybe help and needs one of the other classes from the mod please ask for what class
September 17, 201510 yr If by "throwing a fit" you mean crashing or throwing an exception, you need to provide the crash report or stack trace of the exception. Don't make mods if you don't know Java. Check out my website: http://shadowfacts.net Developer of many mods
September 17, 201510 yr Author It is giving an error I can figure out for the life of me. Sorry that I am not really the best at explaining myself
September 17, 201510 yr It is giving an error I can figure out for the life of me. Sorry that I am not really the best at explaining myself Post the error (like shadowfacts told you to) and your model classes (like diesieben07 told you to). It's hard to find a solution when we don't know what the problem is. Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.