mirror of
https://github.com/PaperMC/Paper.git
synced 2025-02-22 04:33:28 +01:00
patches
This commit is contained in:
parent
baa293bb60
commit
70bec0e28e
16 changed files with 4 additions and 18 deletions
patches
api
Add-Raw-Byte-ItemStack-Serialization.patchAdd-tick-times-API.patchDisable-Sync-Events-firing-Async-errors-during-shutd.patchExpose-MinecraftServer-isRunning.patchMake-JavaPluginLoader-thread-safe.patch
server
Add-Raw-Byte-ItemStack-Serialization.patchAdd-tick-times-API-and-mspt-command.patchDead-Player-s-shouldn-t-be-able-to-move.patchDo-not-allow-bees-to-load-chunks-for-beehives.patchDon-t-move-existing-players-to-world-spawn.patchDon-t-tick-dead-players.patchExpose-MinecraftServer-isRunning.patchPillager-patrol-spawn-settings-and-per-player-option.patchPrevent-Double-PlayerChunkMap-adds-crashing-server.patchRemote-Connections-shouldn-t-hold-up-shutdown.patchSet-spigots-verbose-world-setting-to-false-by-def.patch
|
@ -14,11 +14,11 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||||
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||||
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||||
@@ -0,0 +0,0 @@ public class ServerPlayer extends Player {
|
@@ -0,0 +0,0 @@ public class ServerPlayer extends Player {
|
||||||
this.stats = server.getPlayerList().getStatisticManager(this);
|
this.stats = server.getPlayerList().getPlayerStats(this);
|
||||||
this.advancements = server.getPlayerList().getPlayerAdvancements(this);
|
this.advancements = server.getPlayerList().getPlayerAdvancements(this);
|
||||||
this.maxUpStep = 1.0F;
|
this.maxUpStep = 1.0F;
|
||||||
- this.fudgeSpawnLocation(world);
|
- this.fudgeSpawnLocation(world);
|
||||||
+ //this.c(worldserver); // Paper - don't move to spawn on login, only first join
|
+ //this.fudgeSpawnLocation(world); // Paper - don't move to spawn on login, only first join
|
||||||
|
|
||||||
this.cachedSingleHashSet = new com.destroystokyo.paper.util.misc.PooledLinkedHashSets.PooledObjectLinkedOpenHashSet<>(this); // Paper
|
this.cachedSingleHashSet = new com.destroystokyo.paper.util.misc.PooledLinkedHashSets.PooledObjectLinkedOpenHashSet<>(this); // Paper
|
||||||
|
|
|
@ -51,20 +51,6 @@ diff --git a/src/main/java/net/minecraft/world/level/levelgen/PatrolSpawner.java
|
||||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||||
--- a/src/main/java/net/minecraft/world/level/levelgen/PatrolSpawner.java
|
--- a/src/main/java/net/minecraft/world/level/levelgen/PatrolSpawner.java
|
||||||
+++ b/src/main/java/net/minecraft/world/level/levelgen/PatrolSpawner.java
|
+++ b/src/main/java/net/minecraft/world/level/levelgen/PatrolSpawner.java
|
||||||
@@ -0,0 +0,0 @@ import java.util.Random;
|
|
||||||
import net.minecraft.core.BlockPos;
|
|
||||||
import net.minecraft.nbt.CompoundTag;
|
|
||||||
import net.minecraft.server.level.ServerLevel;
|
|
||||||
+import net.minecraft.server.level.ServerPlayer;
|
|
||||||
+import net.minecraft.stats.Stats;
|
|
||||||
import net.minecraft.world.entity.EntityType;
|
|
||||||
import net.minecraft.world.entity.MobSpawnType;
|
|
||||||
import net.minecraft.world.entity.SpawnGroupData;
|
|
||||||
import net.minecraft.world.entity.monster.PatrollingMonster;
|
|
||||||
-import net.minecraft.world.entity.player.Player;
|
|
||||||
import net.minecraft.world.level.BlockGetter;
|
|
||||||
import net.minecraft.world.level.CustomSpawner;
|
|
||||||
import net.minecraft.world.level.GameRules;
|
|
||||||
@@ -0,0 +0,0 @@ public class PatrolSpawner implements CustomSpawner {
|
@@ -0,0 +0,0 @@ public class PatrolSpawner implements CustomSpawner {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -87,7 +73,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||||
return 0;
|
return 0;
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ ServerPlayer entityhuman = world.players().get(random.nextInt(j));
|
+ net.minecraft.server.level.ServerPlayer entityhuman = world.players().get(random.nextInt(j));
|
||||||
+ if (entityhuman.isSpectator()) {
|
+ if (entityhuman.isSpectator()) {
|
||||||
+ return 0;
|
+ return 0;
|
||||||
+ }
|
+ }
|
||||||
|
@ -108,7 +94,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||||
+ } else {
|
+ } else {
|
||||||
+ long days;
|
+ long days;
|
||||||
+ if (world.paperConfig.patrolPerPlayerStart) {
|
+ if (world.paperConfig.patrolPerPlayerStart) {
|
||||||
+ days = entityhuman.getStats().getValue(Stats.CUSTOM.get(Stats.PLAY_TIME)) / 24000L; // PLAY_ONE_MINUTE is actually counting in ticks, a misnomer by Mojang
|
+ days = entityhuman.getStats().getValue(net.minecraft.stats.Stats.CUSTOM.get(net.minecraft.stats.Stats.PLAY_TIME)) / 24000L; // PLAY_ONE_MINUTE is actually counting in ticks, a misnomer by Mojang
|
||||||
+ } else {
|
+ } else {
|
||||||
+ days = world.getDayTime() / 24000L;
|
+ days = world.getDayTime() / 24000L;
|
||||||
+ }
|
+ }
|
Loading…
Add table
Reference in a new issue