0% found this document useful (0 votes)
28 views21 pages

ClientPlayerEntity Class Overview

minecraft
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
28 views21 pages

ClientPlayerEntity Class Overview

minecraft
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd

//

// Source code recreated from a .class file by IntelliJ IDEA


// (powered by Fernflower decompiler)
//

package [Link];

import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link].ClientCommandC2SPacket;
import [Link].ClientStatusC2SPacket;
import [Link].CloseHandledScreenC2SPacket;
import [Link].HandSwingC2SPacket;
import [Link].PlayerActionC2SPacket;
import [Link].PlayerInputC2SPacket;
import [Link].PlayerMoveC2SPacket;
import [Link].RecipeBookDataC2SPacket;
import [Link].UpdatePlayerAbilitiesC2SPacket;
import [Link].VehicleMoveC2SPacket;
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link].Vec2f;
import [Link].Vec3d;
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];

@Environment([Link])
public class ClientPlayerEntity extends AbstractClientPlayerEntity {
public static final Logger LOGGER = [Link]();
private static final int field_32671 = 20;
private static final int field_32672 = 600;
private static final int field_32673 = 100;
private static final float field_32674 = 0.6F;
private static final double field_32675 = 0.35;
private static final double MAX_SOFT_COLLISION_RADIANS = (double)0.13962634F;
private static final float field_38337 = 0.3F;
public final ClientPlayNetworkHandler networkHandler;
private final StatHandler statHandler;
private final ClientRecipeBook recipeBook;
private final List<ClientPlayerTickable> tickables = [Link]();
private int clientPermissionLevel = 0;
private double lastX;
private double lastBaseY;
private double lastZ;
private float lastYaw;
private float lastPitch;
private boolean lastOnGround;
private boolean inSneakingPose;
private boolean lastSneaking;
private boolean lastSprinting;
private int ticksSinceLastPositionPacketSent;
private boolean healthInitialized;
@Nullable
private String serverBrand;
public Input input;
protected final MinecraftClient client;
protected int ticksLeftToDoubleTapSprint;
public float renderYaw;
public float renderPitch;
public float lastRenderYaw;
public float lastRenderPitch;
private int field_3938;
private float mountJumpStrength;
public float nauseaIntensity;
public float prevNauseaIntensity;
private boolean usingItem;
@Nullable
private Hand activeHand;
private boolean riding;
private boolean autoJumpEnabled = true;
private int ticksToNextAutojump;
private boolean falling;
private int underwaterVisibilityTicks;
private boolean showsDeathScreen = true;

public ClientPlayerEntity(MinecraftClient client, ClientWorld world,


ClientPlayNetworkHandler networkHandler, StatHandler stats, ClientRecipeBook
recipeBook, boolean lastSneaking, boolean lastSprinting) {
super(world, [Link]());
[Link] = client;
[Link] = networkHandler;
[Link] = stats;
[Link] = recipeBook;
[Link] = lastSneaking;
[Link] = lastSprinting;
[Link](new AmbientSoundPlayer(this, [Link]()));
[Link](new BubbleColumnSoundPlayer(this));
[Link](new BiomeEffectSoundPlayer(this,
[Link](), [Link]()));
}

public boolean damage(DamageSource source, float amount) {


return false;
}

public void heal(float amount) {


}

public boolean startRiding(Entity entity, boolean force) {


if (![Link](entity, force)) {
return false;
} else {
if (entity instanceof AbstractMinecartEntity) {
[Link]().play(new
MinecartInsideSoundInstance(this, (AbstractMinecartEntity)entity, true));
[Link]().play(new
MinecartInsideSoundInstance(this, (AbstractMinecartEntity)entity, false));
}

return true;
}
}

public void dismountVehicle() {


[Link]();
[Link] = false;
}

public float getPitch(float tickDelta) {


return [Link]();
}

public float getYaw(float tickDelta) {


return [Link]() ? [Link](tickDelta) : [Link]();
}

public void tick() {


if ([Link]().isPosLoaded([Link](), [Link]())) {
[Link]();
if ([Link]()) {
[Link](new
[Link]([Link](), [Link](),
[Link]()));
[Link](new
PlayerInputC2SPacket([Link], [Link], [Link],
[Link]));
Entity entity = [Link]();
if (entity != this && [Link]()) {
[Link](new
VehicleMoveC2SPacket(entity));
[Link]();
}
} else {
[Link]();
}

for(ClientPlayerTickable clientPlayerTickable : [Link]) {


[Link]();
}

}
}

public float getMoodPercentage() {


for(ClientPlayerTickable clientPlayerTickable : [Link]) {
if (clientPlayerTickable instanceof BiomeEffectSoundPlayer) {
return
((BiomeEffectSoundPlayer)clientPlayerTickable).getMoodPercentage();
}
}

return 0.0F;
}

private void sendMovementPackets() {


[Link]();
boolean bl = [Link]();
if (bl != [Link]) {
[Link] mode = bl ? Mode.PRESS_SHIFT_KEY :
Mode.RELEASE_SHIFT_KEY;
[Link](new ClientCommandC2SPacket(this, mode));
[Link] = bl;
}

if ([Link]()) {
double d = [Link]() - [Link];
double e = [Link]() - [Link];
double f = [Link]() - [Link];
double g = (double)([Link]() - [Link]);
double h = (double)([Link]() - [Link]);
++[Link];
boolean bl2 = [Link](d, e, f) >
[Link](2.0E-4) || [Link] >= 20;
boolean bl3 = g != (double)0.0F || h != (double)0.0F;
if ([Link]()) {
Vec3d vec3d = [Link]();
[Link](new
[Link](vec3d.x, (double)-999.0F, vec3d.z, [Link](),
[Link](), [Link]()));
bl2 = false;
} else if (bl2 && bl3) {
[Link](new
[Link]([Link](), [Link](), [Link](), [Link](),
[Link](), [Link]()));
} else if (bl2) {
[Link](new
[Link]([Link](), [Link](), [Link](),
[Link]()));
} else if (bl3) {
[Link](new
[Link]([Link](), [Link](),
[Link]()));
} else if ([Link] != [Link]()) {
[Link](new
[Link]([Link]()));
}

if (bl2) {
[Link] = [Link]();
[Link] = [Link]();
[Link] = [Link]();
[Link] = 0;
}

if (bl3) {
[Link] = [Link]();
[Link] = [Link]();
}

[Link] = [Link]();
[Link] =
(Boolean)[Link]().getValue();
}

private void sendSprintingPacket() {


boolean bl = [Link]();
if (bl != [Link]) {
[Link] mode = bl ? Mode.START_SPRINTING :
Mode.STOP_SPRINTING;
[Link](new ClientCommandC2SPacket(this, mode));
[Link] = bl;
}

public boolean dropSelectedItem(boolean entireStack) {


[Link] action = entireStack ? Action.DROP_ALL_ITEMS :
Action.DROP_ITEM;
ItemStack itemStack = [Link]().dropSelectedItem(entireStack);
[Link](new PlayerActionC2SPacket(action,
[Link], [Link]));
return ![Link]();
}

public void swingHand(Hand hand) {


[Link](hand);
[Link](new HandSwingC2SPacket(hand));
}

public void requestRespawn() {


[Link](new
ClientStatusC2SPacket([Link].ClientStatusC2SPacket.M
ode.PERFORM_RESPAWN));
[Link]();
}

protected void applyDamage(DamageSource source, float amount) {


if (![Link](source)) {
[Link]([Link]() - amount);
}
}

public void closeHandledScreen() {


[Link](new
CloseHandledScreenC2SPacket([Link]));
[Link]();
}

public void closeScreen() {


[Link]();
[Link]((Screen)null);
}

public void updateHealth(float health) {


if ([Link]) {
float f = [Link]() - health;
if (f <= 0.0F) {
[Link](health);
if (f < 0.0F) {
[Link] = 10;
}
} else {
[Link] = f;
[Link] = 20;
[Link](health);
[Link] = 10;
[Link] = [Link];
}
} else {
[Link](health);
[Link] = true;
}

public void sendAbilitiesUpdate() {


[Link](new
UpdatePlayerAbilitiesC2SPacket([Link]()));
}

public boolean isMainPlayer() {


return true;
}

public boolean isHoldingOntoLadder() {


return ![Link]().flying && [Link]();
}

public boolean shouldSpawnSprintingParticles() {


return ![Link]().flying &&
[Link]();
}

public boolean shouldDisplaySoulSpeedEffects() {


return ![Link]().flying &&
[Link]();
}

protected void startRidingJump() {


[Link](new ClientCommandC2SPacket(this,
Mode.START_RIDING_JUMP, [Link]([Link]() * 100.0F)));
}

public void openRidingInventory() {


[Link](new ClientCommandC2SPacket(this,
Mode.OPEN_INVENTORY));
}

public void setServerBrand(@Nullable String serverBrand) {


[Link] = serverBrand;
}

@Nullable
public String getServerBrand() {
return [Link];
}
public StatHandler getStatHandler() {
return [Link];
}

public ClientRecipeBook getRecipeBook() {


return [Link];
}

public void onRecipeDisplayed(Recipe<?> recipe) {


if ([Link](recipe)) {
[Link](recipe);
[Link](new RecipeBookDataC2SPacket(recipe));
}

protected int getPermissionLevel() {


return [Link];
}

public void setClientPermissionLevel(int clientPermissionLevel) {


[Link] = clientPermissionLevel;
}

public void sendMessage(Text message, boolean overlay) {


[Link]().onGameMessage(message, overlay);
}

private void pushOutOfBlocks(double x, double z) {


BlockPos blockPos = [Link](x, [Link](), z);
if ([Link](blockPos)) {
double d = x - (double)[Link]();
double e = z - (double)[Link]();
Direction direction = null;
double f = Double.MAX_VALUE;
Direction[] directions = new Direction[]{[Link],
[Link], [Link], [Link]};

for(Direction direction2 : directions) {


double g = [Link]().choose(d, (double)0.0F, e);
double h = [Link]() == [Link] ?
(double)1.0F - g : g;
if (h < f && ![Link]([Link](direction2))) {
f = h;
direction = direction2;
}
}

if (direction != null) {
Vec3d vec3d = [Link]();
if ([Link]() == Axis.X) {
[Link](0.1 * (double)[Link](), vec3d.y,
vec3d.z);
} else {
[Link](vec3d.x, vec3d.y, 0.1 *
(double)[Link]());
}
}
}
}

private boolean wouldCollideAt(BlockPos pos) {


Box box = [Link]();
Box box2 = (new Box((double)[Link](), [Link], (double)[Link](),
(double)[Link]() + (double)1.0F, [Link], (double)[Link]() +
(double)1.0F)).contract(1.0E-7);
return [Link]().canCollide(this, box2);
}

public void setExperience(float progress, int total, int level) {


[Link] = progress;
[Link] = total;
[Link] = level;
}

public void sendMessage(Text message) {


[Link]().addMessage(message);
}

public void handleStatus(byte status) {


if (status >= 24 && status <= 28) {
[Link](status - 24);
} else {
[Link](status);
}

public void setShowsDeathScreen(boolean showsDeathScreen) {


[Link] = showsDeathScreen;
}

public boolean showsDeathScreen() {


return [Link];
}

public void playSound(SoundEvent sound, float volume, float pitch) {


[Link]().playSound([Link](), [Link](), [Link](), sound,
[Link](), volume, pitch, false);
}

public void playSound(SoundEvent event, SoundCategory category, float volume,


float pitch) {
[Link]().playSound([Link](), [Link](), [Link](), event,
category, volume, pitch, false);
}

public boolean canMoveVoluntarily() {


return true;
}

public void setCurrentHand(Hand hand) {


ItemStack itemStack = [Link](hand);
if (![Link]() && ![Link]()) {
[Link](hand);
[Link] = true;
[Link] = hand;
}
}

public boolean isUsingItem() {


return [Link];
}

public void clearActiveItem() {


[Link]();
[Link] = false;
}

public Hand getActiveHand() {


return (Hand)[Link]([Link], Hand.MAIN_HAND);
}

public void onTrackedDataSet(TrackedData<?> data) {


[Link](data);
if (LIVING_FLAGS.equals(data)) {
boolean bl = ((Byte)[Link](LIVING_FLAGS) & 1) > 0;
Hand hand = ((Byte)[Link](LIVING_FLAGS) & 2) > 0 ?
Hand.OFF_HAND : Hand.MAIN_HAND;
if (bl && ![Link]) {
[Link](hand);
} else if (!bl && [Link]) {
[Link]();
}
}

if ([Link](data) && [Link]() && ![Link]) {


[Link]().play(new ElytraSoundInstance(this));
}

@Nullable
public JumpingMount getJumpingMount() {
Entity var2 = [Link]();
JumpingMount var10000;
if (var2 instanceof JumpingMount jumpingMount) {
if ([Link]()) {
var10000 = jumpingMount;
return var10000;
}
}

var10000 = null;
return var10000;
}

public float getMountJumpStrength() {


return [Link];
}

public boolean shouldFilterText() {


return [Link]();
}

public void openEditSignScreen(SignBlockEntity sign, boolean front) {


if (sign instanceof HangingSignBlockEntity hangingSignBlockEntity) {
[Link](new HangingSignEditScreen(hangingSignBlockEntity,
front, [Link]()));
} else {
[Link](new SignEditScreen(sign, front,
[Link]()));
}

public void openCommandBlockMinecartScreen(CommandBlockExecutor


commandBlockExecutor) {
[Link](new
MinecartCommandBlockScreen(commandBlockExecutor));
}

public void openCommandBlockScreen(CommandBlockBlockEntity commandBlock) {


[Link](new CommandBlockScreen(commandBlock));
}

public void openStructureBlockScreen(StructureBlockBlockEntity structureBlock)


{
[Link](new StructureBlockScreen(structureBlock));
}

public void openJigsawScreen(JigsawBlockEntity jigsaw) {


[Link](new JigsawBlockScreen(jigsaw));
}

public void useBook(ItemStack book, Hand hand) {


if ([Link](Items.WRITABLE_BOOK)) {
[Link](new BookEditScreen(this, book, hand));
}

public void addCritParticles(Entity target) {


[Link](target, [Link]);
}

public void addEnchantedHitParticles(Entity target) {


[Link](target,
ParticleTypes.ENCHANTED_HIT);
}

public boolean isSneaking() {


return [Link] != null && [Link];
}

public boolean isInSneakingPose() {


return [Link];
}

public boolean shouldSlowDown() {


return [Link]() || [Link]();
}

public void tickNewAi() {


[Link]();
if ([Link]()) {
[Link] = [Link];
[Link] = [Link];
[Link] = [Link];
[Link] = [Link];
[Link] = [Link];
[Link] += ([Link]() - [Link]) * 0.5F;
[Link] += ([Link]() - [Link]) * 0.5F;
}

protected boolean isCamera() {


return [Link]() == this;
}

public void init() {


[Link]([Link]);
if ([Link]() != null) {
for(double d = [Link](); d > (double)[Link]().getBottomY() &&
d < (double)[Link]().getTopY(); ++d) {
[Link]([Link](), d, [Link]());
if ([Link]().isSpaceEmpty(this)) {
break;
}
}

[Link]([Link]);
[Link](0.0F);
}

[Link]([Link]());
[Link] = 0;
}

public void tickMovement() {


if ([Link] > 0) {
--[Link];
}

if (!([Link] instanceof DownloadingTerrainScreen)) {


[Link]();
}

boolean bl = [Link];
boolean bl2 = [Link];
boolean bl3 = [Link]();
[Link] = ![Link]().flying && ![Link]() &&
[Link]([Link]) && ([Link]() || !
[Link]() && ![Link]([Link]));
float f = [Link](0.3F +
[Link](this), 0.0F, 1.0F);
[Link]([Link](), f);
[Link]().onMovement([Link]);
if ([Link]() && ![Link]()) {
Input var10000 = [Link];
[Link] *= 0.2F;
var10000 = [Link];
[Link] *= 0.2F;
[Link] = 0;
}

boolean bl4 = false;


if ([Link] > 0) {
--[Link];
bl4 = true;
[Link] = true;
}

if (![Link]) {
[Link]([Link]() - (double)[Link]() * 0.35,
[Link]() + (double)[Link]() * 0.35);
[Link]([Link]() - (double)[Link]() * 0.35,
[Link]() - (double)[Link]() * 0.35);
[Link]([Link]() + (double)[Link]() * 0.35,
[Link]() - (double)[Link]() * 0.35);
[Link]([Link]() + (double)[Link]() * 0.35,
[Link]() + (double)[Link]() * 0.35);
}

if (bl2) {
[Link] = 0;
}

boolean bl5 = [Link]();


boolean bl6 = [Link]() ? [Link]().isOnGround() :
[Link]();
boolean bl7 = !bl2 && !bl3;
if ((bl6 || [Link]()) && bl7 && bl5) {
if ([Link] <= 0 && !
[Link]()) {
[Link] = 7;
} else {
[Link](true);
}
}

if ((![Link]() || [Link]()) && bl5 &&


[Link]()) {
[Link](true);
}

if ([Link]()) {
boolean bl8 = ![Link]() || ![Link]();
boolean bl9 = bl8 || [Link] && ![Link]
|| [Link]() && ![Link]();
if ([Link]()) {
if (![Link]() && ![Link] && bl8 || !
[Link]()) {
[Link](false);
}
} else if (bl9) {
[Link](false);
}
}

boolean bl8 = false;


if ([Link]().allowFlying) {
if ([Link]()) {
if (![Link]().flying) {
[Link]().flying = true;
bl8 = true;
[Link]();
}
} else if (!bl && [Link] && !bl4) {
if ([Link] == 0) {
[Link] = 7;
} else if (![Link]()) {
[Link]().flying = ![Link]().flying;
bl8 = true;
[Link]();
[Link] = 0;
}
}
}

if ([Link] && !bl8 && !bl && ![Link]().flying && !


[Link]() && ![Link]()) {
ItemStack itemStack = [Link]([Link]);
if ([Link]([Link]) && [Link](itemStack) &&
[Link]()) {
[Link](new ClientCommandC2SPacket(this,
Mode.START_FALL_FLYING));
}
}

[Link] = [Link]();
if ([Link]() && [Link] &&
[Link]()) {
[Link]();
}

if ([Link]([Link])) {
int i = [Link]() ? 10 : 1;
[Link] =
[Link]([Link] + i, 0, 600);
} else if ([Link] > 0) {
[Link]([Link]);
[Link] =
[Link]([Link] - 10, 0, 600);
}

if ([Link]().flying && [Link]()) {


int i = 0;
if ([Link]) {
--i;
}

if ([Link]) {
++i;
}

if (i != 0) {
[Link]([Link]().add((double)0.0F, (double)
((float)i * [Link]().getFlySpeed() * 3.0F), (double)0.0F));
}
}
JumpingMount jumpingMount = [Link]();
if (jumpingMount != null && [Link]() == 0) {
if (this.field_3938 < 0) {
++this.field_3938;
if (this.field_3938 == 0) {
[Link] = 0.0F;
}
}

if (bl && ![Link]) {


this.field_3938 = -10;

[Link]([Link]([Link]() *
100.0F));
[Link]();
} else if (!bl && [Link]) {
this.field_3938 = 0;
[Link] = 0.0F;
} else if (bl) {
++this.field_3938;
if (this.field_3938 < 10) {
[Link] = (float)this.field_3938 * 0.1F;
} else {
[Link] = 0.8F + 2.0F / (float)(this.field_3938
- 9) * 0.1F;
}
}
} else {
[Link] = 0.0F;
}

[Link]();
if ([Link]() && [Link]().flying && !
[Link]()) {
[Link]().flying = false;
[Link]();
}

protected void updatePostDeath() {


++[Link];
if ([Link] == 20) {
[Link]([Link]);
}

private void updateNausea() {


[Link] = [Link];
float f = 0.0F;
if ([Link]) {
if ([Link] != null && !
[Link]() && !([Link] instanceof
DeathScreen)) {
if ([Link] instanceof HandledScreen) {
[Link]();
}
[Link]((Screen)null);
}

if ([Link] == 0.0F) {

[Link]().play([Link]([Link]
K_PORTAL_TRIGGER, [Link]() * 0.4F + 0.8F, 0.25F));
}

f = 0.0125F;
[Link] = false;
} else if ([Link]([Link]) && !
[Link]([Link]).isDurationBelow(60)) {
f = 0.006666667F;
} else if ([Link] > 0.0F) {
f = -0.05F;
}

[Link] = [Link]([Link] + f, 0.0F,


1.0F);
[Link]();
}

public void tickRiding() {


[Link]();
[Link] = false;
Entity var2 = [Link]();
if (var2 instanceof BoatEntity boatEntity) {
[Link]([Link], [Link],
[Link], [Link]);
[Link] |= [Link] || [Link] ||
[Link] || [Link];
}

public boolean isRiding() {


return [Link];
}

@Nullable
public StatusEffectInstance removeStatusEffectInternal(@Nullable StatusEffect
type) {
if (type == [Link]) {
[Link] = 0.0F;
[Link] = 0.0F;
}

return [Link](type);
}

public void move(MovementType movementType, Vec3d movement) {


double d = [Link]();
double e = [Link]();
[Link](movementType, movement);
[Link]((float)([Link]() - d), (float)([Link]() - e));
}
public boolean isAutoJumpEnabled() {
return [Link];
}

protected void autoJump(float dx, float dz) {


if ([Link]()) {
Vec3d vec3d = [Link]();
Vec3d vec3d2 = [Link]((double)dx, (double)0.0F, (double)dz);
Vec3d vec3d3 = new Vec3d((double)dx, (double)0.0F, (double)dz);
float f = [Link]();
float g = (float)[Link]();
if (g <= 0.001F) {
Vec2f vec2f = [Link]();
float h = f * vec2f.x;
float i = f * vec2f.y;
float j = [Link]([Link]() * ((float)[Link] / 180F));
float k = [Link]([Link]() * ((float)[Link] / 180F));
vec3d3 = new Vec3d((double)(h * k - i * j), vec3d3.y, (double)(i *
k + h * j));
g = (float)[Link]();
if (g <= 0.001F) {
return;
}
}

float l = [Link](g);
Vec3d vec3d4 = [Link]((double)l);
Vec3d vec3d5 = [Link]();
float j = (float)(vec3d5.x * vec3d4.x + vec3d5.z * vec3d4.z);
if (!(j < -0.15F)) {
ShapeContext shapeContext = [Link](this);
BlockPos blockPos = [Link]([Link](),
[Link]().maxY, [Link]());
BlockState blockState = [Link]().getBlockState(blockPos);
if ([Link]([Link](), blockPos,
shapeContext).isEmpty()) {
blockPos = [Link]();
BlockState blockState2 =
[Link]().getBlockState(blockPos);
if ([Link]([Link](), blockPos,
shapeContext).isEmpty()) {
float m = 7.0F;
float n = 1.2F;
if ([Link](StatusEffects.JUMP_BOOST)) {
n += (float)
([Link](StatusEffects.JUMP_BOOST).getAmplifier() + 1) * 0.75F;
}

float o = [Link](f * 7.0F, 1.0F / l);


Vec3d vec3d7 = [Link]([Link]((double)o));
float p = [Link]();
float q = [Link]();
Box box = (new Box(vec3d, [Link]((double)0.0F,
(double)q, (double)0.0F))).expand((double)p, (double)0.0F, (double)p);
Vec3d vec3d6 = [Link]((double)0.0F, (double)0.51F,
(double)0.0F);
vec3d7 = [Link]((double)0.0F, (double)0.51F,
(double)0.0F);
Vec3d vec3d8 = [Link](new Vec3d((double)0.0F,
(double)1.0F, (double)0.0F));
Vec3d vec3d9 = [Link]((double)(p * 0.5F));
Vec3d vec3d10 = [Link](vec3d9);
Vec3d vec3d11 = [Link](vec3d9);
Vec3d vec3d12 = [Link](vec3d9);
Vec3d vec3d13 = [Link](vec3d9);
Iterable<VoxelShape> iterable =
[Link]().getCollisions(this, box);
Iterator<Box> iterator =
[Link]([Link](), false).flatMap((shape) ->
[Link]().stream()).iterator();
float r = Float.MIN_VALUE;

while([Link]()) {
Box box2 = (Box)[Link]();
if ([Link](vec3d10, vec3d11) ||
[Link](vec3d12, vec3d13)) {
r = (float)[Link];
Vec3d vec3d14 = [Link]();
BlockPos blockPos2 = [Link](vec3d14);

for(int s = 1; (float)s < n; ++s) {


BlockPos blockPos3 = [Link](s);
BlockState blockState3 =
[Link]().getBlockState(blockPos3);
VoxelShape voxelShape;
if (!(voxelShape =
[Link]([Link](), blockPos3, shapeContext)).isEmpty())
{
r = (float)[Link](Axis.Y) +
(float)[Link]();
if ((double)r - [Link]() > (double)n) {
return;
}
}

if (s > 1) {
blockPos = [Link]();
BlockState blockState4 =
[Link]().getBlockState(blockPos);
if (!
[Link]([Link](), blockPos, shapeContext).isEmpty()) {
return;
}
}
}
break;
}
}

if (r != Float.MIN_VALUE) {
float t = (float)((double)r - [Link]());
if (!(t <= 0.5F) && !(t > n)) {
[Link] = 1;
}
}
}
}
}
}
}

protected boolean hasCollidedSoftly(Vec3d adjustedMovement) {


float f = [Link]() * ((float)[Link] / 180F);
double d = (double)[Link](f);
double e = (double)[Link](f);
double g = (double)[Link] * e - (double)[Link] * d;
double h = (double)[Link] * e + (double)[Link] * d;
double i = [Link](g) + [Link](h);
double j = [Link](adjustedMovement.x) +
[Link](adjustedMovement.z);
if (!(i < (double)1.0E-5F) && !(j < (double)1.0E-5F)) {
double k = g * adjustedMovement.x + h * adjustedMovement.z;
double l = [Link](k / [Link](i * j));
return l < (double)0.13962634F;
} else {
return false;
}
}

private boolean shouldAutoJump() {


return [Link]() && [Link] <= 0 &&
[Link]() && ![Link]() && ![Link]() &&
[Link]() && (double)[Link]() >=
(double)1.0F;
}

private boolean hasMovementInput() {


Vec2f vec2f = [Link]();
return vec2f.x != 0.0F || vec2f.y != 0.0F;
}

private boolean canStartSprinting() {


return ![Link]() && [Link]() && [Link]() && !
[Link]() && ![Link]([Link]) && (!
[Link]() || [Link]([Link]())) && !
[Link]();
}

private boolean canVehicleSprint(Entity vehicle) {


return [Link]() &&
[Link]();
}

private boolean isWalking() {


double d = 0.8;
return [Link]() ? [Link]() :
(double)[Link] >= 0.8;
}

private boolean canSprint() {


return [Link]() || (float)[Link]().getFoodLevel() >
6.0F || [Link]().allowFlying;
}

public float getUnderwaterVisibility() {


if (![Link]([Link])) {
return 0.0F;
} else {
float f = 600.0F;
float g = 100.0F;
if ((float)[Link] >= 600.0F) {
return 1.0F;
} else {
float h = [Link]((float)[Link] /
100.0F, 0.0F, 1.0F);
float i = (float)[Link] < 100.0F ? 0.0F :
[Link](((float)[Link] - 100.0F) / 500.0F, 0.0F,
1.0F);
return h * 0.6F + i * 0.39999998F;
}
}
}

public void onGameModeChanged(GameMode gameMode) {


if (gameMode == [Link]) {
[Link]([Link]().withAxis(Axis.Y, (double)0.0F));
}

public boolean isSubmergedInWater() {


return [Link];
}

protected boolean updateWaterSubmersionState() {


boolean bl = [Link];
boolean bl2 = [Link]();
if ([Link]()) {
return [Link];
} else {
if (!bl && bl2) {
[Link]().playSound([Link](), [Link](), [Link](),
SoundEvents.AMBIENT_UNDERWATER_ENTER, [Link], 1.0F, 1.0F, false);
[Link]().play(new
[Link](this));
}

if (bl && !bl2) {


[Link]().playSound([Link](), [Link](), [Link](),
SoundEvents.AMBIENT_UNDERWATER_EXIT, [Link], 1.0F, 1.0F, false);
}

return [Link];
}
}

public Vec3d getLeashPos(float delta) {


if ([Link]().isFirstPerson()) {
float f = [Link](delta * 0.5F, [Link](), [Link]) *
((float)[Link] / 180F);
float g = [Link](delta * 0.5F, [Link](),
[Link]) * ((float)[Link] / 180F);
double d = [Link]() == [Link] ? (double)-1.0F :
(double)1.0F;
Vec3d vec3d = new Vec3d(0.39 * d, -0.6, 0.3);
return [Link](-g).rotateY(-f).add([Link](delta));
} else {
return [Link](delta);
}
}

public void onPickupSlotClick(ItemStack cursorStack, ItemStack slotStack,


ClickType clickType) {
[Link]().onPickupSlotClick(cursorStack, slotStack,
clickType);
}

public float getBodyYaw() {


return [Link]();
}
}

You might also like