Jump to content
Search In
  • More options...
Find results that contain...
Find results in...


  • Posts

  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

Tessa's Achievements

Tree Puncher

Tree Puncher (2/8)



  1. I've been trying to use a custom sky renderer to change the sun and moon textures in my dimension. Everything works fine, but I can't figure out how to render the textures in "world space" if that makes sense. Everything just rotates with the view of the player. This is the code I have in the render function of my IRenderHandler implementation. @Override public void render(int ticks, float partialTicks, ClientWorld world, Minecraft mc) { BufferBuilder bufferbuilder = Tessellator.getInstance().getBuffer(); Tessellator tessellator = Tessellator.getInstance(); GlStateManager.enableTexture(); GlStateManager.enableBlend(); GlStateManager.blendFuncSeparate(GL11.GL_SRC_ALPHA, GL11.GL_ONE, GL11.GL_ONE, GL11.GL_ZERO); GL11.glPushMatrix(); float alpha = 1.0F - world.getRainStrength(partialTicks); GL11.glColor4f(1.0F, 1.0F, 1.0F, alpha); GL11.glRotatef(0.0F, 0.0F, 1.0F, 0.0F); GL11.glRotatef(world.getCelestialAngle(partialTicks) * 360.0F, 1.0F, 0.0F, 0.0F); float size = 100.0F; mc.getTextureManager().bindTexture(SUN_TEXTURES); bufferbuilder.begin(7, DefaultVertexFormats.POSITION_TEX); bufferbuilder.pos((double)(-size), 100.0D, (double)(-size)).tex(0.0F, 0.0F).endVertex(); bufferbuilder.pos((double)size, 100.0D, (double)(-size)).tex(1.0F, 0.0F).endVertex(); bufferbuilder.pos((double)size, 100.0D, (double)size).tex(1.0F, 1.F).endVertex(); bufferbuilder.pos((double)(-size), 100.0D, (double)size).tex(0.0F, 1.0F).endVertex(); tessellator.draw(); size = 100.0F; mc.getTextureManager().bindTexture(MOON_PHASES_TEXTURES); int k1 = world.getMoonPhase(); int i2 = k1 % 4; int k2 = k1 / 4 % 2; float f22 = (float)(i2 + 0) / 4.0F; float f23 = (float)(k2 + 0) / 2.0F; float f24 = (float)(i2 + 1) / 4.0F; float f14 = (float)(k2 + 1) / 2.0F; bufferbuilder.begin(7, DefaultVertexFormats.POSITION_TEX); bufferbuilder.pos((double)(-size), -100.0D, (double)size).tex(f24, f14).endVertex(); bufferbuilder.pos((double)size, -100.0D, (double)size).tex(f22, f14).endVertex(); bufferbuilder.pos((double)size, -100.0D, (double)(-size)).tex(f22, f23).endVertex(); bufferbuilder.pos((double)(-size), -100.0D, (double)(-size)).tex(f24, f23).endVertex(); tessellator.draw(); GlStateManager.disableTexture(); GL11.glPopMatrix(); }
  2. Hey @kwpugh, I've been trying to make a custom crossbow myself and ran into the same issue mentioned before. I tried taking a bunch of the vanilla crossbow code and I eventually just copied your code into my class, but still it keeps looping the reload animation. Would you have any idea why?
  3. To make a more impressive looking weapon, I've been trying to combine a model and a generated item. In the image you can see the "staff/rod" is rendering, but I'm trying to render the spear head item, which you can see in the bottom, at the end of the pole. I figured a TileEntityItemStackRenderer would be the right way to go so i made a class that extends the vanilla TEISR. I looked at the vanilla code and other sources for examples, but I can't get it to work. Anyone have a suggestions on how to attempt this? This where I register the item: https://github.com/tessa19950/TheBigBang_1.14.4/blob/master/src/main/java/com/homebrewCult/TheBigBang/init/ModItems.java This is the code for the renderer: https://github.com/tessa19950/TheBigBang_1.14.4/blob/master/src/main/java/com/homebrewCult/TheBigBang/items/render/OmegaSpearRenderer.java This is the model made in Blockbench: https://github.com/tessa19950/TheBigBang_1.14.4/blob/master/src/main/java/com/homebrewCult/TheBigBang/items/model/OmegaSpearModel.java
  4. So after some fiddling around I noticed in the screenshot that my custom sprites were added to the Texture Atlas you see, It just wasn't showing the right part of that image which was because I had overwritten the getMinU, getMaxU, getMinV and getMaxV functions. The reason I'd overwritten them in the first place was because I had an issue before where the game crashed if i didn't overwrite them, but it appears that something else was causing that first problem, I fixed it somewhere along the way, but now the overwrites were breaking the sprite.
  5. I'm trying to get a simple particle to work with a custom sprite animation, but when the particle gets spawned in it looks like this. I've made a particle before that uses an item texture as its visual, which works perfectly. But it seems like this one isn't using the right texture atlas or something like that? I'm not sure what's going wrong. Particle class: https://github.com/tessa19950/TheBigBang_1.14.4/blob/master/src/main/java/com/homebrewCult/TheBigBang/particles/MagicClawParticle.java Particle type registry: https://github.com/tessa19950/TheBigBang_1.14.4/blob/master/src/main/java/com/homebrewCult/TheBigBang/init/ModParticleTypes.java
  6. At this point I assumed we were on the same page, but yes, I was talking about the models. Regardless I really appreciate your help and I'm sorry for the misunderstanding. I guess I should've mentioned they were using the right textures...
  7. Yeah, but as you can see, it doesn't use the correct model. That's the default quadmodel right? Looks like a pig
  8. Right, that wasn't what was crashing the game, there was a nullpointerexception because, like you said, the register entity spawns was being done in the wrong place. For now i commented them out, but the entities still use pig models.
  9. Okay, so I think I have the initialization set up correctly now. But now when the game starts it gives me a this error for each entity type [24Apr2020 11:14:22.209] [Render thread/WARN] [net.minecraft.entity.EntityType/]: No data fixer registered for entity thebigbangstump_entity
  10. But if I make the initializers non static I have to make the functions using them non static which means I cannot call stuff like the registerEntityRenderers function, right?
  11. Okay, this is the first time I'm setting up a git repository with Forge so I hope it's okay like this. Can you access this https://github.com/tessa19950/TheBigBang_1.15.2 ?
  12. Seems like getRenderer is returning the correct renderer, as well as the right model
  13. No never mind, it is also called on the client, when I spawn one of the entities 2 breakpoints happen, one for the server and one for the client.
  14. Waaait, okay sorry for misunderstanding you. So you're saying because the entity is only spawned on the server the client doesn't know what model to use, right? Okay so yeah, the breakpoint was only reached once which was on the server, so I guess that means you were right and it isn't spawned on the client. For some reason I thought it didn't need to be spawned on clientside.
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.