Update to 1.21.1
This commit is contained in:
@@ -17,13 +17,13 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
--- a/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 {
|
||||
this.type = type;
|
||||
this.worldPosition = pos.immutable();
|
||||
this.validateBlockState(state);
|
||||
this.blockState = state;
|
||||
+ 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 {
|
||||
|
||||
// CraftBukkit start - read container
|
||||
|
||||
@@ -16,7 +16,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
StringReader stringreader = new StringReader(suggestionsbuilder.getInput());
|
||||
|
||||
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
|
||||
+ final boolean permission = object instanceof CommandSourceStack stack
|
||||
+ ? stack.bypassSelectorPermissions || stack.hasPermission(2, "minecraft.command.selector")
|
||||
|
||||
@@ -103,10 +103,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
private boolean usesSelectors;
|
||||
+ 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) {
|
||||
+ // Paper start - tell clients to ask server for suggestions for EntityArguments
|
||||
+ this(reader, atAllowed, false);
|
||||
|
||||
@@ -30,8 +30,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
--- a/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 {
|
||||
return s + " // " + this.getClass().getCanonicalName();
|
||||
});
|
||||
public void fillCrashReportCategory(CrashReportCategory crashReportSection) {
|
||||
crashReportSection.setDetail("Name", this::getNameForReporting);
|
||||
if (this.level != null) {
|
||||
- CrashReportCategory.populateBlockDetails(crashReportSection, this.level, this.worldPosition, this.getBlockState());
|
||||
+ // 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
|
||||
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
|
||||
+ this(id, equipmentList, false);
|
||||
+ this(entityId, equipmentList, false);
|
||||
+ }
|
||||
+ private boolean sanitize = false;
|
||||
+ public ClientboundSetEquipmentPacket(int id, List<Pair<EquipmentSlot, ItemStack>> equipmentList, boolean sanitize) {
|
||||
+ private boolean sanitize;
|
||||
+ public ClientboundSetEquipmentPacket(int entityId, List<Pair<EquipmentSlot, ItemStack>> equipmentList, boolean sanitize) {
|
||||
+ this.sanitize = sanitize;
|
||||
+ // Paper end - data sanitization
|
||||
this.entity = id;
|
||||
this.entity = entityId;
|
||||
this.slots = equipmentList;
|
||||
}
|
||||
@@ -0,0 +0,0 @@ public class ClientboundSetEquipmentPacket implements Packet<ClientGamePacketLis
|
||||
|
||||
@@ -170,7 +170,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
- <groupId>org.spigotmc</groupId>
|
||||
- <artifactId>spigot</artifactId>
|
||||
- <packaging>jar</packaging>
|
||||
- <version>1.21-R0.1-SNAPSHOT</version>
|
||||
- <version>1.21.1-R0.1-SNAPSHOT</version>
|
||||
- <name>Spigot</name>
|
||||
- <url>https://www.spigotmc.org/</url>
|
||||
-
|
||||
|
||||
Reference in New Issue
Block a user