mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-03 23:07:40 +01:00
Update to Minecraft 1.21.1
By: md_5 <git@md-5.net>
This commit is contained in:
parent
59b86b9837
commit
921fbc5f60
@ -1,17 +1,17 @@
|
||||
--- a/net/minecraft/commands/arguments/ArgumentEntity.java
|
||||
+++ b/net/minecraft/commands/arguments/ArgumentEntity.java
|
||||
@@ -94,9 +94,15 @@
|
||||
@@ -102,9 +102,15 @@
|
||||
}
|
||||
|
||||
public EntitySelector parse(StringReader stringreader) throws CommandSyntaxException {
|
||||
private EntitySelector parse(StringReader stringreader, boolean flag) throws CommandSyntaxException {
|
||||
+ // CraftBukkit start
|
||||
+ return parse(stringreader, false);
|
||||
+ return parse(stringreader, flag, false);
|
||||
+ }
|
||||
+
|
||||
+ public EntitySelector parse(StringReader stringreader, boolean overridePermissions) throws CommandSyntaxException {
|
||||
+ public EntitySelector parse(StringReader stringreader, boolean flag, boolean overridePermissions) throws CommandSyntaxException {
|
||||
+ // CraftBukkit end
|
||||
boolean flag = false;
|
||||
ArgumentParserSelector argumentparserselector = new ArgumentParserSelector(stringreader);
|
||||
boolean flag1 = false;
|
||||
ArgumentParserSelector argumentparserselector = new ArgumentParserSelector(stringreader, flag);
|
||||
- EntitySelector entityselector = argumentparserselector.parse();
|
||||
+ EntitySelector entityselector = argumentparserselector.parse(overridePermissions); // CraftBukkit
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/commands/arguments/selector/ArgumentParserSelector.java
|
||||
+++ b/net/minecraft/commands/arguments/selector/ArgumentParserSelector.java
|
||||
@@ -147,7 +147,7 @@
|
||||
@@ -158,7 +158,7 @@
|
||||
axisalignedbb = this.createAabb(this.deltaX == null ? 0.0D : this.deltaX, this.deltaY == null ? 0.0D : this.deltaY, this.deltaZ == null ? 0.0D : this.deltaZ);
|
||||
}
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
|
||||
if (this.x == null && this.y == null && this.z == null) {
|
||||
function = (vec3d) -> {
|
||||
@@ -204,8 +204,10 @@
|
||||
@@ -215,8 +215,10 @@
|
||||
};
|
||||
}
|
||||
|
||||
@ -22,7 +22,7 @@
|
||||
this.suggestions = this::suggestSelector;
|
||||
if (!this.reader.canRead()) {
|
||||
throw ArgumentParserSelector.ERROR_MISSING_SELECTOR_TYPE.createWithContext(this.reader);
|
||||
@@ -494,6 +496,12 @@
|
||||
@@ -505,6 +507,12 @@
|
||||
}
|
||||
|
||||
public EntitySelector parse() throws CommandSyntaxException {
|
||||
@ -35,7 +35,7 @@
|
||||
this.startPosition = this.reader.getCursor();
|
||||
this.suggestions = this::suggestNameOrSelector;
|
||||
if (this.reader.canRead() && this.reader.peek() == '@') {
|
||||
@@ -502,7 +510,7 @@
|
||||
@@ -513,7 +521,7 @@
|
||||
}
|
||||
|
||||
this.reader.skip();
|
||||
|
@ -19,7 +19,7 @@
|
||||
private static final Logger LOGGER = LogUtils.getLogger();
|
||||
private final TileEntityTypes<?> type;
|
||||
@Nullable
|
||||
@@ -62,7 +72,16 @@
|
||||
@@ -75,7 +85,16 @@
|
||||
return this.level != null;
|
||||
}
|
||||
|
||||
@ -37,7 +37,7 @@
|
||||
|
||||
public final void loadWithComponents(NBTTagCompound nbttagcompound, HolderLookup.a holderlookup_a) {
|
||||
this.loadAdditional(nbttagcompound, holderlookup_a);
|
||||
@@ -102,6 +121,11 @@
|
||||
@@ -115,6 +134,11 @@
|
||||
}).ifPresent((nbtbase) -> {
|
||||
nbttagcompound.merge((NBTTagCompound) nbtbase);
|
||||
});
|
||||
@ -49,7 +49,7 @@
|
||||
return nbttagcompound;
|
||||
}
|
||||
|
||||
@@ -260,12 +284,18 @@
|
||||
@@ -276,12 +300,18 @@
|
||||
}
|
||||
|
||||
public final void applyComponents(DataComponentMap datacomponentmap, DataComponentPatch datacomponentpatch) {
|
||||
@ -69,7 +69,7 @@
|
||||
@Nullable
|
||||
@Override
|
||||
public <T> T get(DataComponentType<T> datacomponenttype) {
|
||||
@@ -283,6 +313,10 @@
|
||||
@@ -299,6 +329,10 @@
|
||||
DataComponentPatch datacomponentpatch1 = datacomponentpatch.forget(set::contains);
|
||||
|
||||
this.components = datacomponentpatch1.split().added();
|
||||
@ -80,7 +80,7 @@
|
||||
}
|
||||
|
||||
protected void collectImplicitComponents(DataComponentMap.a datacomponentmap_a) {}
|
||||
@@ -317,6 +351,15 @@
|
||||
@@ -333,6 +367,15 @@
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -11,12 +11,8 @@
|
||||
public class TileEntityBeehive extends TileEntity {
|
||||
|
||||
private static final Logger LOGGER = LogUtils.getLogger();
|
||||
@@ -52,9 +56,10 @@
|
||||
private static final int MIN_TICKS_BEFORE_REENTERING_HIVE = 400;
|
||||
private static final int MIN_OCCUPATION_TICKS_NECTAR = 2400;
|
||||
public static final int MIN_OCCUPATION_TICKS_NECTARLESS = 600;
|
||||
- private final List<TileEntityBeehive.HiveBee> stored = Lists.newArrayList();
|
||||
+ private List<TileEntityBeehive.HiveBee> stored = Lists.newArrayList();
|
||||
@@ -55,6 +59,7 @@
|
||||
private List<TileEntityBeehive.HiveBee> stored = Lists.newArrayList();
|
||||
@Nullable
|
||||
public BlockPosition savedFlowerPos;
|
||||
+ public int maxBees = 3; // CraftBukkit - allow setting max amount of bees a hive can hold
|
||||
|
@ -1,27 +1,5 @@
|
||||
--- a/net/minecraft/world/level/block/entity/trialspawner/TrialSpawner.java
|
||||
+++ b/net/minecraft/world/level/block/entity/trialspawner/TrialSpawner.java
|
||||
@@ -57,16 +57,16 @@
|
||||
private static final int MAX_MOB_TRACKING_DISTANCE = 47;
|
||||
private static final int MAX_MOB_TRACKING_DISTANCE_SQR = MathHelper.square(47);
|
||||
private static final float SPAWNING_AMBIENT_SOUND_CHANCE = 0.02F;
|
||||
- private final TrialSpawnerConfig normalConfig;
|
||||
- private final TrialSpawnerConfig ominousConfig;
|
||||
+ public TrialSpawnerConfig normalConfig; // PAIL - private->public, -final
|
||||
+ public TrialSpawnerConfig ominousConfig; // PAIL - private->public, -final
|
||||
private final TrialSpawnerData data;
|
||||
- private final int requiredPlayerRange;
|
||||
- private final int targetCooldownLength;
|
||||
+ public int requiredPlayerRange; // PAIL - private->public, -final
|
||||
+ public int targetCooldownLength; // PAIL - private->public, -final
|
||||
public final TrialSpawner.b stateAccessor;
|
||||
private PlayerDetector playerDetector;
|
||||
private final PlayerDetector.a entitySelector;
|
||||
private boolean overridePeacefulAndMobSpawnRule;
|
||||
- private boolean isOminous;
|
||||
+ public boolean isOminous; // PAIL - private->public
|
||||
|
||||
public Codec<TrialSpawner> codec() {
|
||||
return RecordCodecBuilder.create((instance) -> {
|
||||
@@ -219,13 +219,18 @@
|
||||
}
|
||||
|
||||
|
@ -68,7 +68,7 @@
|
||||
iblockdata.onPlace(this.level, blockposition, iblockdata1, flag);
|
||||
}
|
||||
|
||||
@@ -340,7 +357,12 @@
|
||||
@@ -345,7 +362,12 @@
|
||||
|
||||
@Nullable
|
||||
public TileEntity getBlockEntity(BlockPosition blockposition, Chunk.EnumTileEntityState chunk_enumtileentitystate) {
|
||||
@ -82,7 +82,7 @@
|
||||
|
||||
if (tileentity == null) {
|
||||
NBTTagCompound nbttagcompound = (NBTTagCompound) this.pendingBlockEntities.remove(blockposition);
|
||||
@@ -412,6 +434,7 @@
|
||||
@@ -417,6 +439,7 @@
|
||||
|
||||
if (!iblockdata.hasBlockEntity()) {
|
||||
Chunk.LOGGER.warn("Trying to set block entity {} at position {}, but state {} does not allow it", new Object[]{tileentity, blockposition, iblockdata});
|
||||
@ -90,7 +90,7 @@
|
||||
} else {
|
||||
IBlockData iblockdata1 = tileentity.getBlockState();
|
||||
|
||||
@@ -465,6 +488,12 @@
|
||||
@@ -470,6 +493,12 @@
|
||||
if (this.isInLevel()) {
|
||||
TileEntity tileentity = (TileEntity) this.blockEntities.remove(blockposition);
|
||||
|
||||
@ -103,7 +103,7 @@
|
||||
if (tileentity != null) {
|
||||
World world = this.level;
|
||||
|
||||
@@ -518,6 +547,57 @@
|
||||
@@ -523,6 +552,57 @@
|
||||
|
||||
}
|
||||
|
||||
@ -161,7 +161,7 @@
|
||||
public boolean isEmpty() {
|
||||
return false;
|
||||
}
|
||||
@@ -713,7 +793,7 @@
|
||||
@@ -718,7 +798,7 @@
|
||||
|
||||
private <T extends TileEntity> void updateBlockEntityTicker(T t0) {
|
||||
IBlockData iblockdata = t0.getBlockState();
|
||||
@ -170,7 +170,7 @@
|
||||
|
||||
if (blockentityticker == null) {
|
||||
this.removeBlockEntityTicker(t0.getBlockPos());
|
||||
@@ -798,7 +878,7 @@
|
||||
@@ -803,7 +883,7 @@
|
||||
private boolean loggedInvalidBlockState;
|
||||
|
||||
a(final TileEntity tileentity, final BlockEntityTicker blockentityticker) {
|
||||
|
@ -4,7 +4,7 @@
|
||||
<groupId>org.bukkit</groupId>
|
||||
<artifactId>craftbukkit</artifactId>
|
||||
<packaging>jar</packaging>
|
||||
<version>1.21-R0.1-SNAPSHOT</version>
|
||||
<version>1.21.1-R0.1-SNAPSHOT</version>
|
||||
<name>CraftBukkit</name>
|
||||
<url>https://www.spigotmc.org/</url>
|
||||
|
||||
|
@ -2505,7 +2505,7 @@ public final class CraftServer implements Server {
|
||||
|
||||
try {
|
||||
StringReader reader = new StringReader(selector);
|
||||
nms = arg.parse(reader, true).findEntities(VanillaCommandWrapper.getListener(sender));
|
||||
nms = arg.parse(reader, true, true).findEntities(VanillaCommandWrapper.getListener(sender));
|
||||
Preconditions.checkArgument(!reader.canRead(), "Spurious trailing data in selector: %s", selector);
|
||||
} catch (CommandSyntaxException ex) {
|
||||
throw new IllegalArgumentException("Could not parse selector: " + selector, ex);
|
||||
|
@ -16,7 +16,7 @@ public final class ApiVersion implements Comparable<ApiVersion>, Serializable {
|
||||
|
||||
static {
|
||||
versions = new HashMap<>();
|
||||
CURRENT = getOrCreateVersion("1.21");
|
||||
CURRENT = getOrCreateVersion("1.21.1");
|
||||
FLATTENING = getOrCreateVersion("1.13");
|
||||
FIELD_NAME_PARITY = getOrCreateVersion("1.20.5");
|
||||
NONE = getOrCreateVersion("none");
|
||||
|
@ -226,7 +226,7 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
||||
* @return string
|
||||
*/
|
||||
public String getMappingsVersion() {
|
||||
return "229d7afc75b70a6c388337687ac4da1f";
|
||||
return "7092ff1ff9352ad7e2260dc150e6a3ec";
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Loading…
Reference in New Issue
Block a user