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


  • Content Count

  • Joined

  • Last visited

Community Reputation

0 Neutral

About FlashHUN

  • Rank
    Stone Miner

Recent Profile Visitors

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

  1. 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.g
  2. 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).
  3. How can I loop a sound when a condition is met and stop it when needed?
  4. 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?
  5. 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
  6. 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.
  7. 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?
  8. 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?
  9. 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?
  10. 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?
  11. 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) {
  12. I added this line in readNBT() in my capability storage, Main.logger.debug("NBT Reading in Storage"); and this is the result: This should mean that it's called before the login event, right? If so, then why is it not sending the data that was saved to the player?
  13. Not exactly sure what you mean by that, but this is how I set up and registered my capability: Provider: public class PlayerBaseCapProvider implements ICapabilitySerializable<INBT> { @CapabilityInject(IPlayerBaseCap.class) public static Capability<IPlayerBaseCap> PLAYER_BASE_CAP; private LazyOptional<IPlayerBaseCap> instance = LazyOptional.of(PLAYER_BASE_CAP::getDefaultInstance); @Override public <T> LazyOptional<T> getCapability(Capability<T> cap, Direction side) { return cap == PLAYER_BASE_CAP ? instance.cast() : LazyOptional.empty();
  • Create New...

Important Information

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