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.

FlashHUN's Achievements

Stone Miner

Stone Miner (3/8)



  1. 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...
  2. 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.
  3. 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?
  4. 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));
  5. 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).
  6. How can I loop a sound when a condition is met and stop it when needed?
  7. 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?
  8. 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?
  9. 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.
  10. 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?
  11. 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?
  12. 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?
  13. 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?
  14. When I hold an item in my hand, the model's texture which I want to be transparent becomes solid. Is there any way to fix this? (Having the texture transparent and rendering it with an alpha of 1.0F has the same result as having it solid and rendering it with a lower alpha) Layer code: @OnlyIn(Dist.CLIENT) public class LayerSusanoo extends LayerRenderer<AbstractClientPlayerEntity, PlayerModel<AbstractClientPlayerEntity>> { public LayerSusanoo( IEntityRenderer<AbstractClientPlayerEntity, PlayerModel<AbstractClientPlayerEntity>> entityRendererIn) { super(entityRendererIn); } private static final ResourceLocation cage = new ResourceLocation(Main.modid, "textures/layers/player/susanoo/cage.png"); @Override public void render(AbstractClientPlayerEntity entityIn, float limbSwing, float limbSwingAmount, float partialTicks, float ageInTicks, float netHeadYaw, float headPitch, float scale) { IPlayerKgCap kgcap = PlayerKgCapStorage.getCapability(entityIn); IPlayerAnimCap animcap = PlayerAnimCapStorage.getCapability(entityIn); if (kgcap.getSusanooActive()) { if (kgcap.getSusanooSize() == 1) { GlStateManager.pushMatrix(); ModelSusanooCage modelSusanooCage = new ModelSusanooCage(); GL11.glColor4f(kgcap.getSusanooColorR()/255F, kgcap.getSusanooColorG()/255F, kgcap.getSusanooColorB()/255F, 0.2F); this.bindTexture(cage); modelSusanooCage.isSitting = this.getEntityModel().isSitting; modelSusanooCage.isChild = this.getEntityModel().isChild; modelSusanooCage.setLivingAnimations(entityIn, limbSwing, limbSwingAmount, partialTicks); modelSusanooCage.render(entityIn, limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch, scale); GlStateManager.popMatrix(); } } } @Override public boolean shouldCombineTextures() { return false; } }
  • Create New...

Important Information

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