character sizes, ..

This commit is contained in:
Sen 2025-03-27 23:14:26 +01:00
parent 74f730e450
commit 517e7d74f9
42 changed files with 405 additions and 209 deletions

View file

@ -26,7 +26,7 @@ import game.entity.projectile.EntityProjectile;
import game.entity.types.EntityLiving;
import game.gui.Gui;
import game.gui.GuiConsole;
import game.gui.GuiSkin;
import game.gui.GuiChar;
import game.gui.container.GuiMachine;
import game.gui.container.GuiMerchant;
import game.init.EntityRegistry;
@ -180,7 +180,7 @@ public class ClientPlayer extends NetHandler
this.gameController.loadWorld(this.clientWorldController, packetIn.getEntityType());
// this.gameController.thePlayer.dimension = this.clientWorldController.dimension.getDimensionId();
this.gameController.thePlayer.setId(packetIn.getEntityId());
this.gameController.displayGuiScreen(this.gameController.charEditor ? GuiSkin.INSTANCE : null);
this.gameController.displayGuiScreen(this.gameController.charEditor ? GuiChar.INSTANCE : null);
// this.currentServerMaxPlayers = packetIn.getMaxPlayers();
// this.gameController.controller.setCheat(packetIn.getCheat());
// this.gameController.updateViewDistance();
@ -442,8 +442,8 @@ public class ClientPlayer extends NetHandler
{
entity.getDataWatcher().updateWatchedObjectsFromList(packetIn.func_149376_c());
if(entity == this.gameController.thePlayer && this.gameController.open instanceof GuiSkin)
((GuiSkin)this.gameController.open).checkReopen();
if(entity == this.gameController.thePlayer && this.gameController.open instanceof GuiChar)
((GuiChar)this.gameController.open).checkReopen();
}
}
@ -1022,7 +1022,7 @@ public class ClientPlayer extends NetHandler
// }
this.gameController.setDimensionAndSpawnPlayer(dim.getDimensionId(), packetIn.getEntityType());
this.gameController.displayGuiScreen(this.gameController.charEditor ? GuiSkin.INSTANCE : null);
this.gameController.displayGuiScreen(this.gameController.charEditor ? GuiChar.INSTANCE : null);
// this.gameController.controller.setCheat(packetIn.getCheat());
}

View file

@ -1760,7 +1760,7 @@ public class Player extends NetHandler implements ICrafting, Executor
this.admin = admin;
if(!this.isAdmin() && this.entity != null && this.entity.noclip) {
this.entity.noclip = false;
this.entity.flying &= this.entity.hasEffect(Potion.FLYING);
this.entity.flying &= this.entity.hasEffect(Potion.FLYING) || this.entity.canNaturallyFly();
this.entity.fallDistance = 0.0F;
this.sendPlayerAbilities();
this.addFeed(TextColor.RED + "NoClip wurde deaktiviert");
@ -2572,7 +2572,7 @@ public class Player extends NetHandler implements ICrafting, Executor
break;
case START_FLYING:
this.entity.flying = this.entity.hasEffect(Potion.FLYING) || this.entity.noclip;
this.entity.flying = this.entity.hasEffect(Potion.FLYING) || this.entity.noclip || this.entity.canNaturallyFly();
break;
case STOP_FLYING:
@ -2592,7 +2592,7 @@ public class Player extends NetHandler implements ICrafting, Executor
// break;
case SET_HEIGHT:
this.entity.setHeight(((float)ExtMath.clampi(packetIn.getAuxData(), 120, 320) * 0.01f) / this.entity.getSpecies().renderer.height);
this.entity.setHeight(((float)ExtMath.clampi(packetIn.getAuxData(), this.entity.getMinSize(), this.entity.getMaxSize()) * 0.01f) / this.entity.getSpecies().renderer.height);
// Log.CONSOLE.info("" + this.entity.height + "(" + this.entity.getHeight() + ")");
break;
@ -2721,7 +2721,7 @@ public class Player extends NetHandler implements ICrafting, Executor
if(!this.entity.noclip)
this.entity.mountEntity(null);
this.entity.noclip ^= true;
this.entity.flying &= this.entity.hasEffect(Potion.FLYING) || this.entity.noclip;
this.entity.flying &= this.entity.hasEffect(Potion.FLYING) || this.entity.noclip || this.entity.canNaturallyFly();
this.entity.fallDistance = 0.0F;
this.sendPlayerAbilities();
this.addFeed((this.entity.noclip ? TextColor.GREEN : TextColor.RED) + "NoClip ist jetzt " + (this.entity.noclip ? "eingeschaltet" : "ausgeschaltet"));