mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-30 16:19:03 +01:00
More work work work
This commit is contained in:
parent
c3c850f4fc
commit
0c48ad35ee
13 changed files with 12 additions and 14 deletions
|
@ -14,7 +14,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
--- a/src/main/java/io/papermc/paper/command/PaperCommand.java
|
||||
+++ b/src/main/java/io/papermc/paper/command/PaperCommand.java
|
||||
@@ -0,0 +0,0 @@ public final class PaperCommand extends Command {
|
||||
commands.put(Set.of("debug", "chunkinfo", "holderinfo"), new ChunkDebugCommand());
|
||||
commands.put(Set.of("fixlight"), new FixLightCommand());
|
||||
commands.put(Set.of("syncloadinfo"), new SyncLoadInfoCommand());
|
||||
commands.put(Set.of("dumpitem"), new DumpItemCommand());
|
||||
+ commands.put(Set.of("mobcaps", "playermobcaps"), new MobcapsCommand());
|
|
@ -30,14 +30,12 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
GameProfile gameprofile = entry.getProfile();
|
||||
|
||||
entry.setLastAccess(this.getNextOperation());
|
||||
@@ -0,0 +0,0 @@ public class GameProfileCache {
|
||||
if (uuid != null) {
|
||||
this.profilesByUUID.put(uuid, entry);
|
||||
}
|
||||
this.profilesByName.put(gameprofile.getName().toLowerCase(Locale.ROOT), entry);
|
||||
this.profilesByUUID.put(gameprofile.getId(), entry);
|
||||
+ } finally { this.stateLock.unlock(); } // Paper - allow better concurrency
|
||||
|
||||
}
|
||||
|
||||
private static Optional<GameProfile> lookupGameProfile(GameProfileRepository repository, String name) {
|
||||
@@ -0,0 +0,0 @@ public class GameProfileCache {
|
||||
|
||||
// Paper start
|
||||
|
@ -79,7 +77,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
+ } finally { if (stateLocked) { this.stateLock.unlock(); } } // Paper - allow better concurrency
|
||||
}
|
||||
|
||||
public void getAsync(String username, Consumer<Optional<GameProfile>> consumer) {
|
||||
public CompletableFuture<Optional<GameProfile>> getAsync(String username) {
|
||||
@@ -0,0 +0,0 @@ public class GameProfileCache {
|
||||
}
|
||||
|
|
@ -9,8 +9,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
--- a/src/main/java/net/minecraft/world/entity/animal/goat/Goat.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/animal/goat/Goat.java
|
||||
@@ -0,0 +0,0 @@ public class Goat extends Animal {
|
||||
public static boolean checkGoatSpawnRules(EntityType<? extends Animal> entityType, LevelAccessor world, MobSpawnType spawnReason, BlockPos pos, RandomSource random) {
|
||||
return world.getBlockState(pos.below()).is(BlockTags.GOATS_SPAWNABLE_ON) && isBrightEnoughToSpawn(world, pos);
|
||||
protected Vector3f getPassengerAttachmentPoint(Entity passenger, EntityDimensions dimensions, float scaleFactor) {
|
||||
return new Vector3f(0.0F, dimensions.height - 0.1875F * scaleFactor, 0.0F);
|
||||
}
|
||||
+
|
||||
+ // Paper start - Goat ram API
|
|
@ -20,7 +20,7 @@ diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListener
|
|||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -0,0 +0,0 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -0,0 +0,0 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
}
|
||||
|
||||
public void internalTeleport(double d0, double d1, double d2, float f, float f1, Set<RelativeMovement> set) { // Paper
|
||||
|
@ -174,7 +174,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
@Override
|
||||
public boolean addPotionEffect(PotionEffect effect, boolean force) {
|
||||
+ org.spigotmc.AsyncCatcher.catchOp("effect add"); // Paper
|
||||
this.getHandle().addEffect(new MobEffectInstance(MobEffect.byId(effect.getType().getId()), effect.getDuration(), effect.getAmplifier(), effect.isAmbient(), effect.hasParticles(), effect.hasIcon()), EntityPotionEffectEvent.Cause.PLUGIN); // Paper - Don't ignore icon
|
||||
this.getHandle().addEffect(new MobEffectInstance(CraftPotionEffectType.bukkitToMinecraft(effect.getType()), effect.getDuration(), effect.getAmplifier(), effect.isAmbient(), effect.hasParticles(), effect.hasIcon()), EntityPotionEffectEvent.Cause.PLUGIN); // Paper - Don't ignore icon
|
||||
return true;
|
||||
}
|
||||
diff --git a/src/main/java/org/spigotmc/AsyncCatcher.java b/src/main/java/org/spigotmc/AsyncCatcher.java
|
||||
|
@ -183,7 +183,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
+++ b/src/main/java/org/spigotmc/AsyncCatcher.java
|
||||
@@ -0,0 +0,0 @@ public class AsyncCatcher
|
||||
{
|
||||
if ( !io.papermc.paper.util.TickThread.isTickThread() ) // Paper // Paper - rewrite chunk system
|
||||
if ( (AsyncCatcher.enabled || io.papermc.paper.util.TickThread.STRICT_THREAD_CHECKS) && Thread.currentThread() != MinecraftServer.getServer().serverThread ) // Paper
|
||||
{
|
||||
+ MinecraftServer.LOGGER.error("Thread " + Thread.currentThread().getName() + " failed main thread check: " + reason, new Throwable()); // Paper
|
||||
throw new IllegalStateException( "Asynchronous " + reason + "!" );
|
|
@ -976,12 +976,12 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
+ private final Map<Holder<PoiType>, Set<PoiRecord>> byType = Maps.newHashMap(); public final Map<Holder<PoiType>, Set<PoiRecord>> getData() { return this.byType; } // Paper - public accessor
|
||||
private final Runnable setDirty;
|
||||
private boolean isValid;
|
||||
public final Optional<PoiSection> noAllocateOptional = Optional.of(this); // Paper - rewrite chunk system
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/chunk/storage/SectionStorage.java b/src/main/java/net/minecraft/world/level/chunk/storage/SectionStorage.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/chunk/storage/SectionStorage.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/chunk/storage/SectionStorage.java
|
||||
@@ -0,0 +0,0 @@ public class SectionStorage<R> extends RegionFileStorage implements AutoCloseabl
|
||||
@@ -0,0 +0,0 @@ public class SectionStorage<R> implements AutoCloseable {
|
||||
}
|
||||
|
||||
@Nullable
|
Loading…
Reference in a new issue