CB fixes
* Missing Level -> LevelStem generic in StructureCheck Need to use the right for injectDatafixingContext (Spottedleaf) * Fix summon_entity effect attempting to add incorrect entity (granny) * Removed incorrect parent perm for `minecraft.debugstick.always` (Machine_Maker) * Fixed method signature of Marker#addPassenger (Machine_Maker) * Removed unneeded UOE in CustomWorldChunkManager (extends BiomeSource) (Machine_Maker) * Honor Server#getLootTable method contract (Machine_Maker) Co-authored-by: Spottedleaf <Spottedleaf@users.noreply.github.com>
This commit is contained in:
@@ -424,7 +424,7 @@ public class CraftChunk implements Chunk {
|
||||
}
|
||||
}
|
||||
|
||||
return new CraftChunkSnapshot(x, z, world.getMinHeight(), world.getMaxHeight(), world.getSeaLevel(), world.getName(), world.getFullTime(), blockIDs, skyLight, emitLight, empty, new Heightmap(actual, Heightmap.Types.MOTION_BLOCKING), iregistry, biome);
|
||||
return new CraftChunkSnapshot(x, z, world.getMinHeight(), world.getMaxY(), world.getSeaLevel(), world.getName(), world.getFullTime(), blockIDs, skyLight, emitLight, empty, new Heightmap(actual, Heightmap.Types.MOTION_BLOCKING), iregistry, biome);
|
||||
}
|
||||
|
||||
static void validateChunkCoordinates(int minY, int maxY, int x, int y, int z) {
|
||||
|
||||
@@ -187,4 +187,11 @@ public class CraftLootTable implements org.bukkit.loot.LootTable {
|
||||
org.bukkit.loot.LootTable table = (org.bukkit.loot.LootTable) obj;
|
||||
return table.getKey().equals(this.getKey());
|
||||
}
|
||||
|
||||
// Paper start - satisfy equals/hashCode contract
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return java.util.Objects.hash(key);
|
||||
}
|
||||
// Paper end
|
||||
}
|
||||
|
||||
@@ -1300,6 +1300,10 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||
return this.world.getMaxY() + 1;
|
||||
}
|
||||
|
||||
public int getMaxY() {
|
||||
return this.world.getMaxY();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getLogicalHeight() {
|
||||
return this.world.dimensionType().logicalHeight();
|
||||
|
||||
@@ -123,6 +123,7 @@ public class Main {
|
||||
this.acceptsAll(Main.asList("forceUpgrade"), "Whether to force a world upgrade");
|
||||
this.acceptsAll(Main.asList("eraseCache"), "Whether to force cache erase during world upgrade");
|
||||
this.acceptsAll(Main.asList("recreateRegionFiles"), "Whether to recreate region files during world upgrade");
|
||||
this.accepts("safeMode", "Loads level with vanilla datapack only"); // Paper
|
||||
this.acceptsAll(Main.asList("nogui"), "Disables the graphical console");
|
||||
|
||||
this.acceptsAll(Main.asList("nojline"), "Disables jline and emulates the vanilla console");
|
||||
|
||||
@@ -26,6 +26,7 @@ import org.bukkit.scheduler.BukkitWorker;
|
||||
|
||||
/**
|
||||
* The fundamental concepts for this implementation:
|
||||
* <ul>
|
||||
* <li>Main thread owns {@link #head} and {@link #currentTick}, but it may be read from any thread</li>
|
||||
* <li>Main thread exclusively controls {@link #temp} and {@link #pending}.
|
||||
* They are never to be accessed outside of the main thread; alternatives exist to prevent locking.</li>
|
||||
@@ -41,6 +42,7 @@ import org.bukkit.scheduler.BukkitWorker;
|
||||
* <li>Sync tasks are only to be removed from runners on the main thread when coupled with a removal from pending and temp.</li>
|
||||
* <li>Most of the design in this scheduler relies on queuing special tasks to perform any data changes on the main thread.
|
||||
* When executed from inside a synchronous method, the scheduler will be updated before next execution by virtue of the frequent {@link #parsePending()} calls.</li>
|
||||
* </ul>
|
||||
*/
|
||||
public class CraftScheduler implements BukkitScheduler {
|
||||
|
||||
|
||||
@@ -247,7 +247,7 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
||||
try {
|
||||
nmsStack.applyComponents(new ItemParser(Commands.createValidationContext(MinecraftServer.getDefaultRegistryAccess())).parse(new StringReader(arguments)).components());
|
||||
} catch (CommandSyntaxException ex) {
|
||||
Logger.getLogger(CraftMagicNumbers.class.getName()).log(Level.SEVERE, null, ex);
|
||||
com.mojang.logging.LogUtils.getClassLogger().error("Exception modifying ItemStack", new Throwable(ex)); // Paper - show stack trace
|
||||
}
|
||||
|
||||
stack.setItemMeta(CraftItemStack.getItemMeta(nmsStack));
|
||||
|
||||
@@ -15,7 +15,7 @@ public final class CraftDefaultPermissions {
|
||||
DefaultPermissions.registerPermission(CraftDefaultPermissions.ROOT + ".nbt.place", "Gives the user the ability to place restricted blocks with NBT in creative", org.bukkit.permissions.PermissionDefault.OP, parent);
|
||||
DefaultPermissions.registerPermission(CraftDefaultPermissions.ROOT + ".nbt.copy", "Gives the user the ability to copy NBT in creative", org.bukkit.permissions.PermissionDefault.TRUE, parent);
|
||||
DefaultPermissions.registerPermission(CraftDefaultPermissions.ROOT + ".debugstick", "Gives the user the ability to use the debug stick in creative", org.bukkit.permissions.PermissionDefault.OP, parent);
|
||||
DefaultPermissions.registerPermission(CraftDefaultPermissions.ROOT + ".debugstick.always", "Gives the user the ability to use the debug stick in all game modes", org.bukkit.permissions.PermissionDefault.FALSE, parent);
|
||||
DefaultPermissions.registerPermission(CraftDefaultPermissions.ROOT + ".debugstick.always", "Gives the user the ability to use the debug stick in all game modes", org.bukkit.permissions.PermissionDefault.FALSE/* , parent */); // Paper - should not have this parent, as it's not a "vanilla" utility
|
||||
// Spigot end
|
||||
parent.recalculatePermissibles();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user