mojira.dev

PiTheGuy

Assigned

No issues.

Reported

MC-243012 Beacon effects show regular potion particles when combined with effects that have showParticles set to false Duplicate MCPE-132181 Stairs incorrectly form corners in some situations Confirmed MCPE-132162 /kill doesn't work on creative players Duplicate MC-225409 Text is seriously messed up Invalid

Comments

The number of entities hit by an arrow is not stored in its NBT data,

Code Analysis

I believe the following methods are of interest. (1.20.5-rc2, decompiled with official mappings)

private void renderVehicleHealth(GuiGraphics $$0) {
        LivingEntity $$1 = this.getPlayerVehicleWithHealth();
        if ($$1 != null) {
            int $$2 = this.getVehicleMaxHearts($$1);
            if ($$2 != 0) {
                int $$3 = (int)Math.ceil((double)$$1.getHealth());
                this.minecraft.getProfiler().popPush("mountHealth");
                int $$4 = $$0.guiHeight() - 39;
                int $$5 = $$0.guiWidth() / 2 + 91;
                int $$6 = $$4;
                int $$7 = 0;
                RenderSystem.enableBlend();

                while ($$2 > 0) {
                    int $$8 = Math.min($$2, 10);
                    $$2 -= $$8;

                    for (int $$9 = 0; $$9 < $$8; $$9++) {
                        int $$10 = $$5 - $$9 * 8 - 9;
                        $$0.blitSprite(HEART_VEHICLE_CONTAINER_SPRITE, $$10, $$6, 9, 9);
                        if ($$9 * 2 + 1 + $$7 < $$3) {
                            $$0.blitSprite(HEART_VEHICLE_FULL_SPRITE, $$10, $$6, 9, 9);
                        }

                        if ($$9 * 2 + 1 + $$7 == $$3) {
                            $$0.blitSprite(HEART_VEHICLE_HALF_SPRITE, $$10, $$6, 9, 9);
                        }
                    }

                    $$6 -= 10;
                    $$7 += 20;
                }

                RenderSystem.disableBlend();
            }
        }
    }

private int getVehicleMaxHearts(@Nullable LivingEntity $$0) {
    if ($$0 != null && $$0.showVehicleHealth()) {
        float $$1 = $$0.getMaxHealth();
        int $$2 = (int)($$1 + 0.5F) / 2;
        if ($$2 > 30) {
            $$2 = 30;
        }

        return $$2;
    } else {
        return 0;
    }
}

If a vehicle has a max health of 1, (1 + 0.5) / 2 = 0.75, which gets truncated to 0 when cast to an int. Since a return value of 0 means the vehicle should display its health, the health bar is not shown.

I’m recent versions, they changed the command to allow for specific structure variants. For example you can use village_plains for a plains village. To locate a village of any type you have to use #village.

Can confirm in Release 1.17.1

Yes it is, I added it to the affected versions

Updating a pack is not Mojang's responsibility. That responsibility falls under whoever originally created the pack. Aside from that, 1.17 has only been out for a few days. Updating packs takes time and you need to be patient.