MC Utils
== AT == public net.minecraft.server.level.ServerChunkCache mainThread public net.minecraft.server.level.ServerLevel chunkSource public org.bukkit.craftbukkit.inventory.CraftItemStack handle public net.minecraft.server.level.ChunkMap getVisibleChunkIfPresent(J)Lnet/minecraft/server/level/ChunkHolder; public net.minecraft.server.level.ServerChunkCache mainThreadProcessor public net.minecraft.server.level.ServerChunkCache$MainThreadExecutor public net.minecraft.world.level.chunk.LevelChunkSection states
This commit is contained in:
@@ -96,7 +96,7 @@
|
||||
private static final EntityDataAccessor<Integer> DATA_TICKS_FROZEN = SynchedEntityData.defineId(Entity.class, EntityDataSerializers.INT);
|
||||
private EntityInLevelCallback levelCallback;
|
||||
private final VecDeltaCodec packetPositionCodec;
|
||||
@@ -253,7 +312,38 @@
|
||||
@@ -253,6 +312,42 @@
|
||||
private final List<Entity.Movement> movementThisTick;
|
||||
private final Set<BlockState> blocksInside;
|
||||
private final LongSet visitedBlocks;
|
||||
@@ -122,7 +122,7 @@
|
||||
+ public long activatedTick = Integer.MIN_VALUE;
|
||||
+ public void inactiveTick() { }
|
||||
+ // Spigot end
|
||||
|
||||
+
|
||||
+ public float getBukkitYaw() {
|
||||
+ return this.yRot;
|
||||
+ }
|
||||
@@ -131,11 +131,15 @@
|
||||
+ return this.level.hasChunk((int) Math.floor(this.getX()) >> 4, (int) Math.floor(this.getZ()) >> 4);
|
||||
+ }
|
||||
+ // CraftBukkit end
|
||||
+
|
||||
+ // Paper start
|
||||
+ public final AABB getBoundingBoxAt(double x, double y, double z) {
|
||||
+ return this.dimensions.makeBoundingBox(x, y, z);
|
||||
+ }
|
||||
+ // Paper end
|
||||
|
||||
public Entity(EntityType<?> type, Level world) {
|
||||
this.id = Entity.ENTITY_COUNTER.incrementAndGet();
|
||||
this.passengers = ImmutableList.of();
|
||||
@@ -284,6 +374,13 @@
|
||||
@@ -284,6 +379,13 @@
|
||||
this.position = Vec3.ZERO;
|
||||
this.blockPosition = BlockPos.ZERO;
|
||||
this.chunkPosition = ChunkPos.ZERO;
|
||||
@@ -149,7 +153,7 @@
|
||||
SynchedEntityData.Builder datawatcher_a = new SynchedEntityData.Builder(this);
|
||||
|
||||
datawatcher_a.define(Entity.DATA_SHARED_FLAGS_ID, (byte) 0);
|
||||
@@ -292,7 +389,7 @@
|
||||
@@ -292,7 +394,7 @@
|
||||
datawatcher_a.define(Entity.DATA_CUSTOM_NAME, Optional.empty());
|
||||
datawatcher_a.define(Entity.DATA_SILENT, false);
|
||||
datawatcher_a.define(Entity.DATA_NO_GRAVITY, false);
|
||||
@@ -158,7 +162,7 @@
|
||||
datawatcher_a.define(Entity.DATA_TICKS_FROZEN, 0);
|
||||
this.defineSynchedData(datawatcher_a);
|
||||
this.entityData = datawatcher_a.build();
|
||||
@@ -362,20 +459,36 @@
|
||||
@@ -362,20 +464,36 @@
|
||||
}
|
||||
|
||||
public void kill(ServerLevel world) {
|
||||
@@ -197,7 +201,7 @@
|
||||
public boolean equals(Object object) {
|
||||
return object instanceof Entity ? ((Entity) object).id == this.id : false;
|
||||
}
|
||||
@@ -385,22 +498,34 @@
|
||||
@@ -385,22 +503,34 @@
|
||||
}
|
||||
|
||||
public void remove(Entity.RemovalReason reason) {
|
||||
@@ -237,7 +241,7 @@
|
||||
return this.getPose() == pose;
|
||||
}
|
||||
|
||||
@@ -417,6 +542,33 @@
|
||||
@@ -417,6 +547,33 @@
|
||||
}
|
||||
|
||||
public void setRot(float yaw, float pitch) {
|
||||
@@ -271,7 +275,7 @@
|
||||
this.setYRot(yaw % 360.0F);
|
||||
this.setXRot(pitch % 360.0F);
|
||||
}
|
||||
@@ -462,6 +614,15 @@
|
||||
@@ -462,6 +619,15 @@
|
||||
this.baseTick();
|
||||
}
|
||||
|
||||
@@ -287,7 +291,7 @@
|
||||
public void baseTick() {
|
||||
ProfilerFiller gameprofilerfiller = Profiler.get();
|
||||
|
||||
@@ -475,7 +636,7 @@
|
||||
@@ -475,7 +641,7 @@
|
||||
--this.boardingCooldown;
|
||||
}
|
||||
|
||||
@@ -296,7 +300,7 @@
|
||||
if (this.canSpawnSprintParticle()) {
|
||||
this.spawnSprintParticle();
|
||||
}
|
||||
@@ -514,6 +675,10 @@
|
||||
@@ -514,6 +680,10 @@
|
||||
if (this.isInLava()) {
|
||||
this.lavaHurt();
|
||||
this.fallDistance *= 0.5F;
|
||||
@@ -307,7 +311,7 @@
|
||||
}
|
||||
|
||||
this.checkBelowWorld();
|
||||
@@ -525,7 +690,7 @@
|
||||
@@ -525,7 +695,7 @@
|
||||
world = this.level();
|
||||
if (world instanceof ServerLevel worldserver) {
|
||||
if (this instanceof Leashable) {
|
||||
@@ -316,7 +320,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -568,15 +733,32 @@
|
||||
@@ -568,15 +738,32 @@
|
||||
|
||||
public void lavaHurt() {
|
||||
if (!this.fireImmune()) {
|
||||
@@ -351,7 +355,7 @@
|
||||
}
|
||||
|
||||
}
|
||||
@@ -587,9 +769,25 @@
|
||||
@@ -587,9 +774,25 @@
|
||||
}
|
||||
|
||||
public final void igniteForSeconds(float seconds) {
|
||||
@@ -378,7 +382,7 @@
|
||||
public void igniteForTicks(int ticks) {
|
||||
if (this.remainingFireTicks < ticks) {
|
||||
this.setRemainingFireTicks(ticks);
|
||||
@@ -610,7 +808,7 @@
|
||||
@@ -610,7 +813,7 @@
|
||||
}
|
||||
|
||||
protected void onBelowWorld() {
|
||||
@@ -387,7 +391,7 @@
|
||||
}
|
||||
|
||||
public boolean isFree(double offsetX, double offsetY, double offsetZ) {
|
||||
@@ -672,6 +870,7 @@
|
||||
@@ -672,6 +875,7 @@
|
||||
}
|
||||
|
||||
public void move(MoverType type, Vec3 movement) {
|
||||
@@ -395,10 +399,13 @@
|
||||
if (this.noPhysics) {
|
||||
this.setPos(this.getX() + movement.x, this.getY() + movement.y, this.getZ() + movement.z);
|
||||
} else {
|
||||
@@ -750,6 +949,28 @@
|
||||
}
|
||||
}
|
||||
@@ -747,8 +951,30 @@
|
||||
|
||||
if (movement.y != vec3d1.y) {
|
||||
block.updateEntityMovementAfterFallOn(this.level(), this);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ // CraftBukkit start
|
||||
+ if (this.horizontalCollision && this.getBukkitEntity() instanceof Vehicle) {
|
||||
+ Vehicle vehicle = (Vehicle) this.getBukkitEntity();
|
||||
@@ -412,19 +419,18 @@
|
||||
+ bl = bl.getRelative(BlockFace.SOUTH);
|
||||
+ } else if (movement.z < vec3d1.z) {
|
||||
+ bl = bl.getRelative(BlockFace.NORTH);
|
||||
+ }
|
||||
}
|
||||
+
|
||||
+ if (!bl.getType().isAir()) {
|
||||
+ VehicleBlockCollisionEvent event = new VehicleBlockCollisionEvent(vehicle, bl);
|
||||
+ this.level.getCraftServer().getPluginManager().callEvent(event);
|
||||
+ }
|
||||
+ }
|
||||
}
|
||||
+ // CraftBukkit end
|
||||
+
|
||||
|
||||
if (!this.level().isClientSide() || this.isControlledByLocalInstance()) {
|
||||
Entity.MovementEmission entity_movementemission = this.getMovementEmission();
|
||||
|
||||
@@ -764,6 +985,7 @@
|
||||
@@ -764,6 +990,7 @@
|
||||
gameprofilerfiller.pop();
|
||||
}
|
||||
}
|
||||
@@ -432,7 +438,7 @@
|
||||
}
|
||||
|
||||
private void applyMovementEmissionAndPlaySound(Entity.MovementEmission moveEffect, Vec3 movement, BlockPos landingPos, BlockState landingState) {
|
||||
@@ -1133,6 +1355,20 @@
|
||||
@@ -1133,6 +1360,20 @@
|
||||
return SoundEvents.GENERIC_SPLASH;
|
||||
}
|
||||
|
||||
@@ -453,7 +459,7 @@
|
||||
public void recordMovementThroughBlocks(Vec3 oldPos, Vec3 newPos) {
|
||||
this.movementThisTick.add(new Entity.Movement(oldPos, newPos));
|
||||
}
|
||||
@@ -1609,6 +1845,7 @@
|
||||
@@ -1609,6 +1850,7 @@
|
||||
this.yo = y;
|
||||
this.zo = d4;
|
||||
this.setPos(d3, y, d4);
|
||||
@@ -461,7 +467,7 @@
|
||||
}
|
||||
|
||||
public void moveTo(Vec3 pos) {
|
||||
@@ -1861,6 +2098,12 @@
|
||||
@@ -1861,6 +2103,12 @@
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -474,7 +480,7 @@
|
||||
public void awardKillScore(Entity entityKilled, DamageSource damageSource) {
|
||||
if (entityKilled instanceof ServerPlayer) {
|
||||
CriteriaTriggers.ENTITY_KILLED_PLAYER.trigger((ServerPlayer) entityKilled, this, damageSource);
|
||||
@@ -1889,16 +2132,22 @@
|
||||
@@ -1889,16 +2137,22 @@
|
||||
}
|
||||
|
||||
public boolean saveAsPassenger(CompoundTag nbt) {
|
||||
@@ -500,7 +506,7 @@
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -1909,54 +2158,98 @@
|
||||
@@ -1909,54 +2163,98 @@
|
||||
}
|
||||
|
||||
public CompoundTag saveWithoutId(CompoundTag nbt) {
|
||||
@@ -619,7 +625,7 @@
|
||||
}
|
||||
|
||||
ListTag nbttaglist;
|
||||
@@ -1972,10 +2265,10 @@
|
||||
@@ -1972,10 +2270,10 @@
|
||||
nbttaglist.add(StringTag.valueOf(s));
|
||||
}
|
||||
|
||||
@@ -632,7 +638,7 @@
|
||||
if (this.isVehicle()) {
|
||||
nbttaglist = new ListTag();
|
||||
iterator = this.getPassengers().iterator();
|
||||
@@ -1984,17 +2277,22 @@
|
||||
@@ -1984,17 +2282,22 @@
|
||||
Entity entity = (Entity) iterator.next();
|
||||
CompoundTag nbttagcompound1 = new CompoundTag();
|
||||
|
||||
@@ -658,11 +664,10 @@
|
||||
} catch (Throwable throwable) {
|
||||
CrashReport crashreport = CrashReport.forThrowable(throwable, "Saving entity NBT");
|
||||
CrashReportCategory crashreportsystemdetails = crashreport.addCategory("Entity being saved");
|
||||
@@ -2079,7 +2377,51 @@
|
||||
}
|
||||
@@ -2080,6 +2383,50 @@
|
||||
} else {
|
||||
throw new IllegalStateException("Entity has invalid position");
|
||||
+ }
|
||||
}
|
||||
+
|
||||
+ // CraftBukkit start
|
||||
+ // Spigot start
|
||||
@@ -698,7 +703,7 @@
|
||||
+ }
|
||||
+
|
||||
+ ((ServerPlayer) this).setLevel(bworld == null ? null : ((CraftWorld) bworld).getHandle());
|
||||
}
|
||||
+ }
|
||||
+ this.getBukkitEntity().readBukkitValues(nbt);
|
||||
+ if (nbt.contains("Bukkit.invisible")) {
|
||||
+ boolean bukkitInvisible = nbt.getBoolean("Bukkit.invisible");
|
||||
@@ -710,7 +715,7 @@
|
||||
} catch (Throwable throwable) {
|
||||
CrashReport crashreport = CrashReport.forThrowable(throwable, "Loading entity NBT");
|
||||
CrashReportCategory crashreportsystemdetails = crashreport.addCategory("Entity being loaded");
|
||||
@@ -2101,6 +2443,12 @@
|
||||
@@ -2101,6 +2448,12 @@
|
||||
return entitytypes.canSerialize() && minecraftkey != null ? minecraftkey.toString() : null;
|
||||
}
|
||||
|
||||
@@ -723,7 +728,7 @@
|
||||
protected abstract void readAdditionalSaveData(CompoundTag nbt);
|
||||
|
||||
protected abstract void addAdditionalSaveData(CompoundTag nbt);
|
||||
@@ -2153,9 +2501,22 @@
|
||||
@@ -2153,9 +2506,22 @@
|
||||
if (stack.isEmpty()) {
|
||||
return null;
|
||||
} else {
|
||||
@@ -746,7 +751,7 @@
|
||||
world.addFreshEntity(entityitem);
|
||||
return entityitem;
|
||||
}
|
||||
@@ -2184,6 +2545,12 @@
|
||||
@@ -2184,6 +2550,12 @@
|
||||
if (this.isAlive() && this instanceof Leashable leashable) {
|
||||
if (leashable.getLeashHolder() == player) {
|
||||
if (!this.level().isClientSide()) {
|
||||
@@ -759,7 +764,7 @@
|
||||
if (player.hasInfiniteMaterials()) {
|
||||
leashable.removeLeash();
|
||||
} else {
|
||||
@@ -2200,6 +2567,13 @@
|
||||
@@ -2200,6 +2572,13 @@
|
||||
|
||||
if (itemstack.is(Items.LEAD) && leashable.canHaveALeashAttachedToIt()) {
|
||||
if (!this.level().isClientSide()) {
|
||||
@@ -773,7 +778,7 @@
|
||||
leashable.setLeashedTo(player, true);
|
||||
}
|
||||
|
||||
@@ -2265,7 +2639,7 @@
|
||||
@@ -2265,7 +2644,7 @@
|
||||
}
|
||||
|
||||
public boolean showVehicleHealth() {
|
||||
@@ -782,7 +787,7 @@
|
||||
}
|
||||
|
||||
public boolean startRiding(Entity entity, boolean force) {
|
||||
@@ -2273,7 +2647,7 @@
|
||||
@@ -2273,7 +2652,7 @@
|
||||
return false;
|
||||
} else if (!entity.couldAcceptPassenger()) {
|
||||
return false;
|
||||
@@ -791,7 +796,7 @@
|
||||
return false;
|
||||
} else {
|
||||
for (Entity entity1 = entity; entity1.vehicle != null; entity1 = entity1.vehicle) {
|
||||
@@ -2285,11 +2659,32 @@
|
||||
@@ -2285,11 +2664,32 @@
|
||||
if (!force && (!this.canRide(entity) || !entity.canAddPassenger(this))) {
|
||||
return false;
|
||||
} else {
|
||||
@@ -825,7 +830,7 @@
|
||||
this.vehicle = entity;
|
||||
this.vehicle.addPassenger(this);
|
||||
entity.getIndirectPassengersStream().filter((entity2) -> {
|
||||
@@ -2318,7 +2713,7 @@
|
||||
@@ -2318,7 +2718,7 @@
|
||||
Entity entity = this.vehicle;
|
||||
|
||||
this.vehicle = null;
|
||||
@@ -834,7 +839,7 @@
|
||||
}
|
||||
|
||||
}
|
||||
@@ -2349,21 +2744,50 @@
|
||||
@@ -2349,21 +2749,50 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -891,7 +896,7 @@
|
||||
}
|
||||
|
||||
protected boolean canAddPassenger(Entity passenger) {
|
||||
@@ -2464,7 +2888,7 @@
|
||||
@@ -2464,7 +2893,7 @@
|
||||
if (teleporttransition != null) {
|
||||
ServerLevel worldserver1 = teleporttransition.newLevel();
|
||||
|
||||
@@ -900,7 +905,7 @@
|
||||
this.teleport(teleporttransition);
|
||||
}
|
||||
}
|
||||
@@ -2547,7 +2971,7 @@
|
||||
@@ -2547,7 +2976,7 @@
|
||||
}
|
||||
|
||||
public boolean isCrouching() {
|
||||
@@ -909,7 +914,7 @@
|
||||
}
|
||||
|
||||
public boolean isSprinting() {
|
||||
@@ -2563,7 +2987,7 @@
|
||||
@@ -2563,7 +2992,7 @@
|
||||
}
|
||||
|
||||
public boolean isVisuallySwimming() {
|
||||
@@ -918,7 +923,7 @@
|
||||
}
|
||||
|
||||
public boolean isVisuallyCrawling() {
|
||||
@@ -2571,6 +2995,13 @@
|
||||
@@ -2571,6 +3000,13 @@
|
||||
}
|
||||
|
||||
public void setSwimming(boolean swimming) {
|
||||
@@ -932,7 +937,7 @@
|
||||
this.setSharedFlag(4, swimming);
|
||||
}
|
||||
|
||||
@@ -2624,8 +3055,12 @@
|
||||
@@ -2624,8 +3060,12 @@
|
||||
return this.getTeam() != null ? this.getTeam().isAlliedTo(team) : false;
|
||||
}
|
||||
|
||||
@@ -946,7 +951,7 @@
|
||||
}
|
||||
|
||||
public boolean getSharedFlag(int index) {
|
||||
@@ -2644,7 +3079,7 @@
|
||||
@@ -2644,7 +3084,7 @@
|
||||
}
|
||||
|
||||
public int getMaxAirSupply() {
|
||||
@@ -955,7 +960,7 @@
|
||||
}
|
||||
|
||||
public int getAirSupply() {
|
||||
@@ -2652,7 +3087,18 @@
|
||||
@@ -2652,7 +3092,18 @@
|
||||
}
|
||||
|
||||
public void setAirSupply(int air) {
|
||||
@@ -975,7 +980,7 @@
|
||||
}
|
||||
|
||||
public int getTicksFrozen() {
|
||||
@@ -2679,11 +3125,40 @@
|
||||
@@ -2679,11 +3130,40 @@
|
||||
|
||||
public void thunderHit(ServerLevel world, LightningBolt lightning) {
|
||||
this.setRemainingFireTicks(this.remainingFireTicks + 1);
|
||||
@@ -1018,7 +1023,7 @@
|
||||
}
|
||||
|
||||
public void onAboveBubbleCol(boolean drag) {
|
||||
@@ -2713,7 +3188,7 @@
|
||||
@@ -2713,7 +3193,7 @@
|
||||
this.resetFallDistance();
|
||||
}
|
||||
|
||||
@@ -1027,7 +1032,7 @@
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -2852,6 +3327,18 @@
|
||||
@@ -2852,6 +3332,18 @@
|
||||
|
||||
if (world instanceof ServerLevel worldserver) {
|
||||
if (!this.isRemoved()) {
|
||||
@@ -1046,7 +1051,7 @@
|
||||
ServerLevel worldserver1 = teleportTarget.newLevel();
|
||||
boolean flag = worldserver1.dimension() != worldserver.dimension();
|
||||
|
||||
@@ -2920,8 +3407,12 @@
|
||||
@@ -2920,8 +3412,12 @@
|
||||
} else {
|
||||
entity.restoreFrom(this);
|
||||
this.removeAfterChangingDimensions();
|
||||
@@ -1060,7 +1065,7 @@
|
||||
Iterator iterator1 = list1.iterator();
|
||||
|
||||
while (iterator1.hasNext()) {
|
||||
@@ -2947,7 +3438,7 @@
|
||||
@@ -2947,7 +3443,7 @@
|
||||
}
|
||||
|
||||
private void sendTeleportTransitionToRidingPlayers(TeleportTransition teleportTarget) {
|
||||
@@ -1069,7 +1074,7 @@
|
||||
Iterator iterator = this.getIndirectPassengers().iterator();
|
||||
|
||||
while (iterator.hasNext()) {
|
||||
@@ -2995,8 +3486,9 @@
|
||||
@@ -2995,8 +3491,9 @@
|
||||
}
|
||||
|
||||
protected void removeAfterChangingDimensions() {
|
||||
@@ -1080,7 +1085,7 @@
|
||||
leashable.removeLeash();
|
||||
}
|
||||
|
||||
@@ -3006,6 +3498,20 @@
|
||||
@@ -3006,6 +3503,20 @@
|
||||
return PortalShape.getRelativePosition(portalRect, portalAxis, this.position(), this.getDimensions(this.getPose()));
|
||||
}
|
||||
|
||||
@@ -1101,7 +1106,7 @@
|
||||
public boolean canUsePortal(boolean allowVehicles) {
|
||||
return (allowVehicles || !this.isPassenger()) && this.isAlive();
|
||||
}
|
||||
@@ -3134,10 +3640,16 @@
|
||||
@@ -3134,9 +3645,15 @@
|
||||
return (Boolean) this.entityData.get(Entity.DATA_CUSTOM_NAME_VISIBLE);
|
||||
}
|
||||
|
||||
@@ -1112,16 +1117,15 @@
|
||||
+ public final boolean teleportTo(ServerLevel world, double destX, double destY, double destZ, Set<Relative> flags, float yaw, float pitch, boolean resetCamera) {
|
||||
+ return this.teleportTo(world, destX, destY, destZ, flags, yaw, pitch, resetCamera, PlayerTeleportEvent.TeleportCause.UNKNOWN);
|
||||
+ }
|
||||
|
||||
+
|
||||
+ public boolean teleportTo(ServerLevel worldserver, double d0, double d1, double d2, Set<Relative> set, float f, float f1, boolean flag, org.bukkit.event.player.PlayerTeleportEvent.TeleportCause cause) {
|
||||
+ float f2 = Mth.clamp(f1, -90.0F, 90.0F);
|
||||
+ Entity entity = this.teleport(new TeleportTransition(worldserver, new Vec3(d0, d1, d2), Vec3.ZERO, f, f2, set, TeleportTransition.DO_NOTHING, cause));
|
||||
+ // CraftBukkit end
|
||||
+
|
||||
|
||||
return entity != null;
|
||||
}
|
||||
|
||||
@@ -3187,7 +3699,7 @@
|
||||
@@ -3187,7 +3704,7 @@
|
||||
/** @deprecated */
|
||||
@Deprecated
|
||||
protected void fixupDimensions() {
|
||||
@@ -1130,7 +1134,7 @@
|
||||
EntityDimensions entitysize = this.getDimensions(entitypose);
|
||||
|
||||
this.dimensions = entitysize;
|
||||
@@ -3196,7 +3708,7 @@
|
||||
@@ -3196,7 +3713,7 @@
|
||||
|
||||
public void refreshDimensions() {
|
||||
EntityDimensions entitysize = this.dimensions;
|
||||
@@ -1139,7 +1143,7 @@
|
||||
EntityDimensions entitysize1 = this.getDimensions(entitypose);
|
||||
|
||||
this.dimensions = entitysize1;
|
||||
@@ -3258,10 +3770,29 @@
|
||||
@@ -3258,10 +3775,29 @@
|
||||
}
|
||||
|
||||
public final void setBoundingBox(AABB boundingBox) {
|
||||
@@ -1171,7 +1175,7 @@
|
||||
return this.getDimensions(pose).eyeHeight();
|
||||
}
|
||||
|
||||
@@ -3335,7 +3866,7 @@
|
||||
@@ -3335,7 +3871,7 @@
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@@ -1180,7 +1184,7 @@
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -3435,7 +3966,7 @@
|
||||
@@ -3435,7 +3971,7 @@
|
||||
}
|
||||
|
||||
public boolean isControlledByLocalInstance() {
|
||||
@@ -1189,7 +1193,7 @@
|
||||
|
||||
if (entityliving instanceof Player entityhuman) {
|
||||
return entityhuman.isLocalPlayer();
|
||||
@@ -3445,7 +3976,7 @@
|
||||
@@ -3445,7 +3981,7 @@
|
||||
}
|
||||
|
||||
public boolean isControlledByClient() {
|
||||
@@ -1198,7 +1202,7 @@
|
||||
|
||||
return entityliving != null && entityliving.isControlledByClient();
|
||||
}
|
||||
@@ -3463,7 +3994,7 @@
|
||||
@@ -3463,7 +3999,7 @@
|
||||
return new Vec3((double) f1 * d2 / (double) f3, 0.0D, (double) f2 * d2 / (double) f3);
|
||||
}
|
||||
|
||||
@@ -1207,7 +1211,7 @@
|
||||
return new Vec3(this.getX(), this.getBoundingBox().maxY, this.getZ());
|
||||
}
|
||||
|
||||
@@ -3489,8 +4020,37 @@
|
||||
@@ -3489,8 +4025,37 @@
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -1246,7 +1250,7 @@
|
||||
}
|
||||
|
||||
public void lookAt(EntityAnchorArgument.Anchor anchorPoint, Vec3 target) {
|
||||
@@ -3550,7 +4110,12 @@
|
||||
@@ -3550,7 +4115,12 @@
|
||||
|
||||
vec3d = vec3d.add(vec3d1);
|
||||
++k1;
|
||||
@@ -1259,7 +1263,7 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3613,7 +4178,7 @@
|
||||
@@ -3613,7 +4183,7 @@
|
||||
return new ClientboundAddEntityPacket(this, entityTrackerEntry);
|
||||
}
|
||||
|
||||
@@ -1268,7 +1272,7 @@
|
||||
return this.type.getDimensions();
|
||||
}
|
||||
|
||||
@@ -3818,8 +4383,16 @@
|
||||
@@ -3818,8 +4388,16 @@
|
||||
|
||||
@Override
|
||||
public final void setRemoved(Entity.RemovalReason reason) {
|
||||
@@ -1286,7 +1290,7 @@
|
||||
}
|
||||
|
||||
if (this.removalReason.shouldDestroy()) {
|
||||
@@ -3827,8 +4400,8 @@
|
||||
@@ -3827,8 +4405,8 @@
|
||||
}
|
||||
|
||||
this.getPassengers().forEach(Entity::stopRiding);
|
||||
@@ -1297,7 +1301,7 @@
|
||||
}
|
||||
|
||||
public void unsetRemoved() {
|
||||
@@ -3887,7 +4460,7 @@
|
||||
@@ -3887,7 +4465,7 @@
|
||||
}
|
||||
|
||||
public Vec3 getKnownMovement() {
|
||||
|
||||
Reference in New Issue
Block a user