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.

opoz5

Members
  • Joined

  • Last visited

  1. opoz5 replied to opoz5's topic in Modder Support
    I added this line of code in my clientproxy: RenderingRegistry.instance().registerEntityRenderingHandler(EntityPebble.class, new RenderPebble()); This line of code in my main mod file: EntityRegistry.registerModEntity(EntityPebble.class, "Pebble", 1, this, 250, 5, false); Now the end of my main mod file looks like this: //Entities// EntityRegistry.registerGlobalEntityID(EntityPebble.class, "Pebble", EntityRegistry.findGlobalUniqueEntityId()); EntityRegistry.registerModEntity(EntityPebble.class, "Pebble", 1, this, 250, 5, false); //Rendering Registry// RenderingRegistry.registerEntityRenderingHandler(EntityPebble.class, new ebt.client.render.RenderPebble()); I notice it isn't calling to my ModelPebble file, where is it supposed to do this?
  2. opoz5 replied to opoz5's topic in Modder Support
    RenderPebble package ebt.client.render; import net.minecraft.src.Entity; import net.minecraft.src.ModelBase; import net.minecraft.src.Render; import net.minecraft.src.Tessellator; import org.lwjgl.opengl.GL11; import org.lwjgl.opengl.GL12; import ebt.common.EntityPebble; import ebt.common.ModelPebble; public class RenderPebble extends Render { protected ModelBase ModelPShot; public RenderPebble() { this.shadowSize = 0.1F; this.ModelPShot = new ModelPebble(); } public void renderPShot(EntityPebble var1, double var2, double var4, double var6, float var8, float var9) { if (var1.prevRotationYaw != 0.0F || var1.prevRotationPitch != 0.0F) { //this.modelPShot.render(var1, 0F, 0F, 0F, 11, 2, 2); this.loadTexture("/ebt.client/resources/Pebble.png"); GL11.glPushMatrix(); GL11.glTranslatef((float)var2, (float)var4, (float)var6); GL11.glRotatef(var1.prevRotationYaw + (var1.rotationYaw - var1.prevRotationYaw) * var9 - 90.0F, 0.0F, 1.0F, 0.0F); GL11.glRotatef(var1.prevRotationPitch + (var1.rotationPitch - var1.prevRotationPitch) * var9, 0.0F, 0.0F, 1.0F); Tessellator var10 = Tessellator.instance; byte var11 = 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); 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(); } } public void doRender(Entity var1, double var2, double var4, double var6, float var8, float var9) { this.renderPShot((EntityPebble)var1, var2, var4, var6, var8, var9); } }
  3. opoz5 replied to opoz5's topic in Modder Support
    I know I rendered it incorrectly.. I'm asking how to render it.
  4. magicItems.common.EntityFlameshot cannot be cast to net.minecraft.src.EntityLiving Also having this error. Any help?
  5. opoz5 replied to opoz5's topic in Modder Support
    Really no one has encountered and/or fixed this problem?
  6. opoz5 replied to opoz5's topic in Modder Support
    I tried directing it to the correct texture but it's still invisible. Everything works except for not being able to see it. And help?
  7. opoz5 replied to opoz5's topic in Modder Support
    I have it set to shoot a custom arrow and entity, but using the default arrow's texture. Could it be because two things are using the default texture? I don't exactly understand your question.
  8. I know this has probably been answered somewhere else, but I have done hours of research and cannot find a working solution. Here is the problem: I made a custom bow, and a custom arrow, however the custom arrow is using the original arrow texture right now. But the problem is that when I shoot the arrow, I know it really shoots because it hurts mobs and I can pick it up, but it is invisible. I messed around some. Now I have: In my Entities in my main class file I have: EntityRegistry.registerGlobalEntityID(EntityPebble.class, "Pebble", EntityRegistry.findGlobalUniqueEntityId()); EntityRegistry.registerModEntity(EntityPebble.class, "Pebble", 1, this, 128, 1, false); In my rendering registry I put RenderingRegistry.registerEntityRenderingHandler(EntityPebble.class, new RenderLiving(new ModelPebble(), 0F)); Which yields an ebt.common.EntityPebble cannot be cast to net.minecraft.src.EntityLiving error. When I change RenderingRegistry.registerEntityRenderingHandler(EntityPebble.class, new RenderLiving(new ModelPebble(), 0F)); to RenderingRegistry.registerEntityRenderingHandler(EntityPebble.class, new ebt.client.render.RenderPebble()); I get a arrow like texture, but it says "missing". To clarify I do NOT want a folded texture, I want a cube like texture, and that is what the ModelPebble file is set to be. Thanks in advance, all help is appreciated.

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.