Update to Minecraft 1.21.7

This commit is contained in:
md_5 2025-07-01 00:10:00 +10:00
parent 98f7fa28ed
commit 0918b74480
No known key found for this signature in database
GPG key ID: E8E901AC7C617C11
7 changed files with 20 additions and 18 deletions

View file

@ -1,6 +1,6 @@
--- a/net/minecraft/world/entity/monster/piglin/EntityPiglinAbstract.java
+++ b/net/minecraft/world/entity/monster/piglin/EntityPiglinAbstract.java
@@ -104,7 +104,7 @@
@@ -103,7 +103,7 @@
protected void finishConversion(WorldServer worldserver) {
this.convertTo(EntityTypes.ZOMBIFIED_PIGLIN, ConversionParams.single(this, true, true), (entitypigzombie) -> {
entitypigzombie.addEffect(new MobEffect(MobEffects.NAUSEA, 200, 0));

View file

@ -1,6 +1,6 @@
--- a/net/minecraft/world/entity/npc/EntityVillager.java
+++ b/net/minecraft/world/entity/npc/EntityVillager.java
@@ -93,6 +93,15 @@
@@ -92,6 +92,15 @@
import net.minecraft.world.phys.AxisAlignedBB;
import org.slf4j.Logger;
@ -16,7 +16,7 @@
public class EntityVillager extends EntityVillagerAbstract implements ReputationHandler, VillagerDataHolder {
private static final Logger LOGGER = LogUtils.getLogger();
@@ -130,15 +139,18 @@
@@ -129,15 +138,18 @@
private boolean assignProfessionWhenSpawned;
private static final ImmutableList<MemoryModuleType<?>> MEMORY_TYPES = ImmutableList.of(MemoryModuleType.HOME, MemoryModuleType.JOB_SITE, MemoryModuleType.POTENTIAL_JOB_SITE, MemoryModuleType.MEETING_POINT, MemoryModuleType.NEAREST_LIVING_ENTITIES, MemoryModuleType.NEAREST_VISIBLE_LIVING_ENTITIES, MemoryModuleType.VISIBLE_VILLAGER_BABIES, MemoryModuleType.NEAREST_PLAYERS, MemoryModuleType.NEAREST_VISIBLE_PLAYER, MemoryModuleType.NEAREST_VISIBLE_ATTACKABLE_PLAYER, MemoryModuleType.NEAREST_VISIBLE_WANTED_ITEM, MemoryModuleType.ITEM_PICKUP_COOLDOWN_TICKS, new MemoryModuleType[]{MemoryModuleType.WALK_TARGET, MemoryModuleType.LOOK_TARGET, MemoryModuleType.INTERACTION_TARGET, MemoryModuleType.BREED_TARGET, MemoryModuleType.PATH, MemoryModuleType.DOORS_TO_CLOSE, MemoryModuleType.NEAREST_BED, MemoryModuleType.HURT_BY, MemoryModuleType.HURT_BY_ENTITY, MemoryModuleType.NEAREST_HOSTILE, MemoryModuleType.SECONDARY_JOB_SITE, MemoryModuleType.HIDING_PLACE, MemoryModuleType.HEARD_BELL_TIME, MemoryModuleType.CANT_REACH_WALK_TARGET_SINCE, MemoryModuleType.LAST_SLEPT, MemoryModuleType.LAST_WOKEN, MemoryModuleType.LAST_WORKED_AT_POI, MemoryModuleType.GOLEM_DETECTED_RECENTLY});
private static final ImmutableList<SensorType<? extends Sensor<? super EntityVillager>>> SENSOR_TYPES = ImmutableList.of(SensorType.NEAREST_LIVING_ENTITIES, SensorType.NEAREST_PLAYERS, SensorType.NEAREST_ITEMS, SensorType.NEAREST_BED, SensorType.HURT_BY, SensorType.VILLAGER_HOSTILES, SensorType.VILLAGER_BABIES, SensorType.SECONDARY_POIS, SensorType.GOLEM_DETECTED);
@ -39,7 +39,7 @@
public EntityVillager(EntityTypes<? extends EntityVillager> entitytypes, World world) {
this(entitytypes, world, VillagerType.PLAINS);
@@ -151,7 +163,9 @@
@@ -150,7 +162,9 @@
public EntityVillager(EntityTypes<? extends EntityVillager> entitytypes, World world, Holder<VillagerType> holder) {
super(entitytypes, world);
this.foodLevel = 0;
@ -50,7 +50,7 @@
this.lastGossipDecayTime = 0L;
this.villagerXp = 0;
this.lastRestockGameTime = 0L;
@@ -166,7 +180,7 @@
@@ -165,7 +179,7 @@
@Override
public BehaviorController<EntityVillager> getBrain() {
@ -59,7 +59,7 @@
}
@Override
@@ -251,7 +265,7 @@
@@ -250,7 +264,7 @@
this.increaseProfessionLevelOnUpdate = false;
}
@ -68,7 +68,7 @@
}
}
@@ -369,7 +383,13 @@
@@ -368,7 +382,13 @@
this.updateDemand();
for (MerchantRecipe merchantrecipe : this.getOffers()) {
@ -83,7 +83,7 @@
}
this.resendOffersToTradingPlayer();
@@ -428,7 +448,13 @@
@@ -427,7 +447,13 @@
if (i > 0) {
for (MerchantRecipe merchantrecipe : this.getOffers()) {
@ -98,7 +98,7 @@
}
}
@@ -501,7 +527,7 @@
@@ -500,7 +526,7 @@
this.entityData.set(EntityVillager.DATA_VILLAGER_DATA, (VillagerData) valueinput.read("VillagerData", VillagerData.CODEC).orElseGet(EntityVillager::createDefaultVillagerData));
this.foodLevel = valueinput.getByteOr("FoodLevel", (byte) 0);
this.gossips.clear();
@ -107,7 +107,7 @@
Reputation reputation = this.gossips;
Objects.requireNonNull(this.gossips);
@@ -778,7 +804,7 @@
@@ -777,7 +803,7 @@
entitywitch1.finalizeSpawn(worldserver, worldserver.getCurrentDifficultyAt(entitywitch1.blockPosition()), EntitySpawnReason.CONVERSION, (GroupDataEntity) null);
entitywitch1.setPersistenceRequired();
this.releaseAllPois();
@ -116,7 +116,7 @@
if (entitywitch == null) {
super.thunderHit(worldserver, entitylightning);
@@ -826,7 +852,7 @@
@@ -825,7 +851,7 @@
@Override
protected void updateTrades() {
VillagerData villagerdata = this.getVillagerData();
@ -125,7 +125,7 @@
if (resourcekey != null) {
Int2ObjectMap<VillagerTrades.IMerchantRecipeOption[]> int2objectmap;
@@ -865,7 +891,7 @@
@@ -864,7 +890,7 @@
if (this.lastGossipDecayTime == 0L) {
this.lastGossipDecayTime = i;
@ -134,7 +134,7 @@
this.gossips.decay();
this.lastGossipDecayTime = i;
}
@@ -880,7 +906,7 @@
@@ -879,7 +905,7 @@
}).limit(5L).toList();
if (list1.size() >= j) {
@ -143,7 +143,7 @@
list.forEach(SensorGolemLastSeen::golemDetected);
}
}
@@ -893,15 +919,18 @@
@@ -892,15 +918,18 @@
@Override
public void onReputationEventFrom(ReputationEvent reputationevent, Entity entity) {

View file

@ -4,7 +4,7 @@
<groupId>org.bukkit</groupId>
<artifactId>craftbukkit</artifactId>
<packaging>jar</packaging>
<version>1.21.6-R0.1-SNAPSHOT</version>
<version>1.21.7-R0.1-SNAPSHOT</version>
<name>CraftBukkit</name>
<url>https://www.spigotmc.org/</url>

View file

@ -191,7 +191,7 @@ public class Main {
useConsole = false;
}
if (false && Main.class.getPackage().getImplementationVendor() != null && System.getProperty("IReallyKnowWhatIAmDoingISwear") == null) {
if (Main.class.getPackage().getImplementationVendor() != null && System.getProperty("IReallyKnowWhatIAmDoingISwear") == null) {
Date buildDate = new Date(Integer.parseInt(Main.class.getPackage().getImplementationVendor()) * 1000L);
Calendar deadline = Calendar.getInstance();

View file

@ -17,7 +17,7 @@ public final class ApiVersion implements Comparable<ApiVersion>, Serializable {
static {
versions = new HashMap<>();
CURRENT = getOrCreateVersion("1.21.6");
CURRENT = getOrCreateVersion("1.21.7");
FLATTENING = getOrCreateVersion("1.13");
FIELD_NAME_PARITY = getOrCreateVersion("1.20.5");
ABSTRACT_COW = getOrCreateVersion("1.21.5");

View file

@ -237,7 +237,7 @@ public final class CraftMagicNumbers implements UnsafeValues {
* @return string
*/
public String getMappingsVersion() {
return "164f8e872cb3dff744982fca079642b2";
return "98b42190c84edaa346fd96106ee35d6f";
}
@Override

View file

@ -140,6 +140,8 @@ public class LegacyTest {
// 1.21.6
Material.DRIED_GHAST, Material.BLACK_HARNESS, Material.BLUE_HARNESS, Material.BROWN_HARNESS, Material.CYAN_HARNESS, Material.GRAY_HARNESS, Material.GREEN_HARNESS, Material.HAPPY_GHAST_SPAWN_EGG, Material.LIGHT_BLUE_HARNESS, Material.LIGHT_GRAY_HARNESS,
Material.LIME_HARNESS, Material.MAGENTA_HARNESS, Material.ORANGE_HARNESS, Material.PINK_HARNESS, Material.PURPLE_HARNESS, Material.RED_HARNESS, Material.WHITE_HARNESS, Material.YELLOW_HARNESS, Material.MUSIC_DISC_TEARS,
// 1.21.7
Material.MUSIC_DISC_LAVA_CHICKEN,
//
Material.LEGACY_AIR, Material.LEGACY_DEAD_BUSH, Material.LEGACY_BURNING_FURNACE, Material.LEGACY_WALL_SIGN, Material.LEGACY_REDSTONE_TORCH_OFF, Material.LEGACY_SKULL, Material.LEGACY_REDSTONE_COMPARATOR_ON, Material.LEGACY_WALL_BANNER, Material.LEGACY_MONSTER_EGG));