diff --git a/src/main/java/com/fox/ysmu/client/gui/PlayerModelScreen.java b/src/main/java/com/fox/ysmu/client/gui/PlayerModelScreen.java index 784e478..ce1999b 100644 --- a/src/main/java/com/fox/ysmu/client/gui/PlayerModelScreen.java +++ b/src/main/java/com/fox/ysmu/client/gui/PlayerModelScreen.java @@ -103,7 +103,7 @@ public void initGui() { perText = textField.getText(); focus = textField.isFocused(); } - textField = new GuiTextField(this.fontRendererObj, x + 144, y + 6, 140, 16); + textField = new GuiTextField(this.fontRendererObj, x + 144, y + 6, 158, 16); textField.setText(perText); textField.setTextColor(0xF3EFE0); textField.setFocused(focus); @@ -115,8 +115,7 @@ public void initGui() { this.buttonList.add(new FlatIconButton(1, x + 28, y + 5, 79, 20, 32, 16).setTooltips("gui.yes_steve_model.model.texture")); this.buttonList.add(new StarButton(2, x + 110, y + 5)); this.buttonList.add(new FlatIconButton(3, x + 328, y + 5, 18, 18, 32, 0).setTooltips("gui.yes_steve_model.all_models")); - this.buttonList.add(new FlatIconButton(4, x + 308, y + 5, 18, 18, 48, 0).setTooltips("gui.yes_steve_model.auth_models")); - this.buttonList.add(new FlatIconButton(5, x + 288, y + 5, 18, 18, 0, 0).setTooltips("gui.yes_steve_model.star_models")); + this.buttonList.add(new FlatIconButton(5, x + 308, y + 5, 18, 18, 0, 0).setTooltips("gui.yes_steve_model.star_models")); this.buttonList.add(new FlatIconButton(6, x + 397, y + 5, 18, 18, 16, 16).setTooltips("gui.yes_steve_model.config")); this.buttonList.add(new FlatIconButton(7, x + 377, y + 5, 18, 18, 48, 16).setTooltips("gui.yes_steve_model.fix")); this.buttonList.add(new FlatIconButton(8, x + 357, y + 5, 18, 18, 80, 0).setTooltips("gui.yes_steve_model.open_model_folder.open")); diff --git a/src/main/java/software/bernie/geckolib3/geo/GeoReplacedEntityRenderer.java b/src/main/java/software/bernie/geckolib3/geo/GeoReplacedEntityRenderer.java index a027b6e..a6b7c8e 100644 --- a/src/main/java/software/bernie/geckolib3/geo/GeoReplacedEntityRenderer.java +++ b/src/main/java/software/bernie/geckolib3/geo/GeoReplacedEntityRenderer.java @@ -247,19 +247,35 @@ protected void applyRotations(EntityLivingBase entityLiving, float ageInTicks, f GlStateManager.rotate(f * this.getDeathMaxRotation(entityLiving), 0, 0, 1); } - /* - * TODO: probably doesn't exist in 1.12.2 as well else if - * (entityLiving.isSpinAttacking()) { - * matrixStackIn.rotate(Vector3f.XP.rotationDegrees(-90.0F - - * entityLiving.rotationPitch)); - * matrixStackIn.rotate(Vector3f.YP.rotationDegrees(((float) - * entityLiving.ticksExisted + partialTicks) * -75.0F)); } else if (pose == - * Pose.SLEEPING) { Direction direction = entityLiving.getBedDirection(); float - * f1 = direction != null ? getFacingAngle(direction) : rotationYaw; - * matrixStackIn.rotate(Vector3f.YP.rotationDegrees(f1)); - * matrixStackIn.rotate(Vector3f.ZP.rotationDegrees(this.getDeathMaxRotation( - * entityLiving))); matrixStackIn.rotate(Vector3f.YP.rotationDegrees(270.0F)); } - */ + else if (entityLiving.isPlayerSleeping()) { + float sleepRotation = 0.0F; + if (entityLiving instanceof EntityPlayer) { + EntityPlayer player = (EntityPlayer) entityLiving; + if (player.playerLocation != null) { + try { + int direction = player.worldObj.getBlockMetadata( + player.playerLocation.posX, + player.playerLocation.posY, + player.playerLocation.posZ + ) & 3; + // 床的方向 + switch (direction) { + case 0: sleepRotation = 180.0F; break; + case 1: sleepRotation = 90.0F; break; + case 2: sleepRotation = 0.0F; break; + case 3: sleepRotation = 270.0F; break; + } + + } catch (Exception e) { + sleepRotation = 180.0F - rotationYaw; + } + } + } + + GlStateManager.rotate(sleepRotation, 0, 1, 0); + GlStateManager.rotate(-90.0F, 1.0F, 0.0F, 0.0F);//旋转玩家 + GlStateManager.translate(0.0F, -1.8F, 0.0F); //向后偏移1.8 + } else if ((entityLiving instanceof EntityLiving && ((EntityLiving) entityLiving).hasCustomNameTag()) || entityLiving instanceof EntityPlayer) { String s = ChatFormatting.stripFormatting(entityLiving.getCommandSenderName()); diff --git a/src/main/resources/assets/ysmu/lang/en_us.lang b/src/main/resources/assets/ysmu/lang/en_US.lang similarity index 99% rename from src/main/resources/assets/ysmu/lang/en_us.lang rename to src/main/resources/assets/ysmu/lang/en_US.lang index b9902db..973e9e4 100644 --- a/src/main/resources/assets/ysmu/lang/en_us.lang +++ b/src/main/resources/assets/ysmu/lang/en_US.lang @@ -3,7 +3,6 @@ gui.yes_steve_model.close=Close gui.yes_steve_model.pre_page=Pre Page gui.yes_steve_model.next_page=Next Page gui.yes_steve_model.all_models=All Models -gui.yes_steve_model.auth_models=Auth Models gui.yes_steve_model.star_models=Star Models gui.yes_steve_model.config=Open Config GUI gui.yes_steve_model.download=Open Download GUI diff --git a/src/main/resources/assets/ysmu/lang/zh_cn.lang b/src/main/resources/assets/ysmu/lang/zh_CN.lang similarity index 99% rename from src/main/resources/assets/ysmu/lang/zh_cn.lang rename to src/main/resources/assets/ysmu/lang/zh_CN.lang index ea4cf12..6714092 100644 --- a/src/main/resources/assets/ysmu/lang/zh_cn.lang +++ b/src/main/resources/assets/ysmu/lang/zh_CN.lang @@ -3,7 +3,6 @@ gui.yes_steve_model.close=关闭 gui.yes_steve_model.pre_page=前一页 gui.yes_steve_model.next_page=后一页 gui.yes_steve_model.all_models=所有模型 -gui.yes_steve_model.auth_models=授权模型 gui.yes_steve_model.star_models=收藏模型 gui.yes_steve_model.config=打开配置界面 gui.yes_steve_model.download=打开下载界面