mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-28 15:30:19 +01:00
AT bullshit
This commit is contained in:
parent
2eb94202ea
commit
a1d90ea32f
48 changed files with 191 additions and 638 deletions
|
@ -6,6 +6,152 @@
|
|||
# Leave out the member and it will apply to the class itself
|
||||
# More info, see here https://mcforge.readthedocs.io/en/latest/advanced/accesstransformers/#access-modifiers
|
||||
|
||||
# Paper config files
|
||||
public org.spigotmc.SpigotWorldConfig getBoolean(Ljava/lang/String;Z)Z
|
||||
public org.spigotmc.SpigotWorldConfig getDouble(Ljava/lang/String;)D
|
||||
public org.spigotmc.SpigotWorldConfig getDouble(Ljava/lang/String;D)D
|
||||
public org.spigotmc.SpigotWorldConfig getInt(Ljava/lang/String;)I
|
||||
public org.spigotmc.SpigotWorldConfig getInt(Ljava/lang/String;I)I
|
||||
public org.spigotmc.SpigotWorldConfig getList(Ljava/lang/String;Ljava/lang/Object;)Ljava/util/List;
|
||||
public org.spigotmc.SpigotWorldConfig getString(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
|
||||
|
||||
# MC Utils
|
||||
public net.minecraft.core.Vec3i setX(I)Lnet/minecraft/core/Vec3i;
|
||||
public net.minecraft.core.Vec3i setY(I)Lnet/minecraft/core/Vec3i;
|
||||
public net.minecraft.core.Vec3i setZ(I)Lnet/minecraft/core/Vec3i;
|
||||
public net.minecraft.server.level.ServerChunkCache mainThread
|
||||
public net.minecraft.server.level.ServerLevel chunkSource
|
||||
public org.bukkit.craftbukkit.inventory.CraftItemStack handle
|
||||
|
||||
# Add PlayerInitialSpawnEvent
|
||||
public net.minecraft.world.entity.Entity setRot(FF)V
|
||||
|
||||
# Add PlayerUseUnknownEntityEvent
|
||||
public net.minecraft.network.protocol.game.ServerboundInteractPacket$ActionType
|
||||
|
||||
# Configurable RCON IP address
|
||||
public net.minecraft.server.dedicated.Settings getStringRaw(Ljava/lang/String;)Ljava/lang/String;
|
||||
|
||||
# LootTable API
|
||||
public org.bukkit.craftbukkit.block.CraftBlockEntityState getTileEntity()Lnet/minecraft/world/level/block/entity/BlockEntity;
|
||||
public org.bukkit.craftbukkit.block.CraftLootable setLootTable(Lorg/bukkit/loot/LootTable;J)V
|
||||
public org.bukkit.craftbukkit.entity.CraftMinecartContainer setLootTable(Lorg/bukkit/loot/LootTable;J)V
|
||||
|
||||
# Firework API
|
||||
public net.minecraft.world.entity.projectile.FireworkRocketEntity attachedToEntity
|
||||
|
||||
# Add option to make parrots stay
|
||||
public net.minecraft.world.entity.player.Player removeEntitiesOnShoulder()V
|
||||
|
||||
# LivingEntity setkiller
|
||||
public net.minecraft.world.entity.LivingEntity lastHurtByPlayerTime
|
||||
|
||||
# SkeletonHore Addittions
|
||||
public net.minecraft.world.entity.animal.horse.SkeletonHorse trapTime
|
||||
|
||||
# Fix client rendering skulls
|
||||
public net.minecraft.world.item.ItemStack tag
|
||||
|
||||
# Async chunk io
|
||||
public net.minecraft.server.level.ChunkMap structureManager
|
||||
public net.minecraft.server.level.ChunkMap getUpdatingChunkIfPresent(J)Lnet/minecraft/server/level/ChunkHolder;
|
||||
public net.minecraft.server.level.ChunkMap getVisibleChunkIfPresent(J)Lnet/minecraft/server/level/ChunkHolder;
|
||||
public net.minecraft.server.level.ServerChunkCache mainThreadProcessor
|
||||
public-f net.minecraft.world.level.chunk.storage.RegionFileStorage
|
||||
public net.minecraft.world.level.chunk.storage.RegionFileStorage getFile(Lnet/minecraft/world/level/ChunkPos;Z)Lnet/minecraft/world/level/chunk/storage/RegionFile;
|
||||
public net.minecraft.world.level.chunk.storage.SectionStorage dirty
|
||||
|
||||
# Improve death events
|
||||
public net.minecraft.world.entity.LivingEntity getDeathSound()Lnet/minecraft/sounds/SoundEvent;
|
||||
public net.minecraft.world.entity.LivingEntity getSoundVolume()F
|
||||
public net.minecraft.world.entity.ambient.Bat getSoundVolume()F
|
||||
public net.minecraft.world.entity.monster.Ghast getSoundVolume()F
|
||||
public net.minecraft.world.entity.monster.Phantom getSoundVolume()F
|
||||
public net.minecraft.world.entity.animal.Squid getSoundVolume()F
|
||||
public net.minecraft.world.entity.animal.Wolf getSoundVolume()F
|
||||
|
||||
# Add sun related api
|
||||
public net.minecraft.world.entity.Mob isSunBurnTick()Z
|
||||
|
||||
# Turtle API
|
||||
public net.minecraft.world.entity.animal.Turtle getHomePos()Lnet/minecraft/core/BlockPos;
|
||||
public net.minecraft.world.entity.animal.Turtle setHasEgg(Z)V
|
||||
public net.minecraft.world.entity.animal.Turtle isGoingHome()Z
|
||||
public net.minecraft.world.entity.animal.Turtle setGoingHome(Z)V
|
||||
public net.minecraft.world.entity.animal.Turtle isTravelling()Z
|
||||
public net.minecraft.world.entity.animal.Turtle setTravelling(Z)V
|
||||
|
||||
# Call player spectator target event
|
||||
public net.minecraft.server.network.ServerGamePacketListenerImpl a(Ljava/util/List;Ljava/util/function/UnaryOperator;Lnet/minecraft/world/item/ItemStack;ILnet/minecraft/world/item/ItemStack;)V # todo fix this mapping
|
||||
|
||||
# Improve Server THread Pool
|
||||
public net.minecraft.Util onThreadException(Ljava/lang/Thread;Ljava/lang/Throwable;)V
|
||||
|
||||
# Add more zombie API
|
||||
public net.minecraft.world.entity.monster.Zombie isSunSensitive()Z
|
||||
|
||||
# Add PlayerConnectionCloseEvent
|
||||
public net.minecraft.server.network.ServerLoginPacketListenerImpl$State
|
||||
|
||||
# Entity Activation Range 2.0
|
||||
public net.minecraft.world.entity.Entity isInsidePortal
|
||||
public net.minecraft.world.entity.Mob leashHolder
|
||||
|
||||
# No-Tick view distance
|
||||
public net.minecraft.server.level.ChunkHolder broadcast(Lnet/minecraft/network/protocol/Packet;Z)V
|
||||
public net.minecraft.server.level.ChunkMap setViewDistance(I)V
|
||||
public net.minecraft.server.level.ChunkMap readChunk(Lnet/minecraft/world/level/ChunkPos;)Lnet/minecraft/nbt/CompoundTag;
|
||||
public net.minecraft.server.level.ChunkMap playerLoadedChunk(Lnet/minecraft/server/level/ServerPlayer;[Lnet/minecraft/network/protocol/Packet;Lnet/minecraft/world/level/chunk/LevelChunk;)V
|
||||
public net.minecraft.server.level.ChunkMap mainThreadMailbox # todo one of these doesn't belong here
|
||||
|
||||
# Optimise TickListServer
|
||||
public net.minecraft.world.level.ServerTickList saveTickList(Ljava/util/function/Function;Ljava/lang/Iterable;J)Lnet/minecraft/nbt/ListTag;
|
||||
|
||||
# Don't move existing players to world spawn
|
||||
public net.minecraft.server.level.ServerPlayer fudgeSpawnLocation(Lnet/minecraft/server/level/ServerLevel;)V
|
||||
|
||||
# Implement Player Client Options API
|
||||
public net.minecraft.world.entity.player.Player DATA_PLAYER_MODE_CUSTOMISATION
|
||||
|
||||
# Fix Longstanding Broken behavior
|
||||
public net.minecraft.server.level.ChunkMap addEntity(Lnet/minecraft/world/entity/Entity;)V
|
||||
|
||||
# Load Chunks for Login Async
|
||||
public net.minecraft.server.level.ServerChunkCache runDistanceManagerUpdates()Z
|
||||
public net.minecraft.server.level.ServerChunkCache$MainThreadExecutor # todo doesn't belong here but oh well
|
||||
|
||||
# Implement MobGoalApi
|
||||
public net.minecraft.world.entity.ai.goal.GoalSelector availableGoals
|
||||
|
||||
# Add villager reputation API
|
||||
public net.minecraft.world.entity.ai.gossip.GossipContainer$EntityGossips
|
||||
public net.minecraft.world.entity.ai.gossip.GossipContainer$EntityGossips <init>()V
|
||||
|
||||
# Add entity liquid API
|
||||
public net.minecraft.world.entity.Entity isInRain()Z
|
||||
public net.minecraft.world.entity.Entity isInBubbleColumn()Z
|
||||
|
||||
# Allow delegation to vanilla chunk gen
|
||||
public org.bukkit.craftbukkit.generator.CustomChunkGenerator delegate
|
||||
|
||||
# Optimize redstone algorithm
|
||||
public net.minecraft.world.level.block.RedStoneWireBlock shouldSignal
|
||||
|
||||
# Add more Evoker API
|
||||
public net.minecraft.world.entity.monster.Evoker setWololoTarget(Lnet/minecraft/world/entity/animal/Sheep;)V
|
||||
public net.minecraft.world.entity.monster.Evoker getWololoTarget()Lnet/minecraft/world/entity/animal/Sheep;
|
||||
|
||||
# More lightning API
|
||||
public net.minecraft.world.entity.LightningBolt life
|
||||
public net.minecraft.world.entity.LightningBolt flashes
|
||||
|
||||
# Configurable door breaking difficulty
|
||||
public net.minecraft.world.entity.monster.Vindicator DOOR_BREAKING_PREDICATE
|
||||
public net.minecraft.world.entity.monster.Zombie DOOR_BREAKING_PREDICATE
|
||||
|
||||
# Optimize sending packets to nearby locations (sounds/effects)
|
||||
public net.minecraft.server.level.ServerLevel players
|
||||
|
||||
# Item Rarity API
|
||||
public net.minecraft.world.item.Item rarity
|
||||
|
||||
|
@ -29,3 +175,4 @@ public net.minecraft.util.thread.BlockableEventLoop runAllTasks()V
|
|||
|
||||
# Chunk debug command
|
||||
public net.minecraft.server.level.ChunkMap entitiesInLevel
|
||||
public net.minecraft.server.level.ServerLevel players
|
||||
|
|
|
@ -18,7 +18,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
+ public float getDestroySpeed(ItemStack itemStack, boolean considerEnchants) {
|
||||
+ net.minecraft.world.item.ItemStack nmsItemStack;
|
||||
+ if (itemStack instanceof CraftItemStack) {
|
||||
+ nmsItemStack = ((CraftItemStack) itemStack).getHandle();
|
||||
+ nmsItemStack = ((CraftItemStack) itemStack).handle;
|
||||
+ } else {
|
||||
+ nmsItemStack = CraftItemStack.asNMSCopy(itemStack);
|
||||
+ }
|
||||
|
|
|
@ -81,12 +81,3 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
private final String serverId;
|
||||
@Nullable
|
||||
private ServerPlayer delayedAcceptPlayer;
|
||||
@@ -0,0 +0,0 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener
|
||||
return new GameProfile(uuid, profile.getName());
|
||||
}
|
||||
|
||||
- private static enum State {
|
||||
+ public static enum State { // Paper - make public
|
||||
|
||||
HELLO, KEY, AUTHENTICATING, NEGOTIATING, READY_TO_ACCEPT, DELAY_ACCEPT, ACCEPTED;
|
||||
|
||||
|
|
|
@ -33,16 +33,3 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
// Spigot end
|
||||
|
||||
// CraftBukkit - Moved message to after join
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -0,0 +0,0 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, n
|
||||
return d1 * d1 + d2 * d2 + d3 * d3 < radius * radius;
|
||||
}
|
||||
|
||||
- protected void setRot(float yaw, float pitch) {
|
||||
+ public void setRot(float yaw, float pitch) { // Paper - protected -> public
|
||||
// CraftBukkit start - yaw was sometimes set to NaN, so we need to set it back to 0
|
||||
if (Float.isNaN(yaw)) {
|
||||
yaw = 0;
|
||||
|
|
|
@ -19,15 +19,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
private final boolean usingSecondaryAction;
|
||||
static final ServerboundInteractPacket.Action ATTACK_ACTION = new ServerboundInteractPacket.Action() {
|
||||
@Override
|
||||
@@ -0,0 +0,0 @@ public class ServerboundInteractPacket implements Packet<ServerGamePacketListene
|
||||
void write(FriendlyByteBuf buf);
|
||||
}
|
||||
|
||||
- static enum ActionType {
|
||||
+ public static enum ActionType { // Paper - package-private -> public
|
||||
INTERACT(ServerboundInteractPacket.InteractionAction::new),
|
||||
ATTACK((friendlyByteBuf) -> {
|
||||
return ServerboundInteractPacket.ATTACK_ACTION;
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
|
|
|
@ -20,7 +20,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
+ Preconditions.checkArgument(item.getType() != Material.AIR, "air cannot be serialized");
|
||||
+
|
||||
+ java.io.ByteArrayOutputStream outputStream = new java.io.ByteArrayOutputStream();
|
||||
+ CompoundTag compound = (item instanceof CraftItemStack ? ((CraftItemStack) item).getHandle() : CraftItemStack.asNMSCopy(item)).save(new CompoundTag());
|
||||
+ CompoundTag compound = (item instanceof CraftItemStack ? ((CraftItemStack) item).handle : CraftItemStack.asNMSCopy(item)).save(new CompoundTag());
|
||||
+ compound.putInt("DataVersion", getDataVersion());
|
||||
+ try {
|
||||
+ net.minecraft.nbt.NbtIo.writeCompressed(
|
||||
|
|
|
@ -8,22 +8,6 @@ diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/jav
|
|||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -0,0 +0,0 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, n
|
||||
return this.wasTouchingWater;
|
||||
}
|
||||
|
||||
- private boolean isInRain() {
|
||||
+ public boolean isInRain() { // Paper - private -> public
|
||||
BlockPos blockposition = this.blockPosition();
|
||||
|
||||
return this.level.isRainingAt(blockposition) || this.level.isRainingAt(new BlockPos((double) blockposition.getX(), this.getBoundingBox().maxY, (double) blockposition.getZ()));
|
||||
}
|
||||
|
||||
- private boolean isInBubbleColumn() {
|
||||
+ public boolean isInBubbleColumn() { // Paper - make public
|
||||
return this.level.getBlockState(this.blockPosition()).is(Blocks.BUBBLE_COLUMN);
|
||||
}
|
||||
|
||||
@@ -0,0 +0,0 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, n
|
||||
return this.isInWater() || this.isInRain();
|
||||
}
|
||||
|
|
|
@ -4,25 +4,6 @@ Date: Sun, 23 Aug 2020 15:28:35 +0200
|
|||
Subject: [PATCH] Add more Evoker API
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/monster/Evoker.java b/src/main/java/net/minecraft/world/entity/monster/Evoker.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/monster/Evoker.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/monster/Evoker.java
|
||||
@@ -0,0 +0,0 @@ public class Evoker extends SpellcasterIllager {
|
||||
return SoundEvents.EVOKER_HURT;
|
||||
}
|
||||
|
||||
- void setWololoTarget(@Nullable Sheep sheep) {
|
||||
+ public void setWololoTarget(@Nullable Sheep sheep) { // Paper - make public
|
||||
this.wololoTarget = sheep;
|
||||
}
|
||||
|
||||
@Nullable
|
||||
- Sheep getWololoTarget() {
|
||||
+ public Sheep getWololoTarget() { // Paper - make public
|
||||
return this.wololoTarget;
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEvoker.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEvoker.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEvoker.java
|
||||
|
|
|
@ -30,11 +30,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
this.lastTick = MinecraftServer.currentTick; // CraftBukkit
|
||||
this.conversionTime = ticksUntilWaterConversion;
|
||||
@@ -0,0 +0,0 @@ public class Zombie extends Monster {
|
||||
|
||||
}
|
||||
|
||||
+ public boolean isSunSensitivePublic() { return this.isSunSensitive(); } // Paper - public getter
|
||||
protected boolean isSunSensitive() {
|
||||
public boolean isSunSensitive() {
|
||||
- return true;
|
||||
+ return this.shouldBurnInDay; // Paper - use api value instead
|
||||
}
|
||||
|
@ -94,7 +92,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
+
|
||||
+ @Override
|
||||
+ public boolean shouldBurnInDay() {
|
||||
+ return getHandle().isSunSensitivePublic();
|
||||
+ return getHandle().isSunSensitive();
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
|
|
|
@ -56,12 +56,3 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +0,0 @@ public abstract class Player extends LivingEntity {
|
||||
}
|
||||
}
|
||||
|
||||
- protected void removeEntitiesOnShoulder() {
|
||||
+ public void removeEntitiesOnShoulder() { // Paper - protected -> public
|
||||
if (this.timeEntitySatOnShoulder + 20L < this.level.getGameTime()) {
|
||||
// CraftBukkit start
|
||||
if (this.spawnEntityFromShoulder(this.getShoulderEntityLeft())) {
|
||||
|
|
|
@ -4,19 +4,6 @@ Date: Sun, 7 Oct 2018 00:54:21 -0500
|
|||
Subject: [PATCH] Add sun related API
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/net/minecraft/world/entity/Mob.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Mob.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Mob.java
|
||||
@@ -0,0 +0,0 @@ public abstract class Mob extends LivingEntity {
|
||||
|
||||
}
|
||||
|
||||
- protected boolean isSunBurnTick() {
|
||||
+ public boolean isSunBurnTick() { // Paper - protected -> public
|
||||
if (this.level.isDay() && !this.level.isClientSide) {
|
||||
float f = this.getBrightness();
|
||||
BlockPos blockposition = new BlockPos(this.getX(), this.getEyeY(), this.getZ());
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
|
|
|
@ -32,15 +32,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
|
||||
@VisibleForDebug
|
||||
public Map<UUID, Object2IntMap<GossipType>> getGossipEntries() {
|
||||
@@ -0,0 +0,0 @@ public class GossipContainer {
|
||||
return i > type.max ? Math.max(type.max, left) : i;
|
||||
}
|
||||
|
||||
- static class EntityGossips {
|
||||
+ public static class EntityGossips { // Paper - make public
|
||||
final Object2IntMap<GossipType> entries = new Object2IntOpenHashMap<>();
|
||||
|
||||
public int weightedValue(Predicate<GossipType> gossipTypeFilter) {
|
||||
@@ -0,0 +0,0 @@ public class GossipContainer {
|
||||
public void remove(GossipType gossipType) {
|
||||
this.entries.removeInt(gossipType);
|
||||
|
|
|
@ -67,16 +67,3 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
Set<BlockPos> getTiles() {
|
||||
return this.tiles;
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/generator/CustomChunkGenerator.java b/src/main/java/org/bukkit/craftbukkit/generator/CustomChunkGenerator.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/generator/CustomChunkGenerator.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/generator/CustomChunkGenerator.java
|
||||
@@ -0,0 +0,0 @@ import org.bukkit.generator.ChunkGenerator.ChunkData;
|
||||
|
||||
public class CustomChunkGenerator extends InternalChunkGenerator {
|
||||
|
||||
- private final net.minecraft.world.level.chunk.ChunkGenerator delegate;
|
||||
+ public final net.minecraft.world.level.chunk.ChunkGenerator delegate; // Paper - public
|
||||
private final ChunkGenerator generator;
|
||||
private final ServerLevel world;
|
||||
private final Random random = new Random();
|
||||
|
|
|
@ -1110,7 +1110,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
@@ -0,0 +0,0 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
|
||||
private void playerLoadedChunk(ServerPlayer player, Packet<?>[] packets, LevelChunk chunk) {
|
||||
public void playerLoadedChunk(ServerPlayer player, Packet<?>[] packets, LevelChunk chunk) {
|
||||
if (packets[0] == null) {
|
||||
- packets[0] = new ClientboundLevelChunkPacket(chunk);
|
||||
+ packets[0] = new ClientboundLevelChunkPacket(chunk, chunk.level.chunkPacketBlockController.shouldModify(player, chunk)); // Paper - Ani-Xray - Bypass
|
||||
|
|
|
@ -2369,30 +2369,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
private final PoiManager poiManager;
|
||||
public final LongSet toDrop;
|
||||
private boolean modified;
|
||||
@@ -0,0 +0,0 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
private final ChunkStatusUpdateListener chunkStatusListener;
|
||||
public final ChunkMap.ChunkDistanceManager distanceManager;
|
||||
private final AtomicInteger tickingGenerated;
|
||||
- private final StructureManager structureManager;
|
||||
+ public final StructureManager structureManager; // Paper - private -> public
|
||||
private final File storageFolder;
|
||||
private final PlayerMap playerMap;
|
||||
public final Int2ObjectMap<ChunkMap.TrackedEntity> entityMap;
|
||||
@@ -0,0 +0,0 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
}
|
||||
|
||||
@Nullable
|
||||
- protected ChunkHolder getUpdatingChunkIfPresent(long pos) {
|
||||
+ public final ChunkHolder getUpdatingChunkIfPresent(long pos) { // Paper - protected -> public
|
||||
return (ChunkHolder) this.updatingChunkMap.get(pos);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
- protected ChunkHolder getVisibleChunkIfPresent(long pos) {
|
||||
+ public final ChunkHolder getVisibleChunkIfPresent(long pos) { // Paper - protected -> public
|
||||
return (ChunkHolder) this.visibleChunkMap.get(pos);
|
||||
}
|
||||
|
||||
@@ -0,0 +0,0 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
public void close() throws IOException {
|
||||
try {
|
||||
|
@ -2680,15 +2656,6 @@ diff --git a/src/main/java/net/minecraft/server/level/ServerChunkCache.java b/sr
|
|||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
||||
@@ -0,0 +0,0 @@ public class ServerChunkCache extends ChunkSource {
|
||||
final ServerLevel level;
|
||||
public final Thread mainThread; // Paper - package-private -> public
|
||||
final ThreadedLevelLightEngine lightEngine;
|
||||
- private final ServerChunkCache.MainThreadExecutor mainThreadProcessor;
|
||||
+ public final ServerChunkCache.MainThreadExecutor mainThreadProcessor; // Paper - private -> public
|
||||
public final ChunkMap chunkMap;
|
||||
private final DimensionDataStorage dataStorage;
|
||||
private long lastInhabitedUpdate;
|
||||
@@ -0,0 +0,0 @@ public class ServerChunkCache extends ChunkSource {
|
||||
return ret;
|
||||
}
|
||||
|
@ -3446,16 +3413,7 @@ diff --git a/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileSto
|
|||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileStorage.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileStorage.java
|
||||
@@ -0,0 +0,0 @@ import net.minecraft.server.MinecraftServer;
|
||||
import net.minecraft.util.ExceptionCollector;
|
||||
import net.minecraft.world.level.ChunkPos;
|
||||
|
||||
-public final class RegionFileStorage implements AutoCloseable {
|
||||
+public class RegionFileStorage implements AutoCloseable { // Paper - no final
|
||||
|
||||
public static final String ANVIL_EXTENSION = ".mca";
|
||||
private static final int MAX_CACHE_SIZE = 256;
|
||||
@@ -0,0 +0,0 @@ public final class RegionFileStorage implements AutoCloseable {
|
||||
@@ -0,0 +0,0 @@ public class RegionFileStorage implements AutoCloseable {
|
||||
this.sync = dsync;
|
||||
}
|
||||
|
||||
|
@ -3471,7 +3429,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
+ return regionfile != null ? regionfile.hasChunk(pos) : false;
|
||||
+ }
|
||||
+
|
||||
+ public synchronized RegionFile getFile(ChunkPos chunkcoordintpair, boolean existingOnly) throws IOException { // CraftBukkit // Paper - public
|
||||
+ public synchronized RegionFile getFile(ChunkPos chunkcoordintpair, boolean existingOnly) throws IOException { // CraftBukkit
|
||||
+ return this.getFile(chunkcoordintpair, existingOnly, false);
|
||||
+ }
|
||||
+ public synchronized RegionFile getFile(ChunkPos chunkcoordintpair, boolean existingOnly, boolean lock) throws IOException {
|
||||
|
@ -3489,7 +3447,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
return regionfile;
|
||||
} else {
|
||||
if (this.regionCache.size() >= com.destroystokyo.paper.PaperConfig.regionFileCacheSize) { // Paper - configurable
|
||||
@@ -0,0 +0,0 @@ public final class RegionFileStorage implements AutoCloseable {
|
||||
@@ -0,0 +0,0 @@ public class RegionFileStorage implements AutoCloseable {
|
||||
RegionFile regionfile1 = new RegionFile(file1, this.folder, this.sync);
|
||||
|
||||
this.regionCache.putAndMoveToFirst(i, regionfile1);
|
||||
|
@ -3502,7 +3460,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
return regionfile1;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +0,0 @@ public final class RegionFileStorage implements AutoCloseable {
|
||||
@@ -0,0 +0,0 @@ public class RegionFileStorage implements AutoCloseable {
|
||||
@Nullable
|
||||
public CompoundTag read(ChunkPos pos) throws IOException {
|
||||
// CraftBukkit start - SPIGOT-5680: There's no good reason to preemptively create files on read, save that for writing
|
||||
|
@ -3516,7 +3474,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
DataInputStream datainputstream = regionfile.getChunkDataInputStream(pos);
|
||||
|
||||
CompoundTag nbttagcompound;
|
||||
@@ -0,0 +0,0 @@ public final class RegionFileStorage implements AutoCloseable {
|
||||
@@ -0,0 +0,0 @@ public class RegionFileStorage implements AutoCloseable {
|
||||
}
|
||||
|
||||
return nbttagcompound;
|
||||
|
@ -3532,7 +3490,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
int attempts = 0; Exception laste = null; while (attempts++ < 5) { try { // Paper
|
||||
|
||||
if (nbt == null) {
|
||||
@@ -0,0 +0,0 @@ public final class RegionFileStorage implements AutoCloseable {
|
||||
@@ -0,0 +0,0 @@ public class RegionFileStorage implements AutoCloseable {
|
||||
MinecraftServer.LOGGER.error("Failed to save chunk", laste);
|
||||
}
|
||||
// Paper end
|
||||
|
@ -3546,7 +3504,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
ExceptionCollector<IOException> exceptionsuppressor = new ExceptionCollector<>();
|
||||
ObjectIterator objectiterator = this.regionCache.values().iterator();
|
||||
|
||||
@@ -0,0 +0,0 @@ public final class RegionFileStorage implements AutoCloseable {
|
||||
@@ -0,0 +0,0 @@ public class RegionFileStorage implements AutoCloseable {
|
||||
exceptionsuppressor.throwIfPresent();
|
||||
}
|
||||
|
||||
|
@ -3570,11 +3528,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
- private final IOWorker worker;
|
||||
+ // Paper - remove mojang I/O thread
|
||||
private final Long2ObjectMap<Optional<R>> storage = new Long2ObjectOpenHashMap<>();
|
||||
- private final LongLinkedOpenHashSet dirty = new LongLinkedOpenHashSet();
|
||||
+ public final LongLinkedOpenHashSet dirty = new LongLinkedOpenHashSet(); // Paper - private -> public
|
||||
public final LongLinkedOpenHashSet dirty = new LongLinkedOpenHashSet();
|
||||
private final Function<Runnable, Codec<R>> codec;
|
||||
private final Function<Runnable, R> factory;
|
||||
private final DataFixer fixerUpper;
|
||||
@@ -0,0 +0,0 @@ public class SectionStorage<R> implements AutoCloseable {
|
||||
protected final LevelHeightAccessor levelHeightAccessor;
|
||||
|
||||
|
|
|
@ -89,15 +89,6 @@ 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, Ser
|
||||
}
|
||||
}
|
||||
|
||||
- private void a(List<TextFilter.FilteredText> list, UnaryOperator<String> unaryoperator, ItemStack itemstack, int slot, ItemStack handItem) { // CraftBukkit
|
||||
+ public void a(List<TextFilter.FilteredText> list, UnaryOperator<String> unaryoperator, ItemStack itemstack, int slot, ItemStack handItem) { // CraftBukkit // Paper - make public
|
||||
ListTag nbttaglist = new ListTag();
|
||||
|
||||
if (this.player.isTextFilteringEnabled()) {
|
||||
@@ -0,0 +0,0 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
this.a(x, y, z, yaw, pitch, PlayerTeleportEvent.TeleportCause.UNKNOWN);
|
||||
}
|
||||
|
|
|
@ -30,7 +30,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
import net.minecraft.util.ExceptionCollector;
|
||||
import net.minecraft.world.level.ChunkPos;
|
||||
|
||||
@@ -0,0 +0,0 @@ public final class RegionFileStorage implements AutoCloseable {
|
||||
@@ -0,0 +0,0 @@ public class RegionFileStorage implements AutoCloseable {
|
||||
|
||||
protected void write(ChunkPos pos, @Nullable CompoundTag nbt) throws IOException {
|
||||
RegionFile regionfile = this.getFile(pos, false); // CraftBukkit
|
||||
|
@ -38,7 +38,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
|
||||
if (nbt == null) {
|
||||
regionfile.clear(pos);
|
||||
@@ -0,0 +0,0 @@ public final class RegionFileStorage implements AutoCloseable {
|
||||
@@ -0,0 +0,0 @@ public class RegionFileStorage implements AutoCloseable {
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -454,19 +454,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
private final DistanceManager distanceManager;
|
||||
public final ChunkGenerator generator;
|
||||
final ServerLevel level;
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -0,0 +0,0 @@ public class ServerLevel extends net.minecraft.world.level.Level implements Worl
|
||||
public static final BlockPos END_SPAWN_POINT = new BlockPos(100, 50, 0);
|
||||
private static final Logger LOGGER = LogManager.getLogger();
|
||||
private static final int EMPTY_TIME_NO_TICK = 300;
|
||||
- final List<ServerPlayer> players;
|
||||
+ public final List<ServerPlayer> players; // Paper - package->public
|
||||
public final ServerChunkCache chunkSource; // Paper - public
|
||||
private final MinecraftServer server;
|
||||
public final PrimaryLevelData serverLevelData; // CraftBukkit - type
|
||||
diff --git a/src/main/java/net/minecraft/server/level/Ticket.java b/src/main/java/net/minecraft/server/level/Ticket.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/Ticket.java
|
||||
|
|
|
@ -29,19 +29,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
}
|
||||
|
||||
// CraftBukkit start
|
||||
diff --git a/src/main/java/net/minecraft/server/dedicated/Settings.java b/src/main/java/net/minecraft/server/dedicated/Settings.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/net/minecraft/server/dedicated/Settings.java
|
||||
+++ b/src/main/java/net/minecraft/server/dedicated/Settings.java
|
||||
@@ -0,0 +0,0 @@ public abstract class Settings<T extends Settings<T>> {
|
||||
}
|
||||
|
||||
@Nullable
|
||||
- private String getStringRaw(String key) {
|
||||
+ public String getStringRaw(String key) { // Paper - private -> public
|
||||
return (String) this.getOverride(key, this.properties.getProperty(key)); // CraftBukkit
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/rcon/thread/RconThread.java b/src/main/java/net/minecraft/server/rcon/thread/RconThread.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/net/minecraft/server/rcon/thread/RconThread.java
|
||||
|
|
|
@ -62,15 +62,6 @@ diff --git a/src/main/java/net/minecraft/world/entity/monster/Vindicator.java b/
|
|||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/monster/Vindicator.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/monster/Vindicator.java
|
||||
@@ -0,0 +0,0 @@ import net.minecraft.world.level.ServerLevelAccessor;
|
||||
|
||||
public class Vindicator extends AbstractIllager {
|
||||
private static final String TAG_JOHNNY = "Johnny";
|
||||
- static final Predicate<Difficulty> DOOR_BREAKING_PREDICATE = (difficulty) -> {
|
||||
+ public static final Predicate<Difficulty> DOOR_BREAKING_PREDICATE = (difficulty) -> { // Paper - package private -> public
|
||||
return difficulty == Difficulty.NORMAL || difficulty == Difficulty.HARD;
|
||||
};
|
||||
private boolean isJohnny; public boolean isJohnny() { return this.isJohnny; } public void setJohnny(boolean johnny) { this.isJohnny = johnny; } // Paper - OBFHELPER
|
||||
@@ -0,0 +0,0 @@ public class Vindicator extends AbstractIllager {
|
||||
|
||||
static class VindicatorBreakDoorGoal extends BreakDoorGoal {
|
||||
|
@ -84,15 +75,6 @@ diff --git a/src/main/java/net/minecraft/world/entity/monster/Zombie.java b/src/
|
|||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/monster/Zombie.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/monster/Zombie.java
|
||||
@@ -0,0 +0,0 @@ public class Zombie extends Monster {
|
||||
public static final int REINFORCEMENT_RANGE_MAX = 40;
|
||||
public static final int REINFORCEMENT_RANGE_MIN = 7;
|
||||
private static final float BREAK_DOOR_CHANCE = 0.1F;
|
||||
- private static final Predicate<Difficulty> DOOR_BREAKING_PREDICATE = (enumdifficulty) -> {
|
||||
+ public static final Predicate<Difficulty> DOOR_BREAKING_PREDICATE = (enumdifficulty) -> { // Paper - private -> public
|
||||
return enumdifficulty == Difficulty.HARD;
|
||||
};
|
||||
private final BreakDoorGoal breakDoorGoal;
|
||||
@@ -0,0 +0,0 @@ public class Zombie extends Monster {
|
||||
|
||||
public Zombie(EntityType<? extends Zombie> type, Level world) {
|
||||
|
|
|
@ -22,15 +22,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
|
||||
this.cachedSingleHashSet = new com.destroystokyo.paper.util.misc.PooledLinkedHashSets.PooledObjectLinkedOpenHashSet<>(this); // Paper
|
||||
|
||||
@@ -0,0 +0,0 @@ public class ServerPlayer extends Player {
|
||||
}
|
||||
// CraftBukkit end
|
||||
|
||||
- private void fudgeSpawnLocation(ServerLevel world) {
|
||||
+ public void fudgeSpawnLocation(ServerLevel world) { // Paper - private -> public
|
||||
BlockPos blockposition = world.getSharedSpawnPos();
|
||||
|
||||
if (world.dimensionType().hasSkyLight() && world.serverLevelData.getGameType() != GameType.ADVENTURE) { // CraftBukkit
|
||||
@@ -0,0 +0,0 @@ public class ServerPlayer extends Player {
|
||||
position = Vec3.atCenterOf(((ServerLevel) world).getSharedSpawnPos());
|
||||
}
|
||||
|
|
|
@ -127,15 +127,6 @@ diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/jav
|
|||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -0,0 +0,0 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, n
|
||||
public boolean noCulling;
|
||||
public boolean hasImpulse;
|
||||
public int portalCooldown;
|
||||
- protected boolean isInsidePortal;
|
||||
+ public boolean isInsidePortal; // Paper - public
|
||||
protected int portalTime;
|
||||
protected BlockPos portalEntrancePos;
|
||||
private boolean invulnerable;
|
||||
@@ -0,0 +0,0 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, n
|
||||
public final org.spigotmc.ActivationRange.ActivationType activationType = org.spigotmc.ActivationRange.initializeEntityActivationType(this);
|
||||
public final boolean defaultActivationState;
|
||||
|
@ -183,15 +174,6 @@ diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/n
|
|||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Mob.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Mob.java
|
||||
@@ -0,0 +0,0 @@ public abstract class Mob extends LivingEntity {
|
||||
public ResourceLocation lootTable;
|
||||
public long lootTableSeed;
|
||||
@Nullable
|
||||
- private Entity leashHolder;
|
||||
+ public Entity leashHolder; // Paper - private -> public
|
||||
private int delayedLeashHolderId;
|
||||
@Nullable
|
||||
private CompoundTag leashInfoTag;
|
||||
@@ -0,0 +0,0 @@ public abstract class Mob extends LivingEntity {
|
||||
return this.lookControl;
|
||||
}
|
||||
|
|
|
@ -9,11 +9,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
--- a/src/main/java/net/minecraft/world/entity/projectile/FireworkRocketEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/projectile/FireworkRocketEntity.java
|
||||
@@ -0,0 +0,0 @@ public class FireworkRocketEntity extends Projectile implements ItemSupplier {
|
||||
private int life;
|
||||
public int lifetime;
|
||||
@Nullable
|
||||
- private LivingEntity attachedToEntity;
|
||||
+ public LivingEntity attachedToEntity; // Paper - private -> public
|
||||
public LivingEntity attachedToEntity;
|
||||
+ public java.util.UUID spawningEntity; // Paper
|
||||
|
||||
public FireworkRocketEntity(EntityType<? extends FireworkRocketEntity> type, Level world) {
|
||||
|
|
|
@ -133,19 +133,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
+ }, MinecraftServer.getServer());
|
||||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ChunkHolder.java b/src/main/java/net/minecraft/server/level/ChunkHolder.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ChunkHolder.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ChunkHolder.java
|
||||
@@ -0,0 +0,0 @@ public class ChunkHolder {
|
||||
|
||||
}
|
||||
|
||||
- private void broadcast(Packet<?> packet, boolean onlyOnWatchDistanceEdge) {
|
||||
+ public void broadcast(Packet<?> packet, boolean onlyOnWatchDistanceEdge) { // Paper - private -> public
|
||||
this.playerProvider.getPlayers(this.pos, onlyOnWatchDistanceEdge).forEach((entityplayer) -> {
|
||||
entityplayer.connection.send(packet);
|
||||
});
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
|
|
|
@ -31,15 +31,6 @@ diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/j
|
|||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/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
|
||||
// Paper end - per player view distance
|
||||
}
|
||||
|
||||
- protected void addEntity(Entity entity) {
|
||||
+ public void addEntity(Entity entity) { // Paper - protected -> public
|
||||
org.spigotmc.AsyncCatcher.catchOp("entity track"); // Spigot
|
||||
// Paper start - ignore and warn about illegal addEntity calls instead of crashing server
|
||||
if (!entity.valid || entity.level != this.level || this.entityMap.containsKey(entity.getId())) {
|
||||
@@ -0,0 +0,0 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
.printStackTrace();
|
||||
return;
|
||||
|
|
|
@ -111,21 +111,6 @@ diff --git a/src/main/java/net/minecraft/server/level/ServerChunkCache.java b/sr
|
|||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
||||
@@ -0,0 +0,0 @@ public class ServerChunkCache extends ChunkSource {
|
||||
private static final List<ChunkStatus> CHUNK_STATUSES = ChunkStatus.getStatusList(); public static final List<ChunkStatus> getPossibleChunkStatuses() { return ServerChunkCache.CHUNK_STATUSES; } // Paper - OBFHELPER
|
||||
private final DistanceManager distanceManager;
|
||||
public final ChunkGenerator generator;
|
||||
- final ServerLevel level;
|
||||
- public final Thread mainThread; // Paper - package-private -> public
|
||||
- final ThreadedLevelLightEngine lightEngine;
|
||||
- public final ServerChunkCache.MainThreadExecutor mainThreadProcessor; // Paper - private -> public
|
||||
+ private final ServerLevel level;
|
||||
+ public final Thread mainThread; // Paper - private -> public
|
||||
+ private final ThreadedLevelLightEngine lightEngine;
|
||||
+ public final ServerChunkCache.MainThreadExecutor mainThreadProcessor; // Paper private -> public
|
||||
public final ChunkMap chunkMap;
|
||||
private final DimensionDataStorage dataStorage;
|
||||
private long lastInhabitedUpdate;
|
||||
@@ -0,0 +0,0 @@ public class ServerChunkCache extends ChunkSource {
|
||||
}
|
||||
// Paper end
|
||||
|
@ -134,15 +119,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
public ChunkAccess getChunkAtImmediately(int x, int z) {
|
||||
ChunkHolder holder = this.chunkMap.getVisibleChunkIfPresent(ChunkPos.asLong(x, z));
|
||||
if (holder == null) {
|
||||
@@ -0,0 +0,0 @@ public class ServerChunkCache extends ChunkSource {
|
||||
return this.lastSpawnState;
|
||||
}
|
||||
|
||||
- private final class MainThreadExecutor extends BlockableEventLoop<Runnable> {
|
||||
+ public final class MainThreadExecutor extends BlockableEventLoop<Runnable> { // Paper - package -> public
|
||||
|
||||
MainThreadExecutor(Level world) {
|
||||
super("Chunk source main thread executor for " + world.dimension().location());
|
||||
diff --git a/src/main/java/net/minecraft/world/level/chunk/ChunkStatus.java b/src/main/java/net/minecraft/world/level/chunk/ChunkStatus.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/chunk/ChunkStatus.java
|
||||
|
@ -258,7 +234,7 @@ diff --git a/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileSto
|
|||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileStorage.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileStorage.java
|
||||
@@ -0,0 +0,0 @@ public class RegionFileStorage implements AutoCloseable { // Paper - no final
|
||||
@@ -0,0 +0,0 @@ public class RegionFileStorage implements AutoCloseable {
|
||||
|
||||
try {
|
||||
NbtIo.write(nbt, (DataOutput) dataoutputstream);
|
||||
|
@ -266,7 +242,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
} catch (Throwable throwable) {
|
||||
if (dataoutputstream != null) {
|
||||
try {
|
||||
@@ -0,0 +0,0 @@ public class RegionFileStorage implements AutoCloseable { // Paper - no final
|
||||
@@ -0,0 +0,0 @@ public class RegionFileStorage implements AutoCloseable {
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -320,7 +320,7 @@ diff --git a/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileSto
|
|||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileStorage.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileStorage.java
|
||||
@@ -0,0 +0,0 @@ public class RegionFileStorage implements AutoCloseable { // Paper - no final
|
||||
@@ -0,0 +0,0 @@ public class RegionFileStorage implements AutoCloseable {
|
||||
}
|
||||
|
||||
// Paper start
|
||||
|
|
|
@ -65,19 +65,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
this.blockEntitiesTags.add(compoundTag);
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/net/minecraft/world/item/ItemStack.java
|
||||
+++ b/src/main/java/net/minecraft/world/item/ItemStack.java
|
||||
@@ -0,0 +0,0 @@ public final class ItemStack {
|
||||
private int popTime;
|
||||
@Deprecated
|
||||
private Item item;
|
||||
- private CompoundTag tag;
|
||||
+ public CompoundTag tag; // Paper private -> public
|
||||
private boolean emptyCacheFlag;
|
||||
private Entity entityRepresentation;
|
||||
private BlockInWorld cachedBreakBlock;
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/entity/SkullBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/SkullBlockEntity.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/entity/SkullBlockEntity.java
|
||||
|
|
|
@ -9,7 +9,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
--- a/src/main/java/net/minecraft/world/entity/monster/Vindicator.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/monster/Vindicator.java
|
||||
@@ -0,0 +0,0 @@ public class Vindicator extends AbstractIllager {
|
||||
static final Predicate<Difficulty> DOOR_BREAKING_PREDICATE = (difficulty) -> {
|
||||
public static final Predicate<Difficulty> DOOR_BREAKING_PREDICATE = (difficulty) -> {
|
||||
return difficulty == Difficulty.NORMAL || difficulty == Difficulty.HARD;
|
||||
};
|
||||
- boolean isJohnny;
|
||||
|
|
|
@ -1029,7 +1029,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
@@ -0,0 +0,0 @@ public class ServerChunkCache extends ChunkSource {
|
||||
}
|
||||
|
||||
public boolean runDistanceManagerUpdates() { // Paper - packate-private -> public
|
||||
public boolean runDistanceManagerUpdates() {
|
||||
+ if (distanceManager.delayDistanceManagerTick) return false; // Paper
|
||||
boolean flag = this.distanceManager.runAllUpdates(this.chunkMap);
|
||||
boolean flag1 = this.chunkMap.promoteChunkMap();
|
||||
|
|
|
@ -603,7 +603,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
+ getHandle(craftMob, goal.getTypes()).removeGoal(((PaperVanillaGoal<?>) goal).getHandle());
|
||||
+ } else {
|
||||
+ List<net.minecraft.world.entity.ai.goal.Goal> toRemove = new LinkedList<>();
|
||||
+ for (WrappedGoal item : getHandle(craftMob, goal.getTypes()).availableGoals()) {
|
||||
+ for (WrappedGoal item : getHandle(craftMob, goal.getTypes()).availableGoals) {
|
||||
+ if (item.getGoal() instanceof PaperCustomGoal) {
|
||||
+ //noinspection unchecked
|
||||
+ if (((PaperCustomGoal<T>) item.getGoal()).getHandle() == goal) {
|
||||
|
@ -683,7 +683,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
+ public <T extends Mob> Collection<Goal<T>> getAllGoals(T mob, GoalType type) {
|
||||
+ CraftMob craftMob = (CraftMob) mob;
|
||||
+ Set<Goal<T>> goals = new HashSet<>();
|
||||
+ for (WrappedGoal item : getHandle(craftMob, type).availableGoals()) {
|
||||
+ for (WrappedGoal item : getHandle(craftMob, type).availableGoals) {
|
||||
+ if (!item.getGoal().getGoalTypes().hasElement(MobGoalHelper.paperToVanilla(type))) {
|
||||
+ continue;
|
||||
+ }
|
||||
|
@ -707,7 +707,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
+ if (internalType == type) {
|
||||
+ continue;
|
||||
+ }
|
||||
+ for (WrappedGoal item : getHandle(craftMob, internalType).availableGoals()) {
|
||||
+ for (WrappedGoal item : getHandle(craftMob, internalType).availableGoals) {
|
||||
+ if (item.getGoal().getGoalTypes().hasElement(MobGoalHelper.paperToVanilla(type))) {
|
||||
+ continue;
|
||||
+ }
|
||||
|
@ -919,19 +919,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
MOVE,
|
||||
LOOK,
|
||||
JUMP,
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/ai/goal/GoalSelector.java b/src/main/java/net/minecraft/world/entity/ai/goal/GoalSelector.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/ai/goal/GoalSelector.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/ai/goal/GoalSelector.java
|
||||
@@ -0,0 +0,0 @@ public class GoalSelector {
|
||||
}
|
||||
};
|
||||
private final Map<Goal.Flag, WrappedGoal> lockedFlags = new EnumMap<>(Goal.Flag.class);
|
||||
- private final Set<WrappedGoal> availableGoals = Sets.newLinkedHashSet();
|
||||
+ private final Set<WrappedGoal> availableGoals = Sets.newLinkedHashSet(); public final Set<WrappedGoal> availableGoals() { return this.availableGoals; } // Paper - public getter
|
||||
private final Supplier<ProfilerFiller> profiler;
|
||||
private final EnumSet<Goal.Flag> disabledFlags = EnumSet.noneOf(Goal.Flag.class); // Paper unused, but dummy to prevent plugins from crashing as hard. Theyll need to support paper in a special case if this is super important, but really doesn't seem like it would be.
|
||||
private final com.destroystokyo.paper.util.set.OptimizedSmallEnumSet<net.minecraft.world.entity.ai.goal.Goal.Flag> goalTypes = new com.destroystokyo.paper.util.set.OptimizedSmallEnumSet<>(Goal.Flag.class); // Paper - remove streams from pathfindergoalselector
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
|
|
|
@ -96,19 +96,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
// CraftBukkit start
|
||||
if (getMainArm() != packet.getMainHand()) {
|
||||
PlayerChangedMainHandEvent event = new PlayerChangedMainHandEvent(this.getBukkitEntity(), getMainArm() == HumanoidArm.LEFT ? MainHand.LEFT : MainHand.RIGHT);
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
@@ -0,0 +0,0 @@ public abstract class Player extends LivingEntity {
|
||||
private static final int FLY_ACHIEVEMENT_SPEED = 25;
|
||||
private static final EntityDataAccessor<Float> DATA_PLAYER_ABSORPTION_ID = SynchedEntityData.defineId(Player.class, EntityDataSerializers.FLOAT);
|
||||
private static final EntityDataAccessor<Integer> DATA_SCORE_ID = SynchedEntityData.defineId(Player.class, EntityDataSerializers.INT);
|
||||
- protected static final EntityDataAccessor<Byte> DATA_PLAYER_MODE_CUSTOMISATION = SynchedEntityData.defineId(Player.class, EntityDataSerializers.BYTE);
|
||||
+ public static final EntityDataAccessor<Byte> DATA_PLAYER_MODE_CUSTOMISATION = SynchedEntityData.defineId(Player.class, EntityDataSerializers.BYTE); // Paper - protected -> public
|
||||
protected static final EntityDataAccessor<Byte> DATA_PLAYER_MAIN_HAND = SynchedEntityData.defineId(Player.class, EntityDataSerializers.BYTE);
|
||||
protected static final EntityDataAccessor<CompoundTag> DATA_SHOULDER_LEFT = SynchedEntityData.defineId(Player.class, EntityDataSerializers.COMPOUND_TAG);
|
||||
protected static final EntityDataAccessor<CompoundTag> DATA_SHOULDER_RIGHT = SynchedEntityData.defineId(Player.class, EntityDataSerializers.COMPOUND_TAG);
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
|
|
|
@ -66,15 +66,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
|
||||
return executorService;
|
||||
}
|
||||
@@ -0,0 +0,0 @@ public class Util {
|
||||
throw t instanceof RuntimeException ? (RuntimeException)t : new RuntimeException(t);
|
||||
}
|
||||
|
||||
- private static void onThreadException(Thread thread, Throwable t) {
|
||||
+ public static void onThreadException(Thread thread, Throwable t) { // Paper - make public
|
||||
pauseInIde(t);
|
||||
if (t instanceof CompletionException) {
|
||||
t = t.getCause();
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
|
|
|
@ -194,25 +194,14 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
// CraftBukkit start
|
||||
public int getExpReward() {
|
||||
@@ -0,0 +0,0 @@ public abstract class LivingEntity extends Entity {
|
||||
return SoundEvents.GENERIC_HURT;
|
||||
}
|
||||
|
||||
+
|
||||
@Nullable
|
||||
- protected SoundEvent getDeathSound() {
|
||||
+ public final SoundEvent getDeathSoundPublic() { return this.getDeathSound(); } protected SoundEvent getDeathSound() { // Paper - provide PUBLIC accessor, overrides are hell to deal with
|
||||
+ protected SoundEvent getDeathSound() { return getDeathSoundPublic(); } public SoundEvent getDeathSoundPublic() { // Paper - public OBFHELPER
|
||||
return SoundEvents.GENERIC_DEATH;
|
||||
}
|
||||
|
||||
@@ -0,0 +0,0 @@ public abstract class LivingEntity extends Entity {
|
||||
|
||||
}
|
||||
|
||||
- protected float getSoundVolume() {
|
||||
+ public final float getSoundVolumePublic() { return this.getSoundVolume(); } protected float getSoundVolume() { // Paper - provide PUBLIC accessor, overrides are hell
|
||||
return 1.0F;
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/animal/Fox.java b/src/main/java/net/minecraft/world/entity/animal/Fox.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/animal/Fox.java
|
||||
|
@ -354,7 +343,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
+ net.minecraft.sounds.SoundEvent soundEffect = victim.getDeathSoundPublic();
|
||||
+ event.setDeathSound(soundEffect != null ? org.bukkit.craftbukkit.CraftSound.getBukkit(soundEffect) : null);
|
||||
+ event.setDeathSoundCategory(org.bukkit.SoundCategory.valueOf(victim.getSoundSource().name()));
|
||||
+ event.setDeathSoundVolume(victim.getSoundVolumePublic());
|
||||
+ event.setDeathSoundVolume(victim.getSoundVolume());
|
||||
+ event.setDeathSoundPitch(victim.getVoicePitch());
|
||||
+ }
|
||||
+
|
||||
|
|
|
@ -4,19 +4,6 @@ Date: Mon, 31 Jul 2017 01:49:48 -0500
|
|||
Subject: [PATCH] LivingEntity#setKiller
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -0,0 +0,0 @@ public abstract class LivingEntity extends Entity {
|
||||
public float flyingSpeed;
|
||||
@Nullable
|
||||
public net.minecraft.world.entity.player.Player lastHurtByPlayer;
|
||||
- protected int lastHurtByPlayerTime;
|
||||
+ public int lastHurtByPlayerTime; // Paper - protected -> public
|
||||
protected boolean dead;
|
||||
protected int noActionTime;
|
||||
protected float oRun;
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
||||
|
|
|
@ -4,19 +4,6 @@ Date: Sun, 19 Apr 2020 04:28:29 -0400
|
|||
Subject: [PATCH] Load Chunks for Login Asynchronously
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerChunkCache.java b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
||||
@@ -0,0 +0,0 @@ public class ServerChunkCache extends ChunkSource {
|
||||
return this.mainThreadProcessor.pollTask();
|
||||
}
|
||||
|
||||
- boolean runDistanceManagerUpdates() {
|
||||
+ public boolean runDistanceManagerUpdates() { // Paper - packate-private -> public
|
||||
boolean flag = this.distanceManager.runAllUpdates(this.chunkMap);
|
||||
boolean flag1 = this.chunkMap.promoteChunkMap();
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
|
|
|
@ -641,19 +641,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
LootContext.Builder builder = (new LootContext.Builder((ServerLevel)this.level)).withParameter(LootContextParams.ORIGIN, Vec3.atCenterOf(this.worldPosition)).withOptionalRandomSeed(this.lootTableSeed);
|
||||
if (player != null) {
|
||||
builder.withLuck(player.getLuck()).withParameter(LootContextParams.THIS_ENTITY, player);
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlockEntityState.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlockEntityState.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlockEntityState.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlockEntityState.java
|
||||
@@ -0,0 +0,0 @@ public class CraftBlockEntityState<T extends BlockEntity> extends CraftBlockStat
|
||||
}
|
||||
|
||||
// gets the wrapped TileEntity
|
||||
- protected T getTileEntity() {
|
||||
+ public T getTileEntity() { // Paper - protected -> public
|
||||
return this.tileEntity;
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftChest.java b/src/main/java/org/bukkit/craftbukkit/block/CraftChest.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/block/CraftChest.java
|
||||
|
@ -682,15 +669,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
|
||||
public CraftLootable(Block block, Class<T> tileEntityClass) {
|
||||
super(block, tileEntityClass);
|
||||
@@ -0,0 +0,0 @@ public abstract class CraftLootable<T extends RandomizableContainerBlockEntity>
|
||||
this.setLootTable(this.getLootTable(), seed);
|
||||
}
|
||||
|
||||
- private void setLootTable(LootTable table, long seed) {
|
||||
+ public void setLootTable(LootTable table, long seed) { // Paper - public
|
||||
ResourceLocation key = (table == null) ? null : CraftNamespacedKey.toMinecraft(table.getKey());
|
||||
getSnapshot().setLootTable(key, seed);
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartChest.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartChest.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartChest.java
|
||||
|
@ -704,19 +682,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
private final CraftInventory inventory;
|
||||
|
||||
public CraftMinecartChest(CraftServer server, MinecartChest entity) {
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartContainer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartContainer.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartContainer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartContainer.java
|
||||
@@ -0,0 +0,0 @@ public abstract class CraftMinecartContainer extends CraftMinecart implements Lo
|
||||
return this.getHandle().lootTableSeed;
|
||||
}
|
||||
|
||||
- private void setLootTable(LootTable table, long seed) {
|
||||
+ @Override public void setLootTable(LootTable table, long seed) { // Paper
|
||||
ResourceLocation newKey = (table == null) ? null : CraftNamespacedKey.toMinecraft(table.getKey());
|
||||
this.getHandle().setLootTable(newKey, seed);
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartHopper.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartHopper.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartHopper.java
|
||||
|
|
|
@ -2314,39 +2314,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
|
||||
@Override
|
||||
public BlockPos immutable() {
|
||||
diff --git a/src/main/java/net/minecraft/core/Vec3i.java b/src/main/java/net/minecraft/core/Vec3i.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/net/minecraft/core/Vec3i.java
|
||||
+++ b/src/main/java/net/minecraft/core/Vec3i.java
|
||||
@@ -0,0 +0,0 @@ public class Vec3i implements Comparable<Vec3i> {
|
||||
return this.z;
|
||||
}
|
||||
|
||||
- protected Vec3i setX(int x) {
|
||||
+ public Vec3i setX(int x) { // Paper - protected -> public
|
||||
this.x = x;
|
||||
return this;
|
||||
}
|
||||
|
||||
- protected Vec3i setY(int y) {
|
||||
+ public Vec3i setY(int y) { // Paper - protected -> public
|
||||
this.y = y;
|
||||
return this;
|
||||
}
|
||||
|
||||
- protected Vec3i setZ(int z) {
|
||||
+ public Vec3i setZ(int z) { // Paper - protected -> public
|
||||
this.z = z;
|
||||
return this;
|
||||
}
|
||||
@@ -0,0 +0,0 @@ public class Vec3i implements Comparable<Vec3i> {
|
||||
return this.distSqr(pos.x(), pos.y(), pos.z(), true) < distance * distance;
|
||||
}
|
||||
|
||||
+ @Deprecated public final double distanceSquared(Vec3i baseblockposition) { return distSqr(baseblockposition); } // Paper - OBFHELPER
|
||||
public double distSqr(Vec3i vec) {
|
||||
return this.distSqr((double)vec.getX(), (double)vec.getY(), (double)vec.getZ(), true);
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/nbt/CompoundTag.java b/src/main/java/net/minecraft/nbt/CompoundTag.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/net/minecraft/nbt/CompoundTag.java
|
||||
|
@ -3171,15 +3138,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
|
||||
public class ServerChunkCache extends ChunkSource {
|
||||
|
||||
@@ -0,0 +0,0 @@ public class ServerChunkCache extends ChunkSource {
|
||||
private final DistanceManager distanceManager;
|
||||
public final ChunkGenerator generator;
|
||||
final ServerLevel level;
|
||||
- final Thread mainThread;
|
||||
+ public final Thread mainThread; // Paper - package-private -> public
|
||||
final ThreadedLevelLightEngine lightEngine;
|
||||
private final ServerChunkCache.MainThreadExecutor mainThreadProcessor;
|
||||
public final ChunkMap chunkMap;
|
||||
@@ -0,0 +0,0 @@ public class ServerChunkCache extends ChunkSource {
|
||||
@Nullable
|
||||
@VisibleForDebug
|
||||
|
@ -3415,15 +3373,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
import it.unimi.dsi.fastutil.objects.ObjectIterator;
|
||||
import it.unimi.dsi.fastutil.objects.ObjectLinkedOpenHashSet;
|
||||
import it.unimi.dsi.fastutil.objects.ObjectOpenHashSet;
|
||||
@@ -0,0 +0,0 @@ public class ServerLevel extends net.minecraft.world.level.Level implements Worl
|
||||
private static final Logger LOGGER = LogManager.getLogger();
|
||||
private static final int EMPTY_TIME_NO_TICK = 300;
|
||||
final List<ServerPlayer> players;
|
||||
- private final ServerChunkCache chunkSource;
|
||||
+ public final ServerChunkCache chunkSource; // Paper - public
|
||||
private final MinecraftServer server;
|
||||
public final PrimaryLevelData serverLevelData; // CraftBukkit - type
|
||||
final EntityTickList entityTickList;
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
|
@ -3641,7 +3590,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
+ }
|
||||
+ private org.bukkit.craftbukkit.inventory.CraftItemStack bukkitStack;
|
||||
+ public org.bukkit.inventory.ItemStack getBukkitStack() {
|
||||
+ if (bukkitStack == null || bukkitStack.getHandle() != this) {
|
||||
+ if (bukkitStack == null || bukkitStack.handle != this) {
|
||||
+ bukkitStack = org.bukkit.craftbukkit.inventory.CraftItemStack.asCraftMirror(this);
|
||||
+ }
|
||||
+ return bukkitStack;
|
||||
|
@ -4349,18 +4298,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
public static VoxelShape block() {
|
||||
return BLOCK;
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
|
||||
@@ -0,0 +0,0 @@ public final class CraftItemStack extends ItemStack {
|
||||
}
|
||||
|
||||
net.minecraft.world.item.ItemStack handle;
|
||||
+ public net.minecraft.world.item.ItemStack getHandle() { return handle; } // Paper
|
||||
|
||||
/**
|
||||
* Mirror
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java
|
||||
|
@ -4603,19 +4540,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
@Override
|
||||
public WorldBorder getWorldBorder() {
|
||||
throw new UnsupportedOperationException("Not supported yet.");
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/util/UnsafeList.java b/src/main/java/org/bukkit/craftbukkit/util/UnsafeList.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/util/UnsafeList.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/util/UnsafeList.java
|
||||
@@ -0,0 +0,0 @@ import java.util.RandomAccess;
|
||||
public class UnsafeList<E> extends AbstractList<E> implements List<E>, RandomAccess, Cloneable, Serializable {
|
||||
private static final long serialVersionUID = 8683452581112892191L;
|
||||
|
||||
- private transient Object[] data;
|
||||
+ private transient Object[] data; public final Object[] getRawDataArray() { return this.data; } // Paper - expose for raw get
|
||||
private int size;
|
||||
private int initialCapacity;
|
||||
|
||||
diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/org/spigotmc/SpigotConfig.java
|
||||
|
|
|
@ -4,22 +4,6 @@ Date: Sun, 26 Jul 2020 14:44:09 +0200
|
|||
Subject: [PATCH] More lightning API
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/LightningBolt.java b/src/main/java/net/minecraft/world/entity/LightningBolt.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/LightningBolt.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/LightningBolt.java
|
||||
@@ -0,0 +0,0 @@ public class LightningBolt extends Entity {
|
||||
private static final int START_LIFE = 2;
|
||||
private static final double DAMAGE_RADIUS = 3.0D;
|
||||
private static final double DETECTION_RADIUS = 15.0D;
|
||||
- private int life;
|
||||
+ public int life; // Paper - private -> public
|
||||
public long seed;
|
||||
- private int flashes;
|
||||
+ public int flashes; // Paper - private -> public
|
||||
public boolean visualOnly;
|
||||
@Nullable
|
||||
private ServerPlayer cause;
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLightningStrike.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLightningStrike.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLightningStrike.java
|
||||
|
|
|
@ -95,7 +95,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
@@ -0,0 +0,0 @@ public class ChunkHolder {
|
||||
}
|
||||
|
||||
public void broadcast(Packet<?> packet, boolean onlyOnWatchDistanceEdge) { // Paper - private -> public
|
||||
public void broadcast(Packet<?> packet, boolean onlyOnWatchDistanceEdge) {
|
||||
- this.playerProvider.getPlayers(this.pos, onlyOnWatchDistanceEdge).forEach((entityplayer) -> {
|
||||
- entityplayer.connection.send(packet);
|
||||
- });
|
||||
|
@ -291,11 +291,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
}
|
||||
@@ -0,0 +0,0 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
}
|
||||
}
|
||||
|
||||
- protected void setViewDistance(int watchDistance) {
|
||||
public void setViewDistance(int watchDistance) {
|
||||
- int j = Mth.clamp(watchDistance + 1, 3, 33);
|
||||
+ public void setViewDistance(int watchDistance) { // Paper - public
|
||||
+ int j = Mth.clamp(watchDistance + 1, 3, 33); // Paper - diff on change, these make the lower view distance limit 2 and the upper 32
|
||||
|
||||
if (j != this.viewDistance) {
|
||||
|
@ -348,6 +346,15 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
|
||||
if (chunk != null) {
|
||||
this.playerLoadedChunk(player, packets, chunk);
|
||||
@@ -0,0 +0,0 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
// Paper end
|
||||
|
||||
@Nullable
|
||||
- public CompoundTag readChunk(ChunkPos pos) throws IOException { // Paper - private -> public
|
||||
+ public CompoundTag readChunk(ChunkPos pos) throws IOException {
|
||||
CompoundTag nbttagcompound = this.read(pos);
|
||||
// Paper start - Cache chunk status on disk
|
||||
if (nbttagcompound == null) {
|
||||
@@ -0,0 +0,0 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
this.removePlayerFromDistanceMaps(player); // Paper - distance maps
|
||||
}
|
||||
|
@ -438,12 +445,11 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
+ // Paper end - per player view distance
|
||||
}
|
||||
|
||||
protected void addEntity(Entity entity) {
|
||||
public void addEntity(Entity entity) {
|
||||
@@ -0,0 +0,0 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
|
||||
}
|
||||
|
||||
- private void playerLoadedChunk(ServerPlayer player, Packet<?>[] packets, LevelChunk chunk) {
|
||||
+ // Paper start
|
||||
+ private static int getLightMask(final LevelChunk chunk) {
|
||||
+ final net.minecraft.world.level.chunk.LevelChunkSection[] chunkSections = chunk.getSections();
|
||||
|
@ -485,10 +491,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
+ }
|
||||
+ // Paper end
|
||||
+
|
||||
+ public void playerLoadedChunk(ServerPlayer player, Packet<?>[] packets, LevelChunk chunk) { // Paper - private -> public
|
||||
public void playerLoadedChunk(ServerPlayer player, Packet<?>[] packets, LevelChunk chunk) {
|
||||
if (packets[0] == null) {
|
||||
packets[0] = new ClientboundLevelChunkPacket(chunk, chunk.level.chunkPacketBlockController.shouldModify(player, chunk)); // Paper - Ani-Xray - Bypass
|
||||
packets[1] = new ClientboundLightUpdatePacket(chunk.getPos(), this.lightEngine, (BitSet) null, (BitSet) null, true);
|
||||
diff --git a/src/main/java/net/minecraft/server/level/DistanceManager.java b/src/main/java/net/minecraft/server/level/DistanceManager.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/DistanceManager.java
|
||||
|
|
|
@ -162,7 +162,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
+ // Paper end
|
||||
+
|
||||
@Nullable
|
||||
public final ChunkHolder getVisibleChunkIfPresent(long pos) { // Paper - protected -> public
|
||||
public ChunkHolder getVisibleChunkIfPresent(long pos) {
|
||||
- return (ChunkHolder) this.visibleChunkMap.get(pos);
|
||||
+ // Paper start - mt safe get
|
||||
+ if (Thread.currentThread() != this.level.thread) {
|
||||
|
|
|
@ -970,15 +970,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
import com.google.common.collect.ImmutableMap;
|
||||
import com.google.common.collect.Maps;
|
||||
import com.google.common.collect.Sets;
|
||||
@@ -0,0 +0,0 @@ public class RedStoneWireBlock extends Block {
|
||||
});
|
||||
private static final float PARTICLE_DENSITY = 0.2F;
|
||||
private final BlockState crossState;
|
||||
- private boolean shouldSignal = true;
|
||||
+ public boolean shouldSignal = true; // Paper private -> public
|
||||
|
||||
public RedStoneWireBlock(BlockBehaviour.Properties settings) {
|
||||
super(settings);
|
||||
@@ -0,0 +0,0 @@ public class RedStoneWireBlock extends Block {
|
||||
return floor.isFaceSturdy(world, pos, Direction.UP) || floor.is(Blocks.HOPPER);
|
||||
}
|
||||
|
|
|
@ -770,50 +770,3 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
}
|
||||
};
|
||||
|
||||
diff --git a/src/main/java/org/spigotmc/SpigotWorldConfig.java b/src/main/java/org/spigotmc/SpigotWorldConfig.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/org/spigotmc/SpigotWorldConfig.java
|
||||
+++ b/src/main/java/org/spigotmc/SpigotWorldConfig.java
|
||||
@@ -0,0 +0,0 @@ public class SpigotWorldConfig
|
||||
this.config.set( "world-settings.default." + path, val );
|
||||
}
|
||||
|
||||
- private boolean getBoolean(String path, boolean def)
|
||||
+ public boolean getBoolean(String path, boolean def) // Paper - private -> public
|
||||
{
|
||||
this.config.addDefault( "world-settings.default." + path, def );
|
||||
return this.config.getBoolean( "world-settings." + this.worldName + "." + path, this.config.getBoolean( "world-settings.default." + path ) );
|
||||
}
|
||||
|
||||
- private double getDouble(String path, double def)
|
||||
+ public double getDouble(String path, double def) // Paper - private -> public
|
||||
{
|
||||
this.config.addDefault( "world-settings.default." + path, def );
|
||||
return this.config.getDouble( "world-settings." + this.worldName + "." + path, this.config.getDouble( "world-settings.default." + path ) );
|
||||
}
|
||||
|
||||
- private int getInt(String path)
|
||||
+ public int getInt(String path) // Paper - private -> public
|
||||
{
|
||||
return this.config.getInt( "world-settings." + this.worldName + "." + path );
|
||||
}
|
||||
|
||||
- private int getInt(String path, int def)
|
||||
+ public int getInt(String path, int def) // Paper - private -> public
|
||||
{
|
||||
this.config.addDefault( "world-settings.default." + path, def );
|
||||
return this.config.getInt( "world-settings." + this.worldName + "." + path, this.config.getInt( "world-settings.default." + path ) );
|
||||
}
|
||||
|
||||
- private <T> List getList(String path, T def)
|
||||
+ public <T> List getList(String path, T def) // Paper - private -> public
|
||||
{
|
||||
this.config.addDefault( "world-settings.default." + path, def );
|
||||
return (List<T>) this.config.getList( "world-settings." + this.worldName + "." + path, this.config.getList( "world-settings.default." + path ) );
|
||||
}
|
||||
|
||||
- private String getString(String path, String def)
|
||||
+ public String getString(String path, String def) // Paper - private -> public
|
||||
{
|
||||
this.config.addDefault( "world-settings.default." + path, def );
|
||||
return this.config.getString( "world-settings." + this.worldName + "." + path, this.config.getString( "world-settings.default." + path ) );
|
||||
|
|
|
@ -12,7 +12,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
@@ -0,0 +0,0 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
|
||||
protected void addEntity(Entity entity) {
|
||||
public void addEntity(Entity entity) {
|
||||
org.spigotmc.AsyncCatcher.catchOp("entity track"); // Spigot
|
||||
+ // Paper start - ignore and warn about illegal addEntity calls instead of crashing server
|
||||
+ if (!entity.valid || entity.level != this.level || this.entityMap.containsKey(entity.getId())) {
|
||||
|
|
|
@ -55,7 +55,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
+++ b/src/main/java/net/minecraft/world/entity/ai/goal/GoalSelector.java
|
||||
@@ -0,0 +0,0 @@ public class GoalSelector {
|
||||
private final Map<Goal.Flag, WrappedGoal> lockedFlags = new EnumMap<>(Goal.Flag.class);
|
||||
private final Set<WrappedGoal> availableGoals = Sets.newLinkedHashSet();
|
||||
public final Set<WrappedGoal> availableGoals = Sets.newLinkedHashSet();
|
||||
private final Supplier<ProfilerFiller> profiler;
|
||||
- private final EnumSet<Goal.Flag> disabledFlags = EnumSet.noneOf(Goal.Flag.class);
|
||||
+ private final EnumSet<Goal.Flag> disabledFlags = EnumSet.noneOf(Goal.Flag.class); // Paper unused, but dummy to prevent plugins from crashing as hard. Theyll need to support paper in a special case if this is super important, but really doesn't seem like it would be.
|
||||
|
|
|
@ -28,7 +28,7 @@ diff --git a/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileSto
|
|||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileStorage.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileStorage.java
|
||||
@@ -0,0 +0,0 @@ public final class RegionFileStorage implements AutoCloseable {
|
||||
@@ -0,0 +0,0 @@ public class RegionFileStorage implements AutoCloseable {
|
||||
if (regionfile != null) {
|
||||
return regionfile;
|
||||
} else {
|
||||
|
|
|
@ -4,19 +4,6 @@ Date: Fri, 27 Jul 2018 22:36:31 -0500
|
|||
Subject: [PATCH] SkeletonHorse Additions
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/animal/horse/SkeletonHorse.java b/src/main/java/net/minecraft/world/entity/animal/horse/SkeletonHorse.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/animal/horse/SkeletonHorse.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/animal/horse/SkeletonHorse.java
|
||||
@@ -0,0 +0,0 @@ public class SkeletonHorse extends AbstractHorse {
|
||||
private final SkeletonTrapGoal skeletonTrapGoal = new SkeletonTrapGoal(this);
|
||||
private static final int TRAP_MAX_LIFE = 18000;
|
||||
private boolean isTrap;
|
||||
- private int trapTime;
|
||||
+ public int trapTime; // Paper private -> public
|
||||
|
||||
public SkeletonHorse(EntityType<? extends SkeletonHorse> type, Level world) {
|
||||
super(type, world);
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/animal/horse/SkeletonTrapGoal.java b/src/main/java/net/minecraft/world/entity/animal/horse/SkeletonTrapGoal.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/animal/horse/SkeletonTrapGoal.java
|
||||
|
|
|
@ -38,39 +38,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
return (BlockPos) this.entityData.get(Turtle.HOME_POS);
|
||||
}
|
||||
|
||||
@@ -0,0 +0,0 @@ public class Turtle extends Animal {
|
||||
return (Boolean) this.entityData.get(Turtle.HAS_EGG);
|
||||
}
|
||||
|
||||
- void setHasEgg(boolean hasEgg) {
|
||||
+ public void setHasEgg(boolean hasEgg) { // Paper
|
||||
this.entityData.set(Turtle.HAS_EGG, hasEgg);
|
||||
}
|
||||
|
||||
@@ -0,0 +0,0 @@ public class Turtle extends Animal {
|
||||
this.entityData.set(Turtle.LAYING_EGG, diggingSand);
|
||||
}
|
||||
|
||||
- boolean isGoingHome() {
|
||||
+ public boolean isGoingHome() { // Paper - public
|
||||
return (Boolean) this.entityData.get(Turtle.GOING_HOME);
|
||||
}
|
||||
|
||||
- void setGoingHome(boolean landBound) {
|
||||
+ public void setGoingHome(boolean landBound) { // Paper - public
|
||||
this.entityData.set(Turtle.GOING_HOME, landBound);
|
||||
}
|
||||
|
||||
- boolean isTravelling() {
|
||||
+ public boolean isTravelling() { // Paper - public
|
||||
return (Boolean) this.entityData.get(Turtle.TRAVELLING);
|
||||
}
|
||||
|
||||
- void setTravelling(boolean travelling) {
|
||||
+ public void setTravelling(boolean travelling) { // Paper - public
|
||||
this.entityData.set(Turtle.TRAVELLING, travelling);
|
||||
}
|
||||
|
||||
@@ -0,0 +0,0 @@ public class Turtle extends Animal {
|
||||
|
||||
if (!this.turtle.isInWater() && this.isReachedTarget()) {
|
||||
|
|
Loading…
Reference in a new issue