Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions src/main/java/com/fox/ysmu/client/gui/PlayerModelScreen.java
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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"));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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=打开下载界面
Expand Down