mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-15 20:23:53 -07:00
[ci skip] Fix typos in Paper comments (#6588)
* //Paper -> // Paper * // Tuiniy -> // Paper
This commit is contained in:
@@ -15,7 +15,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
+ @Deprecated // Paper
|
+ @Deprecated // Paper
|
||||||
public BlockMultiPlaceEvent(@NotNull List<BlockState> states, @NotNull Block clicked, @NotNull ItemStack itemInHand, @NotNull Player thePlayer, boolean canBuild) {
|
public BlockMultiPlaceEvent(@NotNull List<BlockState> states, @NotNull Block clicked, @NotNull ItemStack itemInHand, @NotNull Player thePlayer, boolean canBuild) {
|
||||||
- super(states.get(0).getBlock(), states.get(0), clicked, itemInHand, thePlayer, canBuild);
|
- super(states.get(0).getBlock(), states.get(0), clicked, itemInHand, thePlayer, canBuild);
|
||||||
+ //Paper start - add hand to BlockMultiPlaceEvent
|
+ // Paper start - add hand to BlockMultiPlaceEvent
|
||||||
+ this(states, clicked, itemInHand, thePlayer, canBuild, org.bukkit.inventory.EquipmentSlot.HAND);
|
+ this(states, clicked, itemInHand, thePlayer, canBuild, org.bukkit.inventory.EquipmentSlot.HAND);
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
@@ -23,7 +23,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
+ public BlockMultiPlaceEvent(@NotNull List<BlockState> states, @NotNull Block clicked, @NotNull ItemStack itemInHand, @NotNull Player thePlayer, boolean canBuild, @NotNull org.bukkit.inventory.EquipmentSlot hand) {
|
+ public BlockMultiPlaceEvent(@NotNull List<BlockState> states, @NotNull Block clicked, @NotNull ItemStack itemInHand, @NotNull Player thePlayer, boolean canBuild, @NotNull org.bukkit.inventory.EquipmentSlot hand) {
|
||||||
+ super(states.get(0).getBlock(), states.get(0), clicked, itemInHand, thePlayer, canBuild, hand);
|
+ super(states.get(0).getBlock(), states.get(0), clicked, itemInHand, thePlayer, canBuild, hand);
|
||||||
this.states = ImmutableList.copyOf(states);
|
this.states = ImmutableList.copyOf(states);
|
||||||
+ //Paper end
|
+ // Paper end
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -13,7 +13,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||||
@@ -0,0 +0,0 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
@@ -0,0 +0,0 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||||
}
|
}
|
||||||
// Tuiniy end
|
// Paper end
|
||||||
|
|
||||||
+ boolean unloadingPlayerChunk = false; // Paper - do not allow ticket level changes while unloading chunks
|
+ boolean unloadingPlayerChunk = false; // Paper - do not allow ticket level changes while unloading chunks
|
||||||
public ChunkMap(ServerLevel world, LevelStorageSource.LevelStorageAccess session, DataFixer dataFixer, StructureManager structureManager, Executor executor, BlockableEventLoop<Runnable> mainThreadExecutor, LightChunkGetter chunkProvider, ChunkGenerator chunkGenerator, ChunkProgressListener worldGenerationProgressListener, ChunkStatusUpdateListener chunkStatusChangeListener, Supplier<DimensionDataStorage> persistentStateManagerFactory, int viewDistance, boolean dsync) {
|
public ChunkMap(ServerLevel world, LevelStorageSource.LevelStorageAccess session, DataFixer dataFixer, StructureManager structureManager, Executor executor, BlockableEventLoop<Runnable> mainThreadExecutor, LightChunkGetter chunkProvider, ChunkGenerator chunkGenerator, ChunkProgressListener worldGenerationProgressListener, ChunkStatusUpdateListener chunkStatusChangeListener, Supplier<DimensionDataStorage> persistentStateManagerFactory, int viewDistance, boolean dsync) {
|
||||||
|
@@ -23,7 +23,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
- h.closeInventory(org.bukkit.event.inventory.InventoryCloseEvent.Reason.UNLOADED); // Paper
|
- h.closeInventory(org.bukkit.event.inventory.InventoryCloseEvent.Reason.UNLOADED); // Paper
|
||||||
+ ((org.bukkit.craftbukkit.entity.CraftHumanEntity)h).getHandle().closeUnloadedInventory(org.bukkit.event.inventory.InventoryCloseEvent.Reason.UNLOADED); // Paper
|
+ ((org.bukkit.craftbukkit.entity.CraftHumanEntity)h).getHandle().closeUnloadedInventory(org.bukkit.event.inventory.InventoryCloseEvent.Reason.UNLOADED); // Paper
|
||||||
}
|
}
|
||||||
+ // Tuiniy end
|
+ // Paper end
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Spigot End
|
// Spigot End
|
||||||
|
@@ -17,7 +17,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
+ public org.bukkit.craftbukkit.inventory.CraftItemStack getItemStack() {
|
+ public org.bukkit.craftbukkit.inventory.CraftItemStack getItemStack() {
|
||||||
+ return org.bukkit.craftbukkit.inventory.CraftItemStack.asCraftMirror(getHandle().getPickupItem());
|
+ return org.bukkit.craftbukkit.inventory.CraftItemStack.asCraftMirror(getHandle().getPickupItem());
|
||||||
+ }
|
+ }
|
||||||
+ //Paper end
|
+ // Paper end
|
||||||
+
|
+
|
||||||
@Override
|
@Override
|
||||||
public void setTicksLived(int value) {
|
public void setTicksLived(int value) {
|
||||||
|
@@ -87,7 +87,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
this.carriedItem = buf.readItem();
|
this.carriedItem = buf.readItem();
|
||||||
}
|
}
|
||||||
|
|
||||||
+ //Paper start
|
+ // Paper start
|
||||||
+ @Override
|
+ @Override
|
||||||
+ public boolean packetTooLarge(net.minecraft.network.Connection manager) {
|
+ public boolean packetTooLarge(net.minecraft.network.Connection manager) {
|
||||||
+ for (int i = 0 ; i < this.items.size() ; i++) {
|
+ for (int i = 0 ; i < this.items.size() ; i++) {
|
||||||
|
@@ -5271,7 +5271,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
+ public final ChunkHolder getUnloadingChunkHolder(int chunkX, int chunkZ) {
|
+ public final ChunkHolder getUnloadingChunkHolder(int chunkX, int chunkZ) {
|
||||||
+ return this.pendingUnloads.get(io.papermc.paper.util.CoordinateUtils.getChunkKey(chunkX, chunkZ));
|
+ return this.pendingUnloads.get(io.papermc.paper.util.CoordinateUtils.getChunkKey(chunkX, chunkZ));
|
||||||
+ }
|
+ }
|
||||||
+ // Tuiniy end
|
+ // Paper end
|
||||||
+
|
+
|
||||||
public ChunkMap(ServerLevel world, LevelStorageSource.LevelStorageAccess session, DataFixer dataFixer, StructureManager structureManager, Executor executor, BlockableEventLoop<Runnable> mainThreadExecutor, LightChunkGetter chunkProvider, ChunkGenerator chunkGenerator, ChunkProgressListener worldGenerationProgressListener, ChunkStatusUpdateListener chunkStatusChangeListener, Supplier<DimensionDataStorage> persistentStateManagerFactory, int viewDistance, boolean dsync) {
|
public ChunkMap(ServerLevel world, LevelStorageSource.LevelStorageAccess session, DataFixer dataFixer, StructureManager structureManager, Executor executor, BlockableEventLoop<Runnable> mainThreadExecutor, LightChunkGetter chunkProvider, ChunkGenerator chunkGenerator, ChunkProgressListener worldGenerationProgressListener, ChunkStatusUpdateListener chunkStatusChangeListener, Supplier<DimensionDataStorage> persistentStateManagerFactory, int viewDistance, boolean dsync) {
|
||||||
super(new File(session.getDimensionPath(world.dimension()), "region"), dataFixer, dsync);
|
super(new File(session.getDimensionPath(world.dimension()), "region"), dataFixer, dsync);
|
||||||
|
@@ -302,7 +302,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
this.viewDistance = j;
|
this.viewDistance = j;
|
||||||
- this.distanceManager.updatePlayerTickets(this.viewDistance);
|
- this.distanceManager.updatePlayerTickets(this.viewDistance);
|
||||||
- ObjectIterator objectiterator = this.updatingChunkMap.values().iterator();
|
- ObjectIterator objectiterator = this.updatingChunkMap.values().iterator();
|
||||||
+ this.setNoTickViewDistance(this.getRawNoTickViewDistance()); //Paper - no-tick view distance - propagate changes to no-tick, which does the actual chunk loading/sending
|
+ this.setNoTickViewDistance(this.getRawNoTickViewDistance()); // Paper - no-tick view distance - propagate changes to no-tick, which does the actual chunk loading/sending
|
||||||
+ }
|
+ }
|
||||||
|
|
||||||
- while (objectiterator.hasNext()) {
|
- while (objectiterator.hasNext()) {
|
||||||
|
@@ -13,7 +13,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
|
|
||||||
public abstract class CommandNode<S> implements Comparable<CommandNode<S>> {
|
public abstract class CommandNode<S> implements Comparable<CommandNode<S>> {
|
||||||
- private Map<String, CommandNode<S>> children = Maps.newLinkedHashMap();
|
- private Map<String, CommandNode<S>> children = Maps.newLinkedHashMap();
|
||||||
+ private Map<String, CommandNode<S>> children = Maps.newTreeMap(); //Paper - Switch to tree map for automatic sorting
|
+ private Map<String, CommandNode<S>> children = Maps.newTreeMap(); // Paper - Switch to tree map for automatic sorting
|
||||||
private Map<String, LiteralCommandNode<S>> literals = Maps.newLinkedHashMap();
|
private Map<String, LiteralCommandNode<S>> literals = Maps.newLinkedHashMap();
|
||||||
private Map<String, ArgumentCommandNode<S, ?>> arguments = Maps.newLinkedHashMap();
|
private Map<String, ArgumentCommandNode<S, ?>> arguments = Maps.newLinkedHashMap();
|
||||||
public Predicate<S> requirement;
|
public Predicate<S> requirement;
|
||||||
|
@@ -336,7 +336,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
List<ChunkHolder> list = Lists.newArrayList(this.chunkMap.getChunks());
|
List<ChunkHolder> list = Lists.newArrayList(this.chunkMap.getChunks());
|
||||||
|
|
||||||
Collections.shuffle(list);
|
Collections.shuffle(list);
|
||||||
- //Paper start - call player naturally spawn event
|
- // Paper start - call player naturally spawn event
|
||||||
- int chunkRange = level.spigotConfig.mobSpawnRange;
|
- int chunkRange = level.spigotConfig.mobSpawnRange;
|
||||||
- chunkRange = (chunkRange > level.spigotConfig.viewDistance) ? (byte) level.spigotConfig.viewDistance : chunkRange;
|
- chunkRange = (chunkRange > level.spigotConfig.viewDistance) ? (byte) level.spigotConfig.viewDistance : chunkRange;
|
||||||
- chunkRange = Math.min(chunkRange, 8);
|
- chunkRange = Math.min(chunkRange, 8);
|
||||||
|
@@ -43,7 +43,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
List<ChunkHolder> list = Lists.newArrayList(this.chunkMap.getChunks());
|
List<ChunkHolder> list = Lists.newArrayList(this.chunkMap.getChunks());
|
||||||
|
|
||||||
Collections.shuffle(list);
|
Collections.shuffle(list);
|
||||||
+ //Paper start - call player naturally spawn event
|
+ // Paper start - call player naturally spawn event
|
||||||
+ int chunkRange = level.spigotConfig.mobSpawnRange;
|
+ int chunkRange = level.spigotConfig.mobSpawnRange;
|
||||||
+ chunkRange = (chunkRange > level.spigotConfig.viewDistance) ? (byte) level.spigotConfig.viewDistance : chunkRange;
|
+ chunkRange = (chunkRange > level.spigotConfig.viewDistance) ? (byte) level.spigotConfig.viewDistance : chunkRange;
|
||||||
+ chunkRange = Math.min(chunkRange, 8);
|
+ chunkRange = Math.min(chunkRange, 8);
|
||||||
|
@@ -1375,7 +1375,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
int k = this.viewDistance;
|
int k = this.viewDistance;
|
||||||
|
|
||||||
this.viewDistance = j;
|
this.viewDistance = j;
|
||||||
- this.setNoTickViewDistance(this.getRawNoTickViewDistance()); //Paper - no-tick view distance - propagate changes to no-tick, which does the actual chunk loading/sending
|
- this.setNoTickViewDistance(this.getRawNoTickViewDistance()); // Paper - no-tick view distance - propagate changes to no-tick, which does the actual chunk loading/sending
|
||||||
+ this.playerChunkManager.setTickDistance(Mth.clamp(viewDistance, 2, 32)); // Paper - replace player loader system
|
+ this.playerChunkManager.setTickDistance(Mth.clamp(viewDistance, 2, 32)); // Paper - replace player loader system
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -27,7 +27,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
public String getServerModName() {
|
public String getServerModName() {
|
||||||
- return "Spigot"; // Spigot - Spigot > // CraftBukkit - cb > vanilla!
|
- return "Spigot"; // Spigot - Spigot > // CraftBukkit - cb > vanilla!
|
||||||
+ return "Paper"; //Paper - Paper > // Spigot - Spigot > // CraftBukkit - cb > vanilla!
|
+ return "Paper"; // Paper - Paper > // Spigot - Spigot > // CraftBukkit - cb > vanilla!
|
||||||
}
|
}
|
||||||
|
|
||||||
public SystemReport fillSystemReport(SystemReport details) {
|
public SystemReport fillSystemReport(SystemReport details) {
|
||||||
|
@@ -12,7 +12,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
}
|
}
|
||||||
|
|
||||||
org.bukkit.inventory.ItemStack item;
|
org.bukkit.inventory.ItemStack item;
|
||||||
+ //Paper start - add hand to BlockMultiPlaceEvent
|
+ // Paper start - add hand to BlockMultiPlaceEvent
|
||||||
+ EquipmentSlot equipmentSlot;
|
+ EquipmentSlot equipmentSlot;
|
||||||
if (hand == InteractionHand.MAIN_HAND) {
|
if (hand == InteractionHand.MAIN_HAND) {
|
||||||
item = player.getInventory().getItemInMainHand();
|
item = player.getInventory().getItemInMainHand();
|
||||||
@@ -24,7 +24,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
|
|
||||||
- BlockMultiPlaceEvent event = new BlockMultiPlaceEvent(blockStates, blockClicked, item, player, canBuild);
|
- BlockMultiPlaceEvent event = new BlockMultiPlaceEvent(blockStates, blockClicked, item, player, canBuild);
|
||||||
+ BlockMultiPlaceEvent event = new BlockMultiPlaceEvent(blockStates, blockClicked, item, player, canBuild, equipmentSlot);
|
+ BlockMultiPlaceEvent event = new BlockMultiPlaceEvent(blockStates, blockClicked, item, player, canBuild, equipmentSlot);
|
||||||
+ //Paper end
|
+ // Paper end
|
||||||
craftServer.getPluginManager().callEvent(event);
|
craftServer.getPluginManager().callEvent(event);
|
||||||
|
|
||||||
return event;
|
return event;
|
||||||
|
Reference in New Issue
Block a user