Jump to content

MaSch212

Members
  • Posts

    6
  • Joined

  • Last visited

Converted

  • Gender
    Undisclosed
  • Personal Text
    I am new!

MaSch212's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  1. Yes but I have "EntityRegistry.registerGlobalEntityID". I don't really know the differences between "registerGlobalEntityID" and "registerModEntity". Do I have to write both in the ClientProxy? Or do I have to put them in another class? You put registerModEntity in the same place as registerGlobalEntityID registerGlobalEntityID gives the entity a unique id (like in the older versions of minecraft if you pressed F3 you'dd see numbers above mobs heads) registerModEntity actually tells the game their is an entity. O_O OK that was actually the solution. I now put both into the PreInit in my Main Class and now I see the Arrow. That is confusing Thank you all for your help
  2. Yes at first I put this into the Main class and then I saw a tutorial. They said that I have to put it into the ClientProxy. I didn't understand this But this doesn't solve my problem Can you post your render class? @SideOnly(Side.CLIENT) public class RenderLaserArrow extends Render { public void renderArrow(EntityLaserArrow par1EntityArrow, double par2, double par4, double par6, float par8, float par9) { this.loadTexture("/AdvancedIC2/resources/laserArrows.png"); GL11.glPushMatrix(); GL11.glTranslatef((float)par2, (float)par4, (float)par6); GL11.glRotatef(par1EntityArrow.prevRotationYaw + (par1EntityArrow.rotationYaw - par1EntityArrow.prevRotationYaw) * par9 - 90.0F, 0.0F, 1.0F, 0.0F); GL11.glRotatef(par1EntityArrow.prevRotationPitch + (par1EntityArrow.rotationPitch - par1EntityArrow.prevRotationPitch) * par9, 0.0F, 0.0F, 1.0F); Tessellator var10 = Tessellator.instance; byte var11 = (byte)(par1EntityArrow.IsQuantum ? 1 : 0); float var12 = 0.0F; float var13 = 0.5F; float var14 = (float)(0 + var11 * 10) / 32.0F; float var15 = (float)(5 + var11 * 10) / 32.0F; float var16 = 0.0F; float var17 = 0.15625F; float var18 = (float)(5 + var11 * 10) / 32.0F; float var19 = (float)(10 + var11 * 10) / 32.0F; float var20 = 0.05625F; GL11.glEnable(GL12.GL_RESCALE_NORMAL); float var21 = (float)par1EntityArrow.arrowShake - par9; if (var21 > 0.0F) { float var22 = -MathHelper.sin(var21 * 3.0F) * var21; GL11.glRotatef(var22, 0.0F, 0.0F, 1.0F); } GL11.glRotatef(45.0F, 1.0F, 0.0F, 0.0F); GL11.glScalef(var20, var20, var20); GL11.glTranslatef(-4.0F, 0.0F, 0.0F); GL11.glNormal3f(var20, 0.0F, 0.0F); var10.startDrawingQuads(); var10.addVertexWithUV(-7.0D, -2.0D, -2.0D, (double)var16, (double)var18); var10.addVertexWithUV(-7.0D, -2.0D, 2.0D, (double)var17, (double)var18); var10.addVertexWithUV(-7.0D, 2.0D, 2.0D, (double)var17, (double)var19); var10.addVertexWithUV(-7.0D, 2.0D, -2.0D, (double)var16, (double)var19); var10.draw(); GL11.glNormal3f(-var20, 0.0F, 0.0F); var10.startDrawingQuads(); var10.addVertexWithUV(-7.0D, 2.0D, -2.0D, (double)var16, (double)var18); var10.addVertexWithUV(-7.0D, 2.0D, 2.0D, (double)var17, (double)var18); var10.addVertexWithUV(-7.0D, -2.0D, 2.0D, (double)var17, (double)var19); var10.addVertexWithUV(-7.0D, -2.0D, -2.0D, (double)var16, (double)var19); var10.draw(); for (int var23 = 0; var23 < 4; ++var23) { GL11.glRotatef(90.0F, 1.0F, 0.0F, 0.0F); GL11.glNormal3f(0.0F, 0.0F, var20); var10.startDrawingQuads(); var10.addVertexWithUV(-8.0D, -2.0D, 0.0D, (double)var12, (double)var14); var10.addVertexWithUV(8.0D, -2.0D, 0.0D, (double)var13, (double)var14); var10.addVertexWithUV(8.0D, 2.0D, 0.0D, (double)var13, (double)var15); var10.addVertexWithUV(-8.0D, 2.0D, 0.0D, (double)var12, (double)var15); var10.draw(); } GL11.glDisable(GL12.GL_RESCALE_NORMAL); GL11.glPopMatrix(); } @Override public void doRender(Entity par1Entity, double par2, double par4, double par6, float par8, float par9) { System.out.println("DoRender startet!"); this.renderArrow((EntityLaserArrow)par1Entity, par2, par4, par6, par8, par9); } } Like I said - I copied the hole code of RenderArrow.
  3. Yes at first I put this into the Main class and then I saw a tutorial. They said that I have to put it into the ClientProxy. I didn't understand this But this doesn't solve my problem
  4. Yes but I have "EntityRegistry.registerGlobalEntityID". I don't really know the differences between "registerGlobalEntityID" and "registerModEntity". Do I have to write both in the ClientProxy? Or do I have to put them in another class?
  5. Yes I read the Tutorial on Forge Wiki and I've done everything. And I copied the hole RenderArrow Class for testing but it is still not working.
  6. Hey Guys, I want to make a bow with special Arrows. I already written everything for it and it works fine but the Arrow is invisible. I searched for help but I don't know why the Arrow is not rendered. Here is some code: Main Class: @Mod(modid="Marc's AdvancedIC2", name="AdvancedIC2", version="1.0") @NetworkMod(clientSideRequired=true, serverSideRequired=true) public class AdvancedIC2 { //Some Vars @SidedProxy(clientSide="MyMod.client.ClientProxyMyMod", serverSide="MyMod.common.CommonProxyMyMod") public static CommonProxyMyMod proxy; @PreInit public void PreInit(FMLPreInitializationEvent event) { //Some new Sounds //Some Config-Stuff } @Init public void Init(FMLInitializationEvent event) { proxy.registerRenderThings(); //Item Registry, Recipies, ... } } CommonProxyMyMod: public class CommonProxyMyMod { public void registerRenderThings() { } } ClientProxyMyMod: public class ClientProxyMyMod extends CommonProxyMyMod { @Override public void registerRenderThings() { //Preload Textures (they work fine) EntityRegistry.registerGlobalEntityID(EntityLaserArrow.class, "LaserArrow", EntityRegistry.findGlobalUniqueEntityId()); RenderingRegistry.registerEntityRenderingHandler(EntityLaserArrow.class, new RenderLaserArrow()); } } I first thought that my Render class is not working but I tested it with "System.out.println()" so that I can see if the "doRender" method is called any time. And the result was that the "doRender" Method never called.
×
×
  • Create New...

Important Information

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