From 91303b697047b005fac47e4f0161e9878f8570b8 Mon Sep 17 00:00:00 2001 From: Technici4n <13494793+Technici4n@users.noreply.github.com> Date: Tue, 22 Oct 2024 15:42:15 +0000 Subject: [PATCH] Update to 1.21.2 --- gradle.properties | 6 +- .../server/level/ChunkMap.java.patch | 10 ++-- .../server/level/ServerChunkCache.java.patch | 8 +-- .../minecraft/world/entity/Entity.java.patch | 56 +++++++++---------- .../vehicle/AbstractMinecart.java.patch | 2 +- .../vehicle/OldMinecartBehavior.java.patch | 8 +-- 6 files changed, 45 insertions(+), 45 deletions(-) diff --git a/gradle.properties b/gradle.properties index d524c7c996..c08cddfd9f 100644 --- a/gradle.properties +++ b/gradle.properties @@ -9,10 +9,10 @@ org.gradle.debug=false java_version=21 -minecraft_version=1.21.2-rc1 -neoform_version=20241017.134216 +minecraft_version=1.21.2 +neoform_version=20241022.151510 # on snapshot versions, used to prefix the version -neoforge_snapshot_next_stable=21.2 +neoforge_snapshot_next_stable=21.3 mergetool_version=2.0.0 accesstransformers_version=10.0.1 diff --git a/patches/net/minecraft/server/level/ChunkMap.java.patch b/patches/net/minecraft/server/level/ChunkMap.java.patch index 1a37c82136..d6dcc91909 100644 --- a/patches/net/minecraft/server/level/ChunkMap.java.patch +++ b/patches/net/minecraft/server/level/ChunkMap.java.patch @@ -28,7 +28,7 @@ this.markPosition(p_140418_, chunkaccess.getPersistedStatus().getChunkType()); return chunkaccess; } else { -@@ -778,6 +_,7 @@ +@@ -780,6 +_,7 @@ Profiler.get().incrementCounter("chunkSave"); this.activeChunkWrites.incrementAndGet(); SerializableChunkData serializablechunkdata = SerializableChunkData.copyOf(this.level, p_140259_); @@ -36,7 +36,7 @@ CompletableFuture completablefuture = CompletableFuture.supplyAsync(serializablechunkdata::write, Util.backgroundExecutor()); this.write(chunkpos, completablefuture::join).handle((p_381690_, p_381691_) -> { if (p_381691_ != null) { -@@ -844,9 +_,11 @@ +@@ -846,9 +_,11 @@ private static void markChunkPendingToSend(ServerPlayer p_295834_, LevelChunk p_296281_) { p_295834_.connection.chunkSender.markChunkPendingToSend(p_296281_); @@ -48,7 +48,7 @@ p_294215_.connection.chunkSender.dropChunk(p_294215_, p_294758_); } -@@ -1057,6 +_,7 @@ +@@ -1059,6 +_,7 @@ this.playerMap.unIgnorePlayer(p_140185_); } @@ -56,7 +56,7 @@ this.updateChunkTracking(p_140185_); } } -@@ -1108,7 +_,7 @@ +@@ -1110,7 +_,7 @@ } protected void addEntity(Entity p_140200_) { @@ -65,7 +65,7 @@ EntityType entitytype = p_140200_.getType(); int i = entitytype.clientTrackingRange() * 16; if (i != 0) { -@@ -1352,5 +_,20 @@ +@@ -1354,5 +_,20 @@ this.updatePlayer(serverplayer); } } diff --git a/patches/net/minecraft/server/level/ServerChunkCache.java.patch b/patches/net/minecraft/server/level/ServerChunkCache.java.patch index 1c3f4867c4..d56419a092 100644 --- a/patches/net/minecraft/server/level/ServerChunkCache.java.patch +++ b/patches/net/minecraft/server/level/ServerChunkCache.java.patch @@ -30,10 +30,10 @@ this.storeInCache(i, chunkaccess1, ChunkStatus.FULL); @@ -384,7 +_,7 @@ private void collectTickingChunks(List p_363421_) { - this.chunkMap.forEachSpawnCandidateChunk(p_370483_ -> { - LevelChunk levelchunk = p_370483_.getTickingChunk(); -- if (levelchunk != null && this.level.isNaturalSpawningAllowed(p_370483_.getPos())) { -+ if (levelchunk != null && this.level.isNaturalSpawningAllowed(p_370483_.getPos()) || this.distanceManager.shouldForceTicks(p_370483_.getPos().toLong())) { + this.chunkMap.forEachSpawnCandidateChunk(p_381767_ -> { + LevelChunk levelchunk = p_381767_.getTickingChunk(); +- if (levelchunk != null && this.level.isNaturalSpawningAllowed(p_381767_.getPos())) { ++ if (levelchunk != null && this.level.isNaturalSpawningAllowed(p_381767_.getPos()) || this.distanceManager.shouldForceTicks(p_381767_.getPos().toLong())) { p_363421_.add(levelchunk); } }); diff --git a/patches/net/minecraft/world/entity/Entity.java.patch b/patches/net/minecraft/world/entity/Entity.java.patch index 801a7043a6..15f8303a24 100644 --- a/patches/net/minecraft/world/entity/Entity.java.patch +++ b/patches/net/minecraft/world/entity/Entity.java.patch @@ -48,7 +48,7 @@ } this.checkBelowWorld(); -@@ -763,12 +_,12 @@ +@@ -760,12 +_,12 @@ this.setRemainingFireTicks(-this.getFireImmuneTicks()); } @@ -63,7 +63,7 @@ this.setRemainingFireTicks(-this.getFireImmuneTicks()); } } -@@ -848,9 +_,7 @@ +@@ -845,9 +_,7 @@ return blockpos; } else { BlockState blockstate = this.level().getBlockState(blockpos); @@ -74,7 +74,7 @@ ? blockpos.atY(Mth.floor(this.position.y - (double)p_216987_)) : blockpos; } -@@ -1132,19 +_,19 @@ +@@ -1129,19 +_,19 @@ return !blockstate.is(BlockTags.INSIDE_STEP_SOUND_BLOCKS) && !blockstate.is(BlockTags.COMBINATION_STEP_SOUND_BLOCKS) ? p_278049_ : blockpos; } @@ -100,7 +100,7 @@ this.playSound(soundtype.getStepSound(), soundtype.getVolume() * 0.15F, soundtype.getPitch()); } -@@ -1297,20 +_,23 @@ +@@ -1294,20 +_,23 @@ public void updateSwimming() { if (this.isSwimming()) { @@ -129,7 +129,7 @@ } void updateInWaterStateAndDoWaterCurrentPushing() { -@@ -1335,6 +_,7 @@ +@@ -1332,6 +_,7 @@ private void updateFluidOnEyes() { this.wasEyeInWater = this.isEyeInFluid(FluidTags.WATER); this.fluidOnEyes.clear(); @@ -137,7 +137,7 @@ double d0 = this.getEyeY(); if (this.getVehicle() instanceof AbstractBoat abstractboat && !abstractboat.isUnderWater() -@@ -1347,7 +_,7 @@ +@@ -1344,7 +_,7 @@ FluidState fluidstate = this.level().getFluidState(blockpos); double d1 = (double)((float)blockpos.getY() + fluidstate.getHeight(this.level(), blockpos)); if (d1 > d0) { @@ -146,7 +146,7 @@ } } -@@ -1392,12 +_,13 @@ +@@ -1389,12 +_,13 @@ } public boolean canSpawnSprintParticle() { @@ -161,7 +161,7 @@ if (blockstate.getRenderShape() != RenderShape.INVISIBLE) { Vec3 vec3 = this.getDeltaMovement(); BlockPos blockpos1 = this.blockPosition(); -@@ -1411,16 +_,19 @@ +@@ -1408,16 +_,19 @@ d1 = Mth.clamp(d1, (double)blockpos.getZ(), (double)blockpos.getZ() + 1.0); } @@ -183,7 +183,7 @@ } public void moveRelative(float p_19921_, Vec3 p_19922_) { -@@ -1799,6 +_,10 @@ +@@ -1796,6 +_,10 @@ p_20241_.put("Tags", listtag); } @@ -194,7 +194,7 @@ this.addAdditionalSaveData(p_20241_); if (this.isVehicle()) { ListTag listtag1 = new ListTag(); -@@ -1880,6 +_,8 @@ +@@ -1877,6 +_,8 @@ this.setGlowingTag(p_20259_.getBoolean("Glowing")); this.setTicksFrozen(p_20259_.getInt("TicksFrozen")); this.hasVisualFire = p_20259_.getBoolean("HasVisualFire"); @@ -203,7 +203,7 @@ if (p_20259_.contains("Tags", 9)) { this.tags.clear(); ListTag listtag3 = p_20259_.getList("Tags", 8); -@@ -1962,6 +_,8 @@ +@@ -1959,6 +_,8 @@ } else { ItemEntity itementity = new ItemEntity(p_376141_, this.getX(), this.getY() + (double)p_376881_, this.getZ(), p_376472_); itementity.setDefaultPickUpDelay(); @@ -212,7 +212,7 @@ p_376141_.addFreshEntity(itementity); return itementity; } -@@ -2029,7 +_,11 @@ +@@ -2026,7 +_,11 @@ public void rideTick() { this.setDeltaMovement(Vec3.ZERO); @@ -225,7 +225,7 @@ if (this.isPassenger()) { this.getVehicle().positionRider(this); } -@@ -2089,6 +_,7 @@ +@@ -2086,6 +_,7 @@ } } @@ -233,7 +233,7 @@ if (p_19967_ || this.canRide(p_19966_) && p_19966_.canAddPassenger(this)) { if (this.isPassenger()) { this.stopRiding(); -@@ -2120,6 +_,7 @@ +@@ -2117,6 +_,7 @@ public void removeVehicle() { if (this.vehicle != null) { Entity entity = this.vehicle; @@ -241,7 +241,7 @@ this.vehicle = null; entity.removePassenger(this); } -@@ -2169,6 +_,8 @@ +@@ -2166,6 +_,8 @@ return this.passengers.isEmpty(); } @@ -250,7 +250,7 @@ protected boolean couldAcceptPassenger() { return true; } -@@ -2357,7 +_,7 @@ +@@ -2354,7 +_,7 @@ } public boolean isVisuallyCrawling() { @@ -259,7 +259,7 @@ } public void setSwimming(boolean p_20283_) { -@@ -2470,7 +_,7 @@ +@@ -2467,7 +_,7 @@ this.igniteForSeconds(8.0F); } @@ -268,7 +268,7 @@ } public void onAboveBubbleCol(boolean p_20313_) { -@@ -2565,7 +_,7 @@ +@@ -2562,7 +_,7 @@ } protected Component getTypeName() { @@ -277,7 +277,7 @@ } public boolean is(Entity p_20356_) { -@@ -2620,10 +_,11 @@ +@@ -2617,10 +_,11 @@ } protected final boolean isInvulnerableToBase(DamageSource p_20122_) { @@ -290,7 +290,7 @@ } public boolean isInvulnerable() { -@@ -2648,6 +_,7 @@ +@@ -2645,6 +_,7 @@ @Nullable public Entity teleport(TeleportTransition p_379899_) { @@ -298,7 +298,7 @@ if (this.level() instanceof ServerLevel serverlevel && !this.isRemoved()) { ServerLevel serverlevel1 = p_379899_.newLevel(); boolean flag = serverlevel1.dimension() != serverlevel.dimension(); -@@ -2855,6 +_,7 @@ +@@ -2852,6 +_,7 @@ return this.stringUUID; } @@ -306,7 +306,7 @@ public boolean isPushedByFluid() { return true; } -@@ -2963,6 +_,8 @@ +@@ -2960,6 +_,8 @@ EntityDimensions entitydimensions = this.dimensions; Pose pose = this.getPose(); EntityDimensions entitydimensions1 = this.getDimensions(pose); @@ -315,7 +315,7 @@ this.dimensions = entitydimensions1; this.eyeHeight = entitydimensions1.eyeHeight(); this.reapplyPosition(); -@@ -3268,9 +_,17 @@ +@@ -3265,9 +_,17 @@ return Mth.lerp(p_352259_, this.yRotO, this.yRot); } @@ -334,7 +334,7 @@ } else { AABB aabb = this.getBoundingBox().deflate(0.001); int i = Mth.floor(aabb.minX); -@@ -3285,25 +_,36 @@ +@@ -3282,25 +_,36 @@ Vec3 vec3 = Vec3.ZERO; int k1 = 0; BlockPos.MutableBlockPos blockpos$mutableblockpos = new BlockPos.MutableBlockPos(); @@ -378,7 +378,7 @@ } } } -@@ -3311,27 +_,30 @@ +@@ -3308,27 +_,30 @@ } } @@ -419,7 +419,7 @@ } } -@@ -3344,7 +_,10 @@ +@@ -3341,7 +_,10 @@ return !this.level().hasChunksAt(i, k, j, l); } @@ -430,7 +430,7 @@ return this.fluidHeight.getDouble(p_204037_); } -@@ -3481,6 +_,7 @@ +@@ -3478,6 +_,7 @@ this.levelCallback.onMove(); } @@ -438,7 +438,7 @@ } public void checkDespawn() { -@@ -3606,6 +_,128 @@ +@@ -3603,6 +_,128 @@ public boolean mayInteract(ServerLevel p_376870_, BlockPos p_146844_) { return true; diff --git a/patches/net/minecraft/world/entity/vehicle/AbstractMinecart.java.patch b/patches/net/minecraft/world/entity/vehicle/AbstractMinecart.java.patch index ed84bbe0f6..3360a92b16 100644 --- a/patches/net/minecraft/world/entity/vehicle/AbstractMinecart.java.patch +++ b/patches/net/minecraft/world/entity/vehicle/AbstractMinecart.java.patch @@ -1,6 +1,6 @@ --- a/net/minecraft/world/entity/vehicle/AbstractMinecart.java +++ b/net/minecraft/world/entity/vehicle/AbstractMinecart.java -@@ -420,8 +_,8 @@ +@@ -430,8 +_,8 @@ public Vec3 getRedstoneDirection(BlockPos p_361470_) { BlockState blockstate = this.level().getBlockState(p_361470_); diff --git a/patches/net/minecraft/world/entity/vehicle/OldMinecartBehavior.java.patch b/patches/net/minecraft/world/entity/vehicle/OldMinecartBehavior.java.patch index 0e5d4fb6b5..d8e36d27ee 100644 --- a/patches/net/minecraft/world/entity/vehicle/OldMinecartBehavior.java.patch +++ b/patches/net/minecraft/world/entity/vehicle/OldMinecartBehavior.java.patch @@ -9,7 +9,7 @@ this.minecart.activateMinecart(blockpos.getX(), blockpos.getY(), blockpos.getZ(), blockstate.getValue(PoweredRailBlock.POWERED)); } } else { -@@ -149,7 +_,7 @@ +@@ -148,7 +_,7 @@ d1 = (double)blockpos.getY(); boolean flag = false; boolean flag1 = false; @@ -18,7 +18,7 @@ flag = blockstate.getValue(PoweredRailBlock.POWERED); flag1 = !flag; } -@@ -160,7 +_,7 @@ +@@ -159,7 +_,7 @@ } Vec3 vec31 = this.getDeltaMovement(); @@ -27,7 +27,7 @@ switch (railshape) { case ASCENDING_EAST: this.setDeltaMovement(vec31.add(-d3, 0.0, 0.0)); -@@ -318,9 +_,10 @@ +@@ -317,9 +_,10 @@ j--; } @@ -40,7 +40,7 @@ p_363435_ = (double)j; if (railshape.isSlope()) { p_363435_ = (double)(j + 1); -@@ -357,9 +_,10 @@ +@@ -356,9 +_,10 @@ j--; }