Update to Minecraft 1.19.1

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot
2022-07-28 04:00:00 +10:00
parent 7c33b52741
commit f8db65033c
41 changed files with 654 additions and 579 deletions

View File

@@ -1,6 +1,6 @@
--- a/net/minecraft/server/level/EntityPlayer.java
+++ b/net/minecraft/server/level/EntityPlayer.java
@@ -147,6 +147,35 @@
@@ -148,6 +148,35 @@
import net.minecraft.world.scores.criteria.IScoreboardCriteria;
import org.slf4j.Logger;
@@ -36,7 +36,7 @@
public class EntityPlayer extends EntityHuman {
private static final Logger LOGGER = LogUtils.getLogger();
@@ -201,6 +230,21 @@
@@ -202,6 +231,21 @@
public int latency;
public boolean wonGame;
@@ -58,7 +58,7 @@
public EntityPlayer(MinecraftServer minecraftserver, WorldServer worldserver, GameProfile gameprofile, @Nullable ProfilePublicKey profilepublickey) {
super(worldserver, worldserver.getSharedSpawnPos(), worldserver.getSharedSpawnAngle(), gameprofile, profilepublickey);
this.chatVisibility = EnumChatVisibility.FULL;
@@ -263,12 +307,56 @@
@@ -264,12 +308,56 @@
this.advancements = minecraftserver.getPlayerList().getPlayerAdvancements(this);
this.maxUpStep = 1.0F;
this.fudgeSpawnLocation(worldserver);
@@ -116,7 +116,7 @@
int i = Math.max(0, this.server.getSpawnRadius(worldserver));
int j = MathHelper.floor(worldserver.getWorldBorder().getDistanceToBorder((double) blockposition.getX(), (double) blockposition.getZ()));
@@ -326,17 +414,26 @@
@@ -327,17 +415,26 @@
if (nbttagcompound.contains("recipeBook", 10)) {
this.recipeBook.fromNbt(nbttagcompound.getCompound("recipeBook"), this.server.getRecipeManager());
}
@@ -144,7 +144,7 @@
Logger logger = EntityPlayer.LOGGER;
Objects.requireNonNull(logger);
@@ -363,7 +460,20 @@
@@ -364,7 +461,20 @@
Entity entity = this.getRootVehicle();
Entity entity1 = this.getVehicle();
@@ -166,7 +166,7 @@
NBTTagCompound nbttagcompound2 = new NBTTagCompound();
NBTTagCompound nbttagcompound3 = new NBTTagCompound();
@@ -381,7 +491,7 @@
@@ -382,7 +492,7 @@
nbttagcompound.putInt("SpawnZ", this.respawnPosition.getZ());
nbttagcompound.putBoolean("SpawnForced", this.respawnForced);
nbttagcompound.putFloat("SpawnAngle", this.respawnAngle);
@@ -175,7 +175,7 @@
Logger logger = EntityPlayer.LOGGER;
Objects.requireNonNull(logger);
@@ -389,8 +499,32 @@
@@ -390,8 +500,32 @@
nbttagcompound.put("SpawnDimension", nbtbase);
});
}
@@ -208,7 +208,7 @@
public void setExperiencePoints(int i) {
float f = (float) this.getXpNeededForNextLevel();
@@ -450,6 +584,11 @@
@@ -451,6 +585,11 @@
@Override
public void tick() {
@@ -220,7 +220,7 @@
this.gameMode.tick();
--this.spawnInvulnerableTime;
if (this.invulnerableTime > 0) {
@@ -505,7 +644,7 @@
@@ -506,7 +645,7 @@
}
if (this.getHealth() != this.lastSentHealth || this.lastSentFood != this.foodData.getFoodLevel() || this.foodData.getSaturationLevel() == 0.0F != this.lastFoodSaturationZero) {
@@ -229,7 +229,7 @@
this.lastSentHealth = this.getHealth();
this.lastSentFood = this.foodData.getFoodLevel();
this.lastFoodSaturationZero = this.foodData.getSaturationLevel() == 0.0F;
@@ -536,6 +675,12 @@
@@ -537,6 +676,12 @@
this.updateScoreForCriteria(IScoreboardCriteria.EXPERIENCE, MathHelper.ceil((float) this.lastRecordedExperience));
}
@@ -242,7 +242,7 @@
if (this.experienceLevel != this.lastRecordedLevel) {
this.lastRecordedLevel = this.experienceLevel;
this.updateScoreForCriteria(IScoreboardCriteria.LEVEL, MathHelper.ceil((float) this.lastRecordedLevel));
@@ -550,6 +695,20 @@
@@ -551,6 +696,20 @@
CriterionTriggers.LOCATION.trigger(this);
}
@@ -263,7 +263,7 @@
} catch (Throwable throwable) {
CrashReport crashreport = CrashReport.forThrowable(throwable, "Ticking player");
CrashReportSystemDetails crashreportsystemdetails = crashreport.addCategory("Player being ticked");
@@ -592,7 +751,8 @@
@@ -593,7 +752,8 @@
}
private void updateScoreForCriteria(IScoreboardCriteria iscoreboardcriteria, int i) {
@@ -273,7 +273,7 @@
scoreboardscore.setScore(i);
});
}
@@ -601,9 +761,47 @@
@@ -602,9 +762,47 @@
public void die(DamageSource damagesource) {
this.gameEvent(GameEvent.ENTITY_DIE);
boolean flag = this.level.getGameRules().getBoolean(GameRules.RULE_SHOWDEATHMESSAGES);
@@ -321,9 +321,9 @@
+ ichatbasecomponent = org.bukkit.craftbukkit.util.CraftChatMessage.fromStringOrNull(deathMessage);
+ }
this.connection.send(new ClientboundPlayerCombatKillPacket(this.getCombatTracker(), ichatbasecomponent), (future) -> {
if (!future.isSuccess()) {
@@ -637,12 +835,18 @@
this.connection.send(new ClientboundPlayerCombatKillPacket(this.getCombatTracker(), ichatbasecomponent), PacketSendListener.exceptionallySend(() -> {
boolean flag1 = true;
@@ -635,12 +833,18 @@
if (this.level.getGameRules().getBoolean(GameRules.RULE_FORGIVE_DEAD_PLAYERS)) {
this.tellNeutralMobsThatIDied();
}
@@ -346,7 +346,7 @@
EntityLiving entityliving = this.getKillCredit();
if (entityliving != null) {
@@ -680,10 +884,12 @@
@@ -678,10 +882,12 @@
String s = this.getScoreboardName();
String s1 = entity.getScoreboardName();
@@ -361,7 +361,7 @@
} else {
this.awardStat(StatisticList.MOB_KILLS);
}
@@ -701,7 +907,8 @@
@@ -699,7 +905,8 @@
int i = scoreboardteam.getColor().getId();
if (i >= 0 && i < aiscoreboardcriteria.length) {
@@ -371,7 +371,7 @@
}
}
@@ -745,18 +952,20 @@
@@ -743,18 +950,20 @@
}
private boolean isPvpAllowed() {
@@ -395,7 +395,7 @@
} else {
return shapedetectorshape;
}
@@ -765,11 +974,20 @@
@@ -763,11 +972,20 @@
@Nullable
@Override
public Entity changeDimension(WorldServer worldserver) {
@@ -419,7 +419,7 @@
this.unRide();
this.getLevel().removePlayerImmediately(this, Entity.RemovalReason.CHANGED_DIMENSION);
if (!this.wonGame) {
@@ -780,6 +998,8 @@
@@ -778,6 +996,8 @@
return this;
} else {
@@ -428,7 +428,7 @@
WorldData worlddata = worldserver.getLevelData();
this.connection.send(new PacketPlayOutRespawn(worldserver.dimensionTypeId(), worldserver.dimension(), BiomeManager.obfuscateSeed(worldserver.getSeed()), this.gameMode.getGameModeForPlayer(), this.gameMode.getPreviousGameModeForPlayer(), worldserver.isDebug(), worldserver.isFlat(), true, this.getLastDeathLocation()));
@@ -789,22 +1009,52 @@
@@ -787,22 +1007,52 @@
playerlist.sendPlayerPermissionLevel(this);
worldserver1.removePlayerImmediately(this, Entity.RemovalReason.CHANGED_DIMENSION);
this.unsetRemoved();
@@ -487,7 +487,7 @@
worldserver1.getProfiler().pop();
this.triggerDimensionChangeTriggers(worldserver1);
this.connection.send(new PacketPlayOutAbilities(this.getAbilities()));
@@ -822,12 +1072,31 @@
@@ -820,12 +1070,31 @@
this.lastSentExp = -1;
this.lastSentHealth = -1.0F;
this.lastSentFood = -1;
@@ -519,7 +519,7 @@
private void createEndPlatform(WorldServer worldserver, BlockPosition blockposition) {
BlockPosition.MutableBlockPosition blockposition_mutableblockposition = blockposition.mutable();
@@ -844,17 +1113,17 @@
@@ -842,17 +1111,17 @@
}
@Override
@@ -542,7 +542,7 @@
}
return optional1;
@@ -864,13 +1133,21 @@
@@ -862,13 +1131,21 @@
public void triggerDimensionChangeTriggers(WorldServer worldserver) {
ResourceKey<World> resourcekey = worldserver.dimension();
ResourceKey<World> resourcekey1 = this.level.dimension();
@@ -567,7 +567,7 @@
this.enteredNetherPosition = null;
}
@@ -887,12 +1164,10 @@
@@ -885,12 +1162,10 @@
this.containerMenu.broadcastChanges();
}
@@ -583,7 +583,7 @@
return Either.left(EntityHuman.EnumBedResult.NOT_POSSIBLE_HERE);
} else if (!this.bedInRange(blockposition, enumdirection)) {
return Either.left(EntityHuman.EnumBedResult.TOO_FAR_AWAY);
@@ -916,7 +1191,36 @@
@@ -914,7 +1189,36 @@
}
}
@@ -621,7 +621,7 @@
this.awardStat(StatisticList.SLEEP_IN_BED);
CriterionTriggers.SLEPT_IN_BED.trigger(this);
});
@@ -929,9 +1233,8 @@
@@ -927,9 +1231,8 @@
return either;
}
}
@@ -632,7 +632,7 @@
}
@Override
@@ -958,6 +1261,24 @@
@@ -956,6 +1259,24 @@
@Override
public void stopSleepInBed(boolean flag, boolean flag1) {
@@ -657,7 +657,7 @@
if (this.isSleeping()) {
this.getLevel().getChunkSource().broadcastAndSend(this, new PacketPlayOutAnimation(this, 2));
}
@@ -1039,8 +1360,9 @@
@@ -1037,8 +1358,9 @@
this.connection.send(new PacketPlayOutOpenSignEditor(tileentitysign.getBlockPos()));
}
@@ -668,7 +668,7 @@
}
@Override
@@ -1048,13 +1370,35 @@
@@ -1046,13 +1368,35 @@
if (itileinventory == null) {
return OptionalInt.empty();
} else {
@@ -704,7 +704,7 @@
if (container == null) {
if (this.isSpectator()) {
this.displayClientMessage(IChatBaseComponent.translatable("container.spectatorCantOpen").withStyle(EnumChatFormat.RED), true);
@@ -1062,9 +1406,11 @@
@@ -1060,9 +1404,11 @@
return OptionalInt.empty();
} else {
@@ -718,7 +718,7 @@
return OptionalInt.of(this.containerCounter);
}
}
@@ -1077,13 +1423,24 @@
@@ -1075,13 +1421,24 @@
@Override
public void openHorseInventory(EntityHorseAbstract entityhorseabstract, IInventory iinventory) {
@@ -745,7 +745,7 @@
this.initMenu(this.containerMenu);
}
@@ -1106,6 +1463,7 @@
@@ -1104,6 +1461,7 @@
@Override
public void closeContainer() {
@@ -753,7 +753,7 @@
this.connection.send(new PacketPlayOutCloseWindow(this.containerMenu.containerId));
this.doCloseContainer();
}
@@ -1135,7 +1493,7 @@
@@ -1133,7 +1491,7 @@
@Override
public void awardStat(Statistic<?> statistic, int i) {
this.stats.increment(this, statistic, i);
@@ -762,7 +762,7 @@
scoreboardscore.add(i);
});
}
@@ -1143,7 +1501,7 @@
@@ -1141,7 +1499,7 @@
@Override
public void resetStat(Statistic<?> statistic) {
this.stats.setValue(this, statistic, 0);
@@ -771,7 +771,7 @@
}
@Override
@@ -1159,7 +1517,7 @@
@@ -1157,7 +1515,7 @@
for (int j = 0; j < i; ++j) {
MinecraftKey minecraftkey = aminecraftkey1[j];
@@ -780,7 +780,7 @@
Objects.requireNonNull(list);
optional.ifPresent(list::add);
@@ -1194,6 +1552,7 @@
@@ -1192,6 +1550,7 @@
public void resetSentInfo() {
this.lastSentHealth = -1.0E8F;
@@ -788,7 +788,7 @@
}
@Override
@@ -1249,7 +1608,7 @@
@@ -1247,7 +1606,7 @@
this.lastSentExp = -1;
this.lastSentHealth = -1.0F;
this.lastSentFood = -1;
@@ -797,7 +797,7 @@
this.seenCredits = entityplayer.seenCredits;
this.enteredNetherPosition = entityplayer.enteredNetherPosition;
this.setShoulderEntityLeft(entityplayer.getShoulderEntityLeft());
@@ -1397,7 +1756,20 @@
@@ -1390,7 +1749,20 @@
return s;
}
@@ -818,7 +818,7 @@
this.chatVisibility = packetplayinsettings.chatVisibility();
this.canChatColor = packetplayinsettings.chatColors();
this.textFilteringEnabled = packetplayinsettings.textFilteringEnabled();
@@ -1472,7 +1844,7 @@
@@ -1461,7 +1833,7 @@
this.camera = (Entity) (entity == null ? this : entity);
if (entity1 != this.camera) {
this.connection.send(new PacketPlayOutCamera(this.camera));
@@ -827,7 +827,7 @@
}
}
@@ -1501,7 +1873,7 @@
@@ -1490,7 +1862,7 @@
@Nullable
public IChatBaseComponent getTabListDisplayName() {
@@ -836,7 +836,7 @@
}
@Override
@@ -1522,9 +1894,16 @@
@@ -1511,9 +1883,16 @@
return this.advancements;
}
@@ -853,7 +853,7 @@
if (worldserver == this.level) {
this.connection.teleport(d0, d1, d2, f, f1);
} else {
@@ -1544,6 +1923,9 @@
@@ -1533,6 +1912,9 @@
this.server.getPlayerList().sendLevelInfo(this, worldserver);
this.server.getPlayerList().sendAllPlayerInfo(this);
}
@@ -863,7 +863,7 @@
}
@@ -1713,4 +2095,146 @@
@@ -1702,4 +2084,146 @@
}
}

View File

@@ -1,6 +1,6 @@
--- a/net/minecraft/server/level/PlayerChunkMap.java
+++ b/net/minecraft/server/level/PlayerChunkMap.java
@@ -102,6 +102,12 @@
@@ -103,6 +103,12 @@
import org.apache.commons.lang3.mutable.MutableObject;
import org.slf4j.Logger;
@@ -13,7 +13,7 @@
public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.e {
private static final byte CHUNK_TYPE_REPLACEABLE = -1;
@@ -144,6 +150,27 @@
@@ -145,6 +151,27 @@
private final Queue<Runnable> unloadQueue;
int viewDistance;
@@ -41,7 +41,7 @@
public PlayerChunkMap(WorldServer worldserver, Convertable.ConversionSession convertable_conversionsession, DataFixer datafixer, StructureTemplateManager structuretemplatemanager, Executor executor, IAsyncTaskHandler<Runnable> iasynctaskhandler, ILightAccess ilightaccess, ChunkGenerator chunkgenerator, WorldLoadListener worldloadlistener, ChunkStatusUpdateListener chunkstatusupdatelistener, Supplier<WorldPersistentData> supplier, int i, boolean flag) {
super(convertable_conversionsession.getDimensionPath(worldserver.dimension()).resolve("region"), datafixer, flag);
this.visibleChunkMap = this.updatingChunkMap.clone();
@@ -162,6 +189,11 @@
@@ -163,6 +190,11 @@
this.storageName = path.getFileName().toString();
this.level = worldserver;
this.generator = chunkgenerator;
@@ -53,7 +53,7 @@
if (chunkgenerator instanceof ChunkGeneratorAbstract) {
ChunkGeneratorAbstract chunkgeneratorabstract = (ChunkGeneratorAbstract) chunkgenerator;
@@ -313,9 +345,12 @@
@@ -314,9 +346,12 @@
CompletableFuture<List<Either<IChunkAccess, PlayerChunk.Failure>>> completablefuture1 = SystemUtils.sequence(list);
CompletableFuture<Either<List<IChunkAccess>, PlayerChunk.Failure>> completablefuture2 = completablefuture1.thenApply((list2) -> {
List<IChunkAccess> list3 = Lists.newArrayList();
@@ -68,7 +68,7 @@
final Either<IChunkAccess, PlayerChunk.Failure> either = (Either) iterator.next();
if (either == null) {
@@ -520,7 +555,7 @@
@@ -521,7 +556,7 @@
private void scheduleUnload(long i, PlayerChunk playerchunk) {
CompletableFuture<IChunkAccess> completablefuture = playerchunk.getChunkToSave();
@@ -77,7 +77,7 @@
CompletableFuture<IChunkAccess> completablefuture1 = playerchunk.getChunkToSave();
if (completablefuture1 != completablefuture) {
@@ -609,9 +644,9 @@
@@ -610,9 +645,9 @@
ProtoChunk protochunk = ChunkRegionLoader.read(this.level, this.poiManager, chunkcoordintpair, (NBTTagCompound) optional.get());
this.markPosition(chunkcoordintpair, protochunk.getStatus().getChunkType());
@@ -89,7 +89,7 @@
}
}, this.mainThreadExecutor).exceptionallyAsync((throwable) -> {
return this.handleChunkLoadFailure(throwable, chunkcoordintpair);
@@ -717,7 +752,21 @@
@@ -718,7 +753,21 @@
private static void postLoadProtoChunk(WorldServer worldserver, List<NBTTagCompound> list) {
if (!list.isEmpty()) {
@@ -112,7 +112,7 @@
}
}
@@ -816,7 +865,7 @@
@@ -817,7 +866,7 @@
if (!playerchunk.wasAccessibleSinceLastSave()) {
return false;
} else {
@@ -121,7 +121,7 @@
if (!(ichunkaccess instanceof ProtoChunkExtension) && !(ichunkaccess instanceof Chunk)) {
return false;
@@ -978,7 +1027,8 @@
@@ -979,7 +1028,8 @@
return ichunkaccess instanceof Chunk ? Optional.of((Chunk) ichunkaccess) : Optional.empty();
});
@@ -131,7 +131,7 @@
return chunk.getBlockEntities().size();
}).orElse(0), tickingtracker.getTicketDebugString(i), tickingtracker.getLevel(i), optional1.map((chunk) -> {
return chunk.getBlockTicks().count();
@@ -991,7 +1041,7 @@
@@ -992,7 +1042,7 @@
private static String printFuture(CompletableFuture<Either<Chunk, PlayerChunk.Failure>> completablefuture) {
try {
@@ -140,7 +140,7 @@
return either != null ? (String) either.map((chunk) -> {
return "done";
@@ -1007,12 +1057,14 @@
@@ -1008,12 +1058,14 @@
private CompletableFuture<Optional<NBTTagCompound>> readChunk(ChunkCoordIntPair chunkcoordintpair) {
return this.read(chunkcoordintpair).thenApplyAsync((optional) -> {
@@ -158,7 +158,7 @@
}
boolean anyPlayerCloseEnoughForSpawning(ChunkCoordIntPair chunkcoordintpair) {
@@ -1433,7 +1485,7 @@
@@ -1434,7 +1486,7 @@
public final Set<ServerPlayerConnection> seenBy = Sets.newIdentityHashSet();
public EntityTracker(Entity entity, int i, int j, boolean flag) {
@@ -167,7 +167,7 @@
this.entity = entity;
this.range = i;
this.lastSectionPos = SectionPosition.of((EntityAccess) entity);
@@ -1492,6 +1544,11 @@
@@ -1493,6 +1545,11 @@
double d2 = d0 * d0;
boolean flag = d1 <= d2 && this.entity.broadcastToPlayer(entityplayer);

View File

@@ -1,6 +1,6 @@
--- a/net/minecraft/server/level/RegionLimitedWorldAccess.java
+++ b/net/minecraft/server/level/RegionLimitedWorldAccess.java
@@ -206,7 +206,7 @@
@@ -207,7 +207,7 @@
if (iblockdata.isAir()) {
return false;
} else {
@@ -9,7 +9,7 @@
TileEntity tileentity = iblockdata.hasBlockEntity() ? this.getBlockEntity(blockposition) : null;
Block.dropResources(iblockdata, this.level, blockposition, tileentity, entity, ItemStack.EMPTY);
@@ -325,6 +325,13 @@
@@ -326,6 +326,13 @@
@Override
public boolean addFreshEntity(Entity entity) {

View File

@@ -1,6 +1,6 @@
--- a/net/minecraft/server/level/WorldServer.java
+++ b/net/minecraft/server/level/WorldServer.java
@@ -152,6 +152,26 @@
@@ -153,6 +153,26 @@
import net.minecraft.world.ticks.TickListServer;
import org.slf4j.Logger;
@@ -27,7 +27,7 @@
public class WorldServer extends World implements GeneratorAccessSeed {
public static final BlockPosition END_SPAWN_POINT = new BlockPosition(100, 50, 0);
@@ -169,7 +189,7 @@
@@ -170,7 +190,7 @@
final List<EntityPlayer> players;
private final ChunkProviderServer chunkSource;
private final MinecraftServer server;
@@ -36,7 +36,7 @@
final EntityTickList entityTickList;
public final PersistentEntitySectionManager<Entity> entityManager;
public boolean noSave;
@@ -193,11 +213,28 @@
@@ -194,11 +214,28 @@
private final StructureCheck structureCheck;
private final boolean tickTime;
@@ -69,7 +69,7 @@
this.players = Lists.newArrayList();
this.entityTickList = new EntityTickList();
this.blockTicks = new TickListServer<>(this::isPositionTickingWithEntitiesLoaded, this.getProfilerSupplier());
@@ -212,6 +249,22 @@
@@ -213,6 +250,22 @@
this.customSpawners = list;
this.serverLevelData = iworlddataserver;
ChunkGenerator chunkgenerator = worlddimension.generator();
@@ -92,7 +92,7 @@
boolean flag2 = minecraftserver.forceSynchronousWrites();
DataFixer datafixer = minecraftserver.getFixerUpper();
EntityPersistentStorage<Entity> entitypersistentstorage = new EntityStorage(this, convertable_conversionsession.getDimensionPath(resourcekey).resolve("entities"), datafixer, flag2, minecraftserver);
@@ -243,14 +296,15 @@
@@ -244,14 +297,15 @@
long l = minecraftserver.getWorldData().worldGenSettings().seed();
this.structureCheck = new StructureCheck(this.chunkSource.chunkScanner(), this.registryAccess(), minecraftserver.getStructureManager(), resourcekey, chunkgenerator, this.chunkSource.randomState(), this, chunkgenerator.getBiomeSource(), l, datafixer);
@@ -111,7 +111,7 @@
}
public void setWeatherParameters(int i, int j, boolean flag, boolean flag1) {
@@ -282,12 +336,20 @@
@@ -283,12 +337,20 @@
long j;
if (this.sleepStatus.areEnoughSleeping(i) && this.sleepStatus.areEnoughDeepSleeping(i, this.players)) {
@@ -135,7 +135,7 @@
if (this.getGameRules().getBoolean(GameRules.RULE_WEATHER_CYCLE) && this.isRaining()) {
this.resetWeatherCycle();
}
@@ -313,7 +375,7 @@
@@ -314,7 +376,7 @@
this.runBlockEvents();
this.handlingTick = false;
gameprofilerfiller.pop();
@@ -144,7 +144,7 @@
if (flag) {
this.resetEmptyTime();
@@ -329,7 +391,7 @@
@@ -330,7 +392,7 @@
this.entityTickList.forEach((entity) -> {
if (!entity.isRemoved()) {
@@ -153,7 +153,7 @@
entity.discard();
} else {
gameprofilerfiller.push("checkDespawn");
@@ -403,7 +465,7 @@
@@ -404,7 +466,7 @@
private void wakeUpAllPlayers() {
this.sleepStatus.removeAllSleepers();
@@ -162,7 +162,7 @@
entityplayer.stopSleepInBed(false, false);
});
}
@@ -430,14 +492,14 @@
@@ -431,14 +493,14 @@
entityhorseskeleton.setTrap(true);
entityhorseskeleton.setAge(0);
entityhorseskeleton.setPos((double) blockposition.getX(), (double) blockposition.getY(), (double) blockposition.getZ());
@@ -179,7 +179,7 @@
}
}
@@ -448,12 +510,12 @@
@@ -449,12 +511,12 @@
BiomeBase biomebase = (BiomeBase) this.getBiome(blockposition).value();
if (biomebase.shouldFreeze(this, blockposition1)) {
@@ -194,7 +194,7 @@
}
IBlockData iblockdata = this.getBlockState(blockposition1);
@@ -649,6 +711,7 @@
@@ -650,6 +712,7 @@
this.rainLevel = MathHelper.clamp(this.rainLevel, 0.0F, 1.0F);
}
@@ -202,7 +202,7 @@
if (this.oRainLevel != this.rainLevel) {
this.server.getPlayerList().broadcastAll(new PacketPlayOutGameStateChange(PacketPlayOutGameStateChange.RAIN_LEVEL_CHANGE, this.rainLevel), this.dimension());
}
@@ -667,14 +730,47 @@
@@ -668,14 +731,47 @@
this.server.getPlayerList().broadcastAll(new PacketPlayOutGameStateChange(PacketPlayOutGameStateChange.RAIN_LEVEL_CHANGE, this.rainLevel));
this.server.getPlayerList().broadcastAll(new PacketPlayOutGameStateChange(PacketPlayOutGameStateChange.THUNDER_LEVEL_CHANGE, this.thunderLevel));
}
@@ -252,7 +252,7 @@
}
public void resetEmptyTime() {
@@ -709,6 +805,7 @@
@@ -710,6 +806,7 @@
});
gameprofilerfiller.incrementCounter("tickNonPassenger");
entity.tick();
@@ -260,7 +260,7 @@
this.getProfiler().pop();
Iterator iterator = entity.getPassengers().iterator();
@@ -732,6 +829,7 @@
@@ -733,6 +830,7 @@
});
gameprofilerfiller.incrementCounter("tickPassenger");
entity1.rideTick();
@@ -268,7 +268,7 @@
gameprofilerfiller.pop();
Iterator iterator = entity1.getPassengers().iterator();
@@ -756,6 +854,7 @@
@@ -757,6 +855,7 @@
ChunkProviderServer chunkproviderserver = this.getChunkSource();
if (!flag1) {
@@ -276,7 +276,7 @@
if (iprogressupdate != null) {
iprogressupdate.progressStartNoAbort(IChatBaseComponent.translatable("menu.savingLevel"));
}
@@ -773,11 +872,19 @@
@@ -774,11 +873,19 @@
}
}
@@ -297,7 +297,7 @@
}
this.getChunkSource().getDataStorage().save();
@@ -823,15 +930,37 @@
@@ -824,15 +931,37 @@
@Override
public boolean addFreshEntity(Entity entity) {
@@ -338,7 +338,7 @@
}
public void addDuringCommandTeleport(EntityPlayer entityplayer) {
@@ -862,24 +991,37 @@
@@ -863,24 +992,37 @@
this.entityManager.addNewEntity(entityplayer);
}
@@ -380,7 +380,7 @@
return true;
}
}
@@ -893,10 +1035,32 @@
@@ -894,10 +1036,32 @@
entityplayer.remove(entity_removalreason);
}
@@ -413,7 +413,7 @@
while (iterator.hasNext()) {
EntityPlayer entityplayer = (EntityPlayer) iterator.next();
@@ -905,6 +1069,12 @@
@@ -906,6 +1070,12 @@
double d1 = (double) blockposition.getY() - entityplayer.getY();
double d2 = (double) blockposition.getZ() - entityplayer.getZ();
@@ -426,7 +426,7 @@
if (d0 * d0 + d1 * d1 + d2 * d2 < 1024.0D) {
entityplayer.connection.send(new PacketPlayOutBlockBreakAnimation(i, blockposition, j));
}
@@ -941,6 +1111,14 @@
@@ -942,6 +1112,14 @@
public void gameEvent(GameEvent gameevent, Vec3D vec3d, GameEvent.a gameevent_a) {
int i = gameevent.getNotificationRadius();
BlockPosition blockposition = new BlockPosition(vec3d);
@@ -441,7 +441,7 @@
int j = SectionPosition.blockToSectionCoord(blockposition.getX() - i);
int k = SectionPosition.blockToSectionCoord(blockposition.getY() - i);
int l = SectionPosition.blockToSectionCoord(blockposition.getZ() - i);
@@ -1013,7 +1191,18 @@
@@ -1014,7 +1192,18 @@
Iterator iterator = this.navigatingMobs.iterator();
while (iterator.hasNext()) {
@@ -461,7 +461,7 @@
NavigationAbstract navigationabstract = entityinsentient.getNavigation();
if (navigationabstract.shouldRecomputePath(blockposition)) {
@@ -1069,10 +1258,20 @@
@@ -1070,10 +1259,20 @@
@Override
public Explosion explode(@Nullable Entity entity, @Nullable DamageSource damagesource, @Nullable ExplosionDamageCalculator explosiondamagecalculator, double d0, double d1, double d2, float f, boolean flag, Explosion.Effect explosion_effect) {
@@ -482,7 +482,7 @@
if (explosion_effect == Explosion.Effect.NONE) {
explosion.clearToBlow();
}
@@ -1144,13 +1343,20 @@
@@ -1145,13 +1344,20 @@
}
public <T extends ParticleParam> int sendParticles(T t0, double d0, double d1, double d2, int i, double d3, double d4, double d5, double d6) {
@@ -505,7 +505,7 @@
++j;
}
}
@@ -1201,7 +1407,7 @@
@@ -1202,7 +1408,7 @@
@Nullable
public BlockPosition findNearestMapStructure(TagKey<Structure> tagkey, BlockPosition blockposition, int i, boolean flag) {
@@ -514,7 +514,7 @@
return null;
} else {
Optional<HolderSet.Named<Structure>> optional = this.registryAccess().registryOrThrow(IRegistry.STRUCTURE_REGISTRY).getTag(tagkey);
@@ -1243,11 +1449,21 @@
@@ -1244,11 +1450,21 @@
@Nullable
@Override
public WorldMap getMapData(String s) {
@@ -537,7 +537,7 @@
this.getServer().overworld().getDataStorage().set(s, worldmap);
}
@@ -1545,6 +1761,11 @@
@@ -1546,6 +1762,11 @@
@Override
public void blockUpdated(BlockPosition blockposition, Block block) {
if (!this.isDebug()) {
@@ -549,7 +549,7 @@
this.updateNeighborsAt(blockposition, block);
}
@@ -1564,12 +1785,12 @@
@@ -1565,12 +1786,12 @@
}
public boolean isFlat() {
@@ -564,7 +564,7 @@
}
@Nullable
@@ -1592,7 +1813,7 @@
@@ -1593,7 +1814,7 @@
private static <T> String getTypeCount(Iterable<T> iterable, Function<T, String> function) {
try {
Object2IntOpenHashMap<String> object2intopenhashmap = new Object2IntOpenHashMap();
@@ -573,7 +573,7 @@
while (iterator.hasNext()) {
T t0 = iterator.next();
@@ -1601,7 +1822,7 @@
@@ -1602,7 +1823,7 @@
object2intopenhashmap.addTo(s, 1);
}
@@ -582,7 +582,7 @@
String s1 = (String) entry.getKey();
return s1 + ":" + entry.getIntValue();
@@ -1612,17 +1833,33 @@
@@ -1613,17 +1834,33 @@
}
public static void makeObsidianPlatform(WorldServer worldserver) {
@@ -618,7 +618,7 @@
}
@Override
@@ -1733,6 +1970,7 @@
@@ -1734,6 +1971,7 @@
}
entity.updateDynamicGameEventListener(DynamicGameEventListener::add);
@@ -626,7 +626,7 @@
}
public void onTrackingEnd(Entity entity) {
@@ -1769,6 +2007,14 @@
@@ -1770,6 +2008,14 @@
}
entity.updateDynamicGameEventListener(DynamicGameEventListener::remove);