1
0
mirror of https://github.com/PaperMC/Paper.git synced 2025-07-28 02:32:03 -07:00

Update to 1.21.1

This commit is contained in:
Nassim Jahnke
2024-08-10 12:24:38 +02:00
parent f117e53094
commit ec79de82ca
14 changed files with 21 additions and 25 deletions

@@ -40,7 +40,7 @@ How To (Plugin Developers)
<dependency> <dependency>
<groupId>io.papermc.paper</groupId> <groupId>io.papermc.paper</groupId>
<artifactId>paper-api</artifactId> <artifactId>paper-api</artifactId>
<version>1.21-R0.1-SNAPSHOT</version> <version>1.21.1-R0.1-SNAPSHOT</version>
<scope>provided</scope> <scope>provided</scope>
</dependency> </dependency>
``` ```
@@ -53,7 +53,7 @@ repositories {
} }
dependencies { dependencies {
compileOnly("io.papermc.paper:paper-api:1.21-R0.1-SNAPSHOT") compileOnly("io.papermc.paper:paper-api:1.21.1-R0.1-SNAPSHOT")
} }
java { java {

@@ -67,7 +67,7 @@ repositories {
} }
dependencies { dependencies {
paramMappings("net.fabricmc:yarn:1.21+build.1:mergedv2") paramMappings("net.fabricmc:yarn:1.21.1+build.3:mergedv2")
remapper("net.fabricmc:tiny-remapper:0.10.3:fat") remapper("net.fabricmc:tiny-remapper:0.10.3:fat")
decompiler("org.vineflower:vineflower:1.10.1") decompiler("org.vineflower:vineflower:1.10.1")
spigotDecompiler("io.papermc:patched-spigot-fernflower:0.1+build.13") spigotDecompiler("io.papermc:patched-spigot-fernflower:0.1+build.13")

@@ -1,6 +1,6 @@
group=io.papermc.paper group=io.papermc.paper
version=1.21-R0.1-SNAPSHOT version=1.21.1-R0.1-SNAPSHOT
mcVersion=1.21 mcVersion=1.21.1
# Set to true while updating Minecraft version # Set to true while updating Minecraft version
updatingMinecraft=false updatingMinecraft=false

@@ -135,7 +135,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
- -
- <groupId>org.spigotmc</groupId> - <groupId>org.spigotmc</groupId>
- <artifactId>spigot-api</artifactId> - <artifactId>spigot-api</artifactId>
- <version>1.21-R0.1-SNAPSHOT</version> - <version>1.21.1-R0.1-SNAPSHOT</version>
- <packaging>jar</packaging> - <packaging>jar</packaging>
- -
- <name>Spigot-API</name> - <name>Spigot-API</name>

@@ -17,13 +17,13 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
--- a/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java --- a/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java
+++ b/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java +++ b/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java
@@ -0,0 +0,0 @@ public abstract class BlockEntity { @@ -0,0 +0,0 @@ public abstract class BlockEntity {
this.type = type;
this.worldPosition = pos.immutable(); this.worldPosition = pos.immutable();
this.validateBlockState(state);
this.blockState = state; this.blockState = state;
+ this.persistentDataContainer = new CraftPersistentDataContainer(DATA_TYPE_REGISTRY); // Paper - always init + this.persistentDataContainer = new CraftPersistentDataContainer(DATA_TYPE_REGISTRY); // Paper - always init
} }
public static BlockPos getPosFromTag(CompoundTag nbt) { private void validateBlockState(BlockState state) {
@@ -0,0 +0,0 @@ public abstract class BlockEntity { @@ -0,0 +0,0 @@ public abstract class BlockEntity {
// CraftBukkit start - read container // CraftBukkit start - read container

@@ -16,7 +16,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
StringReader stringreader = new StringReader(suggestionsbuilder.getInput()); StringReader stringreader = new StringReader(suggestionsbuilder.getInput());
stringreader.setCursor(suggestionsbuilder.getStart()); stringreader.setCursor(suggestionsbuilder.getStart());
- EntitySelectorParser argumentparserselector = new EntitySelectorParser(stringreader, icompletionprovider.hasPermission(2)); - EntitySelectorParser argumentparserselector = new EntitySelectorParser(stringreader, EntitySelectorParser.allowSelectors(icompletionprovider));
+ // Paper start - Fix EntityArgument suggestion permissions + // Paper start - Fix EntityArgument suggestion permissions
+ final boolean permission = object instanceof CommandSourceStack stack + final boolean permission = object instanceof CommandSourceStack stack
+ ? stack.bypassSelectorPermissions || stack.hasPermission(2, "minecraft.command.selector") + ? stack.bypassSelectorPermissions || stack.hasPermission(2, "minecraft.command.selector")

@@ -103,10 +103,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
private boolean usesSelectors; private boolean usesSelectors;
+ public boolean parsingEntityArgumentSuggestions; // Paper - tell clients to ask server for suggestions for EntityArguments + public boolean parsingEntityArgumentSuggestions; // Paper - tell clients to ask server for suggestions for EntityArguments
public EntitySelectorParser(StringReader reader) {
this(reader, true);
}
public EntitySelectorParser(StringReader reader, boolean atAllowed) { public EntitySelectorParser(StringReader reader, boolean atAllowed) {
+ // Paper start - tell clients to ask server for suggestions for EntityArguments + // Paper start - tell clients to ask server for suggestions for EntityArguments
+ this(reader, atAllowed, false); + this(reader, atAllowed, false);

@@ -30,8 +30,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
--- a/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java --- a/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java
+++ b/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java +++ b/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java
@@ -0,0 +0,0 @@ public abstract class BlockEntity { @@ -0,0 +0,0 @@ public abstract class BlockEntity {
return s + " // " + this.getClass().getCanonicalName(); public void fillCrashReportCategory(CrashReportCategory crashReportSection) {
}); crashReportSection.setDetail("Name", this::getNameForReporting);
if (this.level != null) { if (this.level != null) {
- CrashReportCategory.populateBlockDetails(crashReportSection, this.level, this.worldPosition, this.getBlockState()); - CrashReportCategory.populateBlockDetails(crashReportSection, this.level, this.worldPosition, this.getBlockState());
+ // Paper start - Prevent block entity and entity crashes + // Paper start - Prevent block entity and entity crashes

@@ -160,15 +160,15 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
@@ -0,0 +0,0 @@ public class ClientboundSetEquipmentPacket implements Packet<ClientGamePacketLis @@ -0,0 +0,0 @@ public class ClientboundSetEquipmentPacket implements Packet<ClientGamePacketLis
private final List<Pair<EquipmentSlot, ItemStack>> slots; private final List<Pair<EquipmentSlot, ItemStack>> slots;
public ClientboundSetEquipmentPacket(int id, List<Pair<EquipmentSlot, ItemStack>> equipmentList) { public ClientboundSetEquipmentPacket(int entityId, List<Pair<EquipmentSlot, ItemStack>> equipmentList) {
+ // Paper start - data sanitization + // Paper start - data sanitization
+ this(id, equipmentList, false); + this(entityId, equipmentList, false);
+ } + }
+ private boolean sanitize = false; + private boolean sanitize;
+ public ClientboundSetEquipmentPacket(int id, List<Pair<EquipmentSlot, ItemStack>> equipmentList, boolean sanitize) { + public ClientboundSetEquipmentPacket(int entityId, List<Pair<EquipmentSlot, ItemStack>> equipmentList, boolean sanitize) {
+ this.sanitize = sanitize; + this.sanitize = sanitize;
+ // Paper end - data sanitization + // Paper end - data sanitization
this.entity = id; this.entity = entityId;
this.slots = equipmentList; this.slots = equipmentList;
} }
@@ -0,0 +0,0 @@ public class ClientboundSetEquipmentPacket implements Packet<ClientGamePacketLis @@ -0,0 +0,0 @@ public class ClientboundSetEquipmentPacket implements Packet<ClientGamePacketLis

@@ -170,7 +170,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
- <groupId>org.spigotmc</groupId> - <groupId>org.spigotmc</groupId>
- <artifactId>spigot</artifactId> - <artifactId>spigot</artifactId>
- <packaging>jar</packaging> - <packaging>jar</packaging>
- <version>1.21-R0.1-SNAPSHOT</version> - <version>1.21.1-R0.1-SNAPSHOT</version>
- <name>Spigot</name> - <name>Spigot</name>
- <url>https://www.spigotmc.org/</url> - <url>https://www.spigotmc.org/</url>
- -