mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-01 20:52:12 -07:00
More work work work
This commit is contained in:
@@ -14,7 +14,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
--- a/src/main/java/io/papermc/paper/command/PaperCommand.java
|
--- a/src/main/java/io/papermc/paper/command/PaperCommand.java
|
||||||
+++ b/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 {
|
@@ -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("syncloadinfo"), new SyncLoadInfoCommand());
|
||||||
commands.put(Set.of("dumpitem"), new DumpItemCommand());
|
commands.put(Set.of("dumpitem"), new DumpItemCommand());
|
||||||
+ commands.put(Set.of("mobcaps", "playermobcaps"), new MobcapsCommand());
|
+ commands.put(Set.of("mobcaps", "playermobcaps"), new MobcapsCommand());
|
@@ -30,14 +30,12 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
GameProfile gameprofile = entry.getProfile();
|
GameProfile gameprofile = entry.getProfile();
|
||||||
|
|
||||||
entry.setLastAccess(this.getNextOperation());
|
entry.setLastAccess(this.getNextOperation());
|
||||||
@@ -0,0 +0,0 @@ public class GameProfileCache {
|
this.profilesByName.put(gameprofile.getName().toLowerCase(Locale.ROOT), entry);
|
||||||
if (uuid != null) {
|
this.profilesByUUID.put(gameprofile.getId(), entry);
|
||||||
this.profilesByUUID.put(uuid, entry);
|
|
||||||
}
|
|
||||||
+ } finally { this.stateLock.unlock(); } // Paper - allow better concurrency
|
+ } finally { this.stateLock.unlock(); } // Paper - allow better concurrency
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static Optional<GameProfile> lookupGameProfile(GameProfileRepository repository, String name) {
|
||||||
@@ -0,0 +0,0 @@ public class GameProfileCache {
|
@@ -0,0 +0,0 @@ public class GameProfileCache {
|
||||||
|
|
||||||
// Paper start
|
// Paper start
|
||||||
@@ -79,7 +77,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
+ } finally { if (stateLocked) { this.stateLock.unlock(); } } // Paper - allow better concurrency
|
+ } 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 {
|
@@ -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
|
--- a/src/main/java/net/minecraft/world/entity/animal/goat/Goat.java
|
||||||
+++ b/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 {
|
@@ -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) {
|
protected Vector3f getPassengerAttachmentPoint(Entity passenger, EntityDimensions dimensions, float scaleFactor) {
|
||||||
return world.getBlockState(pos.below()).is(BlockTags.GOATS_SPAWNABLE_ON) && isBrightEnoughToSpawn(world, pos);
|
return new Vector3f(0.0F, dimensions.height - 0.1875F * scaleFactor, 0.0F);
|
||||||
}
|
}
|
||||||
+
|
+
|
||||||
+ // Paper start - Goat ram API
|
+ // Paper start - Goat ram API
|
@@ -20,7 +20,7 @@ diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListener
|
|||||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||||
+++ b/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
|
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
|
@Override
|
||||||
public boolean addPotionEffect(PotionEffect effect, boolean force) {
|
public boolean addPotionEffect(PotionEffect effect, boolean force) {
|
||||||
+ org.spigotmc.AsyncCatcher.catchOp("effect add"); // Paper
|
+ 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;
|
return true;
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/org/spigotmc/AsyncCatcher.java b/src/main/java/org/spigotmc/AsyncCatcher.java
|
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
|
+++ b/src/main/java/org/spigotmc/AsyncCatcher.java
|
||||||
@@ -0,0 +0,0 @@ public class AsyncCatcher
|
@@ -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
|
+ MinecraftServer.LOGGER.error("Thread " + Thread.currentThread().getName() + " failed main thread check: " + reason, new Throwable()); // Paper
|
||||||
throw new IllegalStateException( "Asynchronous " + reason + "!" );
|
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 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 final Runnable setDirty;
|
||||||
private boolean isValid;
|
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
|
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
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||||
--- a/src/main/java/net/minecraft/world/level/chunk/storage/SectionStorage.java
|
--- a/src/main/java/net/minecraft/world/level/chunk/storage/SectionStorage.java
|
||||||
+++ b/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
|
@Nullable
|
Reference in New Issue
Block a user