Aileron

Aileron

16.7k Downloads

Crash on Startup With Bedrockify

Parkanizor opened this issue ยท 2 comments

commented

Crash report: https://hastebin.com/raw/gewozukeyo

Minecraft version: 1.19.2
Quilt loader version: 0.17.4
Aileron version: 1.19 Quilt v1.0.0
Bedrockify version: 1.4.2

commented

also, on review of this mixin, shouldn't it use IForgeItem#canElytraFly or FabricElytraItem rather than checking instanceof ElytraItem? I know this would require a ForgeGuiMixin and FabricGuiMixin, or an xplat abstraction of some kind, but it'd be more friendly to other mods

commented

Suggested solution: modify the following code to be a ModifyArg instead of a Redirect

@Redirect(method = "renderExperienceBar", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/gui/Font;draw(Lcom/mojang/blaze3d/vertex/PoseStack;Ljava/lang/String;FFI)I"))
public int draw(Font self, PoseStack poseStack, String string, float f, float g, int i) {
LocalPlayer player = Minecraft.getInstance().player;
if ((player.getEntityData().get(SmokeStocks.DATA_SMOKE_STOCKS) > 0 && player.isFallFlying()) || (player.getInventory().getArmor(2).getItem() instanceof ElytraItem && player.isCrouching())) {
return self.draw(poseStack, string, f, g + 4, i);
} else {
return self.draw(poseStack, string, f, g, i);
}
}