Jump to content


  • Posts

  • Joined

  • Last visited

Recent Profile Visitors

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

FlashHUN's Achievements

Stone Miner

Stone Miner (3/8)



  1. How could I bake obj models without wrapping them in blocks or items? I'm guessing I have to use ModelBakeEvent and ModelRegistryEvent, but I'd appreciate a little more clarification.
  2. No matter what order I put these in or which class I enable and disable them from (RenderSystem, GlStateManager, GL11), I can't achieve the result I'm looking for...
  3. Players can unlock and go into a form that allows them to see other players and mobs through walls in a radius depending on how skilled they are at using said form, and see roughly how much mana those players have left. That's the basic idea.
  4. I want to give the player a buff that allows them to see mobs through walls. Instead of using the glowing effect, I actually want to make the mobs render through the walls. How could I achieve that?
  5. When I change the player's hitbox with EntityEvent.Size and recalculate it using Entity.recalculateSize() on both the client and server when it should change, the hitbox changes fine, however it is off-center and when the player moves they get teleported into the center of the hitbox. EntityEvent.Size: @SubscribeEvent public void playerSize(EntityEvent.Size event) { if (event.getEntity().isAddedToWorld()) { PlayerEntity player = (PlayerEntity)event.getEntity(); IPlayerCap cap = CapabilityUtil.getPlayerCap(player); EntitySize changeTo = player.getSize(player.getPose()); if (cap.getSusanooActive()) { changeTo = SUSANOO_CAGE; } event.setNewSize(changeTo); } } Entity.recalculateSize() gets called in the packet I sync the capability with when the data changes Edit: the current fix I found for it is after calling recalculateSize() I need to set the bounding box again with player.setBoundingBox(new AxisAlignedBB(player.getPosX()-(double)width/2, player.getPosY(), player.getPosZ()-(double)width/2, player.getPosX()+(double)width/2, player.getPosY()+(double)height, player.getPosZ()+(double)width/2));
  6. If I use a layer renderer to render a model on top of the player, is there a way I could change the UVs of its texture? Like, make the top left pixel 0,1 instead of 0,0 (keeping the same texture size).
  7. How can I loop a sound when a condition is met and stop it when needed?
  8. Minecraft client = Minecraft.getInstance(); ItemStack stack = new ItemStack(Items.GOLD_INGOT); GL11.glPushMatrix(); GL11.glTranslatef(posX, posY, 0.0F); GL11.glScalef(scale, scale, 0.0F); client.getItemRenderer().renderItemIntoGUI(stack, 0, 0); GL11.glPopMatrix(); Rendering any item in a Screen makes it appear dark. What could cause this and how could I fix it?
  9. I looked at how a filled map item gets block colors, tried something similar, but I've ran into a couple of issues. My code: private MaterialColor getBlockColorAt(int x, int z) { Chunk chunk = client.world.getChunkAt(new BlockPos(x, 0, z)); int y = chunk.getTopBlockY(Heightmap.Type.WORLD_SURFACE, x, z); BlockPos pos = new BlockPos(x, y, z); return client.world.getBlockState(pos).getMaterialColor(client.world.getBlockReader(chunk.getPos().x, chunk.getPos().z), pos); } Issues: BlockState#getMaterialColor is deprecated and I can't find any alternatives to use y always returns -1 What am I doing wrong? What do I need to do to get a block's color at a specific position?
  10. I have a non-square texture that's larger than 256x256 in size and I want to draw it on the screen without it getting scaled to be a square. What method do I need to use? I know there was a drawModalRectWithCustomTextureSize method in older versions, but I can't find what it was replaced with.
  11. This is the error I get when trying to access the layer renderers of a player by getting the player renderer then doing render.layerRenderers, yet some mods like Quark can just simply access it by doing the exact same thing. Why could that be?
  12. I have my custom fire block set up, how could I render an overlay when the player is on fire like the vanilla one but with my custom fire's texture?
  13. If I have a layer that is rendering a model on top of the player model, how could I render that model in first person view aswell?
  14. I know that these are in HeldItemLayer and BipedArmorLayer, but how could I cancel the rendering of just these two layers when the conditions are met?
  • Create New...

Important Information

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