-
[1.16.5] Baking obj models without wrapping them in items or blocks
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.
-
[1.16] See mobs through walls
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...
-
[1.16] See mobs through walls
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.
-
[1.16] See mobs through walls
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?
-
[1.16.4] Changing player hitbox size doesn't center it on the player
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));
-
[SOLVED] [1.16.4] Is there any way to change texture UVs during model rendering?
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).
-
[1.15.2] How can I loop sounds?
How can I loop a sound when a condition is met and stop it when needed?
-
[1.15.2] Rendering item in a Screen makes it dark
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?
-
[1.15.2] Getting a block's color for minimap
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?
-
[1.15.2] Drawing a non-square texture on GUI
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.
-
[1.14.4] Accessing entity layer renderers?
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?
-
[1.14.4] Custom fire with custom overlay
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?
-
[1.14.4] How can I render layers in first person?
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?
-
[1.14.4] How could I hide the held item and the armor the player is wearing?
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?
-
[1.14.4] [SOLVED] Rendering layer (model) with transparency on player and holding an item makes the texture solid
Ah, thank you guys! That solved it.
IPS spam blocked by CleanTalk.