13
0
geforkt von Mirrors/Paper

Paper 1.13.1 Update

Updated Upstream (Bukkit/CraftBukkit/Spigot)

Bukkit Changes:
2dcc44dc SPIGOT-4307: Fix hacky API for banners on shields
e0fc6572 SPIGOT-4309: Add "forced" display of particles
efeeab2f Add index to README.md for easier navigation
f502bc6f Update to Minecraft 1.13.1

CraftBukkit Changes:
d0bb0a1d Fix some tests randomly failing
997d378d Fix client stall in specific teleportation scenarios
b3dc2366 SPIGOT-4307: Fix hacky API for banners on shields
2a271162 SPIGOT-4301: Fix more invalid enchants
5d0d83bb SPIGOT-4309: Add "forced" display of particles
a6772578 Add additional tests for CraftBlockData
ce1af0c3 Update to Minecraft 1.13.1

Spigot Changes:
2440e189 Rebuild patches
4ecffced Update to Minecraft 1.13.1
Dieser Commit ist enthalten in:
Aikar 2018-08-26 14:11:49 -04:00
Ursprung 338c730c10
Commit 05dfa62d32
324 geänderte Dateien mit 1984 neuen und 2579 gelöschten Zeilen

Datei anzeigen

@ -5,7 +5,7 @@ Subject: [PATCH] Ability to get Tile Entities from a chunk without snapshots
diff --git a/src/main/java/org/bukkit/Chunk.java b/src/main/java/org/bukkit/Chunk.java
index c75bce07..dc847340 100644
index c75bce07a..dc847340f 100644
--- a/src/main/java/org/bukkit/Chunk.java
+++ b/src/main/java/org/bukkit/Chunk.java
@@ -0,0 +0,0 @@ public interface Chunk {

Datei anzeigen

@ -1,111 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Sat, 16 Jun 2018 13:41:00 -0400
Subject: [PATCH] Add SentientNPC Interface to Entities
Used to determine ACTUAL Living NPC's. Spigot mistakenly inversed the conditions for LivingEntity, and
used LivingEntity for Insentient Entities, and named the actual EntityLiving class EntityInsentient.
This should of all been inversed on the implementation side. To make matters worse, Spigot never
exposed the differentiator that there are entities with AI that are not sentient/alive such as
Armor stands and Players are the only things that do not implement the REAL EntityLiving class (named Insentient internally)
This interface lets you identify NPC entities capable of sentience, and able to move about and react to the world.
diff --git a/src/main/java/com/destroystokyo/paper/entity/SentientNPC.java b/src/main/java/com/destroystokyo/paper/entity/SentientNPC.java
new file mode 100644
index 000000000..cb8de4629
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/entity/SentientNPC.java
@@ -0,0 +0,0 @@
+/*
+ * Copyright (c) 2018 Daniel Ennis (Aikar) MIT License
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sublicense, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+ * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+ * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+package com.destroystokyo.paper.entity;
+
+import org.bukkit.entity.Mob;
+
+
+/**
+ * @deprecated Upstream has added this API. Use {@link Mob}. Will be removed in 1.13.1
+ */
+@Deprecated
+public interface SentientNPC extends Mob {
+}
diff --git a/src/main/java/org/bukkit/entity/Ambient.java b/src/main/java/org/bukkit/entity/Ambient.java
index 613830a74..4ad71c825 100644
--- a/src/main/java/org/bukkit/entity/Ambient.java
+++ b/src/main/java/org/bukkit/entity/Ambient.java
@@ -0,0 +0,0 @@ package org.bukkit.entity;
/**
* Represents an ambient mob
*/
-public interface Ambient extends Mob {}
+public interface Ambient extends Mob, com.destroystokyo.paper.entity.SentientNPC {} // Paper {}
diff --git a/src/main/java/org/bukkit/entity/Creature.java b/src/main/java/org/bukkit/entity/Creature.java
index 6c9c5e85e..c796c4dc2 100644
--- a/src/main/java/org/bukkit/entity/Creature.java
+++ b/src/main/java/org/bukkit/entity/Creature.java
@@ -0,0 +0,0 @@ package org.bukkit.entity;
* Represents a Creature. Creatures are non-intelligent monsters or animals
* which have very simple abilities.
*/
-public interface Creature extends Mob {}
+public interface Creature extends Mob, com.destroystokyo.paper.entity.SentientNPC {} // Paper
diff --git a/src/main/java/org/bukkit/entity/EnderDragon.java b/src/main/java/org/bukkit/entity/EnderDragon.java
index 4ea0e44e7..8f200e6c4 100644
--- a/src/main/java/org/bukkit/entity/EnderDragon.java
+++ b/src/main/java/org/bukkit/entity/EnderDragon.java
@@ -0,0 +0,0 @@ package org.bukkit.entity;
/**
* Represents an Ender Dragon
*/
-public interface EnderDragon extends ComplexLivingEntity {
+public interface EnderDragon extends ComplexLivingEntity, com.destroystokyo.paper.entity.SentientNPC { // Paper
/**
* Represents a phase or action that an Ender Dragon can perform.
diff --git a/src/main/java/org/bukkit/entity/Flying.java b/src/main/java/org/bukkit/entity/Flying.java
index 580ce18bf..45840ee1f 100644
--- a/src/main/java/org/bukkit/entity/Flying.java
+++ b/src/main/java/org/bukkit/entity/Flying.java
@@ -0,0 +0,0 @@ package org.bukkit.entity;
/**
* Represents a Flying Entity.
*/
-public interface Flying extends Mob {}
+public interface Flying extends Mob, com.destroystokyo.paper.entity.SentientNPC {} // Paper
diff --git a/src/main/java/org/bukkit/entity/Slime.java b/src/main/java/org/bukkit/entity/Slime.java
index 1119e26e2..46d03d29d 100644
--- a/src/main/java/org/bukkit/entity/Slime.java
+++ b/src/main/java/org/bukkit/entity/Slime.java
@@ -0,0 +0,0 @@ package org.bukkit.entity;
/**
* Represents a Slime.
*/
-public interface Slime extends Mob {
+public interface Slime extends Mob, com.destroystokyo.paper.entity.SentientNPC { // Paper
/**
* @return The size of the slime
--

Datei anzeigen

@ -6,7 +6,7 @@ Subject: [PATCH] Add TNTPrimeEvent
diff --git a/src/main/java/com/destroystokyo/paper/event/block/TNTPrimeEvent.java b/src/main/java/com/destroystokyo/paper/event/block/TNTPrimeEvent.java
new file mode 100644
index 00000000..2ae8826b
index 000000000..2ae8826bb
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/event/block/TNTPrimeEvent.java
@@ -0,0 +0,0 @@

Datei anzeigen

@ -5,7 +5,7 @@ Subject: [PATCH] Add World.getEntity(UUID) API
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
index ef3a2f2d2..860e4374f 100644
index 1df38ba9d..5e6cb56ab 100644
--- a/src/main/java/org/bukkit/World.java
+++ b/src/main/java/org/bukkit/World.java
@@ -0,0 +0,0 @@ public interface World extends PluginMessageRecipient, Metadatable {

Datei anzeigen

@ -7,7 +7,7 @@ Not here to name and shame, only so server admins can be aware of which
plugins have and haven't been updated.
diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java
index 33cad901..aff1d8e9 100644
index 33cad9015..aff1d8e9b 100644
--- a/src/main/java/org/bukkit/UnsafeValues.java
+++ b/src/main/java/org/bukkit/UnsafeValues.java
@@ -0,0 +0,0 @@ public interface UnsafeValues {
@ -22,7 +22,7 @@ index 33cad901..aff1d8e9 100644
+ // Paper end
}
diff --git a/src/main/java/org/bukkit/command/defaults/PluginsCommand.java b/src/main/java/org/bukkit/command/defaults/PluginsCommand.java
index b1d384e8..72c0c0bc 100644
index b1d384e82..72c0c0bc6 100644
--- a/src/main/java/org/bukkit/command/defaults/PluginsCommand.java
+++ b/src/main/java/org/bukkit/command/defaults/PluginsCommand.java
@@ -0,0 +0,0 @@ public class PluginsCommand extends BukkitCommand {
@ -42,7 +42,7 @@ index b1d384e8..72c0c0bc 100644
StringBuilder pluginList = new StringBuilder();
diff --git a/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java b/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java
index 3cff01b6..2b9aad0a 100644
index 3cff01b6b..2b9aad0a7 100644
--- a/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java
+++ b/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java
@@ -0,0 +0,0 @@ public final class JavaPluginLoader implements PluginLoader {

Datei anzeigen

@ -5,7 +5,7 @@ Subject: [PATCH] Add async chunk load API
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
index 550c26be..121033e9 100644
index 5e6cb56ab..dbbcfec99 100644
--- a/src/main/java/org/bukkit/World.java
+++ b/src/main/java/org/bukkit/World.java
@@ -0,0 +0,0 @@ public interface World extends PluginMessageRecipient, Metadatable {

Datei anzeigen

@ -5,7 +5,7 @@ Subject: [PATCH] Add hand to bucket events
diff --git a/src/main/java/org/bukkit/event/player/PlayerBucketEmptyEvent.java b/src/main/java/org/bukkit/event/player/PlayerBucketEmptyEvent.java
index 8fb121a9..7b9596f3 100644
index 8fb121a91..7b9596f30 100644
--- a/src/main/java/org/bukkit/event/player/PlayerBucketEmptyEvent.java
+++ b/src/main/java/org/bukkit/event/player/PlayerBucketEmptyEvent.java
@@ -0,0 +0,0 @@ import org.bukkit.block.Block;
@ -30,7 +30,7 @@ index 8fb121a9..7b9596f3 100644
public HandlerList getHandlers() {
return handlers;
diff --git a/src/main/java/org/bukkit/event/player/PlayerBucketEvent.java b/src/main/java/org/bukkit/event/player/PlayerBucketEvent.java
index 56584687..3dbe428b 100644
index 56584687f..3dbe428ba 100644
--- a/src/main/java/org/bukkit/event/player/PlayerBucketEvent.java
+++ b/src/main/java/org/bukkit/event/player/PlayerBucketEvent.java
@@ -0,0 +0,0 @@ import org.bukkit.block.Block;
@ -82,7 +82,7 @@ index 56584687..3dbe428b 100644
return cancelled;
}
diff --git a/src/main/java/org/bukkit/event/player/PlayerBucketFillEvent.java b/src/main/java/org/bukkit/event/player/PlayerBucketFillEvent.java
index 94e042a3..884b9240 100644
index 94e042a36..884b9240b 100644
--- a/src/main/java/org/bukkit/event/player/PlayerBucketFillEvent.java
+++ b/src/main/java/org/bukkit/event/player/PlayerBucketFillEvent.java
@@ -0,0 +0,0 @@ import org.bukkit.block.Block;

Datei anzeigen

@ -5,7 +5,7 @@ Subject: [PATCH] Add source block to BlockPhysicsEvent
diff --git a/src/main/java/org/bukkit/event/block/BlockPhysicsEvent.java b/src/main/java/org/bukkit/event/block/BlockPhysicsEvent.java
index 5e47eabe..9d9e4712 100644
index 5e47eabe8..9d9e4712b 100644
--- a/src/main/java/org/bukkit/event/block/BlockPhysicsEvent.java
+++ b/src/main/java/org/bukkit/event/block/BlockPhysicsEvent.java
@@ -0,0 +0,0 @@ public class BlockPhysicsEvent extends BlockEvent implements Cancellable {

Datei anzeigen

@ -49,7 +49,7 @@ index 8dcb15fb8..7e1ee875e 100644
* @return A new location where X/Y/Z are the center of the block
*/
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
index f84f151ad..3170a0746 100644
index 724088ec0..d4bfbad33 100644
--- a/src/main/java/org/bukkit/World.java
+++ b/src/main/java/org/bukkit/World.java
@@ -0,0 +0,0 @@ public interface World extends PluginMessageRecipient, Metadatable {

Datei anzeigen

@ -5,7 +5,7 @@ Subject: [PATCH] Allow disabling armour stand ticking
diff --git a/src/main/java/org/bukkit/entity/ArmorStand.java b/src/main/java/org/bukkit/entity/ArmorStand.java
index 099da6ce..859f166f 100644
index 099da6ce1..859f166fb 100644
--- a/src/main/java/org/bukkit/entity/ArmorStand.java
+++ b/src/main/java/org/bukkit/entity/ArmorStand.java
@@ -0,0 +0,0 @@ public interface ArmorStand extends LivingEntity {

Datei anzeigen

@ -6,7 +6,7 @@ Subject: [PATCH] AnvilDamageEvent
diff --git a/src/main/java/com/destroystokyo/paper/event/block/AnvilDamagedEvent.java b/src/main/java/com/destroystokyo/paper/event/block/AnvilDamagedEvent.java
new file mode 100644
index 00000000..fd3c5c02
index 000000000..fd3c5c02e
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/event/block/AnvilDamagedEvent.java
@@ -0,0 +0,0 @@

Datei anzeigen

@ -5,7 +5,7 @@ Subject: [PATCH] Don't use snapshots for Timings Tile Entity reports
diff --git a/src/main/java/co/aikar/timings/TimingHistory.java b/src/main/java/co/aikar/timings/TimingHistory.java
index c2c2fb83..769facd8 100644
index c2c2fb838..769facd80 100644
--- a/src/main/java/co/aikar/timings/TimingHistory.java
+++ b/src/main/java/co/aikar/timings/TimingHistory.java
@@ -0,0 +0,0 @@ public class TimingHistory {

Datei anzeigen

@ -6,7 +6,7 @@ Subject: [PATCH] Entity#getChunk API
Get the chunk the entity is currently registered to
diff --git a/src/main/java/org/bukkit/entity/Entity.java b/src/main/java/org/bukkit/entity/Entity.java
index 4548c95b..573a6918 100644
index 4548c95b9..573a69184 100644
--- a/src/main/java/org/bukkit/entity/Entity.java
+++ b/src/main/java/org/bukkit/entity/Entity.java
@@ -0,0 +0,0 @@

Datei anzeigen

@ -6,7 +6,7 @@ Subject: [PATCH] EntityShootBowEvent consumeArrow and getArrowItem API
Adds ability to get what arrow was shot, and control if it should be consumed.
diff --git a/src/main/java/org/bukkit/event/entity/EntityShootBowEvent.java b/src/main/java/org/bukkit/event/entity/EntityShootBowEvent.java
index f8c91a13..c9eb75aa 100644
index f8c91a13b..c9eb75aa7 100644
--- a/src/main/java/org/bukkit/event/entity/EntityShootBowEvent.java
+++ b/src/main/java/org/bukkit/event/entity/EntityShootBowEvent.java
@@ -0,0 +0,0 @@ public class EntityShootBowEvent extends EntityEvent implements Cancellable {

Datei anzeigen

@ -6,7 +6,7 @@ Subject: [PATCH] EntityTransformedEvent
diff --git a/src/main/java/com/destroystokyo/paper/event/entity/EntityTransformedEvent.java b/src/main/java/com/destroystokyo/paper/event/entity/EntityTransformedEvent.java
new file mode 100644
index 00000000..d9e5cab9
index 000000000..d9e5cab95
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/event/entity/EntityTransformedEvent.java
@@ -0,0 +0,0 @@

Datei anzeigen

@ -8,7 +8,7 @@ Add the following:
- Enable/Disable slot interactions
diff --git a/src/main/java/org/bukkit/entity/ArmorStand.java b/src/main/java/org/bukkit/entity/ArmorStand.java
index 859f166f..eda4873d 100644
index 859f166fb..eda4873d5 100644
--- a/src/main/java/org/bukkit/entity/ArmorStand.java
+++ b/src/main/java/org/bukkit/entity/ArmorStand.java
@@ -0,0 +0,0 @@

Datei anzeigen

@ -98,7 +98,7 @@ index 162a76e8b..056a4d6bb 100644
@Override
public boolean equals(Object obj) {
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
index 5630c624a..ef3a2f2d2 100644
index a8d97c519..1df38ba9d 100644
--- a/src/main/java/org/bukkit/World.java
+++ b/src/main/java/org/bukkit/World.java
@@ -0,0 +0,0 @@ public interface World extends PluginMessageRecipient, Metadatable {

Datei anzeigen

@ -6,7 +6,7 @@ Subject: [PATCH] Expand Location Manipulation API
Adds set(x, y, z), add(base, x, y, z), subtract(base, x, y, z);
diff --git a/src/main/java/org/bukkit/Location.java b/src/main/java/org/bukkit/Location.java
index 056a4d6b..8dcb15fb 100644
index 056a4d6bb..8dcb15fb8 100644
--- a/src/main/java/org/bukkit/Location.java
+++ b/src/main/java/org/bukkit/Location.java
@@ -0,0 +0,0 @@ public class Location implements Cloneable, ConfigurationSerializable {

Datei anzeigen

@ -464,7 +464,7 @@ index 4d0acaf5b..255efab76 100644
* Options which can be applied to redstone dust particles - a particle
* color and size.
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
index f9d8b14c6..5630c624a 100644
index 0fb55b071..a8d97c519 100644
--- a/src/main/java/org/bukkit/World.java
+++ b/src/main/java/org/bukkit/World.java
@@ -0,0 +0,0 @@ public interface World extends PluginMessageRecipient, Metadatable {
@ -524,6 +524,6 @@ index f9d8b14c6..5630c624a 100644
+ // Paper end
+
// Spigot start
public class Spigot
/**
* Spawns the particle (the number of times specified by count)
--

Datei anzeigen

@ -6,7 +6,7 @@ Subject: [PATCH] Improve ProjectileHitEvent to include the BlockFace where the
diff --git a/src/main/java/org/bukkit/event/entity/ProjectileHitEvent.java b/src/main/java/org/bukkit/event/entity/ProjectileHitEvent.java
index 35f4148b..db105e76 100644
index 35f4148bb..db105e764 100644
--- a/src/main/java/org/bukkit/event/entity/ProjectileHitEvent.java
+++ b/src/main/java/org/bukkit/event/entity/ProjectileHitEvent.java
@@ -0,0 +0,0 @@ public class ProjectileHitEvent extends EntityEvent {

Datei anzeigen

@ -5,7 +5,7 @@ Subject: [PATCH] ItemStack API additions for quantity/flags/lore
diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java
index 972b945d..526ff166 100644
index 972b945d3..526ff1666 100644
--- a/src/main/java/org/bukkit/inventory/ItemStack.java
+++ b/src/main/java/org/bukkit/inventory/ItemStack.java
@@ -0,0 +0,0 @@ package org.bukkit.inventory;

Datei anzeigen

@ -10,105 +10,6 @@ auto replenish for a player.
Provides methods to determine players looted state for an object
diff --git a/src/main/java/com/destroystokyo/paper/loottable/Lootable.java b/src/main/java/com/destroystokyo/paper/loottable/Lootable.java
new file mode 100644
index 000000000..7dd3955b5
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/loottable/Lootable.java
@@ -0,0 +0,0 @@
+package com.destroystokyo.paper.loottable;
+
+import org.bukkit.Bukkit;
+import org.bukkit.NamespacedKey;
+import org.bukkit.loot.LootTable;
+
+/**
+ * Defines an object that has a Loot Table and seed associated with it.
+ * <p>
+ * How the Loot Table and seed are used may vary based on Minecraft Versions
+ * and what type of object is using the Loot Table
+ *
+ * @deprecated Use {@link org.bukkit.loot.Lootable}
+ */
+@Deprecated
+public interface Lootable extends org.bukkit.loot.Lootable {
+
+ /**
+ * Gets the name of the Loot Table to be used in the World Folder
+ *
+ * @return The name, or null if no loot table exists
+ * @deprecated Use {@link org.bukkit.loot.Lootable#getLootTable()}
+ */
+ @Deprecated
+ default String getLootTableName() {
+ LootTable lootTable = getLootTable();
+ return lootTable != null && lootTable.getKey() != null ? lootTable.getKey().toString() : null;
+ }
+
+ /**
+ * Sets the name of the Loot Table to be used in the World Folder
+ * Will use a random seed (0)
+ *
+ * @param name name in either foo or minecraft:foo format
+ * @return The previous Loot Table before the change
+ * @deprecated Use {@link org.bukkit.loot.Lootable#setLootTable(LootTable)}
+ */
+ @Deprecated
+ default String setLootTable(String name) {
+ return setLootTable(name, 0);
+ }
+
+ /**
+ * Sets the name of the Loot Table to be used in the World Folder
+ * Uses supplied Seed
+ *
+ * @param name name in either foo or minecraft:foo format
+ * @param seed seed for the loot table. If 0, seed will be random
+ * @return The previous Loot Table before the change
+ * @deprecated Use {@link org.bukkit.loot.Lootable#setSeed(long)}
+ */
+ @Deprecated
+ default String setLootTable(String name, long seed) {
+ String prev = getLootTableName();
+ LootTable lootTable = Bukkit.getLootTable(NamespacedKey.minecraft(name));
+ setLootTable(lootTable, seed);
+ return prev;
+ }
+
+ /**
+ * Gets the current seed associated to the Loot Table on this object
+ *
+ * @return The seed, or 0 for random
+ * @deprecated Use {@link org.bukkit.loot.Lootable#getSeed()}
+ */
+ @Deprecated
+ default long getLootTableSeed() {
+ return getSeed();
+ }
+
+ /**
+ * Changes the current seed associated with the Loot Table on this object.
+ * <p>
+ * The seed will have no affect if this object does not have a Loot Table
+ * associated with it.
+ *
+ * @param seed The seed to use, or 0 for random
+ * @return The previous seed
+ * @throws IllegalStateException If called when this object does not have a loot table
+ * @deprecated Use {@link org.bukkit.loot.Lootable#setSeed(long)}
+ */
+ @Deprecated
+ default long setLootTableSeed(long seed) {
+ final String lootTableName = getLootTableName();
+ if (lootTableName == null) {
+ throw new IllegalStateException("This object does not currently have a Loot Table.");
+ }
+
+ long prev = getSeed();
+ setSeed(seed);
+ return prev;
+ }
+}
diff --git a/src/main/java/com/destroystokyo/paper/loottable/LootableBlockInventory.java b/src/main/java/com/destroystokyo/paper/loottable/LootableBlockInventory.java
new file mode 100644
index 000000000..9095df616
@ -153,13 +54,14 @@ index 000000000..a389f74c6
+}
diff --git a/src/main/java/com/destroystokyo/paper/loottable/LootableInventory.java b/src/main/java/com/destroystokyo/paper/loottable/LootableInventory.java
new file mode 100644
index 000000000..cde999ef4
index 000000000..2fc3e8a1c
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/loottable/LootableInventory.java
@@ -0,0 +0,0 @@
+package com.destroystokyo.paper.loottable;
+
+import org.bukkit.entity.Player;
+import org.bukkit.loot.Lootable;
+
+import java.util.UUID;
+
@ -449,7 +351,7 @@ index 9ea403e6f..238d118f7 100644
+public interface StorageMinecart extends Minecart, InventoryHolder, LootableEntityInventory { // Paper
}
diff --git a/src/main/java/org/bukkit/loot/Lootable.java b/src/main/java/org/bukkit/loot/Lootable.java
index f4b3d0215..98a472055 100644
index f4b3d0215..9f1c830f4 100644
--- a/src/main/java/org/bukkit/loot/Lootable.java
+++ b/src/main/java/org/bukkit/loot/Lootable.java
@@ -0,0 +0,0 @@ public interface Lootable {
@ -463,7 +365,10 @@ index f4b3d0215..98a472055 100644
+ * @param table the Loot Table this {@link org.bukkit.block.Container} or {@link org.bukkit.entity.Mob} will have.
+ * @param seed the seed to used to generate loot. Default is 0.
+ */
+ void setLootTable(LootTable table, long seed);
+ default void setLootTable(LootTable table, long seed) {
+ setLootTable(table);
+ setSeed(seed);
+ }
+
+ /**
+ * Returns whether or not this object has a Loot Table

Datei anzeigen

@ -5,15 +5,15 @@ Subject: [PATCH] Make EnderDragon extend Mob
diff --git a/src/main/java/org/bukkit/entity/EnderDragon.java b/src/main/java/org/bukkit/entity/EnderDragon.java
index 8f200e6c..dad0b314 100644
index 4ea0e44e7..fa115c091 100644
--- a/src/main/java/org/bukkit/entity/EnderDragon.java
+++ b/src/main/java/org/bukkit/entity/EnderDragon.java
@@ -0,0 +0,0 @@ package org.bukkit.entity;
/**
* Represents an Ender Dragon
*/
-public interface EnderDragon extends ComplexLivingEntity, com.destroystokyo.paper.entity.SentientNPC { // Paper
+public interface EnderDragon extends ComplexLivingEntity, com.destroystokyo.paper.entity.SentientNPC, org.bukkit.entity.Mob { // Paper - add Mob
-public interface EnderDragon extends ComplexLivingEntity {
+public interface EnderDragon extends ComplexLivingEntity, org.bukkit.entity.Mob { // Paper - add Mob
/**
* Represents a phase or action that an Ender Dragon can perform.

Datei anzeigen

@ -5,7 +5,7 @@ Subject: [PATCH] POM changes
diff --git a/pom.xml b/pom.xml
index f06c89c1..97c13752 100644
index 117a7f8cf..03894ccf3 100644
--- a/pom.xml
+++ b/pom.xml
@@ -0,0 +0,0 @@
@ -21,7 +21,7 @@ index f06c89c1..97c13752 100644
+ </parent>
+
+ <artifactId>paper-api</artifactId>
<version>1.13-R0.1-SNAPSHOT</version>
<version>1.13.1-R0.1-SNAPSHOT</version>
<packaging>jar</packaging>
- <name>Spigot-API</name>

Datei anzeigen

@ -6,7 +6,7 @@ Subject: [PATCH] PlayerElytraBoostEvent
diff --git a/src/main/java/com/destroystokyo/paper/event/player/PlayerElytraBoostEvent.java b/src/main/java/com/destroystokyo/paper/event/player/PlayerElytraBoostEvent.java
new file mode 100644
index 00000000..cecb2182
index 000000000..cecb2182c
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/event/player/PlayerElytraBoostEvent.java
@@ -0,0 +0,0 @@

Datei anzeigen

@ -6,7 +6,7 @@ Subject: [PATCH] PlayerLaunchProjectileEvent
diff --git a/src/main/java/com/destroystokyo/paper/event/player/PlayerLaunchProjectileEvent.java b/src/main/java/com/destroystokyo/paper/event/player/PlayerLaunchProjectileEvent.java
new file mode 100644
index 00000000..d2b244a4
index 000000000..d2b244a41
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/event/player/PlayerLaunchProjectileEvent.java
@@ -0,0 +0,0 @@

Datei anzeigen

@ -7,7 +7,7 @@ Allows you to easily access the chunks X/z as a long, and a method
to look up by the long key too.
diff --git a/src/main/java/org/bukkit/Chunk.java b/src/main/java/org/bukkit/Chunk.java
index 079b9feb..c75bce07 100644
index 079b9febe..c75bce07a 100644
--- a/src/main/java/org/bukkit/Chunk.java
+++ b/src/main/java/org/bukkit/Chunk.java
@@ -0,0 +0,0 @@ public interface Chunk {
@ -27,7 +27,7 @@ index 079b9feb..c75bce07 100644
* Gets the world containing this chunk
*
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
index ba300c29..f84f151a 100644
index dbbcfec99..724088ec0 100644
--- a/src/main/java/org/bukkit/World.java
+++ b/src/main/java/org/bukkit/World.java
@@ -0,0 +0,0 @@ public interface World extends PluginMessageRecipient, Metadatable {

Datei anzeigen

@ -8,15 +8,16 @@ and to perform an attack.
diff --git a/src/main/java/com/destroystokyo/paper/entity/RangedEntity.java b/src/main/java/com/destroystokyo/paper/entity/RangedEntity.java
new file mode 100644
index 000000000..ded25f214
index 000000000..8234de28f
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/entity/RangedEntity.java
@@ -0,0 +0,0 @@
+package com.destroystokyo.paper.entity;
+
+import org.bukkit.entity.LivingEntity;
+import org.bukkit.entity.Mob;
+
+public interface RangedEntity extends SentientNPC {
+public interface RangedEntity extends Mob {
+ /**
+ * Attack the specified entity using a ranged attack.
+ *

Datei anzeigen

@ -6,7 +6,7 @@ Subject: [PATCH] SkeletonHorse Additions
diff --git a/src/main/java/com/destroystokyo/paper/event/entity/SkeletonHorseTrapEvent.java b/src/main/java/com/destroystokyo/paper/event/entity/SkeletonHorseTrapEvent.java
new file mode 100644
index 00000000..55bae018
index 000000000..55bae018e
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/event/entity/SkeletonHorseTrapEvent.java
@@ -0,0 +0,0 @@
@ -54,7 +54,7 @@ index 00000000..55bae018
+}
+
diff --git a/src/main/java/org/bukkit/entity/SkeletonHorse.java b/src/main/java/org/bukkit/entity/SkeletonHorse.java
index b2c6b6a8..ba998346 100644
index b2c6b6a86..ba9983463 100644
--- a/src/main/java/org/bukkit/entity/SkeletonHorse.java
+++ b/src/main/java/org/bukkit/entity/SkeletonHorse.java
@@ -0,0 +0,0 @@ package org.bukkit.entity;

Datei anzeigen

@ -6,7 +6,7 @@ Subject: [PATCH] Slime Pathfinder Events
diff --git a/src/main/java/com/destroystokyo/paper/event/entity/SlimeChangeDirectionEvent.java b/src/main/java/com/destroystokyo/paper/event/entity/SlimeChangeDirectionEvent.java
new file mode 100644
index 00000000..f5a3ca3b
index 000000000..f5a3ca3b0
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/event/entity/SlimeChangeDirectionEvent.java
@@ -0,0 +0,0 @@
@ -49,7 +49,7 @@ index 00000000..f5a3ca3b
+}
diff --git a/src/main/java/com/destroystokyo/paper/event/entity/SlimePathfindEvent.java b/src/main/java/com/destroystokyo/paper/event/entity/SlimePathfindEvent.java
new file mode 100644
index 00000000..356bcca8
index 000000000..356bcca8b
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/event/entity/SlimePathfindEvent.java
@@ -0,0 +0,0 @@
@ -104,7 +104,7 @@ index 00000000..356bcca8
+}
diff --git a/src/main/java/com/destroystokyo/paper/event/entity/SlimeSwimEvent.java b/src/main/java/com/destroystokyo/paper/event/entity/SlimeSwimEvent.java
new file mode 100644
index 00000000..7c99fb53
index 000000000..7c99fb538
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/event/entity/SlimeSwimEvent.java
@@ -0,0 +0,0 @@
@ -126,7 +126,7 @@ index 00000000..7c99fb53
+}
diff --git a/src/main/java/com/destroystokyo/paper/event/entity/SlimeTargetLivingEntityEvent.java b/src/main/java/com/destroystokyo/paper/event/entity/SlimeTargetLivingEntityEvent.java
new file mode 100644
index 00000000..7c96e326
index 000000000..7c96e3268
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/event/entity/SlimeTargetLivingEntityEvent.java
@@ -0,0 +0,0 @@
@ -161,7 +161,7 @@ index 00000000..7c96e326
+}
diff --git a/src/main/java/com/destroystokyo/paper/event/entity/SlimeWanderEvent.java b/src/main/java/com/destroystokyo/paper/event/entity/SlimeWanderEvent.java
new file mode 100644
index 00000000..e55d208c
index 000000000..e55d208c6
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/event/entity/SlimeWanderEvent.java
@@ -0,0 +0,0 @@
@ -182,10 +182,10 @@ index 00000000..e55d208c
+ }
+}
diff --git a/src/main/java/org/bukkit/entity/Slime.java b/src/main/java/org/bukkit/entity/Slime.java
index 46d03d29..8bd18406 100644
index 1119e26e2..c4791f95d 100644
--- a/src/main/java/org/bukkit/entity/Slime.java
+++ b/src/main/java/org/bukkit/entity/Slime.java
@@ -0,0 +0,0 @@ public interface Slime extends Mob, com.destroystokyo.paper.entity.SentientNPC {
@@ -0,0 +0,0 @@ public interface Slime extends Mob {
* @param sz The new size of the slime.
*/
public void setSize(int sz);

Datei anzeigen

@ -5,7 +5,7 @@ Subject: [PATCH] Use specific 1.13 versioning branch/build name
diff --git a/src/main/java/org/bukkit/command/defaults/VersionCommand.java b/src/main/java/org/bukkit/command/defaults/VersionCommand.java
index c45faf4c..7041085c 100644
index c45faf4cb..7041085c3 100644
--- a/src/main/java/org/bukkit/command/defaults/VersionCommand.java
+++ b/src/main/java/org/bukkit/command/defaults/VersionCommand.java
@@ -0,0 +0,0 @@ public class VersionCommand extends BukkitCommand {

Datei anzeigen

@ -6,14 +6,10 @@ Subject: [PATCH] Vex#getSummoner API
Get's the Mob that summoned this Vex
diff --git a/src/main/java/org/bukkit/entity/Vex.java b/src/main/java/org/bukkit/entity/Vex.java
index a2f2fcaec..734683763 100644
index a2f2fcaec..d395e405d 100644
--- a/src/main/java/org/bukkit/entity/Vex.java
+++ b/src/main/java/org/bukkit/entity/Vex.java
@@ -0,0 +0,0 @@
package org.bukkit.entity;
+import com.destroystokyo.paper.entity.SentientNPC;
+
@@ -0,0 +0,0 @@ package org.bukkit.entity;
/**
* Represents a Vex.
*/
@ -21,11 +17,7 @@ index a2f2fcaec..734683763 100644
+public interface Vex extends Monster {
+ /**
+ * @return What Entity (most likely an Evoker, but not guaranteed) summoned this Vex
+ * @deprecated Use {@link #getSummoner()}
+ */
+ @Deprecated
+ default SentientNPC getOwner() { return (SentientNPC) getSummoner(); } // Paper
+
+ Mob getSummoner(); // Paper
+
+}

Datei anzeigen

@ -6,7 +6,7 @@ Subject: [PATCH] isChunkGenerated API
Resolves #1329
diff --git a/src/main/java/org/bukkit/Location.java b/src/main/java/org/bukkit/Location.java
index 7e1ee875..9457832b 100644
index 7e1ee875e..9457832bc 100644
--- a/src/main/java/org/bukkit/Location.java
+++ b/src/main/java/org/bukkit/Location.java
@@ -0,0 +0,0 @@ import org.bukkit.util.NumberConversions;
@ -34,7 +34,7 @@ index 7e1ee875..9457832b 100644
/**
* Sets the position of this Location and returns itself
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
index 3170a074..4fd4f997 100644
index d4bfbad33..53764fae6 100644
--- a/src/main/java/org/bukkit/World.java
+++ b/src/main/java/org/bukkit/World.java
@@ -0,0 +0,0 @@ public interface World extends PluginMessageRecipient, Metadatable {

Datei anzeigen

@ -13,7 +13,7 @@ also Avoid NPE during CraftBlockEntityState load if could not get TE
If Tile Entity was null, correct Sign to return empty lines instead of null
diff --git a/src/main/java/net/minecraft/server/TileEntity.java b/src/main/java/net/minecraft/server/TileEntity.java
index 6021a3401f..536fd37254 100644
index b3c5766a27..29fe031d85 100644
--- a/src/main/java/net/minecraft/server/TileEntity.java
+++ b/src/main/java/net/minecraft/server/TileEntity.java
@@ -0,0 +0,0 @@ public abstract class TileEntity implements KeyedObject { // Paper
@ -39,7 +39,7 @@ index 6021a3401f..536fd37254 100644
return null;
}
diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
index dfddbaf825..4aaf14e8ce 100644
index 370a222f83..f493ebc4f3 100644
--- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
+++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
@@ -0,0 +0,0 @@ public class CraftBlock implements Block {

Datei anzeigen

@ -10,7 +10,7 @@ of giving the player experience points.
Both an API To standalone mend, and apply mending logic to .giveExp has been added.
diff --git a/src/main/java/net/minecraft/server/EnchantmentManager.java b/src/main/java/net/minecraft/server/EnchantmentManager.java
index 3204d94c54..e4ed9e2066 100644
index c90e413f8c..c365bfea04 100644
--- a/src/main/java/net/minecraft/server/EnchantmentManager.java
+++ b/src/main/java/net/minecraft/server/EnchantmentManager.java
@@ -0,0 +0,0 @@ public class EnchantmentManager {
@ -22,7 +22,7 @@ index 3204d94c54..e4ed9e2066 100644
List list = enchantment.a(entityliving);
diff --git a/src/main/java/net/minecraft/server/Enchantments.java b/src/main/java/net/minecraft/server/Enchantments.java
index 0f4aad20fe..3a5263fd9f 100644
index 836fe13c3d..27093a672e 100644
--- a/src/main/java/net/minecraft/server/Enchantments.java
+++ b/src/main/java/net/minecraft/server/Enchantments.java
@@ -0,0 +0,0 @@ public class Enchantments {
@ -35,7 +35,7 @@ index 0f4aad20fe..3a5263fd9f 100644
@Nullable
diff --git a/src/main/java/net/minecraft/server/EntityExperienceOrb.java b/src/main/java/net/minecraft/server/EntityExperienceOrb.java
index a87ef5fb8c..b8bfc75771 100644
index dcef63bb1f..53cfc10017 100644
--- a/src/main/java/net/minecraft/server/EntityExperienceOrb.java
+++ b/src/main/java/net/minecraft/server/EntityExperienceOrb.java
@@ -0,0 +0,0 @@ public class EntityExperienceOrb extends Entity {
@ -52,7 +52,7 @@ index a87ef5fb8c..b8bfc75771 100644
return i * 2;
}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index b455d8e287..c7adfaad91 100644
index a89fbc6027..c2016ba003 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -0,0 +0,0 @@ public class CraftPlayer extends CraftHumanEntity implements Player {

Datei anzeigen

@ -6,7 +6,7 @@ Subject: [PATCH] Ability to change PlayerProfile in AsyncPreLoginEvent
This will allow you to change the players name or skin on login.
diff --git a/src/main/java/net/minecraft/server/LoginListener.java b/src/main/java/net/minecraft/server/LoginListener.java
index 91cd6e0f61..f02b28059c 100644
index 1380a14274..ab85fd9a6e 100644
--- a/src/main/java/net/minecraft/server/LoginListener.java
+++ b/src/main/java/net/minecraft/server/LoginListener.java
@@ -0,0 +0,0 @@

Datei anzeigen

@ -5,7 +5,7 @@ Subject: [PATCH] Ability to get Tile Entities from a chunk without snapshots
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftChunk.java b/src/main/java/org/bukkit/craftbukkit/CraftChunk.java
index 0a47353b4..3238ca742 100644
index 0a47353b48..3238ca7420 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftChunk.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftChunk.java
@@ -0,0 +0,0 @@ public class CraftChunk implements Chunk {

Datei anzeigen

@ -6,7 +6,7 @@ Subject: [PATCH] Activation Range Improvements
Fixes and adds new Immunities to improve gameplay behavior
diff --git a/src/main/java/net/minecraft/server/EntityCreature.java b/src/main/java/net/minecraft/server/EntityCreature.java
index ceed50d8de..4c2cd41700 100644
index 3790039f18..a644f393af 100644
--- a/src/main/java/net/minecraft/server/EntityCreature.java
+++ b/src/main/java/net/minecraft/server/EntityCreature.java
@@ -0,0 +0,0 @@ import org.bukkit.event.entity.EntityUnleashEvent;
@ -18,7 +18,7 @@ index ceed50d8de..4c2cd41700 100644
private float b;
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
index 05546ff4db..422b826d61 100644
index 7e13a78411..60f22959b5 100644
--- a/src/main/java/net/minecraft/server/EntityLiving.java
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
@@ -0,0 +0,0 @@ public abstract class EntityLiving extends Entity {
@ -31,15 +31,15 @@ index 05546ff4db..422b826d61 100644
protected int ticksFarFromPlayer;
protected float aZ;
diff --git a/src/main/java/net/minecraft/server/EntityLlama.java b/src/main/java/net/minecraft/server/EntityLlama.java
index bb86ecb2fb..5cd8c3f288 100644
index cdf50ed1cf..10b325043c 100644
--- a/src/main/java/net/minecraft/server/EntityLlama.java
+++ b/src/main/java/net/minecraft/server/EntityLlama.java
@@ -0,0 +0,0 @@ public class EntityLlama extends EntityHorseChestedAbstract implements IRangedEn
return this.bR != null;
}
+ public boolean inCaravan() { return this.en(); } // Paper - OBFHELPER
public boolean en() {
+ public boolean inCaravan() { return this.em(); } // Paper - OBFHELPER
public boolean em() {
return this.bQ != null;
}
diff --git a/src/main/java/net/minecraft/server/PathfinderGoal.java b/src/main/java/net/minecraft/server/PathfinderGoal.java
@ -99,7 +99,7 @@ index d5c08aa7cb..fe6570c88d 100644
}
}
diff --git a/src/main/java/org/spigotmc/ActivationRange.java b/src/main/java/org/spigotmc/ActivationRange.java
index e02647f806..cdbf769e7b 100644
index 34d2f11f4f..958d15a6ba 100644
--- a/src/main/java/org/spigotmc/ActivationRange.java
+++ b/src/main/java/org/spigotmc/ActivationRange.java
@@ -0,0 +0,0 @@ import net.minecraft.server.EntityFireball;

Datei anzeigen

@ -5,7 +5,7 @@ Subject: [PATCH] Add API methods to control if armour stands can move
diff --git a/src/main/java/net/minecraft/server/EntityArmorStand.java b/src/main/java/net/minecraft/server/EntityArmorStand.java
index cf11a2225b..578d966401 100644
index 5485c4bff3..00a46129b8 100644
--- a/src/main/java/net/minecraft/server/EntityArmorStand.java
+++ b/src/main/java/net/minecraft/server/EntityArmorStand.java
@@ -0,0 +0,0 @@ public class EntityArmorStand extends EntityLiving {

Datei anzeigen

@ -13,7 +13,7 @@ starting point for future additions in this area.
Fixes GH-559
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java
index 3dbe9d81e..22b9674da 100644
index 3dbe9d81ea..22b9674da3 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java
@@ -0,0 +0,0 @@ public final class CraftItemFactory implements ItemFactory {
@ -26,7 +26,7 @@ index 3dbe9d81e..22b9674da 100644
case CHEST:
case TRAPPED_CHEST:
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
index 69425e838..bdd4bf515 100644
index 69425e838f..bdd4bf5151 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 {
@ -40,7 +40,7 @@ index 69425e838..bdd4bf515 100644
case TRAPPED_CHEST:
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaArmorStand.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaArmorStand.java
new file mode 100644
index 000000000..0e8acf12e
index 0000000000..0e8acf12e4
--- /dev/null
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaArmorStand.java
@@ -0,0 +0,0 @@
@ -354,7 +354,7 @@ index 000000000..0e8acf12e
+ }
+}
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
index 3fd208803..360e1fd54 100644
index 3fd2088039..360e1fd54c 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
@@ -0,0 +0,0 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable {
@ -383,7 +383,7 @@ index 3fd208803..360e1fd54 100644
}
return HANDLED_TAGS;
diff --git a/src/test/java/org/bukkit/craftbukkit/inventory/ItemMetaTest.java b/src/test/java/org/bukkit/craftbukkit/inventory/ItemMetaTest.java
index f66cc81d9..eb6cf1bb3 100644
index 00f89f2296..ef9d40b8a0 100644
--- a/src/test/java/org/bukkit/craftbukkit/inventory/ItemMetaTest.java
+++ b/src/test/java/org/bukkit/craftbukkit/inventory/ItemMetaTest.java
@@ -0,0 +0,0 @@ import static org.hamcrest.Matchers.*;
@ -392,8 +392,8 @@ index f66cc81d9..eb6cf1bb3 100644
import java.util.List;
+import com.destroystokyo.paper.inventory.meta.ArmorStandMeta; // Paper
import net.minecraft.server.Block;
import net.minecraft.server.IRegistry;
import net.minecraft.server.ITileEntity;
import net.minecraft.server.Item;
@@ -0,0 +0,0 @@ public class ItemMetaTest extends AbstractTestingBase {
cleanStack.setItemMeta(meta);
return cleanStack;

Datei anzeigen

@ -6,7 +6,7 @@ Subject: [PATCH] Add Debug Entities option to debug dupe uuid issues
Add -Ddebug.entities=true to your JVM flags to gain more information
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index 835d329f91..ff22feee4d 100644
index 58f7489ebd..d974cb5c61 100644
--- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java
@@ -0,0 +0,0 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
@ -18,20 +18,20 @@ index 835d329f91..ff22feee4d 100644
if (bukkitEntity == null) {
bukkitEntity = CraftEntity.getEntity(world.getServer(), this);
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
index b048343b7c..747d99dbe6 100644
index 6987d9423c..8e8cf659f8 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java
+++ b/src/main/java/net/minecraft/server/WorldServer.java
@@ -0,0 +0,0 @@ public class WorldServer extends World implements IAsyncTaskHandler {
private boolean Q;
// CraftBukkit start
public final DimensionManager dimension;
+ private static final boolean DEBUG_ENTITIES = Boolean.getBoolean("debug.entities"); // Paper
+ private static Throwable getAddToWorldStackTrace(Entity entity) {
+ return new Throwable(entity + " Added to world at " + new java.util.Date());
+ }
public final int dimension;
// Add env and gen to constructor
public WorldServer(MinecraftServer minecraftserver, IDataManager idatamanager, PersistentCollection persistentcollection, WorldData worlddata, DimensionManager dimensionmanager, MethodProfiler methodprofiler, org.bukkit.World.Environment env, org.bukkit.generator.ChunkGenerator gen) {
@@ -0,0 +0,0 @@ public class WorldServer extends World implements IAsyncTaskHandler {
private boolean j(Entity entity) {
if (entity.dead) {

Datei anzeigen

@ -9,7 +9,7 @@ thread dumps at an interval until the point of crash.
This will help diagnose what was going on in that time before the crash.
diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java
index 046bf33f6..b23d45f7d 100644
index 046bf33f66..b23d45f7df 100644
--- a/src/main/java/com/destroystokyo/paper/PaperConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java
@@ -0,0 +0,0 @@ import org.bukkit.configuration.InvalidConfigurationException;
@ -37,19 +37,19 @@ index 046bf33f6..b23d45f7d 100644
public static int tabSpamLimit = 500;
private static void tabSpamLimiters() {
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 74c97b5db..5fdd65b08 100644
index 76e6b233b1..24e8b5ed14 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -0,0 +0,0 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati
this.a(this.n);
this.a(this.m);
// Spigot start
+ org.spigotmc.WatchdogThread.hasStarted = true; // Paper
Arrays.fill( recentTps, 20 );
long start = System.nanoTime(), lastTick = start - TICK_TIME, catchupTime = 0, curTime, wait, tickSection = start; // Paper - Further improve server tick loop
while (this.isRunning) {
long start = System.nanoTime(), curTime, wait, tickSection = start; // Paper - Further improve server tick loop
lastTick = start - TICK_TIME; // Paper
diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java
index 4ac0ab997..0c45d75ad 100644
index eed96c60c5..496c5cbdff 100644
--- a/src/main/java/org/spigotmc/SpigotConfig.java
+++ b/src/main/java/org/spigotmc/SpigotConfig.java
@@ -0,0 +0,0 @@ public class SpigotConfig
@ -62,7 +62,7 @@ index 4ac0ab997..0c45d75ad 100644
public static boolean bungee;
diff --git a/src/main/java/org/spigotmc/WatchdogThread.java b/src/main/java/org/spigotmc/WatchdogThread.java
index 57a4748a3..19df383e0 100644
index 57a4748a30..19df383e06 100644
--- a/src/main/java/org/spigotmc/WatchdogThread.java
+++ b/src/main/java/org/spigotmc/WatchdogThread.java
@@ -0,0 +0,0 @@ import java.lang.management.MonitorInfo;

Datei anzeigen

@ -5,7 +5,7 @@ Subject: [PATCH] Add EntityZapEvent
diff --git a/src/main/java/net/minecraft/server/EntityPig.java b/src/main/java/net/minecraft/server/EntityPig.java
index 34b6b01a30..670f26c827 100644
index fecc7e154d..b405e63e81 100644
--- a/src/main/java/net/minecraft/server/EntityPig.java
+++ b/src/main/java/net/minecraft/server/EntityPig.java
@@ -0,0 +0,0 @@ public class EntityPig extends EntityAnimal {
@ -22,7 +22,7 @@ index 34b6b01a30..670f26c827 100644
if (CraftEventFactory.callPigZapEvent(this, entitylightning, entitypigzombie).isCancelled()) {
return;
diff --git a/src/main/java/net/minecraft/server/EntityVillager.java b/src/main/java/net/minecraft/server/EntityVillager.java
index 32893a32c9..45df38bad4 100644
index 74a9fa9434..10921c1cbc 100644
--- a/src/main/java/net/minecraft/server/EntityVillager.java
+++ b/src/main/java/net/minecraft/server/EntityVillager.java
@@ -0,0 +0,0 @@ public class EntityVillager extends EntityAgeable implements NPC, IMerchant {
@ -48,7 +48,7 @@ index 32893a32c9..45df38bad4 100644
}
}
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
index 38e07f39c0..5227c15d71 100644
index e39352c221..4c98c7b337 100644
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
@@ -0,0 +0,0 @@ public class CraftEventFactory {

Datei anzeigen

@ -6,7 +6,7 @@ Subject: [PATCH] Add MinecraftKey Information to Objects
Stores the reference to the objects respective MinecraftKey
diff --git a/src/main/java/com/destroystokyo/paper/PaperCommand.java b/src/main/java/com/destroystokyo/paper/PaperCommand.java
index e8f7b7292..7ff8e70b2 100644
index e8f7b7292d..7ff8e70b24 100644
--- a/src/main/java/com/destroystokyo/paper/PaperCommand.java
+++ b/src/main/java/com/destroystokyo/paper/PaperCommand.java
@@ -0,0 +0,0 @@ public class PaperCommand extends Command {
@ -19,7 +19,7 @@ index e8f7b7292..7ff8e70b2 100644
MutablePair<Integer, Map<ChunkCoordIntPair, Integer>> info = list.computeIfAbsent(key, k -> MutablePair.of(0, Maps.newHashMap()));
ChunkCoordIntPair chunk = new ChunkCoordIntPair(e.getChunkX(), e.getChunkZ());
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index a1050912b..7e691baf9 100644
index 8997cf84a4..044f7b5aa0 100644
--- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java
@@ -0,0 +0,0 @@ import org.bukkit.event.entity.EntityPortalEvent;
@ -75,7 +75,7 @@ index a1050912b..7e691baf9 100644
protected abstract void a(NBTTagCompound nbttagcompound);
diff --git a/src/main/java/net/minecraft/server/EntityTypes.java b/src/main/java/net/minecraft/server/EntityTypes.java
index 9a513b4e3..fa268f354 100644
index 5c1ab6a0b6..cd411a1423 100644
--- a/src/main/java/net/minecraft/server/EntityTypes.java
+++ b/src/main/java/net/minecraft/server/EntityTypes.java
@@ -0,0 +0,0 @@ public class EntityTypes<T extends Entity> {
@ -84,11 +84,11 @@ index 9a513b4e3..fa268f354 100644
+ public boolean isPersistable() { return a(); } // Paper - OBFHELPER
public boolean a() {
return this.aV;
return this.aU;
}
diff --git a/src/main/java/net/minecraft/server/KeyedObject.java b/src/main/java/net/minecraft/server/KeyedObject.java
new file mode 100644
index 000000000..743142d03
index 0000000000..743142d030
--- /dev/null
+++ b/src/main/java/net/minecraft/server/KeyedObject.java
@@ -0,0 +0,0 @@
@ -102,7 +102,7 @@ index 000000000..743142d03
+ }
+}
diff --git a/src/main/java/net/minecraft/server/TileEntity.java b/src/main/java/net/minecraft/server/TileEntity.java
index 8a0453245..5ca7fef51 100644
index 62b6e6eb38..7390061bf0 100644
--- a/src/main/java/net/minecraft/server/TileEntity.java
+++ b/src/main/java/net/minecraft/server/TileEntity.java
@@ -0,0 +0,0 @@ import org.apache.logging.log4j.Logger;

Datei anzeigen

@ -5,7 +5,7 @@ Subject: [PATCH] Add PlayerArmorChangeEvent
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
index 169ad7619e..3236179a45 100644
index 2ff82694b4..e2ceb7ae4b 100644
--- a/src/main/java/net/minecraft/server/EntityLiving.java
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
@@ -0,0 +0,0 @@

Datei anzeigen

@ -5,7 +5,7 @@ Subject: [PATCH] Add PlayerJumpEvent
diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java
index d9f81e6348..8aad37b9be 100644
index d11edae03c..9a71fa1e94 100644
--- a/src/main/java/net/minecraft/server/EntityHuman.java
+++ b/src/main/java/net/minecraft/server/EntityHuman.java
@@ -0,0 +0,0 @@ public abstract class EntityHuman extends EntityLiving {
@ -17,7 +17,7 @@ index d9f81e6348..8aad37b9be 100644
super.cH();
this.a(StatisticList.JUMP);
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index d4701d8d56..c1dd2db89d 100644
index 7e06e5bc67..4cf738e0f8 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -0,0 +0,0 @@ import org.bukkit.inventory.CraftingInventory;

Datei anzeigen

@ -18,7 +18,7 @@ index 77440ac81f..8711462e16 100644
private Vec3D c;
private EnumHand d;
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index dc38e4e043..90ab7f065f 100644
index 3257f41713..096e4e0d8c 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -0,0 +0,0 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {

Datei anzeigen

@ -5,7 +5,7 @@ Subject: [PATCH] Add ProjectileCollideEvent
diff --git a/src/main/java/net/minecraft/server/EntityArrow.java b/src/main/java/net/minecraft/server/EntityArrow.java
index 75445b00dc..4ab875a3d3 100644
index c24225892f..187f02d4e4 100644
--- a/src/main/java/net/minecraft/server/EntityArrow.java
+++ b/src/main/java/net/minecraft/server/EntityArrow.java
@@ -0,0 +0,0 @@ public abstract class EntityArrow extends Entity implements IProjectile {
@ -46,7 +46,7 @@ index 3e3619d79f..58cc4824cf 100644
this.a(movingobjectposition);
diff --git a/src/main/java/net/minecraft/server/EntityFishingHook.java b/src/main/java/net/minecraft/server/EntityFishingHook.java
index 4f801e8fec..1804a49de9 100644
index 62e8f27aa7..81de03084a 100644
--- a/src/main/java/net/minecraft/server/EntityFishingHook.java
+++ b/src/main/java/net/minecraft/server/EntityFishingHook.java
@@ -0,0 +0,0 @@ public class EntityFishingHook extends Entity {
@ -87,7 +87,7 @@ index ee402d4140..fc8c0cab55 100644
if (movingobjectposition.type == MovingObjectPosition.EnumMovingObjectType.BLOCK && this.world.getType(movingobjectposition.a()).getBlock() == Blocks.NETHER_PORTAL) {
this.e(movingobjectposition.a());
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
index 01961c5bdd..8df07536f8 100644
index 488d0221c2..89e765e803 100644
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
@@ -0,0 +0,0 @@ public class CraftEventFactory {

Datei anzeigen

@ -5,7 +5,7 @@ Subject: [PATCH] Add TNTPrimeEvent
diff --git a/src/main/java/net/minecraft/server/BlockFire.java b/src/main/java/net/minecraft/server/BlockFire.java
index 25a8a1afd..108006d58 100644
index 24573b4704..ea428e2daf 100644
--- a/src/main/java/net/minecraft/server/BlockFire.java
+++ b/src/main/java/net/minecraft/server/BlockFire.java
@@ -0,0 +0,0 @@ package net.minecraft.server;
@ -28,16 +28,17 @@ index 25a8a1afd..108006d58 100644
if (block instanceof BlockTNT) {
+ // Paper start - TNTPrimeEvent
+ org.bukkit.block.Block tntBlock = world.getWorld().getBlockAt(blockposition.getX(), blockposition.getY(), blockposition.getZ());
+ if(!new TNTPrimeEvent(tntBlock, TNTPrimeEvent.PrimeReason.FIRE, null).callEvent())
+ org.bukkit.block.Block tntBlock = MCUtil.toBukkitBlock(world, blockposition);
+ if (!new TNTPrimeEvent(tntBlock, TNTPrimeEvent.PrimeReason.FIRE, null).callEvent()) {
+ return;
+ }
+ world.setAir(blockposition); // setair after non cancelled event, it would usually be air by now
+ // Paper end
((BlockTNT) block).a(world, blockposition);
}
}
diff --git a/src/main/java/net/minecraft/server/BlockTNT.java b/src/main/java/net/minecraft/server/BlockTNT.java
index 0c48a0cfe..c3eeee263 100644
index 81c5b60ea1..5fddb29612 100644
--- a/src/main/java/net/minecraft/server/BlockTNT.java
+++ b/src/main/java/net/minecraft/server/BlockTNT.java
@@ -0,0 +0,0 @@
@ -53,7 +54,7 @@ index 0c48a0cfe..c3eeee263 100644
if (iblockdata1.getBlock() != iblockdata.getBlock()) {
if (world.isBlockIndirectlyPowered(blockposition)) {
+ // Paper start - TNTPrimeEvent
+ org.bukkit.block.Block tntBlock = world.getWorld().getBlockAt(blockposition.getX(), blockposition.getY(), blockposition.getZ());
+ org.bukkit.block.Block tntBlock = MCUtil.toBukkitBlock(world, blockposition);;
+ if(!new TNTPrimeEvent(tntBlock, TNTPrimeEvent.PrimeReason.REDSTONE, null).callEvent())
+ return;
+ // Paper end
@ -65,7 +66,7 @@ index 0c48a0cfe..c3eeee263 100644
public void doPhysics(IBlockData iblockdata, World world, BlockPosition blockposition, Block block, BlockPosition blockposition1) {
if (world.isBlockIndirectlyPowered(blockposition)) {
+ // Paper start - TNTPrimeEvent
+ org.bukkit.block.Block tntBlock = world.getWorld().getBlockAt(blockposition.getX(), blockposition.getY(), blockposition.getZ());
+ org.bukkit.block.Block tntBlock = MCUtil.toBukkitBlock(world, blockposition);;
+ if(!new TNTPrimeEvent(tntBlock, TNTPrimeEvent.PrimeReason.REDSTONE, null).callEvent())
+ return;
+ // Paper end
@ -77,7 +78,7 @@ index 0c48a0cfe..c3eeee263 100644
public void wasExploded(World world, BlockPosition blockposition, Explosion explosion) {
if (!world.isClientSide) {
+ // Paper start - TNTPrimeEvent
+ org.bukkit.block.Block tntBlock = world.getWorld().getBlockAt(blockposition.getX(), blockposition.getY(), blockposition.getZ());
+ org.bukkit.block.Block tntBlock = MCUtil.toBukkitBlock(world, blockposition);;
+ org.bukkit.entity.Entity source = explosion.source != null ? explosion.source.bukkitEntity : null;
+ if(!new TNTPrimeEvent(tntBlock, TNTPrimeEvent.PrimeReason.EXPLOSION, source).callEvent())
+ return;
@ -90,7 +91,7 @@ index 0c48a0cfe..c3eeee263 100644
return super.interact(iblockdata, world, blockposition, entityhuman, enumhand, enumdirection, f, f1, f2);
} else {
+ // Paper start - TNTPrimeEvent
+ org.bukkit.block.Block tntBlock = world.getWorld().getBlockAt(blockposition.getX(), blockposition.getY(), blockposition.getZ());
+ org.bukkit.block.Block tntBlock = MCUtil.toBukkitBlock(world, blockposition);
+ if(!new TNTPrimeEvent(tntBlock, TNTPrimeEvent.PrimeReason.ITEM, entityhuman.bukkitEntity).callEvent())
+ return true;
+ // Paper end
@ -102,15 +103,16 @@ index 0c48a0cfe..c3eeee263 100644
}
// CraftBukkit end
+ // Paper start - TNTPrimeEvent
+ org.bukkit.block.Block tntBlock = world.getWorld().getBlockAt(blockposition.getX(), blockposition.getY(), blockposition.getZ());
+ if(!new TNTPrimeEvent(tntBlock, TNTPrimeEvent.PrimeReason.PROJECTILE, entityarrow.bukkitEntity).callEvent())
+ org.bukkit.block.Block tntBlock = MCUtil.toBukkitBlock(world, blockposition);
+ if (!new TNTPrimeEvent(tntBlock, TNTPrimeEvent.PrimeReason.PROJECTILE, entityarrow.bukkitEntity).callEvent()) {
+ return;
+ }
+ // Paper end
this.a(world, blockposition, entityarrow.shooter instanceof EntityLiving ? (EntityLiving) entityarrow.shooter : null);
this.a(world, blockposition, entity1 instanceof EntityLiving ? (EntityLiving) entity1 : null);
world.setAir(blockposition);
}
diff --git a/src/main/java/net/minecraft/server/EntityEnderDragon.java b/src/main/java/net/minecraft/server/EntityEnderDragon.java
index d8ab87e21..d5e2a0251 100644
index 2c735a920d..74d96a2f09 100644
--- a/src/main/java/net/minecraft/server/EntityEnderDragon.java
+++ b/src/main/java/net/minecraft/server/EntityEnderDragon.java
@@ -0,0 +0,0 @@ import org.apache.logging.log4j.Logger;

Datei anzeigen

@ -5,7 +5,7 @@ Subject: [PATCH] Add UnknownCommandEvent
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 51ea2013e8..42b3447a1a 100644
index 10cbe8c6a1..5c48430313 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -0,0 +0,0 @@ import org.bukkit.craftbukkit.util.Versioning;

Datei anzeigen

@ -6,7 +6,7 @@ Subject: [PATCH] Add World Util Methods
Methods that can be used for other patches to help improve logic.
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
index eb6f900c39..ef6a54bcae 100644
index 1131a092af..d86b925f0d 100644
--- a/src/main/java/net/minecraft/server/Chunk.java
+++ b/src/main/java/net/minecraft/server/Chunk.java
@@ -0,0 +0,0 @@ public class Chunk implements IChunkAccess {
@ -18,25 +18,25 @@ index eb6f900c39..ef6a54bcae 100644
return this.a(blockposition, i, this.world.o().g());
}
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index e0fe05a0b1..72c0c92ec1 100644
index 879f2fe844..fd6f070417 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -0,0 +0,0 @@ public abstract class World implements GeneratorAccess, IIBlockAccess, AutoClose
@@ -0,0 +0,0 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc
public final List<Entity> k = Lists.newArrayList();
protected final IntHashMap<Entity> entitiesById = new IntHashMap();
private final long G = 16777215L;
- private int H;
+ private int H; public int getSkylightSubtracted() { return this.H; } public void setSkylightSubtracted(int value) { this.H = value;} // Paper - OBFHELPER
private final long F = 16777215L;
- private int G;
+ private int G; public int getSkylightSubtracted() { return this.G; } public void setSkylightSubtracted(int value) { this.G = value;} // Paper - OBFHELPER
protected int m = (new Random()).nextInt();
protected final int n = 1013904223;
protected float o;
@@ -0,0 +0,0 @@ public abstract class World implements GeneratorAccess, IIBlockAccess, AutoClose
@@ -0,0 +0,0 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc
return this.getType(blockposition).isAir();
}
+ // Paper start
+ public Chunk getChunkIfLoaded(BlockPosition blockposition) {
+ return ((ChunkProviderServer) this.chunkProvider).getChunkIfLoaded(blockposition.getX() >> 4, blockposition.getZ() >> 4);
+ return getChunkIfLoaded(blockposition.getX() >> 4, blockposition.getZ() >> 4);
+ }
+ // test if meets light level, return faster
+ // logic copied from below
@ -89,6 +89,20 @@ index e0fe05a0b1..72c0c92ec1 100644
+ }
+ return null;
+ }
+ public Block getBlockIfLoaded(BlockPosition blockposition) {
+ IBlockData type = getTypeIfLoaded(blockposition);
+ if (type == null) {
+ return null;
+ }
+ return type.getBlock();
+ }
+ public Material getMaterialIfLoaded(BlockPosition blockposition) {
+ IBlockData type = getTypeIfLoaded(blockposition);
+ if (type == null) {
+ return null;
+ }
+ return type.getBlock().material;
+ }
+ // Paper end
+
public Chunk getChunkAtWorldCoords(BlockPosition blockposition) {

Datei anzeigen

@ -5,7 +5,7 @@ Subject: [PATCH] Add ability to configure frosted_ice properties
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
index b6ef1d4378..8d54af6bb7 100644
index 56a25531b4..25a5333219 100644
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
@@ -0,0 +0,0 @@ public class PaperWorldConfig {
@ -24,7 +24,7 @@ index b6ef1d4378..8d54af6bb7 100644
+ }
}
diff --git a/src/main/java/net/minecraft/server/BlockIceFrost.java b/src/main/java/net/minecraft/server/BlockIceFrost.java
index 1d5c24c7a7..77cf6b8e9b 100644
index 39b3c88d64..302d420512 100644
--- a/src/main/java/net/minecraft/server/BlockIceFrost.java
+++ b/src/main/java/net/minecraft/server/BlockIceFrost.java
@@ -0,0 +0,0 @@ public class BlockIceFrost extends BlockIce {
@ -39,10 +39,8 @@ index 1d5c24c7a7..77cf6b8e9b 100644
IBlockData iblockdata1 = world.getType(blockposition_b);
if (iblockdata1.getBlock() == this && !this.c(iblockdata1, world, blockposition_b)) {
- world.I().a(blockposition_b, this, MathHelper.nextInt(random, 20, 40));
+ // Paper start - use configurable min/max delay
+ world.I().a(blockposition_b, this, MathHelper.nextInt(random, world.paperConfig.frostedIceDelayMin, world.paperConfig.frostedIceDelayMax));
+ // Paper end
- world.J().a(blockposition_b, this, MathHelper.nextInt(random, 20, 40));
+ world.J().a(blockposition_b, this, MathHelper.nextInt(random, world.paperConfig.frostedIceDelayMin, world.paperConfig.frostedIceDelayMax)); // Paper - use configurable min/max delay
}
}
} catch (Throwable throwable1) {

Datei anzeigen

@ -5,7 +5,7 @@ Subject: [PATCH] Add async chunk load API
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index f94830838..9294d1707 100644
index e4c4cdb980..af977b171a 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -0,0 +0,0 @@ public class CraftWorld implements World {
@ -15,7 +15,7 @@ index f94830838..9294d1707 100644
+ // Paper start - Async chunk load API
+ public void getChunkAtAsync(final int x, final int z, final ChunkLoadCallback callback) {
+ final ChunkProviderServer cps = this.world.getChunkProviderServer();
+ callback.onLoad(cps.getChunkAt(x, z).bukkitChunk); // TODO: Add back async variant
+ callback.onLoad(cps.getChunkAt(x, z, true, true).bukkitChunk); // TODO: Add back async variant
+ /*cps.getChunkAt(x, z, new Runnable() {
+ @Override
+ public void run() {
@ -34,6 +34,6 @@ index f94830838..9294d1707 100644
+ // Paper end
+
public Chunk getChunkAt(int x, int z) {
return this.world.getChunkProviderServer().getChunkAt(x, z).bukkitChunk;
return this.world.getChunkProviderServer().getChunkAt(x, z, true, true).bukkitChunk;
}
--

Datei anzeigen

@ -5,7 +5,7 @@ Subject: [PATCH] Add config to disable ender dragon legacy check
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
index ddb5ced79d..2701388043 100644
index 2e3e48637a..8724c2816b 100644
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
@@ -0,0 +0,0 @@ public class PaperWorldConfig {

Datei anzeigen

@ -5,7 +5,7 @@ Subject: [PATCH] Add configurable portal search radius
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
index 7d1f6cde9..c98286999 100644
index 7d1f6cde94..c982869995 100644
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
@@ -0,0 +0,0 @@ public class PaperWorldConfig {
@ -19,7 +19,7 @@ index 7d1f6cde9..c98286999 100644
+ }
}
diff --git a/src/main/java/net/minecraft/server/PortalTravelAgent.java b/src/main/java/net/minecraft/server/PortalTravelAgent.java
index 0cb1eeb68..402d8d7d6 100644
index 73d5b4d625..5e899e05cf 100644
--- a/src/main/java/net/minecraft/server/PortalTravelAgent.java
+++ b/src/main/java/net/minecraft/server/PortalTravelAgent.java
@@ -0,0 +0,0 @@ import org.bukkit.util.Vector;
@ -41,7 +41,7 @@ index 0cb1eeb68..402d8d7d6 100644
return false;
}
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftTravelAgent.java b/src/main/java/org/bukkit/craftbukkit/CraftTravelAgent.java
index 1d5dce10e..7ca2617a8 100644
index d4639c8221..e1eb3aa0f3 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftTravelAgent.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftTravelAgent.java
@@ -0,0 +0,0 @@ public class CraftTravelAgent extends PortalTravelAgent implements TravelAgent {

Datei anzeigen

@ -20,7 +20,7 @@ index 9f1182c723..e97dbaf8e3 100644
+ }
}
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 476b01f70f..17b398cde0 100644
index 95f28c83af..6a44428293 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -0,0 +0,0 @@ public final class CraftServer implements Server {

Datei anzeigen

@ -6,7 +6,7 @@ Subject: [PATCH] Add exception reporting event
diff --git a/src/main/java/com/destroystokyo/paper/ServerSchedulerReportingWrapper.java b/src/main/java/com/destroystokyo/paper/ServerSchedulerReportingWrapper.java
new file mode 100644
index 000000000..93397188b
index 0000000000..93397188b7
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/ServerSchedulerReportingWrapper.java
@@ -0,0 +0,0 @@
@ -50,7 +50,7 @@ index 000000000..93397188b
+}
\ No newline at end of file
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
index ea7d82f09..ec43c2659 100644
index ef09ac7873..1131a092af 100644
--- a/src/main/java/net/minecraft/server/Chunk.java
+++ b/src/main/java/net/minecraft/server/Chunk.java
@@ -0,0 +0,0 @@
@ -60,15 +60,6 @@ index ea7d82f09..ec43c2659 100644
import com.google.common.collect.Maps;
import com.google.common.collect.Queues;
import com.google.common.collect.Sets;
@@ -0,0 +0,0 @@ import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import com.google.common.collect.Lists; // CraftBukkit
+import org.bukkit.Server; // CraftBukkit
+import org.bukkit.craftbukkit.util.CraftMagicNumbers; // Paper
public class Chunk implements IChunkAccess {
@@ -0,0 +0,0 @@ public class Chunk implements IChunkAccess {
return this.getBlockData(i, j, k).b(this.world, new BlockPosition(i, j, k));
}
@ -89,7 +80,7 @@ index ea7d82f09..ec43c2659 100644
+ ServerInternalException e = new ServerInternalException(
+ "Attempted to place a tile entity (" + tileentity + ") at " + tileentity.position.getX() + ","
+ + tileentity.position.getY() + "," + tileentity.position.getZ()
+ + " (" + CraftMagicNumbers.getMaterial(getBlockData(blockposition).getBlock()) + ") where there was no entity tile!\n" +
+ + " (" + getBlockData(blockposition) + ") where there was no entity tile!\n" +
+ "Chunk coordinates: " + (this.locX * 16) + "," + (this.locZ * 16));
+ e.printStackTrace();
+ ServerInternalException.reportInternalException(e);
@ -98,10 +89,10 @@ index ea7d82f09..ec43c2659 100644
}
}
diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java
index d025d949e..0e04d6598 100644
index 1379b574ef..6b041f06e4 100644
--- a/src/main/java/net/minecraft/server/ChunkProviderServer.java
+++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java
@@ -0,0 +0,0 @@ import java.util.concurrent.ExecutionException;
@@ -0,0 +0,0 @@ import java.util.function.BooleanSupplier;
import java.util.function.Consumer;
import java.util.function.Function;
import javax.annotation.Nullable;
@ -109,19 +100,6 @@ index d025d949e..0e04d6598 100644
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
@@ -0,0 +0,0 @@ public class ChunkProviderServer implements IChunkProvider {
try {
// this.chunkLoader.a(this.world, chunk); // Spigot
} catch (Exception exception) {
- ChunkProviderServer.a.error("Couldn\'t save entities", exception);
+ // Paper start
+ String msg = "Couldn\'t save entities";
+ ChunkProviderServer.a.error(msg, exception);
+ ServerInternalException.reportInternalException(exception);
+ // Paper end
}
}
@@ -0,0 +0,0 @@ public class ChunkProviderServer implements IChunkProvider {
ichunkaccess.setLastSaved(this.world.getTime());
this.chunkLoader.saveChunk(this.world, ichunkaccess, unloaded); // Spigot
@ -140,7 +118,7 @@ index d025d949e..0e04d6598 100644
}
diff --git a/src/main/java/net/minecraft/server/NameReferencingFileConverter.java b/src/main/java/net/minecraft/server/NameReferencingFileConverter.java
index 33e5aaf2c..f13534917 100644
index 1d830dff64..58d971cf20 100644
--- a/src/main/java/net/minecraft/server/NameReferencingFileConverter.java
+++ b/src/main/java/net/minecraft/server/NameReferencingFileConverter.java
@@ -0,0 +0,0 @@
@ -166,35 +144,8 @@ index 33e5aaf2c..f13534917 100644
}
}
// CraftBukkit end
diff --git a/src/main/java/net/minecraft/server/PersistentCollection.java b/src/main/java/net/minecraft/server/PersistentCollection.java
index 6b5600ba5..72f386720 100644
--- a/src/main/java/net/minecraft/server/PersistentCollection.java
+++ b/src/main/java/net/minecraft/server/PersistentCollection.java
@@ -0,0 +0,0 @@
package net.minecraft.server;
+import com.destroystokyo.paper.exception.ServerInternalException;
import com.google.common.collect.Lists;
import com.google.common.collect.Maps;
import com.mojang.datafixers.DataFixTypes;
@@ -0,0 +0,0 @@ public class PersistentCollection {
nbttagcompound = GameProfileSerializer.a(this.c.i(), DataFixTypes.SAVED_DATA, nbttagcompound1, j, i);
} catch (Throwable throwable1) {
throwable = throwable1;
+ ServerInternalException.reportInternalException(throwable1); // Paper
throw throwable1;
} finally {
if (fileinputstream != null) {
@@ -0,0 +0,0 @@ public class PersistentCollection {
}
} catch (Exception exception) {
exception.printStackTrace();
+ ServerInternalException.reportInternalException(exception); // Paper
}
}
diff --git a/src/main/java/net/minecraft/server/RegionFile.java b/src/main/java/net/minecraft/server/RegionFile.java
index 31899549d..cc7cad8be 100644
index 31899549d5..cc7cad8be4 100644
--- a/src/main/java/net/minecraft/server/RegionFile.java
+++ b/src/main/java/net/minecraft/server/RegionFile.java
@@ -0,0 +0,0 @@
@ -221,7 +172,7 @@ index 31899549d..cc7cad8be 100644
}
diff --git a/src/main/java/net/minecraft/server/RegionFileCache.java b/src/main/java/net/minecraft/server/RegionFileCache.java
index 0e91aeec3..ff473a263 100644
index d18921271f..e5115863ec 100644
--- a/src/main/java/net/minecraft/server/RegionFileCache.java
+++ b/src/main/java/net/minecraft/server/RegionFileCache.java
@@ -0,0 +0,0 @@
@ -240,7 +191,7 @@ index 0e91aeec3..ff473a263 100644
}
diff --git a/src/main/java/net/minecraft/server/SpawnerCreature.java b/src/main/java/net/minecraft/server/SpawnerCreature.java
index b12e767db..342a15db5 100644
index 9e24b77ad1..f32191c5a2 100644
--- a/src/main/java/net/minecraft/server/SpawnerCreature.java
+++ b/src/main/java/net/minecraft/server/SpawnerCreature.java
@@ -0,0 +0,0 @@ import org.apache.logging.log4j.LogManager;
@ -268,7 +219,7 @@ index b12e767db..342a15db5 100644
}
diff --git a/src/main/java/net/minecraft/server/VillageSiege.java b/src/main/java/net/minecraft/server/VillageSiege.java
index 4ff243dab..67b2e41c7 100644
index e649d662ae..560edb523f 100644
--- a/src/main/java/net/minecraft/server/VillageSiege.java
+++ b/src/main/java/net/minecraft/server/VillageSiege.java
@@ -0,0 +0,0 @@
@ -288,7 +239,7 @@ index 4ff243dab..67b2e41c7 100644
}
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index f6d7070de..e0fe05a0b 100644
index 9fb87914ff..879f2fe844 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -0,0 +0,0 @@
@ -299,8 +250,8 @@ index f6d7070de..e0fe05a0b 100644
+import com.destroystokyo.paper.exception.ServerInternalException;
import com.google.common.base.MoreObjects;
import com.google.common.collect.Lists;
import java.util.ArrayList;
@@ -0,0 +0,0 @@ public abstract class World implements GeneratorAccess, IIBlockAccess, AutoClose
import it.unimi.dsi.fastutil.longs.LongSet;
@@ -0,0 +0,0 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc
} catch (Throwable throwable1) {
entity.tickTimer.stopTiming();
// Paper start - Prevent tile entity and entity crashes
@ -312,7 +263,7 @@ index f6d7070de..e0fe05a0b 100644
entity.dead = true;
continue;
// Paper end
@@ -0,0 +0,0 @@ public abstract class World implements GeneratorAccess, IIBlockAccess, AutoClose
@@ -0,0 +0,0 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc
this.methodProfiler.e();
} catch (Throwable throwable2) {
// Paper start - Prevent tile entity and entity crashes
@ -324,8 +275,20 @@ index f6d7070de..e0fe05a0b 100644
tilesThisCycle--;
this.tileEntityListTick.remove(tileTickPosition--);
continue;
diff --git a/src/main/java/net/minecraft/server/WorldPersistentData.java b/src/main/java/net/minecraft/server/WorldPersistentData.java
index 65931bfb5f..625335c60f 100644
--- a/src/main/java/net/minecraft/server/WorldPersistentData.java
+++ b/src/main/java/net/minecraft/server/WorldPersistentData.java
@@ -0,0 +0,0 @@ public class WorldPersistentData {
nbttagcompound = GameProfileSerializer.a(idatamanager.i(), DataFixTypes.SAVED_DATA, nbttagcompound1, j, i);
} catch (Throwable throwable1) {
+ com.destroystokyo.paper.exception.ServerInternalException.reportInternalException(throwable1); // Paper
throwable = throwable1;
throw throwable1;
} finally {
diff --git a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java
index 93b9134d6..26753fac5 100644
index 93b9134d6e..26753fac5e 100644
--- a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java
+++ b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java
@@ -0,0 +0,0 @@ import java.util.concurrent.atomic.AtomicReference;

Datei anzeigen

@ -5,7 +5,7 @@ Subject: [PATCH] Add hand to bucket events
diff --git a/src/main/java/net/minecraft/server/EntityCow.java b/src/main/java/net/minecraft/server/EntityCow.java
index b2010ffa6..3493c4c44 100644
index 5f4f107d5a..b2e50f8532 100644
--- a/src/main/java/net/minecraft/server/EntityCow.java
+++ b/src/main/java/net/minecraft/server/EntityCow.java
@@ -0,0 +0,0 @@ public class EntityCow extends EntityAnimal {
@ -18,7 +18,7 @@ index b2010ffa6..3493c4c44 100644
if (event.isCancelled()) {
return false;
diff --git a/src/main/java/net/minecraft/server/ItemBucket.java b/src/main/java/net/minecraft/server/ItemBucket.java
index 2c36c3990..b38ee2853 100644
index b63da71512..b0dd30dd12 100644
--- a/src/main/java/net/minecraft/server/ItemBucket.java
+++ b/src/main/java/net/minecraft/server/ItemBucket.java
@@ -0,0 +0,0 @@ public class ItemBucket extends Item {
@ -50,14 +50,14 @@ index 2c36c3990..b38ee2853 100644
+ public boolean a(EntityHuman entityhuman, World world, BlockPosition blockposition, @Nullable MovingObjectPosition movingobjectposition, EnumDirection enumdirection, BlockPosition clicked, ItemStack itemstack, EnumHand enumhand) {
+ // Paper end
// CraftBukkit end
if (!(this.a instanceof FluidTypeFlowing)) {
if (!(this.fluidType instanceof FluidTypeFlowing)) {
return false;
@@ -0,0 +0,0 @@ public class ItemBucket extends Item {
boolean flag1 = material.isReplaceable();
if (!world.isEmpty(blockposition) && !flag && !flag1 && (!(iblockdata.getBlock() instanceof IFluidContainer) || !((IFluidContainer) iblockdata.getBlock()).a((IBlockAccess) world, blockposition, iblockdata, this.a))) {
if (!world.isEmpty(blockposition) && !flag && !flag1 && (!(iblockdata.getBlock() instanceof IFluidContainer) || !((IFluidContainer) iblockdata.getBlock()).canPlace(world, blockposition, iblockdata, this.fluidType))) {
- return movingobjectposition == null ? false : this.a(entityhuman, world, movingobjectposition.a().shift(movingobjectposition.direction), (MovingObjectPosition) null, enumdirection, clicked, itemstack); // CraftBukkit
+ return movingobjectposition == null ? false : this.a(entityhuman, world, movingobjectposition.a().shift(movingobjectposition.direction), (MovingObjectPosition) null, enumdirection, clicked, itemstack, enumhand); // CraftBukkit // Paper - add enumHand
+ return movingobjectposition == null ? false : this.a(entityhuman, world, movingobjectposition.a().shift(movingobjectposition.direction), (MovingObjectPosition) null, enumdirection, clicked, itemstack, enumhand); // CraftBukkit // Paper - add enumhand
} else {
// CraftBukkit start
if (entityhuman != null) {
@ -67,7 +67,7 @@ index 2c36c3990..b38ee2853 100644
((EntityPlayer) entityhuman).playerConnection.sendPacket(new PacketPlayOutBlockChange(world, blockposition)); // SPIGOT-4238: needed when looking through entity
// TODO: inventory not updated
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
index 140ddae0d..9037a1233 100644
index 1f3774c249..e0a012a82b 100644
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
@@ -0,0 +0,0 @@ public class CraftEventFactory {

Datei anzeigen

@ -5,7 +5,7 @@ Subject: [PATCH] Add method to open already placed sign
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
index 4afff2f262..e9707dfa74 100644
index 38a886fbd5..92fe80316f 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
@@ -0,0 +0,0 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity {

Datei anzeigen

@ -6,7 +6,7 @@ Subject: [PATCH] Add missing coverages for getTileEntity in order to attempt
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
index 8f6ce6bf1a..5d5f6f6328 100644
index e58b21ae43..e4ba13cec5 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java
+++ b/src/main/java/net/minecraft/server/WorldServer.java
@@ -0,0 +0,0 @@ public class WorldServer extends World implements IAsyncTaskHandler {

Datei anzeigen

@ -11,7 +11,7 @@ I suspect Mojang may switch to this behavior before full release.
To be converted into a Paper-API event at some point in the future?
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
index 4991138dfe..87c599338a 100644
index 8923454524..0094f6ab98 100644
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
@@ -0,0 +0,0 @@ public class PaperWorldConfig {
@ -26,7 +26,7 @@ index 4991138dfe..87c599338a 100644
+ }
}
diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java
index 9814075d6d..814202286c 100644
index 79233fe463..f6600ce515 100644
--- a/src/main/java/net/minecraft/server/EntityHuman.java
+++ b/src/main/java/net/minecraft/server/EntityHuman.java
@@ -0,0 +0,0 @@ public abstract class EntityHuman extends EntityLiving {
@ -39,7 +39,7 @@ index 9814075d6d..814202286c 100644
}
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index 08ef17dfe1..d4701d8d56 100644
index 7f61da1cd3..7e06e5bc67 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -0,0 +0,0 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {

Datei anzeigen

@ -23,7 +23,7 @@ index c1845d6811..9f1182c723 100644
+ }
}
diff --git a/src/main/java/net/minecraft/server/ServerStatisticManager.java b/src/main/java/net/minecraft/server/ServerStatisticManager.java
index 07e7db455b..34c57e26f4 100644
index 6405f98e06..42e2f3d22b 100644
--- a/src/main/java/net/minecraft/server/ServerStatisticManager.java
+++ b/src/main/java/net/minecraft/server/ServerStatisticManager.java
@@ -0,0 +0,0 @@ public class ServerStatisticManager extends StatisticManager {
@ -36,10 +36,10 @@ index 07e7db455b..34c57e26f4 100644
jsonreader.setLenient(false);
@@ -0,0 +0,0 @@ public class ServerStatisticManager extends StatisticManager {
if (statistic == null) {
ServerStatisticManager.b.warn("Invalid statistic in {}: Don\'t know what {} is", this.d, s2);
if (statistic == null) {
ServerStatisticManager.b.warn("Invalid statistic in {}: Don\'t know what {} is", this.d, s2);
+ if (com.destroystokyo.paper.PaperConfig.removeInvalidStatistics) invalidStats.add(s2); // Paper
} else {
this.a.put(statistic, nbttagcompound2.getInt(s2));
}
} else {
this.a.put(statistic, nbttagcompound2.getInt(s2));
}
--

Datei anzeigen

@ -5,7 +5,7 @@ Subject: [PATCH] Add player view distance API
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
index 2dc70ffbf0..b66df45bde 100644
index 9f23c0d2c2..b44d056651 100644
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
@@ -0,0 +0,0 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
@ -203,7 +203,7 @@ index d975c2ccf1..6ece565c51 100644
+ // Paper end
}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 15023a4563..43b27ea7c2 100644
index 8ecef3ff96..3cc16b6923 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -0,0 +0,0 @@ public class CraftPlayer extends CraftHumanEntity implements Player {

Datei anzeigen

@ -7,7 +7,7 @@ This allows you to create already filled textures on Skulls to avoid texture loo
which commonly cause rate limit issues with Mojang API
diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftSkull.java b/src/main/java/org/bukkit/craftbukkit/block/CraftSkull.java
index f113da713..fdfe101ae 100644
index f113da713a..fdfe101ae3 100644
--- a/src/main/java/org/bukkit/craftbukkit/block/CraftSkull.java
+++ b/src/main/java/org/bukkit/craftbukkit/block/CraftSkull.java
@@ -0,0 +0,0 @@
@ -48,7 +48,7 @@ index f113da713..fdfe101ae 100644
public BlockFace getRotation() {
return ((Rotatable) getBlockData()).getRotation();
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java
index 7984c68cb..14d8dd65a 100644
index 7984c68cb0..14d8dd65ac 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java
@@ -0,0 +0,0 @@ package org.bukkit.craftbukkit.inventory;

Datei anzeigen

@ -19,7 +19,7 @@ index a1110da38e..0a8fc7927a 100644
+ }
}
diff --git a/src/main/java/net/minecraft/server/NameReferencingFileConverter.java b/src/main/java/net/minecraft/server/NameReferencingFileConverter.java
index f135349174..85c7a96c5a 100644
index 58d971cf20..8a2ff6a413 100644
--- a/src/main/java/net/minecraft/server/NameReferencingFileConverter.java
+++ b/src/main/java/net/minecraft/server/NameReferencingFileConverter.java
@@ -0,0 +0,0 @@ public class NameReferencingFileConverter {
@ -33,7 +33,7 @@ index f135349174..85c7a96c5a 100644
} else {
String[] astring1 = astring;
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 3861c63cb8..ff1f71310e 100644
index 89f6c77dbc..b0e8302f0c 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -0,0 +0,0 @@ public final class CraftServer implements Server {

Datei anzeigen

@ -9,7 +9,7 @@ This should hopefully avoid duplicate entities ever being created
if the entity was to end up in 2 different chunk slices
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
index abdcf7745a..bd31a7dcab 100644
index 404b7d21c2..7b6b8f4824 100644
--- a/src/main/java/net/minecraft/server/Chunk.java
+++ b/src/main/java/net/minecraft/server/Chunk.java
@@ -0,0 +0,0 @@ public class Chunk implements IChunkAccess {
@ -73,7 +73,7 @@ index abdcf7745a..bd31a7dcab 100644
// Do not pass along players, as doing so can get them stuck outside of time.
// (which for example disables inventory icon updates and prevents block breaking)
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index 4315804ddb..166abea704 100644
index 4a2faa314e..f5d5f38232 100644
--- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java
@@ -0,0 +0,0 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Add source block to BlockPhysicsEvent
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index 16d0c0d45..a4d9f0d5f 100644
index abf3796d91..2a7abae942 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -0,0 +0,0 @@ public abstract class World implements GeneratorAccess, IIBlockAccess, AutoClose
@@ -0,0 +0,0 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc
// CraftBukkit start
CraftWorld world = ((WorldServer) this).getWorld();
if (world != null && !((WorldServer)this).stopPhysicsEvent) { // Paper

Datei anzeigen

@ -5,7 +5,7 @@ Subject: [PATCH] Add source to PlayerExpChangeEvent
diff --git a/src/main/java/net/minecraft/server/EntityExperienceOrb.java b/src/main/java/net/minecraft/server/EntityExperienceOrb.java
index c8698b2f67..3c888d6015 100644
index 33b24c833b..880f496526 100644
--- a/src/main/java/net/minecraft/server/EntityExperienceOrb.java
+++ b/src/main/java/net/minecraft/server/EntityExperienceOrb.java
@@ -0,0 +0,0 @@ public class EntityExperienceOrb extends Entity {
@ -18,7 +18,7 @@ index c8698b2f67..3c888d6015 100644
this.die();
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
index 5227c15d71..01961c5bdd 100644
index 4c98c7b337..488d0221c2 100644
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
@@ -0,0 +0,0 @@ import org.bukkit.entity.Player;

Datei anzeigen

@ -5,7 +5,7 @@ Subject: [PATCH] Add velocity warnings
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 5230867326..53adc9e1a0 100644
index 6a7bdb9ab6..bd99aa72c4 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -0,0 +0,0 @@ public final class CraftServer implements Server {

Datei anzeigen

@ -5,7 +5,7 @@ Subject: [PATCH] All chunks are slime spawn chunks toggle
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
index d91b48b0a..7d1f6cde9 100644
index d91b48b0ae..7d1f6cde94 100644
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
@@ -0,0 +0,0 @@ public class PaperWorldConfig {
@ -19,16 +19,16 @@ index d91b48b0a..7d1f6cde9 100644
+ }
}
diff --git a/src/main/java/net/minecraft/server/EntitySlime.java b/src/main/java/net/minecraft/server/EntitySlime.java
index 31e066b54..eeaf98e82 100644
index 9e0df95607..238f3c7926 100644
--- a/src/main/java/net/minecraft/server/EntitySlime.java
+++ b/src/main/java/net/minecraft/server/EntitySlime.java
@@ -0,0 +0,0 @@ public class EntitySlime extends EntityInsentient implements IMonster {
}
ChunkCoordIntPair chunkcoordintpair = new ChunkCoordIntPair(blockposition);
- boolean flag = SeededRandom.a(chunkcoordintpair.x, chunkcoordintpair.z, generatoraccess.getSeed(), world.spigotConfig.slimeSeed).nextInt(10) == 0; // Spigot
+ boolean flag = world.paperConfig.allChunksAreSlimeChunks || SeededRandom.a(chunkcoordintpair.x, chunkcoordintpair.z, generatoraccess.getSeed(), world.spigotConfig.slimeSeed).nextInt(10) == 0; // Spigot // Paper - add allChunksAreSlime
- boolean flag1 = SeededRandom.a(chunkcoordintpair.x, chunkcoordintpair.z, generatoraccess.getSeed(), world.spigotConfig.slimeSeed).nextInt(10) == 0; // Spigot
+ boolean flag1 = world.paperConfig.allChunksAreSlimeChunks || SeededRandom.a(chunkcoordintpair.x, chunkcoordintpair.z, generatoraccess.getSeed(), world.spigotConfig.slimeSeed).nextInt(10) == 0; // Spigot // Paper - add allChunksAreSlime
if (this.random.nextInt(10) == 0 && flag && this.locY < 40.0D) {
return super.a(generatoraccess);
if (this.random.nextInt(10) == 0 && flag1 && this.locY < 40.0D) {
return super.a(generatoraccess, flag);
--

Datei anzeigen

@ -6,7 +6,7 @@ Subject: [PATCH] Allow Reloading of Command Aliases
Reload the aliases stored in commands.yml
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index ff1f71310e..476b01f70f 100644
index b0e8302f0c..95f28c83af 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -0,0 +0,0 @@ public final class CraftServer implements Server {

Datei anzeigen

@ -6,7 +6,7 @@ Subject: [PATCH] Allow Reloading of Custom Permissions
https://github.com/PaperMC/Paper/issues/49
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index b68af1c285..f70629a868 100644
index 8d059d75ac..eacee4036e 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -0,0 +0,0 @@ public final class CraftServer implements Server {

Datei anzeigen

@ -5,12 +5,12 @@ Subject: [PATCH] Allow disabling armour stand ticking
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
index 61c8b58b1..458baf444 100644
index 58f87794d6..06c949ef06 100644
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
@@ -0,0 +0,0 @@ public class PaperWorldConfig {
allowPermaChunkLoaders = getBoolean("game-mechanics.allow-permanent-chunk-loaders", allowPermaChunkLoaders);
log("Allow Perma Chunk Loaders: " + (allowPermaChunkLoaders ? "enabled" : "disabled"));
break;
}
}
+
+ public boolean armorStandTick = true;
@ -20,7 +20,7 @@ index 61c8b58b1..458baf444 100644
+ }
}
diff --git a/src/main/java/net/minecraft/server/EntityArmorStand.java b/src/main/java/net/minecraft/server/EntityArmorStand.java
index 3b2b94d8c..7edeb9bb0 100644
index 7647311dfd..35afffedef 100644
--- a/src/main/java/net/minecraft/server/EntityArmorStand.java
+++ b/src/main/java/net/minecraft/server/EntityArmorStand.java
@@ -0,0 +0,0 @@ public class EntityArmorStand extends EntityLiving {
@ -48,7 +48,7 @@ index 3b2b94d8c..7edeb9bb0 100644
Vector3f vector3f = (Vector3f) this.datawatcher.get(EntityArmorStand.b);
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftArmorStand.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftArmorStand.java
index 9f5c3b92e..07ce93f17 100644
index 9f5c3b92e3..07ce93f17c 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftArmorStand.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftArmorStand.java
@@ -0,0 +0,0 @@ public class CraftArmorStand extends CraftLivingEntity implements ArmorStand {

Datei anzeigen

@ -5,7 +5,7 @@ Subject: [PATCH] Allow for toggling of spawn chunks
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
index 02f7e506e..cef0c47ac 100644
index 02f7e506e3..cef0c47ac7 100644
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
@@ -0,0 +0,0 @@ public class PaperWorldConfig {
@ -20,10 +20,10 @@ index 02f7e506e..cef0c47ac 100644
+ }
}
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index 562a85b72..6ca7a2069 100644
index c3c435cab9..30a46a50fb 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -0,0 +0,0 @@ public abstract class World implements GeneratorAccess, IIBlockAccess, AutoClose
@@ -0,0 +0,0 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc
this.getServer().addWorld(this.world);
// CraftBukkit end
timings = new co.aikar.timings.WorldTimingsHandler(this); // Paper - code below can generate new world and access timings

Datei anzeigen

@ -8,7 +8,7 @@ This API has more capabilities than .dropItem with the Consumer function
Item can be set inside of the Consumer pre spawn function.
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index 62638d4e25..affbb93bfd 100644
index 63d9130918..c449a9a39b 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -0,0 +0,0 @@ public class CraftWorld implements World {

Datei anzeigen

@ -27,7 +27,7 @@ index e97dbaf8e3..45863c017c 100644
+ }
}
diff --git a/src/main/java/net/minecraft/server/LoginListener.java b/src/main/java/net/minecraft/server/LoginListener.java
index 005efbc111..6249b0e686 100644
index 8bbea96240..10c82107d4 100644
--- a/src/main/java/net/minecraft/server/LoginListener.java
+++ b/src/main/java/net/minecraft/server/LoginListener.java
@@ -0,0 +0,0 @@ public class LoginListener implements PacketLoginInListener, ITickable {

Datei anzeigen

@ -7,7 +7,7 @@ This will help guarantee that entities are always in the
chunk that they are currently located at.
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index 6b0ca4eb9..68b4a902e 100644
index e558197623..f5e66aaf90 100644
--- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java
@@ -0,0 +0,0 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
@ -27,7 +27,7 @@ index 6b0ca4eb9..68b4a902e 100644
protected SoundEffect ad() {
diff --git a/src/main/java/net/minecraft/server/EntityLeash.java b/src/main/java/net/minecraft/server/EntityLeash.java
index f2d3d0b4c..f20060614 100644
index f2d3d0b4c7..f20060614d 100644
--- a/src/main/java/net/minecraft/server/EntityLeash.java
+++ b/src/main/java/net/minecraft/server/EntityLeash.java
@@ -0,0 +0,0 @@ public class EntityLeash extends EntityHanging {
@ -39,7 +39,7 @@ index f2d3d0b4c..f20060614 100644
public void setDirection(EnumDirection enumdirection) {}
diff --git a/src/main/java/net/minecraft/server/EntityShulker.java b/src/main/java/net/minecraft/server/EntityShulker.java
index 95c6cd897..bc11e7da2 100644
index 24de5f0172..06e51d5b81 100644
--- a/src/main/java/net/minecraft/server/EntityShulker.java
+++ b/src/main/java/net/minecraft/server/EntityShulker.java
@@ -0,0 +0,0 @@ public class EntityShulker extends EntityGolem implements IMonster {

Datei anzeigen

@ -8,10 +8,10 @@ which can keep them in the chunk when they shouldnt be if done
during entity ticking.
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index 921add1dc..ff0112c52 100644
index 3ea26d5ad8..c2d404b813 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -0,0 +0,0 @@ public abstract class World implements GeneratorAccess, IIBlockAccess, AutoClose
@@ -0,0 +0,0 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc
this.everyoneSleeping();
}
@ -20,7 +20,7 @@ index 921add1dc..ff0112c52 100644
int i = entity.ae;
int j = entity.ag;
@@ -0,0 +0,0 @@ public abstract class World implements GeneratorAccess, IIBlockAccess, AutoClose
@@ -0,0 +0,0 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc
this.getChunkAt(i, j).b(entity);
}

Datei anzeigen

@ -5,7 +5,7 @@ Subject: [PATCH] Anti-Xray
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
index a87258bbe..a395406d5 100644
index 19f4c61cdc..3acb1ff9fd 100644
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
@@ -0,0 +0,0 @@
@ -30,8 +30,8 @@ index a87258bbe..a395406d5 100644
+ public ChunkEdgeMode chunkEdgeMode;
+ public int maxChunkSectionIndex;
+ public int updateRadius;
+ public List<Object> hiddenBlocks;
+ public List<Object> replacementBlocks;
+ public List<String> hiddenBlocks;
+ public List<String> replacementBlocks;
+ private void antiXray() {
+ antiXray = getBoolean("anti-xray.enabled", false);
+ asynchronous = true;
@ -42,14 +42,14 @@ index a87258bbe..a395406d5 100644
+ maxChunkSectionIndex = getInt("anti-xray.max-chunk-section-index", 3);
+ maxChunkSectionIndex = maxChunkSectionIndex > 15 ? 15 : maxChunkSectionIndex;
+ updateRadius = getInt("anti-xray.update-radius", 2);
+ hiddenBlocks = getList("anti-xray.hidden-blocks", Arrays.asList((Object) "gold_ore", "iron_ore", "coal_ore", "lapis_ore", "mossy_cobblestone", "obsidian", "chest", "diamond_ore", "redstone_ore", "lit_redstone_ore", "clay", "emerald_ore", "ender_chest"));
+ replacementBlocks = getList("anti-xray.replacement-blocks", Arrays.asList((Object) "stone", "planks"));
+ hiddenBlocks = getList("anti-xray.hidden-blocks", Arrays.asList("gold_ore", "iron_ore", "coal_ore", "lapis_ore", "mossy_cobblestone", "obsidian", "chest", "diamond_ore", "redstone_ore", "lit_redstone_ore", "clay", "emerald_ore", "ender_chest"));
+ replacementBlocks = getList("anti-xray.replacement-blocks", Arrays.asList("stone", "planks"));
+ log("Anti-Xray: " + (antiXray ? "enabled" : "disabled") + " / Engine Mode: " + engineMode.getDescription() + " / Chunk Edge Mode: " + chunkEdgeMode.getDescription() + " / Up to " + ((maxChunkSectionIndex + 1) * 16) + " blocks / Update Radius: " + updateRadius);
+ }
}
diff --git a/src/main/java/com/destroystokyo/paper/antixray/ChunkPacketBlockController.java b/src/main/java/com/destroystokyo/paper/antixray/ChunkPacketBlockController.java
new file mode 100644
index 000000000..1ba8477bf
index 0000000000..1ba8477bf9
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/antixray/ChunkPacketBlockController.java
@@ -0,0 +0,0 @@
@ -100,7 +100,7 @@ index 000000000..1ba8477bf
+}
diff --git a/src/main/java/com/destroystokyo/paper/antixray/ChunkPacketBlockControllerAntiXray.java b/src/main/java/com/destroystokyo/paper/antixray/ChunkPacketBlockControllerAntiXray.java
new file mode 100644
index 000000000..ed21f8515
index 0000000000..65d3e88c3b
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/antixray/ChunkPacketBlockControllerAntiXray.java
@@ -0,0 +0,0 @@
@ -111,6 +111,8 @@ index 000000000..ed21f8515
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
+
+import net.minecraft.server.IRegistry;
+import net.minecraft.server.MinecraftKey;
+import org.bukkit.World.Environment;
+
+import com.destroystokyo.paper.PaperWorldConfig;
@ -177,8 +179,8 @@ index 000000000..ed21f8515
+ } else {
+ Set<IBlockData> predefinedBlockDataSet = new HashSet<IBlockData>();
+
+ for (Object id : paperWorldConfig.hiddenBlocks) {
+ Block block = Block.getByName(String.valueOf(id));
+ for (String id : paperWorldConfig.hiddenBlocks) {
+ Block block = IRegistry.BLOCK.get(new MinecraftKey(id));
+
+ if (block != null && !block.isTileEntity()) {
+ predefinedBlockDataSet.add(block.getBlockData());
@ -200,8 +202,8 @@ index 000000000..ed21f8515
+ predefinedBlockDataBitsEndStoneGlobal = null;
+ }
+
+ for (Object id : (engineMode == EngineMode.HIDE) ? paperWorldConfig.hiddenBlocks : paperWorldConfig.replacementBlocks) {
+ Block block = Block.getByName(String.valueOf(id));
+ for (String id : (engineMode == EngineMode.HIDE) ? paperWorldConfig.hiddenBlocks : paperWorldConfig.replacementBlocks) {
+ Block block = IRegistry.BLOCK.get(new MinecraftKey(id));
+
+ if (block != null) {
+ obfuscateGlobal[ChunkSection.GLOBAL_PALETTE.getDataBits(block.getBlockData())] = true;
@ -774,7 +776,7 @@ index 000000000..ed21f8515
+}
diff --git a/src/main/java/com/destroystokyo/paper/antixray/ChunkPacketInfo.java b/src/main/java/com/destroystokyo/paper/antixray/ChunkPacketInfo.java
new file mode 100644
index 000000000..41618994b
index 0000000000..41618994b4
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/antixray/ChunkPacketInfo.java
@@ -0,0 +0,0 @@
@ -861,7 +863,7 @@ index 000000000..41618994b
+}
diff --git a/src/main/java/com/destroystokyo/paper/antixray/ChunkPacketInfoAntiXray.java b/src/main/java/com/destroystokyo/paper/antixray/ChunkPacketInfoAntiXray.java
new file mode 100644
index 000000000..e255a45fa
index 0000000000..e255a45fa3
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/antixray/ChunkPacketInfoAntiXray.java
@@ -0,0 +0,0 @@
@ -896,7 +898,7 @@ index 000000000..e255a45fa
+}
diff --git a/src/main/java/com/destroystokyo/paper/antixray/DataBitsReader.java b/src/main/java/com/destroystokyo/paper/antixray/DataBitsReader.java
new file mode 100644
index 000000000..cc586827a
index 0000000000..cc586827aa
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/antixray/DataBitsReader.java
@@ -0,0 +0,0 @@
@ -958,7 +960,7 @@ index 000000000..cc586827a
+}
diff --git a/src/main/java/com/destroystokyo/paper/antixray/DataBitsWriter.java b/src/main/java/com/destroystokyo/paper/antixray/DataBitsWriter.java
new file mode 100644
index 000000000..37093419c
index 0000000000..37093419cf
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/antixray/DataBitsWriter.java
@@ -0,0 +0,0 @@
@ -1047,7 +1049,7 @@ index 000000000..37093419c
+ }
+}
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
index 8b8083093..358934455 100644
index eed37198b0..b88d232c85 100644
--- a/src/main/java/net/minecraft/server/Chunk.java
+++ b/src/main/java/net/minecraft/server/Chunk.java
@@ -0,0 +0,0 @@ public class Chunk implements IChunkAccess {
@ -1069,7 +1071,7 @@ index 8b8083093..358934455 100644
this.initLighting();
}
diff --git a/src/main/java/net/minecraft/server/ChunkRegionLoader.java b/src/main/java/net/minecraft/server/ChunkRegionLoader.java
index 54840851b..0f1423c9a 100644
index 68a3169c31..6a33bbb231 100644
--- a/src/main/java/net/minecraft/server/ChunkRegionLoader.java
+++ b/src/main/java/net/minecraft/server/ChunkRegionLoader.java
@@ -0,0 +0,0 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver {
@ -1091,7 +1093,7 @@ index 54840851b..0f1423c9a 100644
chunksection.getBlocks().a(nbttagcompound, "Palette", "BlockStates");
chunksection.a(new NibbleArray(nbttagcompound.getByteArray("BlockLight")));
diff --git a/src/main/java/net/minecraft/server/ChunkSection.java b/src/main/java/net/minecraft/server/ChunkSection.java
index 233cbb6d6..8c116b74c 100644
index 233cbb6d60..8c116b74c5 100644
--- a/src/main/java/net/minecraft/server/ChunkSection.java
+++ b/src/main/java/net/minecraft/server/ChunkSection.java
@@ -0,0 +0,0 @@ public class ChunkSection {
@ -1112,29 +1114,29 @@ index 233cbb6d6..8c116b74c 100644
if (flag) {
this.skyLight = new NibbleArray();
diff --git a/src/main/java/net/minecraft/server/ChunkTaskScheduler.java b/src/main/java/net/minecraft/server/ChunkTaskScheduler.java
index ed20454d0..2b14e0051 100644
index 99e752ddd6..c2dd61248d 100644
--- a/src/main/java/net/minecraft/server/ChunkTaskScheduler.java
+++ b/src/main/java/net/minecraft/server/ChunkTaskScheduler.java
@@ -0,0 +0,0 @@ public class ChunkTaskScheduler extends Scheduler<ChunkCoordIntPair, ChunkStatus
// CraftBukkit start
public void forcePolluteCache(ChunkCoordIntPair chunkcoordintpair) {
- this.g.put(chunkcoordintpair.a(), new Scheduler.a(chunkcoordintpair, new ProtoChunk(chunkcoordintpair, ChunkConverter.a), ChunkStatus.EMPTY));
+ this.g.put(chunkcoordintpair.a(), new Scheduler.a(chunkcoordintpair, new ProtoChunk(chunkcoordintpair, ChunkConverter.a, this.getWorld()), ChunkStatus.EMPTY)); // Paper - Anti-Xray
- this.progressCache.put(chunkcoordintpair.a(), new Scheduler.a(chunkcoordintpair, new ProtoChunk(chunkcoordintpair, ChunkConverter.a), ChunkStatus.EMPTY));
+ this.progressCache.put(chunkcoordintpair.a(), new Scheduler.a(chunkcoordintpair, new ProtoChunk(chunkcoordintpair, ChunkConverter.a, this.getWorld()), ChunkStatus.EMPTY)); // Paper - Anti-Xray
}
// CraftBukkit end
@@ -0,0 +0,0 @@ public class ChunkTaskScheduler extends Scheduler<ChunkCoordIntPair, ChunkStatus
protochunk.setLastSaved(this.c.getTime());
return new Scheduler.a(chunkcoordintpair, protochunk, protochunk.i());
} else {
- return new Scheduler.a(chunkcoordintpair, new ProtoChunk(chunkcoordintpair, ChunkConverter.a), ChunkStatus.EMPTY);
+ return new Scheduler.a(chunkcoordintpair, new ProtoChunk(chunkcoordintpair, ChunkConverter.a, this.getWorld()), ChunkStatus.EMPTY); // Paper - Anti-Xray
}
});
}
protochunk.setLastSaved(this.c.getTime());
return new Scheduler.a(chunkcoordintpair, protochunk, protochunk.i());
} else {
- return new Scheduler.a(chunkcoordintpair, new ProtoChunk(chunkcoordintpair, ChunkConverter.a), ChunkStatus.EMPTY);
+ return new Scheduler.a(chunkcoordintpair, new ProtoChunk(chunkcoordintpair, ChunkConverter.a, this.getWorld()), ChunkStatus.EMPTY); // Paper - Anti-Xray
}
}) : (Scheduler.a) this.progressCache.get(chunkcoordintpair.a());
}
diff --git a/src/main/java/net/minecraft/server/DataPaletteBlock.java b/src/main/java/net/minecraft/server/DataPaletteBlock.java
index 575f9b558..5d2561a94 100644
index 575f9b5587..5d2561a946 100644
--- a/src/main/java/net/minecraft/server/DataPaletteBlock.java
+++ b/src/main/java/net/minecraft/server/DataPaletteBlock.java
@@ -0,0 +0,0 @@
@ -1271,7 +1273,7 @@ index 575f9b558..5d2561a94 100644
int j = along.length * 64 / 4096;
diff --git a/src/main/java/net/minecraft/server/NetworkManager.java b/src/main/java/net/minecraft/server/NetworkManager.java
index f8facddb4..b2afec5e4 100644
index f8facddb40..b2afec5e4b 100644
--- a/src/main/java/net/minecraft/server/NetworkManager.java
+++ b/src/main/java/net/minecraft/server/NetworkManager.java
@@ -0,0 +0,0 @@ public class NetworkManager extends SimpleChannelInboundHandler<Packet<?>> {
@ -1332,7 +1334,7 @@ index f8facddb4..b2afec5e4 100644
public void a() {
this.o();
diff --git a/src/main/java/net/minecraft/server/PacketPlayOutMapChunk.java b/src/main/java/net/minecraft/server/PacketPlayOutMapChunk.java
index 9787f5b06..d666685c5 100644
index 6321010246..d0ff96812e 100644
--- a/src/main/java/net/minecraft/server/PacketPlayOutMapChunk.java
+++ b/src/main/java/net/minecraft/server/PacketPlayOutMapChunk.java
@@ -0,0 +0,0 @@
@ -1421,7 +1423,7 @@ index 9787f5b06..d666685c5 100644
if (flag) {
packetdataserializer.writeBytes(chunksection.getSkyLightArray().asBytes());
diff --git a/src/main/java/net/minecraft/server/PlayerChunk.java b/src/main/java/net/minecraft/server/PlayerChunk.java
index fcd9f5491..346367b68 100644
index f8d8a44a88..e7d465fb8a 100644
--- a/src/main/java/net/minecraft/server/PlayerChunk.java
+++ b/src/main/java/net/minecraft/server/PlayerChunk.java
@@ -0,0 +0,0 @@ public class PlayerChunk {
@ -1452,7 +1454,7 @@ index fcd9f5491..346367b68 100644
} else {
this.a((Packet) (new PacketPlayOutMultiBlockChange(this.dirtyCount, this.dirtyBlocks, this.chunk)));
diff --git a/src/main/java/net/minecraft/server/PlayerInteractManager.java b/src/main/java/net/minecraft/server/PlayerInteractManager.java
index 4a439ef4c..063f2b920 100644
index cae24961fd..a9690fb1c3 100644
--- a/src/main/java/net/minecraft/server/PlayerInteractManager.java
+++ b/src/main/java/net/minecraft/server/PlayerInteractManager.java
@@ -0,0 +0,0 @@ public class PlayerInteractManager {
@ -1465,7 +1467,7 @@ index 4a439ef4c..063f2b920 100644
public void a(BlockPosition blockposition) {
diff --git a/src/main/java/net/minecraft/server/ProtoChunk.java b/src/main/java/net/minecraft/server/ProtoChunk.java
index 584a86c11..62a7d3c23 100644
index 541435d3e5..0b4f0d2414 100644
--- a/src/main/java/net/minecraft/server/ProtoChunk.java
+++ b/src/main/java/net/minecraft/server/ProtoChunk.java
@@ -0,0 +0,0 @@ public class ProtoChunk implements IChunkAccess {
@ -1494,6 +1496,24 @@ index 584a86c11..62a7d3c23 100644
this.d = new AtomicInteger();
this.f = Maps.newEnumMap(HeightMap.Type.class);
this.g = ChunkStatus.EMPTY;
@@ -0,0 +0,0 @@ public class ProtoChunk implements IChunkAccess {
IRegistry iregistry1 = IRegistry.BLOCK;
IRegistry.BLOCK.getClass();
- this.q = new ProtoChunkTickList(predicate, function, iregistry1::getOrDefault, chunkcoordintpair);
+ this.q = new ProtoChunkTickList<Block>(predicate, function, IRegistry.BLOCK::getOrDefault, chunkcoordintpair); // Paper - decompile fix
predicate = (fluidtype) -> {
return fluidtype == null || fluidtype == FluidTypes.a;
};
@@ -0,0 +0,0 @@ public class ProtoChunk implements IChunkAccess {
function = iregistry::getKey;
iregistry1 = IRegistry.FLUID;
IRegistry.FLUID.getClass();
- this.r = new ProtoChunkTickList(predicate, function, iregistry1::getOrDefault, chunkcoordintpair);
+ this.r = new ProtoChunkTickList<FluidType>(predicate, function, IRegistry.FLUID::getOrDefault, chunkcoordintpair); // Paper - decompile fix
}
public static ShortList a(ShortList[] ashortlist, int i) {
@@ -0,0 +0,0 @@ public class ProtoChunk implements IChunkAccess {
return iblockdata;
}
@ -1513,7 +1533,7 @@ index 584a86c11..62a7d3c23 100644
if (enumskyblock == EnumSkyBlock.SKY) {
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index a4d9f0d5f..7b694efb6 100644
index 2a7abae942..17b5ef00f5 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -0,0 +0,0 @@
@ -1525,7 +1545,7 @@ index a4d9f0d5f..7b694efb6 100644
import com.destroystokyo.paper.event.server.ServerExceptionEvent;
import com.destroystokyo.paper.exception.ServerInternalException;
import com.google.common.base.MoreObjects;
@@ -0,0 +0,0 @@ public abstract class World implements GeneratorAccess, IIBlockAccess, AutoClose
@@ -0,0 +0,0 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc
public final org.spigotmc.SpigotWorldConfig spigotConfig; // Spigot
public final com.destroystokyo.paper.PaperWorldConfig paperConfig; // Paper
@ -1533,15 +1553,15 @@ index a4d9f0d5f..7b694efb6 100644
public final co.aikar.timings.WorldTimingsHandler timings; // Paper
public boolean guardEntityList; // Spigot // Paper - public
@@ -0,0 +0,0 @@ public abstract class World implements GeneratorAccess, IIBlockAccess, AutoClose
protected World(IDataManager idatamanager, WorldData worlddata, WorldProvider worldprovider, MethodProfiler methodprofiler, boolean flag, ChunkGenerator gen, org.bukkit.World.Environment env) {
@@ -0,0 +0,0 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc
protected World(IDataManager idatamanager, @Nullable PersistentCollection persistentcollection, WorldData worlddata, WorldProvider worldprovider, MethodProfiler methodprofiler, boolean flag, ChunkGenerator gen, org.bukkit.World.Environment env) {
this.spigotConfig = new org.spigotmc.SpigotWorldConfig( worlddata.getName() ); // Spigot
this.paperConfig = new com.destroystokyo.paper.PaperWorldConfig(worlddata.getName(), this.spigotConfig); // Paper
+ this.chunkPacketBlockController = this.paperConfig.antiXray ? new ChunkPacketBlockControllerAntiXray(this.paperConfig) : ChunkPacketBlockController.NO_OPERATION_INSTANCE; // Paper - Anti-Xray
this.generator = gen;
this.world = new CraftWorld((WorldServer) this, gen, env);
this.ticksPerAnimalSpawns = this.getServer().getTicksPerAnimalSpawns(); // CraftBukkit
@@ -0,0 +0,0 @@ public abstract class World implements GeneratorAccess, IIBlockAccess, AutoClose
@@ -0,0 +0,0 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc
// CraftBukkit end
IBlockData iblockdata1 = chunk.a(blockposition, iblockdata, (i & 64) != 0);
@ -1550,7 +1570,7 @@ index a4d9f0d5f..7b694efb6 100644
if (iblockdata1 == null) {
// CraftBukkit start - remove blockstate if failed
diff --git a/src/main/java/org/bukkit/craftbukkit/generator/CraftChunkData.java b/src/main/java/org/bukkit/craftbukkit/generator/CraftChunkData.java
index c26f0ed16..f6915d32a 100644
index c26f0ed16b..f6915d32ab 100644
--- a/src/main/java/org/bukkit/craftbukkit/generator/CraftChunkData.java
+++ b/src/main/java/org/bukkit/craftbukkit/generator/CraftChunkData.java
@@ -0,0 +0,0 @@ import org.bukkit.material.MaterialData;

Datei anzeigen

@ -5,12 +5,12 @@ Subject: [PATCH] AnvilDamageEvent
diff --git a/src/main/java/net/minecraft/server/ContainerAnvil.java b/src/main/java/net/minecraft/server/ContainerAnvil.java
index fb3413d81..3b23ef986 100644
index f2e15fa545..96fcd35bfe 100644
--- a/src/main/java/net/minecraft/server/ContainerAnvil.java
+++ b/src/main/java/net/minecraft/server/ContainerAnvil.java
@@ -0,0 +0,0 @@ public class ContainerAnvil extends Container {
if (!world.isClientSide) {
if (!entityhuman.abilities.canInstantlyBuild && iblockdata.a(TagsBlock.y) && entityhuman.getRandom().nextFloat() < 0.12F) {
if (!entityhuman.abilities.canInstantlyBuild && iblockdata.a(TagsBlock.ANVIL) && entityhuman.getRandom().nextFloat() < 0.12F) {
IBlockData iblockdata1 = BlockAnvil.a_(iblockdata);
+ // Paper start
+ com.destroystokyo.paper.event.block.AnvilDamagedEvent event = new com.destroystokyo.paper.event.block.AnvilDamagedEvent(getBukkitView(), iblockdata1 != null ? org.bukkit.craftbukkit.block.data.CraftBlockData.fromData(iblockdata1) : null);

Datei anzeigen

@ -14,7 +14,7 @@ completion, such as offline players.
Also adds isCommand and getLocation to the sync TabCompleteEvent
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index 60d9f5706a..a912fb3414 100644
index 5ffe4b374e..93807ffa62 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -0,0 +0,0 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
@ -29,8 +29,16 @@ index 60d9f5706a..a912fb3414 100644
+ minecraftServer.postToMainThread(() -> this.disconnect(new ChatMessage("disconnect.spam", new Object[0]))); // Paper
return;
}
- // CraftBukkit end
- ParseResults parseresults = this.minecraftServer.getCommandDispatcher().a().parse(packetplayintabcomplete.c(), this.player.getCommandListener());
// CraftBukkit end
@@ -0,0 +0,0 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
stringreader.skip();
}
- ParseResults parseresults = this.minecraftServer.getCommandDispatcher().a().parse(stringreader, this.player.getCommandListener());
-
- this.minecraftServer.getCommandDispatcher().a().getCompletionSuggestions(parseresults).thenAccept((suggestions) -> {
- if (((Suggestions) suggestions).isEmpty()) return; // CraftBukkit - don't send through empty suggestions - prevents [<args>] from showing for plugins with nothing more to offer
- this.networkManager.sendPacket(new PacketPlayOutTabComplete(packetplayintabcomplete.b(), (Suggestions) suggestions)); // CraftBukkit - decompile error
+ // Paper start
+ com.destroystokyo.paper.event.server.AsyncTabCompleteEvent event;
+ java.util.List<String> completions = new java.util.ArrayList<>();
@ -65,10 +73,7 @@ index 60d9f5706a..a912fb3414 100644
+ minecraftServer.postToMainThread(() -> sendSuggestions(packetplayintabcomplete, null));
+ }
+ public void sendSuggestions(PacketPlayInTabComplete packetplayintabcomplete, java.util.List<String> otherSuggestions) {
- this.minecraftServer.getCommandDispatcher().a().getCompletionSuggestions(parseresults).thenAccept((suggestions) -> {
- if (((Suggestions) suggestions).isEmpty()) return; // CraftBukkit - don't send through empty suggestions - prevents [<args>] from showing for plugins with nothing more to offer
- this.networkManager.sendPacket(new PacketPlayOutTabComplete(packetplayintabcomplete.b(), (Suggestions) suggestions)); // CraftBukkit - decompile error
+
+ ParseResults parseresults = this.minecraftServer.getCommandDispatcher().a().parse(packetplayintabcomplete.c(), this.player.getCommandListener());
+ //noinspection unchecked
+ java.util.concurrent.CompletableFuture<Suggestions> completionSuggestions = this.minecraftServer.getCommandDispatcher().a().getCompletionSuggestions(parseresults);
@ -85,7 +90,7 @@ index 60d9f5706a..a912fb3414 100644
}
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 3d4bb6d8c9..b5fd412b74 100644
index 0eea57eb7d..99f4b40f7f 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -0,0 +0,0 @@ public final class CraftServer implements Server {

Datei anzeigen

@ -32,7 +32,7 @@ index aa0e3c757d..c1845d6811 100644
+ }
}
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
index ec6b550ff6..499230af60 100644
index 547ab09627..78a3188274 100644
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
@@ -0,0 +0,0 @@ package com.destroystokyo.paper;
@ -64,30 +64,30 @@ index ec6b550ff6..499230af60 100644
+ }
}
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
index ace64c0345..229215180b 100644
index 2efb870dd6..6c766f2bf7 100644
--- a/src/main/java/net/minecraft/server/Chunk.java
+++ b/src/main/java/net/minecraft/server/Chunk.java
@@ -0,0 +0,0 @@ public class Chunk implements IChunkAccess {
private final TickList<Block> t;
private final TickList<FluidType> u;
private boolean v;
- private boolean w;
+ private boolean w; public boolean hasEntities() { return w; } // Paper - OBFHELPER
private final TickList<Block> s;
private final TickList<FluidType> t;
private boolean u;
- private boolean v;
+ private boolean v;public boolean hasEntities() { return v; } // Paper - OBFHELPER
private long lastSaved;
- private boolean y;
+ private boolean y; public boolean isModified() { return y; } // Paper - OBFHELPER
private int z;
private long A; public long getInhabitedTime() { return A; } // Paper - OBFHELPER
private int B;
- private boolean x;
+ private boolean x; public boolean isModified() { return x; } // Paper - OBFHELPER
private int y;
private long z;
private int A;
@@ -0,0 +0,0 @@ public class Chunk implements IChunkAccess {
if (this.w && this.world.getTime() != this.lastSaved || this.y) {
if (this.v && this.world.getTime() != this.lastSaved || this.x) {
return true;
}
- } else if (this.w && this.world.getTime() >= this.lastSaved + MinecraftServer.getServer().autosavePeriod * 4) { // Spigot - Only save if we've passed 2 auto save intervals without modification
- } else if (this.v && this.world.getTime() >= this.lastSaved + MinecraftServer.getServer().autosavePeriod * 4) { // Spigot - Only save if we've passed 2 auto save intervals without modification
- return true;
}
-
- return this.y;
- return this.x;
+ // Paper start - Make world configurable and incremental
+ // This !flag section should say if isModified or hasEntities, then check auto save
+ return ((isModified() || hasEntities()) && this.world.getTime() >= this.lastSaved + world.paperConfig.autoSavePeriod);
@ -96,39 +96,32 @@ index ace64c0345..229215180b 100644
public boolean isEmpty() {
diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java
index a5139b0b0d..aa8d25e765 100644
index 53dc1322e8..90840e4709 100644
--- a/src/main/java/net/minecraft/server/ChunkProviderServer.java
+++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java
@@ -0,0 +0,0 @@
package net.minecraft.server;
+import com.destroystokyo.paper.PaperConfig;
import com.google.common.collect.Lists;
import it.unimi.dsi.fastutil.longs.Long2ObjectMap;
import it.unimi.dsi.fastutil.longs.Long2ObjectMaps;
@@ -0,0 +0,0 @@ public class ChunkProviderServer implements IChunkProvider {
this.saveChunk(chunk, false); // Spigot
chunk.a(false);
++i;
- if (i == 24 && !flag && false) { // Spigot
+ if (!flag && i >= world.paperConfig.maxAutoSaveChunksPerTick) { // Spigot - // Paper - Incremental Auto Save - cap max per tick
return false;
this.saveChunk(chunk, false); // Spigot
chunk.a(false);
++i;
- if (i == 24 && !flag && false) { // Spigot
+ if (!flag && i >= world.paperConfig.maxAutoSaveChunksPerTick) { // Spigot - // Paper - Incremental Auto Save - cap max
return false;
}
}
}
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
index bdd1fef710..9c04fa4a6f 100644
index 96d7be49d8..2c4fc9f3e6 100644
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
@@ -0,0 +0,0 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
private static final Logger cc = LogManager.getLogger();
private static final IChatBaseComponent cd = (new ChatMessage("multiplayer.message_not_delivered", new Object[0])).a(EnumChatFormat.RED);
public String locale = null; // CraftBukkit - lowercase // Paper - default to null
+ public long lastSave = MinecraftServer.currentTick; // Paper
public PlayerConnection playerConnection;
public final MinecraftServer server;
public final PlayerInteractManager playerInteractManager;
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index e3469cacff..02daa43c68 100644
index 25946d2d79..ee13260af7 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -0,0 +0,0 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati
@ -140,7 +133,7 @@ index e3469cacff..02daa43c68 100644
public java.util.Queue<Runnable> processQueue = new java.util.concurrent.ConcurrentLinkedQueue<Runnable>();
public int autosavePeriod;
@@ -0,0 +0,0 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati
this.n.b().a(agameprofile);
this.m.b().a(agameprofile);
}
- if (autosavePeriod > 0 && this.ticks % autosavePeriod == 0) { // CraftBukkit
@ -161,7 +154,7 @@ index e3469cacff..02daa43c68 100644
// and causes the main thread to sleep for random amounts of time depending on chunk activity
// Also pass flag to only save modified chunks
server.playerCommandState = true;
for (World world : worlds) {
for (World world : getWorlds()) {
- world.getWorld().save(false);
+ if (world.paperConfig.autoSavePeriod > 0) world.getWorld().save(false); // Paper - Incremental / Configurable Auto Saving
}
@ -173,9 +166,9 @@ index e3469cacff..02daa43c68 100644
+ //} // Paper - Incremental Auto Saving
this.methodProfiler.a("snooper");
if (getSnooperEnabled() && !this.j.d() && this.ticks > 100) { // Spigot
if (getSnooperEnabled() && !this.i.d() && this.ticks > 100) { // Spigot
diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
index d0c547cc99..12f6812d67 100644
index 02dbb8c6c3..73d72ef7e3 100644
--- a/src/main/java/net/minecraft/server/PlayerList.java
+++ b/src/main/java/net/minecraft/server/PlayerList.java
@@ -0,0 +0,0 @@ public abstract class PlayerList {
@ -214,13 +207,13 @@ index d0c547cc99..12f6812d67 100644
public WhiteList getWhitelist() {
return this.whitelist;
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
index 96002184bb..bf07155bc1 100644
index 4be3a6ae94..59b5a04581 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java
+++ b/src/main/java/net/minecraft/server/WorldServer.java
@@ -0,0 +0,0 @@ public class WorldServer extends World implements IAsyncTaskHandler {
ChunkProviderServer chunkproviderserver = this.getChunkProviderServer();
if (chunkproviderserver.e()) {
if (chunkproviderserver.d()) {
- org.bukkit.Bukkit.getPluginManager().callEvent(new org.bukkit.event.world.WorldSaveEvent(getWorld())); // CraftBukkit
+ if (flag) org.bukkit.Bukkit.getPluginManager().callEvent(new org.bukkit.event.world.WorldSaveEvent(getWorld())); // CraftBukkit // Paper - Incremental Auto Saving - Only fire event on full save
timings.worldSave.startTiming(); // Paper

Datei anzeigen

@ -6,7 +6,7 @@ Subject: [PATCH] Auto fix bad Y levels on player login
Bring down to a saner Y level if super high, as this can cause the server to crash
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
index 9c04fa4a6f..9bb70c151d 100644
index 2c4fc9f3e6..47cf068a1e 100644
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
@@ -0,0 +0,0 @@ public class EntityPlayer extends EntityHuman implements ICrafting {

Datei anzeigen

@ -10,7 +10,7 @@ to the object directly on the Entity/TileEntity object we can directly grab.
Use that local value instead to reduce lookups in many hot places.
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
index d2e87693fa..1997cbdc65 100644
index 5599025d66..37716447c2 100644
--- a/src/main/java/net/minecraft/server/Chunk.java
+++ b/src/main/java/net/minecraft/server/Chunk.java
@@ -0,0 +0,0 @@ public class Chunk implements IChunkAccess {
@ -22,10 +22,10 @@ index d2e87693fa..1997cbdc65 100644
this.a(entity, entity.af);
}
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index 852977cab3..fbca973225 100644
index 32c8fb4531..27d84e3ba9 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -0,0 +0,0 @@ public abstract class World implements GeneratorAccess, IIBlockAccess, AutoClose
@@ -0,0 +0,0 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc
int j;
// Paper start - Set based removal lists
for (Entity e : this.g) {
@ -42,7 +42,7 @@ index 852977cab3..fbca973225 100644
}
for (Entity e : this.g) {
@@ -0,0 +0,0 @@ public abstract class World implements GeneratorAccess, IIBlockAccess, AutoClose
@@ -0,0 +0,0 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc
this.methodProfiler.e();
this.methodProfiler.a("remove");
if (entity.dead) {
@ -61,7 +61,7 @@ index 852977cab3..fbca973225 100644
guardEntityList = false; // Spigot
this.entityList.remove(this.tickPosition--); // CraftBukkit - Use field for loop variable
@@ -0,0 +0,0 @@ public abstract class World implements GeneratorAccess, IIBlockAccess, AutoClose
@@ -0,0 +0,0 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc
BlockPosition blockposition = tileentity.getPosition();
// Paper start - Skip ticking in chunks scheduled for unload
@ -69,8 +69,8 @@ index 852977cab3..fbca973225 100644
+ net.minecraft.server.Chunk chunk = tileentity.getCurrentChunk();
boolean shouldTick = chunk != null;
if(this.paperConfig.skipEntityTickingInChunksScheduledForUnload)
shouldTick = shouldTick && !chunk.isUnloading() && chunk.scheduledForUnload == null;
@@ -0,0 +0,0 @@ public abstract class World implements GeneratorAccess, IIBlockAccess, AutoClose
shouldTick = shouldTick && chunk.scheduledForUnload == null;
@@ -0,0 +0,0 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc
tilesThisCycle--;
this.tileEntityListTick.remove(tileTickPosition--);
//this.tileEntityList.remove(tileentity); // Paper - remove unused list

Datei anzeigen

@ -6,7 +6,7 @@ Subject: [PATCH] Avoid blocking on Network Manager creation
Per Paper issue 294
diff --git a/src/main/java/net/minecraft/server/ServerConnection.java b/src/main/java/net/minecraft/server/ServerConnection.java
index be8d07f41e..9808561eb3 100644
index 9cff011dac..f04ce2fb03 100644
--- a/src/main/java/net/minecraft/server/ServerConnection.java
+++ b/src/main/java/net/minecraft/server/ServerConnection.java
@@ -0,0 +0,0 @@ public class ServerConnection {

Datei anzeigen

@ -14,7 +14,7 @@ And since minecart hoppers are used _very_ rarely near we can avoid alot of sear
Combined, this adds up a lot.
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
index 01401c4447..57ebd1e77a 100644
index d2412624e1..ef09ac7873 100644
--- a/src/main/java/net/minecraft/server/Chunk.java
+++ b/src/main/java/net/minecraft/server/Chunk.java
@@ -0,0 +0,0 @@ public class Chunk implements IChunkAccess {

Datei anzeigen

@ -5,7 +5,7 @@ Subject: [PATCH] Avoid item merge if stack size above max stack size
diff --git a/src/main/java/net/minecraft/server/EntityItem.java b/src/main/java/net/minecraft/server/EntityItem.java
index d232bab745..b0f22f8f09 100644
index 946e59753e..f596b4351b 100644
--- a/src/main/java/net/minecraft/server/EntityItem.java
+++ b/src/main/java/net/minecraft/server/EntityItem.java
@@ -0,0 +0,0 @@ public class EntityItem extends Entity {

Datei anzeigen

@ -403,7 +403,7 @@ index 0000000000..3aceb0ea8a
+ }
+}
diff --git a/src/main/java/net/minecraft/server/MCUtil.java b/src/main/java/net/minecraft/server/MCUtil.java
index 381542e0d2..80927de08b 100644
index 966309a07d..e36e2e0a31 100644
--- a/src/main/java/net/minecraft/server/MCUtil.java
+++ b/src/main/java/net/minecraft/server/MCUtil.java
@@ -0,0 +0,0 @@
@ -428,7 +428,7 @@ index 381542e0d2..80927de08b 100644
* Calculates distance between 2 entities
* @param e1
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 5635997d0b..02b6218807 100644
index 6aec7c31e3..014c923897 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -0,0 +0,0 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati
@ -444,8 +444,8 @@ index 5635997d0b..02b6218807 100644
this.G = i;
}
+ public MinecraftSessionService getSessionService() { return ar(); } // Paper - OBFHELPER
public MinecraftSessionService ar() {
+ public MinecraftSessionService getSessionService() { return ap(); } // Paper - OBFHELPER
public MinecraftSessionService ap() {
return this.V;
}
diff --git a/src/main/java/net/minecraft/server/UserCache.java b/src/main/java/net/minecraft/server/UserCache.java
@ -485,7 +485,7 @@ index a47a51a412..4c476f757c 100644
private UserCacheEntry(GameProfile gameprofile, Date date) {
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 42b3447a1a..3d4bb6d8c9 100644
index 5c48430313..0eea57eb7d 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -0,0 +0,0 @@ import org.bukkit.craftbukkit.util.CraftNamespacedKey;

Datei anzeigen

@ -12,7 +12,7 @@ This disables that by not saving the thrower when the chunk is unloaded.
This is mainly useful for survival servers that do not allow freeform teleporting.
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
index 9daa8f66a1..3467da7c8e 100644
index 9ff73d531c..16e601f7e9 100644
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
@@ -0,0 +0,0 @@ public class PaperWorldConfig {

Datei anzeigen

@ -5,7 +5,7 @@ Subject: [PATCH] Block player logins during server shutdown
diff --git a/src/main/java/net/minecraft/server/LoginListener.java b/src/main/java/net/minecraft/server/LoginListener.java
index fae8a13973..005efbc111 100644
index 19ac21e385..8bbea96240 100644
--- a/src/main/java/net/minecraft/server/LoginListener.java
+++ b/src/main/java/net/minecraft/server/LoginListener.java
@@ -0,0 +0,0 @@ public class LoginListener implements PacketLoginInListener, ITickable {

Datei anzeigen

@ -11,19 +11,19 @@ that is outside happens to be closer, but unreachable, yet another reachable
one is in border that would of been missed.
diff --git a/src/main/java/net/minecraft/server/StructureGenerator.java b/src/main/java/net/minecraft/server/StructureGenerator.java
index 263ea953ad..8b8b468f39 100644
index 142655c57e..6c2899e84d 100644
--- a/src/main/java/net/minecraft/server/StructureGenerator.java
+++ b/src/main/java/net/minecraft/server/StructureGenerator.java
@@ -0,0 +0,0 @@ public abstract class StructureGenerator<C extends WorldGenFeatureConfiguration>
if (flag || flag1) {
if (flag1 || flag2) {
ChunkCoordIntPair chunkcoordintpair = this.a(chunkgenerator, seededrandom, j, k, i1, j1);
+ if (!world.getWorldBorder().isChunkInBounds(chunkcoordintpair.x, chunkcoordintpair.z)) { continue; } // Paper
StructureStart structurestart = this.a(world, chunkgenerator, seededrandom, chunkcoordintpair.a());
if (structurestart != StructureGenerator.a) {
diff --git a/src/main/java/net/minecraft/server/WorldBorder.java b/src/main/java/net/minecraft/server/WorldBorder.java
index ec5386fd50..08424a88bf 100644
index 1a87480f09..057ea1c5ac 100644
--- a/src/main/java/net/minecraft/server/WorldBorder.java
+++ b/src/main/java/net/minecraft/server/WorldBorder.java
@@ -0,0 +0,0 @@ public class WorldBorder {

Datei anzeigen

@ -22,7 +22,7 @@ to take the burden of this into their own hand without having to rely on
plugins doing unsafe things.
diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java
index c457d0711..046bf33f6 100644
index c457d07110..046bf33f66 100644
--- a/src/main/java/com/destroystokyo/paper/PaperConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java
@@ -0,0 +0,0 @@ public class PaperConfig {
@ -45,7 +45,7 @@ index c457d0711..046bf33f6 100644
+ }
}
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index f7401f5c9..6ebc0a95e 100644
index 66e01b8131..b7949ac256 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -0,0 +0,0 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {

Datei anzeigen

@ -133,7 +133,7 @@ index 0000000000..35104542c5
+ }
+}
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index 41a951d580..03d54a7ef4 100644
index de34a70e9b..5e87ee9726 100644
--- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java
@@ -0,0 +0,0 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
@ -145,7 +145,7 @@ index 41a951d580..03d54a7ef4 100644
public float length;
public float J;
diff --git a/src/main/java/net/minecraft/server/EntityInsentient.java b/src/main/java/net/minecraft/server/EntityInsentient.java
index 903434e5f4..68765d2aad 100644
index 4a8c3a428d..8f610c013a 100644
--- a/src/main/java/net/minecraft/server/EntityInsentient.java
+++ b/src/main/java/net/minecraft/server/EntityInsentient.java
@@ -0,0 +0,0 @@ public abstract class EntityInsentient extends EntityLiving {
@ -170,23 +170,23 @@ index 79e52f7bac..42f6a6a93a 100644
return this.e;
}
diff --git a/src/main/java/net/minecraft/server/SpawnerCreature.java b/src/main/java/net/minecraft/server/SpawnerCreature.java
index f525fd1b42..2f20dfcfcf 100644
index 32808558bb..0a57b26551 100644
--- a/src/main/java/net/minecraft/server/SpawnerCreature.java
+++ b/src/main/java/net/minecraft/server/SpawnerCreature.java
@@ -0,0 +0,0 @@ public final class SpawnerCreature {
// CraftBukkit end
if ((!enumcreaturetype.c() || flag1) && (enumcreaturetype.c() || flag) && (!enumcreaturetype.d() || flag2)) {
- k = worldserver.a(enumcreaturetype.a());
+ k = worldserver.entityList.getCreatureCount(enumcreaturetype); // Paper - entity count cache
int l1 = limit * i / b; // CraftBukkit - use per-world limits
k = limit * i / SpawnerCreature.b; // CraftBukkit - use per-world limits
- int l1 = worldserver.a(enumcreaturetype.a(), k);
+ int l1 = k = worldserver.entityList.getCreatureCount(enumcreaturetype); // Paper - entity count cache
if (k <= l1) {
if (l1 <= k) {
BlockPosition.MutableBlockPosition blockposition_mutableblockposition = new BlockPosition.MutableBlockPosition();
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index 004c3ec474..16d0c0d45b 100644
index 4ea31bc201..abf3796d91 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -0,0 +0,0 @@ public abstract class World implements GeneratorAccess, IIBlockAccess, AutoClose
@@ -0,0 +0,0 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc
private static final EnumDirection[] a = EnumDirection.values();
private int b = 63;
// Spigot start - guard entity list from removals
@ -196,15 +196,15 @@ index 004c3ec474..16d0c0d45b 100644
{
@Override
public Entity remove(int index)
@@ -0,0 +0,0 @@ public abstract class World implements GeneratorAccess, IIBlockAccess, AutoClose
@@ -0,0 +0,0 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc
}
}
};
+ */ // Paper end
// Spigot end
protected final Set<Entity> g = Sets.newHashSet(); public Set<Entity> getEntityUnloadQueue() { return g; };// Paper - OBFHELPER
protected final Set<Entity> g = com.google.common.collect.Sets.newHashSet(); public Set<Entity> getEntityUnloadQueue() { return g; };// Paper - OBFHELPER
//public final List<TileEntity> tileEntityList = Lists.newArrayList(); // Paper - remove unused list
@@ -0,0 +0,0 @@ public abstract class World implements GeneratorAccess, IIBlockAccess, AutoClose
@@ -0,0 +0,0 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc
public final com.destroystokyo.paper.PaperWorldConfig paperConfig; // Paper
public final co.aikar.timings.WorldTimingsHandler timings; // Paper
@ -213,7 +213,7 @@ index 004c3ec474..16d0c0d45b 100644
public static boolean haveWeSilencedAPhysicsCrash;
public static String blockLocation;
private org.spigotmc.TickLimiter entityLimiter;
@@ -0,0 +0,0 @@ public abstract class World implements GeneratorAccess, IIBlockAccess, AutoClose
@@ -0,0 +0,0 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc
this.getChunkAt(i, j).b(entity);
}
entity.shouldBeRemoved = true; // Paper

Datei anzeigen

@ -5,7 +5,7 @@ Subject: [PATCH] Cache user authenticator threads
diff --git a/src/main/java/net/minecraft/server/LoginListener.java b/src/main/java/net/minecraft/server/LoginListener.java
index eb936a0445..fae8a13973 100644
index dea401c924..19ac21e385 100644
--- a/src/main/java/net/minecraft/server/LoginListener.java
+++ b/src/main/java/net/minecraft/server/LoginListener.java
@@ -0,0 +0,0 @@ public class LoginListener implements PacketLoginInListener, ITickable {
@ -22,7 +22,7 @@ index eb936a0445..fae8a13973 100644
public void initUUID()
{
@@ -0,0 +0,0 @@ public class LoginListener implements PacketLoginInListener, ITickable {
this.networkManager.sendPacket(new PacketLoginOutEncryptionBegin("", this.server.G().getPublic(), this.e));
this.networkManager.sendPacket(new PacketLoginOutEncryptionBegin("", this.server.E().getPublic(), this.e));
} else {
// Spigot start
- new Thread("User Authenticator #" + LoginListener.b.incrementAndGet()) {
@ -54,7 +54,7 @@ index eb936a0445..fae8a13973 100644
@@ -0,0 +0,0 @@ public class LoginListener implements PacketLoginInListener, ITickable {
return LoginListener.this.server.U() && socketaddress instanceof InetSocketAddress ? ((InetSocketAddress) socketaddress).getAddress() : null;
return LoginListener.this.server.S() && socketaddress instanceof InetSocketAddress ? ((InetSocketAddress) socketaddress).getAddress() : null;
}
- };
-

Datei anzeigen

@ -84,7 +84,7 @@ index 0000000000..74c012fd40
+
+}
diff --git a/src/main/java/net/minecraft/server/LegacyPingHandler.java b/src/main/java/net/minecraft/server/LegacyPingHandler.java
index 07c53f5057..91acfceec8 100644
index f7fbf1d76e..1ed2b193a5 100644
--- a/src/main/java/net/minecraft/server/LegacyPingHandler.java
+++ b/src/main/java/net/minecraft/server/LegacyPingHandler.java
@@ -0,0 +0,0 @@ import java.net.InetSocketAddress;
@ -104,7 +104,7 @@ index 07c53f5057..91acfceec8 100644
switch (i) {
case 0:
LegacyPingHandler.a.debug("Ping: (<1.3.x) from {}:{}", inetsocketaddress.getAddress(), Integer.valueOf(inetsocketaddress.getPort()));
- s = String.format("%s\u00a7%d\u00a7%d", new Object[] { minecraftserver.getMotd(), Integer.valueOf(minecraftserver.A()), Integer.valueOf(minecraftserver.B())});
- s = String.format("%s\u00a7%d\u00a7%d", new Object[] { minecraftserver.getMotd(), Integer.valueOf(minecraftserver.y()), Integer.valueOf(minecraftserver.z())});
+ // Paper start - Call PaperServerListPingEvent and use results
+ event = PaperLegacyStatusClient.processRequest(minecraftserver, inetsocketaddress, 39, null);
+ if (event == null) {
@ -122,7 +122,7 @@ index 07c53f5057..91acfceec8 100644
}
- LegacyPingHandler.a.debug("Ping: (1.4-1.5.x) from {}:{}", inetsocketaddress.getAddress(), Integer.valueOf(inetsocketaddress.getPort()));
- s = String.format("\u00a71\u0000%d\u0000%s\u0000%s\u0000%d\u0000%d", new Object[] { Integer.valueOf(127), minecraftserver.getVersion(), minecraftserver.getMotd(), Integer.valueOf(minecraftserver.A()), Integer.valueOf(minecraftserver.B())});
- s = String.format("\u00a71\u0000%d\u0000%s\u0000%s\u0000%d\u0000%d", new Object[] { Integer.valueOf(127), minecraftserver.getVersion(), minecraftserver.getMotd(), Integer.valueOf(minecraftserver.y()), Integer.valueOf(minecraftserver.z())});
+ // Paper start - Call PaperServerListPingEvent and use results
+ event = PaperLegacyStatusClient.processRequest(minecraftserver, inetsocketaddress, 61, null);
+ if (event == null) {

Datei anzeigen

@ -5,7 +5,7 @@ Subject: [PATCH] Call PortalCreateEvent for exit portals
diff --git a/src/main/java/net/minecraft/server/PortalTravelAgent.java b/src/main/java/net/minecraft/server/PortalTravelAgent.java
index 402d8d7d..72b85bf6 100644
index 5e899e05cf..20f2a9197c 100644
--- a/src/main/java/net/minecraft/server/PortalTravelAgent.java
+++ b/src/main/java/net/minecraft/server/PortalTravelAgent.java
@@ -0,0 +0,0 @@ public class PortalTravelAgent {
@ -50,7 +50,7 @@ index 402d8d7d..72b85bf6 100644
+ java.util.Map<BlockPosition, IBlockData> nmsBlocks = new java.util.LinkedHashMap<>(); // Paper
+
if (d0 < 0.0D) {
i1 = MathHelper.clamp(i1, 70, this.world.aa() - 10);
i1 = MathHelper.clamp(i1, 70, this.world.ab() - 10);
j5 = i1;
@@ -0,0 +0,0 @@ public class PortalTravelAgent {
l3 = j2 + (l2 - 1) * l5 - k2 * k5;

Datei anzeigen

@ -12,7 +12,7 @@ just as it does in Vanilla, but entity pushing logic will be capped.
You can set this to 0 to disable collisions.
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
index b95f259a9a..4991138dfe 100644
index 391cdd2fa5..8923454524 100644
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
@@ -0,0 +0,0 @@ public class PaperWorldConfig {
@ -27,7 +27,7 @@ index b95f259a9a..4991138dfe 100644
+ }
}
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index 3955884e10..33683301b2 100644
index a16fbd4579..cad4894000 100644
--- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java
@@ -0,0 +0,0 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
@ -39,7 +39,7 @@ index 3955884e10..33683301b2 100644
// Spigot end
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
index fdfef98a3f..5da05c0825 100644
index 1b8763f618..8c56eeb11c 100644
--- a/src/main/java/net/minecraft/server/EntityLiving.java
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
@@ -0,0 +0,0 @@ public abstract class EntityLiving extends Entity {

Datei anzeigen

@ -5,36 +5,24 @@ Subject: [PATCH] Change implementation of (tile)entity removal list
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index aed5e4330..f6d7070de 100644
index 8b90b13d15..9fb87914ff 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -0,0 +0,0 @@ import org.bukkit.event.block.BlockPhysicsEvent;
import org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason;
import org.bukkit.generator.ChunkGenerator;
// CraftBukkit end
-
+// Paper start
+import java.util.Set;
+import com.google.common.collect.Sets;
+// Paper end
public abstract class World implements GeneratorAccess, IIBlockAccess, AutoCloseable {
protected static final Logger e = LogManager.getLogger();
@@ -0,0 +0,0 @@ public abstract class World implements GeneratorAccess, IIBlockAccess, AutoClose
@@ -0,0 +0,0 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc
}
};
// Spigot end
- protected final List<Entity> g = Lists.newArrayList();
+ protected final Set<Entity> g = Sets.newHashSet(); // Paper
+ protected final Set<Entity> g = com.google.common.collect.Sets.newHashSet(); // Paper
public final List<TileEntity> tileEntityList = Lists.newArrayList();
public final List<TileEntity> tileEntityListTick = Lists.newArrayList();
private final List<TileEntity> c = Lists.newArrayList();
- private final List<TileEntity> tileEntityListUnload = Lists.newArrayList();
+ private final Set<TileEntity> tileEntityListUnload = Sets.newHashSet(); // Paper
+ private final Set<TileEntity> tileEntityListUnload = com.google.common.collect.Sets.newHashSet(); // Paper
public final List<EntityHuman> players = Lists.newArrayList();
public final List<Entity> k = Lists.newArrayList();
protected final IntHashMap<Entity> entitiesById = new IntHashMap();
@@ -0,0 +0,0 @@ public abstract class World implements GeneratorAccess, IIBlockAccess, AutoClose
@@ -0,0 +0,0 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc
this.entityList.removeAll(this.g);
int j;

Datei anzeigen

@ -5,7 +5,7 @@ Subject: [PATCH] Check online mode before converting and renaming player data
diff --git a/src/main/java/net/minecraft/server/WorldNBTStorage.java b/src/main/java/net/minecraft/server/WorldNBTStorage.java
index a5157269c..a562e1e46 100644
index ee28e4d401..0fd6efec0b 100644
--- a/src/main/java/net/minecraft/server/WorldNBTStorage.java
+++ b/src/main/java/net/minecraft/server/WorldNBTStorage.java
@@ -0,0 +0,0 @@ public class WorldNBTStorage implements IDataManager, IPlayerFileData {

Datei anzeigen

@ -5,30 +5,8 @@ Subject: [PATCH] Chunk Save Reattempt
We commonly have "Stream Closed" errors on chunk saving, so this code should re-try to save the chunk in the event of failure and hopefully prevent rollbacks.
diff --git a/src/main/java/net/minecraft/server/ChunkRegionLoader.java b/src/main/java/net/minecraft/server/ChunkRegionLoader.java
index b247d5f07..f007af2e1 100644
--- a/src/main/java/net/minecraft/server/ChunkRegionLoader.java
+++ b/src/main/java/net/minecraft/server/ChunkRegionLoader.java
@@ -0,0 +0,0 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver {
NBTTagCompound nbttagcompound = SupplierUtils.getIfExists(chunk.compoundSupplier); // Spigot // Paper
if (nbttagcompound != null) {
+ int attempts = 0; Exception laste = null; while (attempts++ < 5) { // Paper
try {
this.b(chunkcoordintpair, nbttagcompound);
+ laste = null; break; // Paper
} catch (Exception exception) {
- ChunkRegionLoader.a.error("Failed to save chunk", exception);
+ //ChunkRegionLoader.a.error("Failed to save chunk", exception); // Paper
+ laste = exception; // Paper
}
+ try {Thread.sleep(10);} catch (InterruptedException e) {e.printStackTrace();} } // Paper
+ if (laste != null) { com.destroystokyo.paper.exception.ServerInternalException.reportInternalException(laste); MinecraftServer.LOGGER.error("Failed to save chunk", laste); } // Paper
}
flag = true;
diff --git a/src/main/java/net/minecraft/server/RegionFile.java b/src/main/java/net/minecraft/server/RegionFile.java
index cc7cad8be..b8b514c87 100644
index cc7cad8be4..b8b514c874 100644
--- a/src/main/java/net/minecraft/server/RegionFile.java
+++ b/src/main/java/net/minecraft/server/RegionFile.java
@@ -0,0 +0,0 @@ public class RegionFile {
@ -41,4 +19,38 @@ index cc7cad8be..b8b514c87 100644
}
}
diff --git a/src/main/java/net/minecraft/server/RegionFileCache.java b/src/main/java/net/minecraft/server/RegionFileCache.java
index e5115863ec..2217adf99c 100644
--- a/src/main/java/net/minecraft/server/RegionFileCache.java
+++ b/src/main/java/net/minecraft/server/RegionFileCache.java
@@ -0,0 +0,0 @@ public class RegionFileCache {
@Nullable
public static synchronized void write(File file, int i, int j, NBTTagCompound nbttagcompound) throws IOException {
+ int attempts = 0; Exception laste = null; while (attempts++ < 5) { try { // Paper
RegionFile regionfile = a(file, i, j);
DataOutputStream dataoutputstream = regionfile.c(i & 31, j & 31);
NBTCompressedStreamTools.a(nbttagcompound, (java.io.DataOutput) dataoutputstream);
dataoutputstream.close();
+ // Paper start
+ laste = null; break; // Paper
+ } catch (Exception exception) {
+ //ChunkRegionLoader.a.error("Failed to save chunk", exception); // Paper
+ laste = exception; // Paper
+ }
+ try {
+ Thread.sleep(10);
+ } catch (InterruptedException e) {
+ e.printStackTrace();
+ }
+ }
+ if (laste != null) {
+ com.destroystokyo.paper.exception.ServerInternalException.reportInternalException(laste);
+ MinecraftServer.LOGGER.error("Failed to save chunk", laste);
+ }
+ // Paper end
}
public static synchronized boolean chunkExists(File file, int i, int j) {
--

Einige Dateien werden nicht angezeigt, da zu viele Dateien in diesem Diff geändert wurden Mehr anzeigen