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
This commit is contained in:
parent
c534848047
commit
835bc39b03
|
@ -1,11 +1,11 @@
|
|||
From 78932fdd2a280f8bc6eb8cd540dbb14c9413fcd6 Mon Sep 17 00:00:00 2001
|
||||
From 3a25a0e5c49a62778583bf33ec87e41053a1989f Mon Sep 17 00:00:00 2001
|
||||
From: Zach Brown <zach.brown@destroystokyo.com>
|
||||
Date: Tue, 1 Mar 2016 00:16:08 +0100
|
||||
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
|
||||
@@ -3,29 +3,35 @@
|
||||
|
@ -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>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
From 74dcc240e66bd353b4e94b30769b8dec97ef41ea Mon Sep 17 00:00:00 2001
|
||||
From d1fe144a1457bb44d3e453bf5add1a93aea47d4a Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
Date: Sun, 1 May 2016 15:19:49 -0400
|
||||
Subject: [PATCH] LootTable API
|
||||
|
@ -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 +1,93 @@
|
||||
+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 +1,111 @@
|
||||
@@ -0,0 +1,112 @@
|
||||
+package com.destroystokyo.paper.loottable;
|
||||
+
|
||||
+import org.bukkit.entity.Player;
|
||||
+import org.bukkit.loot.Lootable;
|
||||
+
|
||||
+import java.util.UUID;
|
||||
+
|
||||
|
@ -449,10 +351,10 @@ 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
|
||||
@@ -33,6 +33,31 @@ public interface Lootable {
|
||||
@@ -33,6 +33,34 @@ public interface Lootable {
|
||||
*/
|
||||
LootTable getLootTable();
|
||||
|
||||
|
@ -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
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
From e831b67f4b5d0f76e11013e2557b6caa23810b78 Mon Sep 17 00:00:00 2001
|
||||
From 17a5dac03ee24a1868c0e0555a175c17d2f45220 Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
Date: Tue, 29 Aug 2017 23:58:48 -0400
|
||||
Subject: [PATCH] Expand World.spawnParticle API and add Builder
|
||||
|
@ -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
|
||||
@@ -1742,7 +1742,57 @@ public interface World extends PluginMessageRecipient, Metadatable {
|
||||
|
@ -524,8 +524,8 @@ index f9d8b14c6..5630c624a 100644
|
|||
+ // Paper end
|
||||
+
|
||||
|
||||
// Spigot start
|
||||
public class Spigot
|
||||
/**
|
||||
* Spawns the particle (the number of times specified by count)
|
||||
--
|
||||
2.18.0
|
||||
|
||||
|
|
|
@ -1,113 +0,0 @@
|
|||
From 271f251dfa394ddcfa8ff6364ab1eeabfc84aa89 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 +1,34 @@
|
||||
+/*
|
||||
+ * 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
|
||||
@@ -3,4 +3,4 @@ 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
|
||||
@@ -4,4 +4,4 @@ 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
|
||||
@@ -3,7 +3,7 @@ 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
|
||||
@@ -3,4 +3,4 @@ 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
|
||||
@@ -3,7 +3,7 @@ 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
|
||||
--
|
||||
2.18.0
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
From 9063aa95f7e636b7ac6f7ef498185e41deeaa694 Mon Sep 17 00:00:00 2001
|
||||
From 2b271de495531cdde7b4cdfa4ad11470e9f749a7 Mon Sep 17 00:00:00 2001
|
||||
From: BillyGalbreath <Blake.Galbreath@GMail.com>
|
||||
Date: Sat, 16 Jun 2018 01:17:39 -0500
|
||||
Subject: [PATCH] Make shield blocking delay configurable
|
|
@ -1,4 +1,4 @@
|
|||
From 15994adb8231b553c5bd352326141857af8bfb25 Mon Sep 17 00:00:00 2001
|
||||
From 8f0a17d0053904bba6193e2f4d7c46931eb4d966 Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
Date: Sat, 15 Jun 2013 19:52:04 -0400
|
||||
Subject: [PATCH] EntityShootBowEvent consumeArrow and getArrowItem API
|
||||
|
@ -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
|
||||
@@ -16,9 +16,28 @@ public class EntityShootBowEvent extends EntityEvent implements Cancellable {
|
|
@ -1,4 +1,4 @@
|
|||
From 98993bdab959f99ca850a5ab7b767a5b56547688 Mon Sep 17 00:00:00 2001
|
||||
From 0291e3afa5c7bacac717ad667112822f628a515b Mon Sep 17 00:00:00 2001
|
||||
From: BillyGalbreath <Blake.Galbreath@GMail.com>
|
||||
Date: Mon, 18 Jun 2018 00:41:46 -0500
|
||||
Subject: [PATCH] Add "getNearbyXXX" methods to Location
|
|
@ -1,4 +1,4 @@
|
|||
From c0279c1b26a29b6acc35b2c45bd53ed2f0253e1d Mon Sep 17 00:00:00 2001
|
||||
From 0e7cded0791f40a007dcdef8b10c24120e255050 Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
Date: Mon, 18 Jun 2018 01:09:27 -0400
|
||||
Subject: [PATCH] PlayerReadyArrowEvent
|
|
@ -1,4 +1,4 @@
|
|||
From 04ec5bec611967cfad7bb9c1b811cb4bc7b0623f Mon Sep 17 00:00:00 2001
|
||||
From 3b6b6156f219653c4c0f1edcb490998333852b72 Mon Sep 17 00:00:00 2001
|
||||
From: Brokkonaut <hannos17@gmx.de>
|
||||
Date: Mon, 18 Jun 2018 15:40:39 +0200
|
||||
Subject: [PATCH] Add EntityKnockbackByEntityEvent
|
|
@ -1,4 +1,4 @@
|
|||
From eb5718c051248c4902e979e9ff35028a9356ed1b Mon Sep 17 00:00:00 2001
|
||||
From aa05ec03ec60e2126c5c0389044b6532d7790a99 Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
Date: Tue, 19 Dec 2017 16:24:42 -0500
|
||||
Subject: [PATCH] Expand Explosions API
|
||||
|
@ -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
|
||||
@@ -890,6 +890,102 @@ public interface World extends PluginMessageRecipient, Metadatable {
|
|
@ -1,11 +1,11 @@
|
|||
From 60260cf74059c80402f6caba78347c9e7b297ec2 Mon Sep 17 00:00:00 2001
|
||||
From 7f8a8f71328288fcd226a13f93e8f97b7f5f5a59 Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
Date: Fri, 22 Jun 2018 22:59:18 -0400
|
||||
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
|
||||
@@ -2,7 +2,9 @@ package org.bukkit.inventory;
|
|
@ -1,4 +1,4 @@
|
|||
From 60e287c651b9a42aea4798a5e3ece6265622222b Mon Sep 17 00:00:00 2001
|
||||
From eb524154c7e3ef486d64f2b1f84ab77b4a6c00fb Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
Date: Fri, 29 Jun 2018 00:19:19 -0400
|
||||
Subject: [PATCH] LivingEntity Hand Raised/Item Use API
|
|
@ -1,4 +1,4 @@
|
|||
From 38a264062d9f7e239ee60eff8bd198197e8b77e8 Mon Sep 17 00:00:00 2001
|
||||
From 294bb2b4e77686af5ff006e185603ee6afd1a4d5 Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
Date: Tue, 26 Jun 2018 21:34:40 -0400
|
||||
Subject: [PATCH] RangedEntity API
|
||||
|
@ -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 +1,29 @@
|
||||
@@ -0,0 +1,30 @@
|
||||
+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.
|
||||
+ *
|
|
@ -1,4 +1,4 @@
|
|||
From daa7931f24c915c80bcd1783f63ef11db9a0f232 Mon Sep 17 00:00:00 2001
|
||||
From 2bf0516d4ec180c0bbd9f50c67f205a99b8c08ca Mon Sep 17 00:00:00 2001
|
||||
From: Brokkonaut <hannos17@gmx.de>
|
||||
Date: Sat, 30 Jun 2018 05:45:04 +0200
|
||||
Subject: [PATCH] Improve ProjectileHitEvent to include the BlockFace where the
|
||||
|
@ -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
|
||||
@@ -12,6 +12,7 @@ public class ProjectileHitEvent extends EntityEvent {
|
|
@ -1,11 +1,11 @@
|
|||
From c0c64949e3296c8076656d6fab742b57a71299d3 Mon Sep 17 00:00:00 2001
|
||||
From b751eab97b7a040cf6b8d47c94a2ee90f02cd5bf Mon Sep 17 00:00:00 2001
|
||||
From: Brokkonaut <hannos17@gmx.de>
|
||||
Date: Tue, 3 Jul 2018 16:07:16 +0200
|
||||
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
|
||||
@@ -690,6 +690,16 @@ public interface World extends PluginMessageRecipient, Metadatable {
|
|
@ -1,4 +1,4 @@
|
|||
From c2bc9239b19e43b8ef8d3a4c82aee6d692732b20 Mon Sep 17 00:00:00 2001
|
||||
From 620b05a03d9f8250536ca98235324946057337f5 Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
Date: Tue, 3 Jul 2018 21:52:52 -0400
|
||||
Subject: [PATCH] InventoryCloseEvent Reason API
|
|
@ -1,4 +1,4 @@
|
|||
From 5b4f6eb2598e8b89c0c3ba00b1f8f7af18ed9a36 Mon Sep 17 00:00:00 2001
|
||||
From 3692eca40551e4d7768b31aafc8e9da88ab680c3 Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
Date: Wed, 4 Jul 2018 02:25:48 -0400
|
||||
Subject: [PATCH] Entity#getChunk API
|
||||
|
@ -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
|
||||
@@ -1,5 +1,6 @@
|
|
@ -1,4 +1,4 @@
|
|||
From a3edf0217f3ee13041788a8800b618804700be4b Mon Sep 17 00:00:00 2001
|
||||
From d3bc8ae26091d52609c73bcd0e6d97f71724aa16 Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
Date: Wed, 4 Jul 2018 15:29:21 -0400
|
||||
Subject: [PATCH] Vex#getSummoner API
|
||||
|
@ -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
|
||||
@@ -1,6 +1,18 @@
|
||||
package org.bukkit.entity;
|
||||
|
||||
+import com.destroystokyo.paper.entity.SentientNPC;
|
||||
+
|
||||
@@ -3,4 +3,10 @@ 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
|
||||
+
|
||||
+}
|
|
@ -1,4 +1,4 @@
|
|||
From 91f71ba5b2acd3e4d2c1723aacb8d5b74dd97ed3 Mon Sep 17 00:00:00 2001
|
||||
From e90f5e3a1992b807e97829fc570ce25f05b7811c Mon Sep 17 00:00:00 2001
|
||||
From: Zach Brown <zach.brown@destroystokyo.com>
|
||||
Date: Thu, 19 Jul 2018 15:07:02 -0500
|
||||
Subject: [PATCH] Add an asterisk to legacy API plugins
|
||||
|
@ -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
|
||||
@@ -66,4 +66,10 @@ 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
|
||||
@@ -38,7 +38,14 @@ 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
|
||||
@@ -303,7 +303,14 @@ public final class JavaPluginLoader implements PluginLoader {
|
|
@ -1,11 +1,11 @@
|
|||
From 104243eb412fa6c00f206d6ea2102ffa5090ee74 Mon Sep 17 00:00:00 2001
|
||||
From bbb9cf97e9b7033826d511f51950b79c2741fe10 Mon Sep 17 00:00:00 2001
|
||||
From: Zach Brown <zach.brown@destroystokyo.com>
|
||||
Date: Thu, 19 Jul 2018 17:32:47 -0500
|
||||
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
|
||||
@@ -266,7 +266,7 @@ public class VersionCommand extends BukkitCommand {
|
|
@ -1,11 +1,11 @@
|
|||
From 2b95e12f292000685d4475a372dbcb4e2c275db2 Mon Sep 17 00:00:00 2001
|
||||
From b242c5647547578b7d9d41871ce3e6f9a3e07931 Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
Date: Mon, 29 Feb 2016 17:43:33 -0600
|
||||
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
|
||||
@@ -137,6 +137,78 @@ public interface World extends PluginMessageRecipient, Metadatable {
|
|
@ -1,4 +1,4 @@
|
|||
From 26ef852d4a6f4ec05a5795b377f92196e8097267 Mon Sep 17 00:00:00 2001
|
||||
From 5820519ee336a827ab94afff4c21d4e8c51bc7aa Mon Sep 17 00:00:00 2001
|
||||
From: BillyGalbreath <Blake.Galbreath@GMail.com>
|
||||
Date: Sat, 21 Jul 2018 01:51:05 -0500
|
||||
Subject: [PATCH] EnderDragon Events
|
|
@ -1,4 +1,4 @@
|
|||
From 3db04f9ed8d1b8c20bbdb9b8bd1273568f68e9dc Mon Sep 17 00:00:00 2001
|
||||
From c485f341e92f90206dba384bf59f0e7ae09b30ef Mon Sep 17 00:00:00 2001
|
||||
From: BillyGalbreath <Blake.Galbreath@GMail.com>
|
||||
Date: Sat, 21 Jul 2018 03:10:50 -0500
|
||||
Subject: [PATCH] PlayerLaunchProjectileEvent
|
||||
|
@ -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 +1,78 @@
|
|
@ -1,4 +1,4 @@
|
|||
From 431affd0e59e92ea462d7e56791ec22af7f3b9cc Mon Sep 17 00:00:00 2001
|
||||
From d9fb4116f080c9844659b75a518d3b7708b3f665 Mon Sep 17 00:00:00 2001
|
||||
From: BillyGalbreath <Blake.Galbreath@GMail.com>
|
||||
Date: Sat, 21 Jul 2018 01:59:53 -0500
|
||||
Subject: [PATCH] PlayerElytraBoostEvent
|
||||
|
@ -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 +1,80 @@
|
|
@ -1,4 +1,4 @@
|
|||
From 7fafe644546eddc8321b487ee8a03974274877ba Mon Sep 17 00:00:00 2001
|
||||
From 2450564e1365b81ba112638f20f937caf306e003 Mon Sep 17 00:00:00 2001
|
||||
From: Anthony MacAllister <anthonymmacallister@gmail.com>
|
||||
Date: Thu, 26 Jul 2018 15:28:53 -0400
|
||||
Subject: [PATCH] EntityTransformedEvent
|
||||
|
@ -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 +1,85 @@
|
|
@ -1,11 +1,11 @@
|
|||
From 69a19d5e994e31333804ece1cae5f8c302e4a3cb Mon Sep 17 00:00:00 2001
|
||||
From 474a840b2cdb4bd68afd54e9d5cd97f7195c58f6 Mon Sep 17 00:00:00 2001
|
||||
From: kashike <kashike@vq.lc>
|
||||
Date: Wed, 15 Aug 2018 01:26:03 -0700
|
||||
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
|
||||
@@ -275,5 +275,21 @@ public interface ArmorStand extends LivingEntity {
|
|
@ -1,4 +1,4 @@
|
|||
From d902c51da3d4b662256480ff4f1e308483cae199 Mon Sep 17 00:00:00 2001
|
||||
From e7af83191e6add9b98b5233a119f4fe20e0b2393 Mon Sep 17 00:00:00 2001
|
||||
From: BillyGalbreath <Blake.Galbreath@GMail.com>
|
||||
Date: Fri, 27 Jul 2018 22:36:17 -0500
|
||||
Subject: [PATCH] SkeletonHorse Additions
|
||||
|
@ -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 +1,43 @@
|
||||
|
@ -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
|
||||
@@ -3,4 +3,12 @@ package org.bukkit.entity;
|
|
@ -1,4 +1,4 @@
|
|||
From 6208bf2ad33541e3b5c47c286e8b6c8ab95e5fe5 Mon Sep 17 00:00:00 2001
|
||||
From 14ac1162650971ca6854d13efe2a4d4b13f28243 Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
Date: Wed, 25 Jul 2018 01:36:07 -0400
|
||||
Subject: [PATCH] Expand Location Manipulation API
|
||||
|
@ -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
|
||||
@@ -503,6 +503,51 @@ public class Location implements Cloneable, ConfigurationSerializable {
|
|
@ -1,4 +1,4 @@
|
|||
From a309fe5f1304a0cfe9478215164836a8401e9728 Mon Sep 17 00:00:00 2001
|
||||
From 71390973372ce416105b11f6c390e5f4f4caa46b Mon Sep 17 00:00:00 2001
|
||||
From: willies952002 <admin@domnian.com>
|
||||
Date: Thu, 26 Jul 2018 02:22:44 -0400
|
||||
Subject: [PATCH] Expand ArmorStand API
|
||||
|
@ -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
|
||||
@@ -1,5 +1,6 @@
|
|
@ -1,4 +1,4 @@
|
|||
From 47e09a364611c02aefca7ef0c5af889f7fad8103 Mon Sep 17 00:00:00 2001
|
||||
From 13eb6bc73408696497c7884114e1ce0fbb0b8ad3 Mon Sep 17 00:00:00 2001
|
||||
From: BillyGalbreath <Blake.Galbreath@GMail.com>
|
||||
Date: Fri, 20 Jul 2018 23:36:55 -0500
|
||||
Subject: [PATCH] AnvilDamageEvent
|
||||
|
@ -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 +1,139 @@
|
|
@ -1,11 +1,11 @@
|
|||
From 74d80f95381c61a23d2c4f37adbded04b89c0e39 Mon Sep 17 00:00:00 2001
|
||||
From efea6dce832fdacd6d244e7ee4e1e484fba0fc4b Mon Sep 17 00:00:00 2001
|
||||
From: BillyGalbreath <Blake.Galbreath@GMail.com>
|
||||
Date: Thu, 2 Aug 2018 08:44:20 -0500
|
||||
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
|
||||
@@ -5,6 +5,7 @@ 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
|
||||
@@ -5,6 +5,7 @@ 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
|
||||
@@ -5,6 +5,7 @@ import org.bukkit.block.Block;
|
|
@ -1,4 +1,4 @@
|
|||
From 10885923bec70e8f6fa0b112d2946e1409f15f47 Mon Sep 17 00:00:00 2001
|
||||
From 073febfd9105d18df169603b4a61e2e4168d2f61 Mon Sep 17 00:00:00 2001
|
||||
From: Mark Vainomaa <mikroskeem@mikroskeem.eu>
|
||||
Date: Sun, 15 Jul 2018 22:17:55 +0300
|
||||
Subject: [PATCH] Add TNTPrimeEvent
|
||||
|
@ -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 +1,108 @@
|
|
@ -1,4 +1,4 @@
|
|||
From b812737b929851249cbbf6c0877d7064ec321c1d Mon Sep 17 00:00:00 2001
|
||||
From 0fbb9998c0c90bc1b064047ebf73bf3dc658f53e Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
Date: Sat, 4 Aug 2018 19:37:35 -0400
|
||||
Subject: [PATCH] Provide Chunk Coordinates as a Long API
|
||||
|
@ -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
|
||||
@@ -23,6 +23,15 @@ 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
|
||||
@@ -137,6 +137,21 @@ public interface World extends PluginMessageRecipient, Metadatable {
|
|
@ -1,19 +1,19 @@
|
|||
From 88e2b4663b6c865344ab4ebe4ca003567ddc1a47 Mon Sep 17 00:00:00 2001
|
||||
From ed7d0f408935b95da80451a70b122ab3cf835fdf Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
Date: Fri, 10 Aug 2018 22:08:34 -0400
|
||||
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
|
||||
@@ -3,7 +3,7 @@ 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.
|
|
@ -1,11 +1,11 @@
|
|||
From eb7265ba1975febbd4b3abb77bc1e9111ea86090 Mon Sep 17 00:00:00 2001
|
||||
From 74245bc30b8c36c2b82410d4d0d431b4dfe27d47 Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
Date: Wed, 15 Aug 2018 01:04:58 -0400
|
||||
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
|
||||
@@ -76,12 +76,24 @@ public interface Chunk {
|
|
@ -1,11 +1,11 @@
|
|||
From 70f55e69ebfa66c2d67f4b2a8ec0e5224bb180f4 Mon Sep 17 00:00:00 2001
|
||||
From 256b7fef647517de52871c256951b0fc5338a045 Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
Date: Wed, 15 Aug 2018 01:19:37 -0400
|
||||
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
|
||||
@@ -118,7 +118,7 @@ public class TimingHistory {
|
|
@ -1,4 +1,4 @@
|
|||
From 743e46cd7844b3927e0d4ed1b59261103aebfd70 Mon Sep 17 00:00:00 2001
|
||||
From dfd4a59ebe47a520514648a63e00a977c945239b Mon Sep 17 00:00:00 2001
|
||||
From: Spottedleaf <Spottedleaf@users.noreply.github.com>
|
||||
Date: Tue, 14 Aug 2018 21:42:10 -0700
|
||||
Subject: [PATCH] Allow Blocks to be accessed via a long key
|
||||
|
@ -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
|
||||
@@ -73,6 +73,37 @@ public interface World extends PluginMessageRecipient, Metadatable {
|
|
@ -1,4 +1,4 @@
|
|||
From 8acf7e358366fd537cdb0c354d8dc8777f254195 Mon Sep 17 00:00:00 2001
|
||||
From fedc9ca19069cd19407283544fc28ebba41f47b8 Mon Sep 17 00:00:00 2001
|
||||
From: BillyGalbreath <Blake.Galbreath@GMail.com>
|
||||
Date: Fri, 24 Aug 2018 08:18:27 -0500
|
||||
Subject: [PATCH] Slime Pathfinder Events
|
||||
|
@ -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 +1,37 @@
|
||||
|
@ -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 +1,49 @@
|
||||
|
@ -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 +1,16 @@
|
||||
|
@ -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 +1,29 @@
|
||||
|
@ -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 +1,16 @@
|
||||
|
@ -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
|
||||
@@ -14,4 +14,20 @@ public interface Slime extends Mob, com.destroystokyo.paper.entity.SentientNPC {
|
||||
@@ -14,4 +14,20 @@ public interface Slime extends Mob {
|
||||
* @param sz The new size of the slime.
|
||||
*/
|
||||
public void setSize(int sz);
|
|
@ -1,4 +1,4 @@
|
|||
From 1d78f754a14a5159a408adc552b3f04f2ccef37c Mon Sep 17 00:00:00 2001
|
||||
From c817dcae2757a7cb848d2ed0f65e607db9d3883e Mon Sep 17 00:00:00 2001
|
||||
From: cswhite2000 <18whitechristop@gmail.com>
|
||||
Date: Tue, 21 Aug 2018 19:39:46 -0700
|
||||
Subject: [PATCH] isChunkGenerated API
|
||||
|
@ -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
|
||||
@@ -9,6 +9,7 @@ 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
|
||||
@@ -181,6 +181,26 @@ public interface World extends PluginMessageRecipient, Metadatable {
|
|
@ -1,11 +1,11 @@
|
|||
From ec28d0096abe5a6c16d25d2853b4e488f0290f53 Mon Sep 17 00:00:00 2001
|
||||
From a924b59822d15436017aaa9ab10288a06f7e5263 Mon Sep 17 00:00:00 2001
|
||||
From: Sotr <i@omc.hk>
|
||||
Date: Thu, 23 Aug 2018 16:14:25 +0800
|
||||
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
|
||||
@@ -29,10 +29,34 @@ public class BlockPhysicsEvent extends BlockEvent implements Cancellable {
|
|
@ -1,11 +1,11 @@
|
|||
From 6842476267fe66eaac1bffd41ef47e5e82cf4964 Mon Sep 17 00:00:00 2001
|
||||
From b66f17991abf9f3df03862b742227841741b1d22 Mon Sep 17 00:00:00 2001
|
||||
From: Zach Brown <zach.brown@destroystokyo.com>
|
||||
Date: Mon, 29 Feb 2016 20:40:33 -0600
|
||||
Subject: [PATCH] POM Changes
|
||||
|
||||
|
||||
diff --git a/pom.xml b/pom.xml
|
||||
index 5d398f7cb..09b4ddf19 100644
|
||||
index f1f0c20a52..17c3baaec9 100644
|
||||
--- a/pom.xml
|
||||
+++ b/pom.xml
|
||||
@@ -1,12 +1,11 @@
|
||||
|
@ -16,7 +16,7 @@ index 5d398f7cb..09b4ddf19 100644
|
|||
- <artifactId>spigot</artifactId>
|
||||
+ <artifactId>paper</artifactId>
|
||||
<packaging>jar</packaging>
|
||||
<version>1.13-R0.1-SNAPSHOT</version>
|
||||
<version>1.13.1-R0.1-SNAPSHOT</version>
|
||||
- <name>Spigot</name>
|
||||
- <url>http://www.spigotmc.org</url>
|
||||
+ <name>Paper</name>
|
||||
|
@ -91,7 +91,7 @@ index 5d398f7cb..09b4ddf19 100644
|
|||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
@@ -138,11 +125,12 @@
|
||||
@@ -138,11 +125,13 @@
|
||||
<artifactId>maven-jar-plugin</artifactId>
|
||||
<version>2.4</version>
|
||||
<configuration>
|
||||
|
@ -101,11 +101,12 @@ index 5d398f7cb..09b4ddf19 100644
|
|||
<Main-Class>org.bukkit.craftbukkit.Main</Main-Class>
|
||||
<Implementation-Title>CraftBukkit</Implementation-Title>
|
||||
- <Implementation-Version>${spigot.desc}${craftbukkit.desc}</Implementation-Version>
|
||||
+ <!--suppress MavenModelInspection -->
|
||||
+ <Implementation-Version>${describe}</Implementation-Version>
|
||||
<Implementation-Vendor>${maven.build.timestamp}</Implementation-Vendor>
|
||||
<Specification-Title>Bukkit</Specification-Title>
|
||||
<Specification-Version>${api.version}</Specification-Version>
|
||||
@@ -182,19 +170,22 @@
|
||||
@@ -182,19 +171,22 @@
|
||||
<goal>shade</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
|
@ -136,7 +137,7 @@ index 5d398f7cb..09b4ddf19 100644
|
|||
<relocation>
|
||||
<pattern>org.bukkit.craftbukkit</pattern>
|
||||
<shadedPattern>org.bukkit.craftbukkit.v${minecraft_version}</shadedPattern>
|
||||
@@ -220,18 +211,6 @@
|
||||
@@ -220,18 +212,6 @@
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<version>3.7.0</version>
|
||||
|
@ -155,7 +156,7 @@ index 5d398f7cb..09b4ddf19 100644
|
|||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
@@ -250,6 +229,11 @@
|
||||
@@ -250,6 +230,11 @@
|
||||
<profiles>
|
||||
<profile>
|
||||
<id>development</id>
|
||||
|
@ -168,7 +169,7 @@ index 5d398f7cb..09b4ddf19 100644
|
|||
<plugins>
|
||||
<plugin>
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/util/Versioning.java b/src/main/java/org/bukkit/craftbukkit/util/Versioning.java
|
||||
index 93046379d..674096cab 100644
|
||||
index 93046379d0..674096cab1 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/util/Versioning.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/util/Versioning.java
|
||||
@@ -11,7 +11,7 @@ public final class Versioning {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
From cb37d1deb3834306189988414d2c44bd0593dfc1 Mon Sep 17 00:00:00 2001
|
||||
From 2ebf973ac944be514fab4ba6124b066c221a05ef Mon Sep 17 00:00:00 2001
|
||||
From: Zach Brown <zach.brown@destroystokyo.com>
|
||||
Date: Mon, 29 Feb 2016 21:02:09 -0600
|
||||
Subject: [PATCH] Paper config files
|
||||
|
@ -6,7 +6,7 @@ Subject: [PATCH] Paper config files
|
|||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/PaperCommand.java b/src/main/java/com/destroystokyo/paper/PaperCommand.java
|
||||
new file mode 100644
|
||||
index 0000000000..e8f7b7292d
|
||||
index 0000000000..961966e169
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/com/destroystokyo/paper/PaperCommand.java
|
||||
@@ -0,0 +1,237 @@
|
||||
|
@ -239,7 +239,7 @@ index 0000000000..e8f7b7292d
|
|||
+
|
||||
+ MinecraftServer console = MinecraftServer.getServer();
|
||||
+ com.destroystokyo.paper.PaperConfig.init((File) console.options.valueOf("paper-settings"));
|
||||
+ for (WorldServer world : console.worlds) {
|
||||
+ for (WorldServer world : console.getWorlds()) {
|
||||
+ world.paperConfig.init();
|
||||
+ }
|
||||
+ console.server.reloadCount++;
|
||||
|
@ -432,7 +432,7 @@ index 0000000000..104abab84b
|
|||
+}
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
new file mode 100644
|
||||
index 0000000000..b8a6161d84
|
||||
index 0000000000..a738657394
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
@@ -0,0 +1,67 @@
|
||||
|
@ -493,7 +493,7 @@ index 0000000000..b8a6161d84
|
|||
+ return (float) getDouble(path, (double) def);
|
||||
+ }
|
||||
+
|
||||
+ private <T> List getList(String path, T def) {
|
||||
+ private <T> List<T> getList(String path, List<T> def) {
|
||||
+ config.addDefault("world-settings.default." + path, def);
|
||||
+ return (List<T>) config.getList("world-settings." + worldName + "." + path, config.getList("world-settings.default." + path));
|
||||
+ }
|
||||
|
@ -504,7 +504,7 @@ index 0000000000..b8a6161d84
|
|||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/net/minecraft/server/DedicatedServer.java b/src/main/java/net/minecraft/server/DedicatedServer.java
|
||||
index 5ff1e96861..3706e44a34 100644
|
||||
index 38720a87da..efa738d4ec 100644
|
||||
--- a/src/main/java/net/minecraft/server/DedicatedServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/DedicatedServer.java
|
||||
@@ -192,6 +192,10 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
|
||||
|
@ -519,7 +519,7 @@ index 5ff1e96861..3706e44a34 100644
|
|||
DedicatedServer.LOGGER.info("Generating keypair");
|
||||
this.a(MinecraftEncryption.b());
|
||||
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
||||
index 55bf00be93..a1050912bc 100644
|
||||
index ef9f0e8834..8997cf84a4 100644
|
||||
--- a/src/main/java/net/minecraft/server/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/server/Entity.java
|
||||
@@ -135,9 +135,9 @@ public abstract class Entity implements INamableTileEntity, ICommandListener {
|
||||
|
@ -536,7 +536,7 @@ index 55bf00be93..a1050912bc 100644
|
|||
public boolean impulse;
|
||||
public int portalCooldown;
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityTypes.java b/src/main/java/net/minecraft/server/EntityTypes.java
|
||||
index ad3f891999..ca2a14d7ac 100644
|
||||
index c6434ec371..17bfa356f1 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityTypes.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityTypes.java
|
||||
@@ -2,6 +2,8 @@ package net.minecraft.server;
|
||||
|
@ -547,8 +547,8 @@ index ad3f891999..ca2a14d7ac 100644
|
|||
+import java.util.Set;
|
||||
import java.util.UUID;
|
||||
import java.util.function.Function;
|
||||
import javax.annotation.Nullable;
|
||||
@@ -323,4 +325,10 @@ public class EntityTypes<T extends Entity> {
|
||||
import java.util.stream.Stream;
|
||||
@@ -333,4 +335,10 @@ public class EntityTypes<T extends Entity> {
|
||||
return new EntityTypes(this.a, this.b, this.c, this.d, type);
|
||||
}
|
||||
}
|
||||
|
@ -560,10 +560,10 @@ index ad3f891999..ca2a14d7ac 100644
|
|||
+ // Paper end
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
|
||||
index 73bd5e1d74..e1cf1e579a 100644
|
||||
index 8d69cea10e..028678379a 100644
|
||||
--- a/src/main/java/net/minecraft/server/World.java
|
||||
+++ b/src/main/java/net/minecraft/server/World.java
|
||||
@@ -127,6 +127,8 @@ public abstract class World implements GeneratorAccess, IIBlockAccess, AutoClose
|
||||
@@ -134,6 +134,8 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc
|
||||
private int tickPosition;
|
||||
public final org.spigotmc.SpigotWorldConfig spigotConfig; // Spigot
|
||||
|
||||
|
@ -572,27 +572,27 @@ index 73bd5e1d74..e1cf1e579a 100644
|
|||
public final SpigotTimings.WorldTimingsHandler timings; // Spigot
|
||||
private boolean guardEntityList; // Spigot
|
||||
public static boolean haveWeSilencedAPhysicsCrash;
|
||||
@@ -149,6 +151,7 @@ public abstract class World implements GeneratorAccess, IIBlockAccess, AutoClose
|
||||
@@ -156,6 +158,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc
|
||||
|
||||
protected World(IDataManager idatamanager, WorldData worlddata, WorldProvider worldprovider, MethodProfiler methodprofiler, boolean flag, ChunkGenerator gen, org.bukkit.World.Environment env) {
|
||||
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.generator = gen;
|
||||
this.world = new CraftWorld((WorldServer) this, gen, env);
|
||||
this.ticksPerAnimalSpawns = this.getServer().getTicksPerAnimalSpawns(); // CraftBukkit
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 6ee7c56ada..ed3c23b74e 100644
|
||||
index 77cb857989..46a9ff9482 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -745,6 +745,7 @@ public final class CraftServer implements Server {
|
||||
@@ -746,6 +746,7 @@ public final class CraftServer implements Server {
|
||||
}
|
||||
|
||||
org.spigotmc.SpigotConfig.init((File) console.options.valueOf("spigot-settings")); // Spigot
|
||||
+ com.destroystokyo.paper.PaperConfig.init((File) console.options.valueOf("paper-settings")); // Paper
|
||||
for (WorldServer world : console.worlds) {
|
||||
for (WorldServer world : console.getWorlds()) {
|
||||
world.worldData.setDifficulty(difficulty);
|
||||
world.setSpawnFlags(monsters, animals);
|
||||
@@ -760,6 +761,7 @@ public final class CraftServer implements Server {
|
||||
@@ -761,6 +762,7 @@ public final class CraftServer implements Server {
|
||||
world.ticksPerMonsterSpawns = this.getTicksPerMonsterSpawns();
|
||||
}
|
||||
world.spigotConfig.init(); // Spigot
|
||||
|
@ -600,7 +600,7 @@ index 6ee7c56ada..ed3c23b74e 100644
|
|||
}
|
||||
|
||||
pluginManager.clearPlugins();
|
||||
@@ -767,6 +769,7 @@ public final class CraftServer implements Server {
|
||||
@@ -768,6 +770,7 @@ public final class CraftServer implements Server {
|
||||
resetRecipes();
|
||||
reloadData();
|
||||
org.spigotmc.SpigotConfig.registerCommands(); // Spigot
|
||||
|
@ -608,7 +608,7 @@ index 6ee7c56ada..ed3c23b74e 100644
|
|||
overrideAllCommandBlockCommands = commandsConfiguration.getStringList("command-block-overrides").contains("*");
|
||||
ignoreVanillaPermissions = commandsConfiguration.getBoolean("ignore-vanilla-permissions");
|
||||
|
||||
@@ -1874,4 +1877,26 @@ public final class CraftServer implements Server {
|
||||
@@ -1894,4 +1897,26 @@ public final class CraftServer implements Server {
|
||||
{
|
||||
return spigot;
|
||||
}
|
||||
|
|
|
@ -1,11 +1,24 @@
|
|||
From 6691919def0c0a2eb8baccb043701888ab8b2044 Mon Sep 17 00:00:00 2001
|
||||
From 35b1f286830c7abfb00224e808b8b2cab705bf56 Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
Date: Wed, 30 Mar 2016 19:36:20 -0400
|
||||
Subject: [PATCH] MC Dev fixes
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/BaseBlockPosition.java b/src/main/java/net/minecraft/server/BaseBlockPosition.java
|
||||
index c3e990bdff..e2a7b4be2c 100644
|
||||
--- a/src/main/java/net/minecraft/server/BaseBlockPosition.java
|
||||
+++ b/src/main/java/net/minecraft/server/BaseBlockPosition.java
|
||||
@@ -93,7 +93,7 @@ public class BaseBlockPosition implements Comparable<BaseBlockPosition> {
|
||||
return MoreObjects.toStringHelper(this).add("x", this.getX()).add("y", this.getY()).add("z", this.getZ()).toString();
|
||||
}
|
||||
|
||||
- public int compareTo(Object object) {
|
||||
+ public int compareTo(BaseBlockPosition object) { // Paper - decompile fix
|
||||
return this.l((BaseBlockPosition) object);
|
||||
}
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/BlockPosition.java b/src/main/java/net/minecraft/server/BlockPosition.java
|
||||
index 002da2a19..9f3aa2459 100644
|
||||
index 002da2a191..9f3aa24590 100644
|
||||
--- a/src/main/java/net/minecraft/server/BlockPosition.java
|
||||
+++ b/src/main/java/net/minecraft/server/BlockPosition.java
|
||||
@@ -150,7 +150,7 @@ public class BlockPosition extends BaseBlockPosition {
|
||||
|
@ -59,7 +72,7 @@ index 002da2a19..9f3aa2459 100644
|
|||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/ChunkSection.java b/src/main/java/net/minecraft/server/ChunkSection.java
|
||||
index 650ef1475..35aea4829 100644
|
||||
index 650ef14758..35aea4829f 100644
|
||||
--- a/src/main/java/net/minecraft/server/ChunkSection.java
|
||||
+++ b/src/main/java/net/minecraft/server/ChunkSection.java
|
||||
@@ -15,7 +15,7 @@ public class ChunkSection {
|
||||
|
@ -72,7 +85,7 @@ index 650ef1475..35aea4829 100644
|
|||
if (flag) {
|
||||
this.skyLight = new NibbleArray();
|
||||
diff --git a/src/main/java/net/minecraft/server/DataPaletteBlock.java b/src/main/java/net/minecraft/server/DataPaletteBlock.java
|
||||
index 20b1bc1b4..030ec8704 100644
|
||||
index 20b1bc1b48..030ec87047 100644
|
||||
--- a/src/main/java/net/minecraft/server/DataPaletteBlock.java
|
||||
+++ b/src/main/java/net/minecraft/server/DataPaletteBlock.java
|
||||
@@ -75,14 +75,14 @@ public class DataPaletteBlock<T> implements DataPaletteExpandable<T> {
|
||||
|
@ -111,7 +124,7 @@ index 20b1bc1b4..030ec8704 100644
|
|||
datapalettehash.a(nbttaglist);
|
||||
DataBits databits = new DataBits(i, 4096, along);
|
||||
diff --git a/src/main/java/net/minecraft/server/DedicatedPlayerList.java b/src/main/java/net/minecraft/server/DedicatedPlayerList.java
|
||||
index 4997255c7..a5545bd4c 100644
|
||||
index 1b91759cb2..ba1e38f8e0 100644
|
||||
--- a/src/main/java/net/minecraft/server/DedicatedPlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/DedicatedPlayerList.java
|
||||
@@ -135,8 +135,4 @@ public class DedicatedPlayerList extends PlayerList {
|
||||
|
@ -124,7 +137,7 @@ index 4997255c7..a5545bd4c 100644
|
|||
- }
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/DefinedStructure.java b/src/main/java/net/minecraft/server/DefinedStructure.java
|
||||
index a661789c1..785a1a218 100644
|
||||
index cd883e8529..bb1d00e440 100644
|
||||
--- a/src/main/java/net/minecraft/server/DefinedStructure.java
|
||||
+++ b/src/main/java/net/minecraft/server/DefinedStructure.java
|
||||
@@ -88,7 +88,7 @@ public class DefinedStructure {
|
||||
|
@ -179,7 +192,7 @@ index a661789c1..785a1a218 100644
|
|||
|
||||
public Iterator<IBlockData> iterator() {
|
||||
diff --git a/src/main/java/net/minecraft/server/EnumDirection.java b/src/main/java/net/minecraft/server/EnumDirection.java
|
||||
index 188d49d82..854ad49b6 100644
|
||||
index 188d49d820..854ad49b6c 100644
|
||||
--- a/src/main/java/net/minecraft/server/EnumDirection.java
|
||||
+++ b/src/main/java/net/minecraft/server/EnumDirection.java
|
||||
@@ -255,7 +255,7 @@ public enum EnumDirection implements INamable {
|
||||
|
@ -243,7 +256,7 @@ index 188d49d82..854ad49b6 100644
|
|||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/LocaleLanguage.java b/src/main/java/net/minecraft/server/LocaleLanguage.java
|
||||
index 8f06c5848..4361b2cee 100644
|
||||
index 8f06c58485..4361b2cee5 100644
|
||||
--- a/src/main/java/net/minecraft/server/LocaleLanguage.java
|
||||
+++ b/src/main/java/net/minecraft/server/LocaleLanguage.java
|
||||
@@ -34,7 +34,7 @@ public class LocaleLanguage {
|
||||
|
@ -255,8 +268,26 @@ index 8f06c5848..4361b2cee 100644
|
|||
}
|
||||
|
||||
this.e = SystemUtils.b();
|
||||
diff --git a/src/main/java/net/minecraft/server/LootSelectorEntry.java b/src/main/java/net/minecraft/server/LootSelectorEntry.java
|
||||
index 3cd5045636..3d501aee30 100644
|
||||
--- a/src/main/java/net/minecraft/server/LootSelectorEntry.java
|
||||
+++ b/src/main/java/net/minecraft/server/LootSelectorEntry.java
|
||||
@@ -85,11 +85,11 @@ public abstract class LootSelectorEntry {
|
||||
return jsonobject;
|
||||
}
|
||||
|
||||
- public JsonElement serialize(Object object, Type type, JsonSerializationContext jsonserializationcontext) {
|
||||
+ public JsonElement serialize(LootSelectorEntry object, Type type, JsonSerializationContext jsonserializationcontext) { // Paper - decompile fix
|
||||
return this.a((LootSelectorEntry) object, type, jsonserializationcontext);
|
||||
}
|
||||
|
||||
- public Object deserialize(JsonElement jsonelement, Type type, JsonDeserializationContext jsondeserializationcontext) throws JsonParseException {
|
||||
+ public LootSelectorEntry deserialize(JsonElement jsonelement, Type type, JsonDeserializationContext jsondeserializationcontext) throws JsonParseException { // Paper - decompile fix
|
||||
return this.a(jsonelement, type, jsondeserializationcontext);
|
||||
}
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/MathHelper.java b/src/main/java/net/minecraft/server/MathHelper.java
|
||||
index 86585a13f..f52b9c6f0 100644
|
||||
index 28fb88dade..5329102dd7 100644
|
||||
--- a/src/main/java/net/minecraft/server/MathHelper.java
|
||||
+++ b/src/main/java/net/minecraft/server/MathHelper.java
|
||||
@@ -8,7 +8,7 @@ import java.util.function.IntPredicate;
|
||||
|
@ -268,8 +299,121 @@ index 86585a13f..f52b9c6f0 100644
|
|||
for (int i = 0; i < afloat.length; ++i) {
|
||||
afloat[i] = (float) Math.sin((double) i * 3.141592653589793D * 2.0D / 65536.0D);
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/NBTBase.java b/src/main/java/net/minecraft/server/NBTBase.java
|
||||
index 8170a84280..e21e60b003 100644
|
||||
--- a/src/main/java/net/minecraft/server/NBTBase.java
|
||||
+++ b/src/main/java/net/minecraft/server/NBTBase.java
|
||||
@@ -20,7 +20,7 @@ public interface NBTBase {
|
||||
|
||||
byte getTypeId();
|
||||
|
||||
- static default NBTBase createTag(byte b0) {
|
||||
+ static NBTBase createTag(byte b0) { // Paper - decompile fix
|
||||
switch (b0) {
|
||||
case 0:
|
||||
return new NBTTagEnd();
|
||||
@@ -66,7 +66,7 @@ public interface NBTBase {
|
||||
}
|
||||
}
|
||||
|
||||
- static default String n(int i) {
|
||||
+ static String n(int i) { // Paper - decompile fix
|
||||
switch (i) {
|
||||
case 0:
|
||||
return "TAG_End";
|
||||
diff --git a/src/main/java/net/minecraft/server/NBTList.java b/src/main/java/net/minecraft/server/NBTList.java
|
||||
index 1a81d8e5f6..057c2077a0 100644
|
||||
--- a/src/main/java/net/minecraft/server/NBTList.java
|
||||
+++ b/src/main/java/net/minecraft/server/NBTList.java
|
||||
@@ -13,7 +13,7 @@ public abstract class NBTList<T extends NBTBase> extends AbstractList<T> impleme
|
||||
}
|
||||
|
||||
public T set(int i, T t0) {
|
||||
- NBTBase nbtbase = this.get(i);
|
||||
+ T nbtbase = this.get(i); // Paper - decompile fix
|
||||
|
||||
this.a(i, t0);
|
||||
return nbtbase;
|
||||
@@ -25,11 +25,5 @@ public abstract class NBTList<T extends NBTBase> extends AbstractList<T> impleme
|
||||
|
||||
public abstract void b(int i);
|
||||
|
||||
- public Object set(int i, Object object) {
|
||||
- return this.set(i, (NBTBase) object);
|
||||
- }
|
||||
-
|
||||
- public Object get(int i) {
|
||||
- return this.get(i);
|
||||
- }
|
||||
+ public abstract NBTList<T> clone(); // Paper - decompile fix
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/NBTTagByteArray.java b/src/main/java/net/minecraft/server/NBTTagByteArray.java
|
||||
index 11ffa6c342..5d61cf70bc 100644
|
||||
--- a/src/main/java/net/minecraft/server/NBTTagByteArray.java
|
||||
+++ b/src/main/java/net/minecraft/server/NBTTagByteArray.java
|
||||
@@ -66,7 +66,8 @@ public class NBTTagByteArray extends NBTList<NBTTagByte> {
|
||||
return stringbuilder.append(']').toString();
|
||||
}
|
||||
|
||||
- public NBTBase clone() {
|
||||
+ @Override
|
||||
+ public NBTTagByteArray clone() { // Paper - decompile fix
|
||||
byte[] abyte = new byte[this.data.length];
|
||||
|
||||
System.arraycopy(this.data, 0, abyte, 0, this.data.length);
|
||||
diff --git a/src/main/java/net/minecraft/server/NBTTagIntArray.java b/src/main/java/net/minecraft/server/NBTTagIntArray.java
|
||||
index f5c9b97d5c..d121ad4f7a 100644
|
||||
--- a/src/main/java/net/minecraft/server/NBTTagIntArray.java
|
||||
+++ b/src/main/java/net/minecraft/server/NBTTagIntArray.java
|
||||
@@ -132,7 +132,7 @@ public class NBTTagIntArray extends NBTList<NBTTagInt> {
|
||||
return this.a(i);
|
||||
}
|
||||
|
||||
- public NBTBase clone() {
|
||||
+ public NBTTagIntArray clone() { // Paper - decompile fix
|
||||
return this.c();
|
||||
}
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/NBTTagList.java b/src/main/java/net/minecraft/server/NBTTagList.java
|
||||
index b3c944d701..a8280acf94 100644
|
||||
--- a/src/main/java/net/minecraft/server/NBTTagList.java
|
||||
+++ b/src/main/java/net/minecraft/server/NBTTagList.java
|
||||
@@ -14,7 +14,7 @@ import org.apache.logging.log4j.Logger;
|
||||
public class NBTTagList extends NBTList<NBTBase> {
|
||||
|
||||
private static final Logger f = LogManager.getLogger();
|
||||
- private List<NBTBase> list = Lists.newArrayList();
|
||||
+ public List<NBTBase> list = Lists.newArrayList(); // Paper
|
||||
private byte type = 0;
|
||||
|
||||
public NBTTagList() {}
|
||||
@@ -294,23 +294,7 @@ public class NBTTagList extends NBTList<NBTBase> {
|
||||
return this.type;
|
||||
}
|
||||
|
||||
- public NBTBase clone() {
|
||||
+ public NBTTagList clone() {
|
||||
return this.c();
|
||||
}
|
||||
-
|
||||
- public Object remove(int i) {
|
||||
- return this.remove(i);
|
||||
- }
|
||||
-
|
||||
- public Object set(int i, Object object) {
|
||||
- return this.set(i, (NBTBase) object);
|
||||
- }
|
||||
-
|
||||
- public Object get(int i) {
|
||||
- return this.get(i);
|
||||
- }
|
||||
-
|
||||
- public boolean add(Object object) {
|
||||
- return this.add((NBTBase) object);
|
||||
- }
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/ProtoChunk.java b/src/main/java/net/minecraft/server/ProtoChunk.java
|
||||
index 824e68b50..584a86c11 100644
|
||||
index 528eb255ec..541435d3e5 100644
|
||||
--- a/src/main/java/net/minecraft/server/ProtoChunk.java
|
||||
+++ b/src/main/java/net/minecraft/server/ProtoChunk.java
|
||||
@@ -65,7 +65,7 @@ public class ProtoChunk implements IChunkAccess {
|
||||
|
@ -279,7 +423,7 @@ index 824e68b50..584a86c11 100644
|
|||
- return block == null || block.getBlockData().isAir();
|
||||
+ return block == null || ((Block) block).getBlockData().isAir(); // Paper - decompile fix
|
||||
};
|
||||
RegistryBlocks registryblocks = Block.REGISTRY;
|
||||
IRegistry iregistry = IRegistry.BLOCK;
|
||||
|
||||
@@ -325,8 +325,8 @@ public class ProtoChunk implements IChunkAccess {
|
||||
}
|
||||
|
@ -317,8 +461,30 @@ index 824e68b50..584a86c11 100644
|
|||
return new BitSet(65536);
|
||||
});
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/RegistryBlockID.java b/src/main/java/net/minecraft/server/RegistryBlockID.java
|
||||
index ef332d6517..7cc7eb7735 100644
|
||||
--- a/src/main/java/net/minecraft/server/RegistryBlockID.java
|
||||
+++ b/src/main/java/net/minecraft/server/RegistryBlockID.java
|
||||
@@ -8,7 +8,7 @@ import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
-public class RegistryBlockID<T> implements Registry<T> {
|
||||
+public class RegistryBlockID<T> implements Registry { // Paper - decompile fix
|
||||
|
||||
private int a;
|
||||
private final IdentityHashMap<T, Integer> b;
|
||||
@@ -27,7 +27,7 @@ public class RegistryBlockID<T> implements Registry<T> {
|
||||
this.b.put(t0, Integer.valueOf(i));
|
||||
|
||||
while (this.c.size() <= i) {
|
||||
- this.c.add((Object) null);
|
||||
+ this.c.add(null); // Paper - decompile fix
|
||||
}
|
||||
|
||||
this.c.set(i, t0);
|
||||
diff --git a/src/main/java/net/minecraft/server/RegistryID.java b/src/main/java/net/minecraft/server/RegistryID.java
|
||||
index 3b8f6ec16..bde5714dd 100644
|
||||
index 3b8f6ec167..bde5714dd6 100644
|
||||
--- a/src/main/java/net/minecraft/server/RegistryID.java
|
||||
+++ b/src/main/java/net/minecraft/server/RegistryID.java
|
||||
@@ -6,7 +6,7 @@ import java.util.Arrays;
|
||||
|
@ -358,8 +524,54 @@ index 3b8f6ec16..bde5714dd 100644
|
|||
this.e = 0;
|
||||
this.f = 0;
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/ServerPing.java b/src/main/java/net/minecraft/server/ServerPing.java
|
||||
index 2179664a0c..d7e1ecc031 100644
|
||||
--- a/src/main/java/net/minecraft/server/ServerPing.java
|
||||
+++ b/src/main/java/net/minecraft/server/ServerPing.java
|
||||
@@ -102,11 +102,11 @@ public class ServerPing {
|
||||
return jsonobject;
|
||||
}
|
||||
|
||||
- public JsonElement serialize(Object object, Type type, JsonSerializationContext jsonserializationcontext) {
|
||||
+ public JsonElement serialize(ServerPing object, Type type, JsonSerializationContext jsonserializationcontext) { // Paper - decompile fix
|
||||
return this.a((ServerPing) object, type, jsonserializationcontext);
|
||||
}
|
||||
|
||||
- public Object deserialize(JsonElement jsonelement, Type type, JsonDeserializationContext jsondeserializationcontext) throws JsonParseException {
|
||||
+ public ServerPing deserialize(JsonElement jsonelement, Type type, JsonDeserializationContext jsondeserializationcontext) throws JsonParseException { // Paper - decompile fix
|
||||
return this.a(jsonelement, type, jsondeserializationcontext);
|
||||
}
|
||||
}
|
||||
@@ -147,11 +147,11 @@ public class ServerPing {
|
||||
return jsonobject;
|
||||
}
|
||||
|
||||
- public JsonElement serialize(Object object, Type type, JsonSerializationContext jsonserializationcontext) {
|
||||
+ public JsonElement serialize(ServerPing.ServerData object, Type type, JsonSerializationContext jsonserializationcontext) { // Paper - decompile fix
|
||||
return this.a((ServerPing.ServerData) object, type, jsonserializationcontext);
|
||||
}
|
||||
|
||||
- public Object deserialize(JsonElement jsonelement, Type type, JsonDeserializationContext jsondeserializationcontext) throws JsonParseException {
|
||||
+ public ServerPing.ServerData deserialize(JsonElement jsonelement, Type type, JsonDeserializationContext jsondeserializationcontext) throws JsonParseException { // Paper - decompile fix
|
||||
return this.a(jsonelement, type, jsondeserializationcontext);
|
||||
}
|
||||
}
|
||||
@@ -235,11 +235,11 @@ public class ServerPing {
|
||||
return jsonobject;
|
||||
}
|
||||
|
||||
- public JsonElement serialize(Object object, Type type, JsonSerializationContext jsonserializationcontext) {
|
||||
+ public JsonElement serialize(ServerPing.ServerPingPlayerSample object, Type type, JsonSerializationContext jsonserializationcontext) { // Paper - decompile fix
|
||||
return this.a((ServerPing.ServerPingPlayerSample) object, type, jsonserializationcontext);
|
||||
}
|
||||
|
||||
- public Object deserialize(JsonElement jsonelement, Type type, JsonDeserializationContext jsondeserializationcontext) throws JsonParseException {
|
||||
+ public ServerPing.ServerPingPlayerSample deserialize(JsonElement jsonelement, Type type, JsonDeserializationContext jsondeserializationcontext) throws JsonParseException { // Paper - decompile fix
|
||||
return this.a(jsonelement, type, jsondeserializationcontext);
|
||||
}
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/ShapeDetector.java b/src/main/java/net/minecraft/server/ShapeDetector.java
|
||||
index 43596cb2d..3faf74a22 100644
|
||||
index 43596cb2d5..3faf74a22f 100644
|
||||
--- a/src/main/java/net/minecraft/server/ShapeDetector.java
|
||||
+++ b/src/main/java/net/minecraft/server/ShapeDetector.java
|
||||
@@ -171,7 +171,7 @@ public class ShapeDetector {
|
||||
|
@ -372,10 +584,10 @@ index 43596cb2d..3faf74a22 100644
|
|||
}
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/VoxelShape.java b/src/main/java/net/minecraft/server/VoxelShape.java
|
||||
index 4b5463cca..53c9f2188 100644
|
||||
index 0b3141d3e7..700900256b 100644
|
||||
--- a/src/main/java/net/minecraft/server/VoxelShape.java
|
||||
+++ b/src/main/java/net/minecraft/server/VoxelShape.java
|
||||
@@ -67,7 +67,7 @@ public abstract class VoxelShape {
|
||||
@@ -69,7 +69,7 @@ public abstract class VoxelShape {
|
||||
ArrayList arraylist = Lists.newArrayList();
|
||||
|
||||
this.b((d0, d1, d2, d3, d4, d5) -> {
|
||||
|
|
|
@ -1,35 +1,23 @@
|
|||
From b78498d654658ee40447dbcbef775b255505987f Mon Sep 17 00:00:00 2001
|
||||
From 909c0b4ade17b19a8f79bd39ca8a28d0ae7c1027 Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
Date: Mon, 28 Mar 2016 20:55:47 -0400
|
||||
Subject: [PATCH] MC Utils
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/BaseBlockPosition.java b/src/main/java/net/minecraft/server/BaseBlockPosition.java
|
||||
index c3e990bd..e2a7b4be 100644
|
||||
--- a/src/main/java/net/minecraft/server/BaseBlockPosition.java
|
||||
+++ b/src/main/java/net/minecraft/server/BaseBlockPosition.java
|
||||
@@ -93,7 +93,7 @@ public class BaseBlockPosition implements Comparable<BaseBlockPosition> {
|
||||
return MoreObjects.toStringHelper(this).add("x", this.getX()).add("y", this.getY()).add("z", this.getZ()).toString();
|
||||
}
|
||||
|
||||
- public int compareTo(Object object) {
|
||||
+ public int compareTo(BaseBlockPosition object) { // Paper - decompile fix
|
||||
return this.l((BaseBlockPosition) object);
|
||||
}
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/BlockPosition.java b/src/main/java/net/minecraft/server/BlockPosition.java
|
||||
index 9f3aa245..7dbea909 100644
|
||||
index 9f3aa24590..ca5c56c2b6 100644
|
||||
--- a/src/main/java/net/minecraft/server/BlockPosition.java
|
||||
+++ b/src/main/java/net/minecraft/server/BlockPosition.java
|
||||
@@ -10,7 +10,6 @@ import org.apache.logging.log4j.Logger;
|
||||
@@ -10,7 +10,7 @@ import org.apache.logging.log4j.Logger;
|
||||
@Immutable
|
||||
public class BlockPosition extends BaseBlockPosition {
|
||||
|
||||
- private static final Logger b = LogManager.getLogger();
|
||||
+ //private static final Logger b = LogManager.getLogger(); // Paper - variable name conflict, logger isn't used
|
||||
public static final BlockPosition ZERO = new BlockPosition(0, 0, 0);
|
||||
private static final int c = 1 + MathHelper.e(MathHelper.c(30000000));
|
||||
private static final int d = BlockPosition.c;
|
||||
@@ -45,6 +44,7 @@ public class BlockPosition extends BaseBlockPosition {
|
||||
@@ -45,6 +45,7 @@ public class BlockPosition extends BaseBlockPosition {
|
||||
return d0 == 0.0D && d1 == 0.0D && d2 == 0.0D ? this : new BlockPosition((double) this.getX() + d0, (double) this.getY() + d1, (double) this.getZ() + d2);
|
||||
}
|
||||
|
||||
|
@ -37,7 +25,7 @@ index 9f3aa245..7dbea909 100644
|
|||
public BlockPosition a(int i, int j, int k) {
|
||||
return i == 0 && j == 0 && k == 0 ? this : new BlockPosition(this.getX() + i, this.getY() + j, this.getZ() + k);
|
||||
}
|
||||
@@ -385,6 +385,7 @@ public class BlockPosition extends BaseBlockPosition {
|
||||
@@ -385,6 +386,7 @@ public class BlockPosition extends BaseBlockPosition {
|
||||
return this.d;
|
||||
}
|
||||
|
||||
|
@ -45,7 +33,7 @@ index 9f3aa245..7dbea909 100644
|
|||
public BlockPosition.MutableBlockPosition c(int i, int j, int k) {
|
||||
this.b = i;
|
||||
this.c = j;
|
||||
@@ -392,6 +393,7 @@ public class BlockPosition extends BaseBlockPosition {
|
||||
@@ -392,6 +394,7 @@ public class BlockPosition extends BaseBlockPosition {
|
||||
return this;
|
||||
}
|
||||
|
||||
|
@ -54,19 +42,19 @@ index 9f3aa245..7dbea909 100644
|
|||
return this.c(MathHelper.floor(d0), MathHelper.floor(d1), MathHelper.floor(d2));
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
|
||||
index 03c96de9..2d06202d 100644
|
||||
index 542b2aaf4d..35cb5ca575 100644
|
||||
--- a/src/main/java/net/minecraft/server/Chunk.java
|
||||
+++ b/src/main/java/net/minecraft/server/Chunk.java
|
||||
@@ -28,7 +28,7 @@ import com.google.common.collect.Lists; // CraftBukkit
|
||||
public class Chunk implements IChunkAccess {
|
||||
|
||||
private static final Logger e = LogManager.getLogger();
|
||||
private static final Logger d = LogManager.getLogger();
|
||||
- public static final ChunkSection a = null;
|
||||
+ public static final ChunkSection a = null; public static final ChunkSection EMPTY_CHUNK_SECTION = Chunk.a; // Paper - OBFHELPER
|
||||
private final ChunkSection[] sections;
|
||||
private final BiomeBase[] g;
|
||||
private final boolean[] h;
|
||||
@@ -693,6 +693,7 @@ public class Chunk implements IChunkAccess {
|
||||
private final BiomeBase[] f;
|
||||
private final boolean[] g;
|
||||
@@ -692,6 +692,7 @@ public class Chunk implements IChunkAccess {
|
||||
return this.a(blockposition, Chunk.EnumTileEntityState.CHECK);
|
||||
}
|
||||
|
||||
|
@ -75,7 +63,7 @@ index 03c96de9..2d06202d 100644
|
|||
public TileEntity a(BlockPosition blockposition, Chunk.EnumTileEntityState chunk_enumtileentitystate) {
|
||||
// CraftBukkit start
|
||||
diff --git a/src/main/java/net/minecraft/server/ChunkCoordIntPair.java b/src/main/java/net/minecraft/server/ChunkCoordIntPair.java
|
||||
index 00a530c5..2947d9ff 100644
|
||||
index 34586bca65..b0c004b1f2 100644
|
||||
--- a/src/main/java/net/minecraft/server/ChunkCoordIntPair.java
|
||||
+++ b/src/main/java/net/minecraft/server/ChunkCoordIntPair.java
|
||||
@@ -24,6 +24,8 @@ public class ChunkCoordIntPair {
|
||||
|
@ -88,10 +76,10 @@ index 00a530c5..2947d9ff 100644
|
|||
return (long) i & 4294967295L | ((long) j & 4294967295L) << 32;
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/ChunkTaskScheduler.java b/src/main/java/net/minecraft/server/ChunkTaskScheduler.java
|
||||
index 5d9118da..8b50ec53 100644
|
||||
index 3b6b3b9a99..22af9c1885 100644
|
||||
--- a/src/main/java/net/minecraft/server/ChunkTaskScheduler.java
|
||||
+++ b/src/main/java/net/minecraft/server/ChunkTaskScheduler.java
|
||||
@@ -15,7 +15,7 @@ import org.apache.logging.log4j.Logger;
|
||||
@@ -16,7 +16,7 @@ import org.apache.logging.log4j.Logger;
|
||||
public class ChunkTaskScheduler extends Scheduler<ChunkCoordIntPair, ChunkStatus, ProtoChunk> {
|
||||
|
||||
private static final Logger b = LogManager.getLogger();
|
||||
|
@ -101,7 +89,7 @@ index 5d9118da..8b50ec53 100644
|
|||
private final IChunkLoader e;
|
||||
private final IAsyncTaskHandler f;
|
||||
diff --git a/src/main/java/net/minecraft/server/DataBits.java b/src/main/java/net/minecraft/server/DataBits.java
|
||||
index d24ec3d5..9e83610f 100644
|
||||
index d24ec3d53c..9e83610f1a 100644
|
||||
--- a/src/main/java/net/minecraft/server/DataBits.java
|
||||
+++ b/src/main/java/net/minecraft/server/DataBits.java
|
||||
@@ -60,6 +60,7 @@ public class DataBits {
|
||||
|
@ -113,7 +101,7 @@ index d24ec3d5..9e83610f 100644
|
|||
return this.a;
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/DataPalette.java b/src/main/java/net/minecraft/server/DataPalette.java
|
||||
index dae40b9c..0be0b0ef 100644
|
||||
index dae40b9cde..0be0b0ef51 100644
|
||||
--- a/src/main/java/net/minecraft/server/DataPalette.java
|
||||
+++ b/src/main/java/net/minecraft/server/DataPalette.java
|
||||
@@ -4,8 +4,10 @@ import javax.annotation.Nullable;
|
||||
|
@ -128,7 +116,7 @@ index dae40b9c..0be0b0ef 100644
|
|||
T a(int i);
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/DataPaletteBlock.java b/src/main/java/net/minecraft/server/DataPaletteBlock.java
|
||||
index 030ec870..575f9b55 100644
|
||||
index 030ec87047..575f9b5587 100644
|
||||
--- a/src/main/java/net/minecraft/server/DataPaletteBlock.java
|
||||
+++ b/src/main/java/net/minecraft/server/DataPaletteBlock.java
|
||||
@@ -9,7 +9,7 @@ import java.util.stream.Collectors;
|
||||
|
@ -170,7 +158,7 @@ index 030ec870..575f9b55 100644
|
|||
this.b();
|
||||
packetdataserializer.writeByte(this.i);
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityCreature.java b/src/main/java/net/minecraft/server/EntityCreature.java
|
||||
index b3475676..ceed50d8 100644
|
||||
index 2c6fbd1d6f..3790039f18 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityCreature.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityCreature.java
|
||||
@@ -6,6 +6,7 @@ import org.bukkit.event.entity.EntityUnleashEvent;
|
||||
|
@ -182,7 +170,7 @@ index b3475676..ceed50d8 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 514c9515..5b339975 100644
|
||||
index fd050c5f32..91c4785889 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
@@ -122,6 +122,7 @@ public abstract class EntityLiving extends Entity {
|
||||
|
@ -194,7 +182,7 @@ index 514c9515..5b339975 100644
|
|||
@Override
|
||||
public float getBukkitYaw() {
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityMonster.java b/src/main/java/net/minecraft/server/EntityMonster.java
|
||||
index 494ce0bc..04c3756e 100644
|
||||
index 96e0122150..a3449e9a8d 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityMonster.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityMonster.java
|
||||
@@ -2,6 +2,7 @@ package net.minecraft.server;
|
||||
|
@ -206,7 +194,7 @@ index 494ce0bc..04c3756e 100644
|
|||
super(entitytypes, world);
|
||||
this.b_ = 5;
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityTypes.java b/src/main/java/net/minecraft/server/EntityTypes.java
|
||||
index ca2a14d7..9a513b4e 100644
|
||||
index 17bfa356f1..5c1ab6a0b6 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityTypes.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityTypes.java
|
||||
@@ -3,6 +3,7 @@ package net.minecraft.server;
|
||||
|
@ -217,18 +205,17 @@ index ca2a14d7..9a513b4e 100644
|
|||
import java.util.Set;
|
||||
import java.util.UUID;
|
||||
import java.util.function.Function;
|
||||
@@ -121,9 +122,20 @@ public class EntityTypes<T extends Entity> {
|
||||
@@ -123,9 +124,20 @@ public class EntityTypes<T extends Entity> {
|
||||
public static <T extends Entity> EntityTypes<T> a(String s, EntityTypes.a<T> entitytypes_a) {
|
||||
EntityTypes entitytypes = entitytypes_a.a(s);
|
||||
|
||||
- EntityTypes.REGISTRY.a(new MinecraftKey(s), entitytypes);
|
||||
+ // Paper start
|
||||
+ if (clsToKeyMap == null ) clsToKeyMap = new java.util.HashMap<>();
|
||||
+ if (clsToTypeMap == null ) clsToTypeMap = new java.util.HashMap<>();
|
||||
+
|
||||
+ MinecraftKey key = new MinecraftKey(s);
|
||||
+ Class<? extends T> entityClass = entitytypes_a.getEntityClass();
|
||||
+ EntityTypes.REGISTRY.a(key, entitytypes);
|
||||
IRegistry.ENTITY_TYPE.a(new MinecraftKey(s), entitytypes); // CraftBukkit - decompile error
|
||||
+ clsToKeyMap.put(entityClass, key);
|
||||
+ clsToTypeMap.put(entityClass, org.bukkit.entity.EntityType.fromName(s));
|
||||
return entitytypes;
|
||||
|
@ -239,7 +226,7 @@ index ca2a14d7..9a513b4e 100644
|
|||
|
||||
@Nullable
|
||||
public static MinecraftKey getName(EntityTypes<?> entitytypes) {
|
||||
@@ -277,7 +289,7 @@ public class EntityTypes<T extends Entity> {
|
||||
@@ -287,7 +299,7 @@ public class EntityTypes<T extends Entity> {
|
||||
|
||||
public static class a<T extends Entity> {
|
||||
|
||||
|
@ -248,8 +235,17 @@ index ca2a14d7..9a513b4e 100644
|
|||
private final Function<? super World, ? extends T> b;
|
||||
private boolean c = true;
|
||||
private boolean d = true;
|
||||
@@ -338,7 +350,7 @@ public class EntityTypes<T extends Entity> {
|
||||
|
||||
// Paper start
|
||||
public static Set<MinecraftKey> getEntityNameList() {
|
||||
- return REGISTRY.keySet();
|
||||
+ return IRegistry.ENTITY_TYPE.keySet();
|
||||
}
|
||||
// Paper end
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/ItemStack.java b/src/main/java/net/minecraft/server/ItemStack.java
|
||||
index 359979cc..0c54eaa5 100644
|
||||
index c54275bc2f..318c4204df 100644
|
||||
--- a/src/main/java/net/minecraft/server/ItemStack.java
|
||||
+++ b/src/main/java/net/minecraft/server/ItemStack.java
|
||||
@@ -26,6 +26,7 @@ import org.bukkit.TreeType;
|
||||
|
@ -278,30 +274,12 @@ index 359979cc..0c54eaa5 100644
|
|||
public void setTag(@Nullable NBTTagCompound nbttagcompound) {
|
||||
this.tag = nbttagcompound;
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/LotoSelectorEntry.java b/src/main/java/net/minecraft/server/LotoSelectorEntry.java
|
||||
index a540167d..add61886 100644
|
||||
--- a/src/main/java/net/minecraft/server/LotoSelectorEntry.java
|
||||
+++ b/src/main/java/net/minecraft/server/LotoSelectorEntry.java
|
||||
@@ -85,11 +85,11 @@ public abstract class LotoSelectorEntry {
|
||||
return jsonobject;
|
||||
}
|
||||
|
||||
- public JsonElement serialize(Object object, Type type, JsonSerializationContext jsonserializationcontext) {
|
||||
+ public JsonElement serialize(LotoSelectorEntry object, Type type, JsonSerializationContext jsonserializationcontext) { // Paper - decompile fix
|
||||
return this.a((LotoSelectorEntry) object, type, jsonserializationcontext);
|
||||
}
|
||||
|
||||
- public Object deserialize(JsonElement jsonelement, Type type, JsonDeserializationContext jsondeserializationcontext) throws JsonParseException {
|
||||
+ public LotoSelectorEntry deserialize(JsonElement jsonelement, Type type, JsonDeserializationContext jsondeserializationcontext) throws JsonParseException { // Paper - decompile fix
|
||||
return this.a(jsonelement, type, jsondeserializationcontext);
|
||||
}
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/MCUtil.java b/src/main/java/net/minecraft/server/MCUtil.java
|
||||
new file mode 100644
|
||||
index 00000000..70cdc3f1
|
||||
index 0000000000..9f9341c98f
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/net/minecraft/server/MCUtil.java
|
||||
@@ -0,0 +1,292 @@
|
||||
@@ -0,0 +1,296 @@
|
||||
+package net.minecraft.server;
|
||||
+
|
||||
+import com.google.common.util.concurrent.ThreadFactoryBuilder;
|
||||
|
@ -540,6 +518,10 @@ index 00000000..70cdc3f1
|
|||
+ return new Location(entity.getWorld().getWorld(), entity.locX, entity.locY, entity.locZ);
|
||||
+ }
|
||||
+
|
||||
+ public static org.bukkit.block.Block toBukkitBlock(World world, BlockPosition pos) {
|
||||
+ return world.getWorld().getBlockAt(pos.getX(), pos.getY(), pos.getZ());
|
||||
+ }
|
||||
+
|
||||
+ public static BlockPosition toBlockPosition(Location loc) {
|
||||
+ return new BlockPosition(loc.getBlockX(), loc.getBlockY(), loc.getBlockZ());
|
||||
+ }
|
||||
|
@ -594,70 +576,8 @@ index 00000000..70cdc3f1
|
|||
+ return null;
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/net/minecraft/server/NBTBase.java b/src/main/java/net/minecraft/server/NBTBase.java
|
||||
index 8170a842..e21e60b0 100644
|
||||
--- a/src/main/java/net/minecraft/server/NBTBase.java
|
||||
+++ b/src/main/java/net/minecraft/server/NBTBase.java
|
||||
@@ -20,7 +20,7 @@ public interface NBTBase {
|
||||
|
||||
byte getTypeId();
|
||||
|
||||
- static default NBTBase createTag(byte b0) {
|
||||
+ static NBTBase createTag(byte b0) { // Paper - decompile fix
|
||||
switch (b0) {
|
||||
case 0:
|
||||
return new NBTTagEnd();
|
||||
@@ -66,7 +66,7 @@ public interface NBTBase {
|
||||
}
|
||||
}
|
||||
|
||||
- static default String n(int i) {
|
||||
+ static String n(int i) { // Paper - decompile fix
|
||||
switch (i) {
|
||||
case 0:
|
||||
return "TAG_End";
|
||||
diff --git a/src/main/java/net/minecraft/server/NBTList.java b/src/main/java/net/minecraft/server/NBTList.java
|
||||
index 1a81d8e5..057c2077 100644
|
||||
--- a/src/main/java/net/minecraft/server/NBTList.java
|
||||
+++ b/src/main/java/net/minecraft/server/NBTList.java
|
||||
@@ -13,7 +13,7 @@ public abstract class NBTList<T extends NBTBase> extends AbstractList<T> impleme
|
||||
}
|
||||
|
||||
public T set(int i, T t0) {
|
||||
- NBTBase nbtbase = this.get(i);
|
||||
+ T nbtbase = this.get(i); // Paper - decompile fix
|
||||
|
||||
this.a(i, t0);
|
||||
return nbtbase;
|
||||
@@ -25,11 +25,5 @@ public abstract class NBTList<T extends NBTBase> extends AbstractList<T> impleme
|
||||
|
||||
public abstract void b(int i);
|
||||
|
||||
- public Object set(int i, Object object) {
|
||||
- return this.set(i, (NBTBase) object);
|
||||
- }
|
||||
-
|
||||
- public Object get(int i) {
|
||||
- return this.get(i);
|
||||
- }
|
||||
+ public abstract NBTList<T> clone(); // Paper - decompile fix
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/NBTTagByteArray.java b/src/main/java/net/minecraft/server/NBTTagByteArray.java
|
||||
index 11ffa6c3..3ff3a298 100644
|
||||
--- a/src/main/java/net/minecraft/server/NBTTagByteArray.java
|
||||
+++ b/src/main/java/net/minecraft/server/NBTTagByteArray.java
|
||||
@@ -66,7 +66,8 @@ public class NBTTagByteArray extends NBTList<NBTTagByte> {
|
||||
return stringbuilder.append(']').toString();
|
||||
}
|
||||
|
||||
- public NBTBase clone() {
|
||||
+ @Override
|
||||
+ public NBTTagByteArray clone() {
|
||||
byte[] abyte = new byte[this.data.length];
|
||||
|
||||
System.arraycopy(this.data, 0, abyte, 0, this.data.length);
|
||||
diff --git a/src/main/java/net/minecraft/server/NBTTagCompound.java b/src/main/java/net/minecraft/server/NBTTagCompound.java
|
||||
index 7fc9b5ff..e658816c 100644
|
||||
index 7fc9b5ff32..e658816c24 100644
|
||||
--- a/src/main/java/net/minecraft/server/NBTTagCompound.java
|
||||
+++ b/src/main/java/net/minecraft/server/NBTTagCompound.java
|
||||
@@ -24,7 +24,7 @@ public class NBTTagCompound implements NBTBase {
|
||||
|
@ -690,61 +610,10 @@ index 7fc9b5ff..e658816c 100644
|
|||
-
|
||||
- public NBTBase clone() {
|
||||
- return this.clone();
|
||||
- }
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/NBTTagIntArray.java b/src/main/java/net/minecraft/server/NBTTagIntArray.java
|
||||
index f5c9b97d..d121ad4f 100644
|
||||
--- a/src/main/java/net/minecraft/server/NBTTagIntArray.java
|
||||
+++ b/src/main/java/net/minecraft/server/NBTTagIntArray.java
|
||||
@@ -132,7 +132,7 @@ public class NBTTagIntArray extends NBTList<NBTTagInt> {
|
||||
return this.a(i);
|
||||
}
|
||||
|
||||
- public NBTBase clone() {
|
||||
+ public NBTTagIntArray clone() { // Paper - decompile fix
|
||||
return this.c();
|
||||
}
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/NBTTagList.java b/src/main/java/net/minecraft/server/NBTTagList.java
|
||||
index b3c944d7..a8280acf 100644
|
||||
--- a/src/main/java/net/minecraft/server/NBTTagList.java
|
||||
+++ b/src/main/java/net/minecraft/server/NBTTagList.java
|
||||
@@ -14,7 +14,7 @@ import org.apache.logging.log4j.Logger;
|
||||
public class NBTTagList extends NBTList<NBTBase> {
|
||||
|
||||
private static final Logger f = LogManager.getLogger();
|
||||
- private List<NBTBase> list = Lists.newArrayList();
|
||||
+ public List<NBTBase> list = Lists.newArrayList(); // Paper
|
||||
private byte type = 0;
|
||||
|
||||
public NBTTagList() {}
|
||||
@@ -294,23 +294,7 @@ public class NBTTagList extends NBTList<NBTBase> {
|
||||
return this.type;
|
||||
}
|
||||
|
||||
- public NBTBase clone() {
|
||||
+ public NBTTagList clone() {
|
||||
return this.c();
|
||||
}
|
||||
-
|
||||
- public Object remove(int i) {
|
||||
- return this.remove(i);
|
||||
- }
|
||||
-
|
||||
- public Object set(int i, Object object) {
|
||||
- return this.set(i, (NBTBase) object);
|
||||
- }
|
||||
-
|
||||
- public Object get(int i) {
|
||||
- return this.get(i);
|
||||
- }
|
||||
-
|
||||
- public boolean add(Object object) {
|
||||
- return this.add((NBTBase) object);
|
||||
- }
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/NetworkManager.java b/src/main/java/net/minecraft/server/NetworkManager.java
|
||||
index 0afaea81..26da8972 100644
|
||||
index 0afaea8109..26da897243 100644
|
||||
--- a/src/main/java/net/minecraft/server/NetworkManager.java
|
||||
+++ b/src/main/java/net/minecraft/server/NetworkManager.java
|
||||
@@ -44,7 +44,7 @@ public class NetworkManager extends SimpleChannelInboundHandler<Packet<?>> {
|
||||
|
@ -785,7 +654,7 @@ index 0afaea81..26da8972 100644
|
|||
public QueuedPacket(Packet<?> packet, @Nullable GenericFutureListener<? extends Future<? super Void>> genericfuturelistener) {
|
||||
this.a = packet;
|
||||
diff --git a/src/main/java/net/minecraft/server/PacketDataSerializer.java b/src/main/java/net/minecraft/server/PacketDataSerializer.java
|
||||
index d04afceb..a63a5811 100644
|
||||
index d04afceb70..a63a5811d6 100644
|
||||
--- a/src/main/java/net/minecraft/server/PacketDataSerializer.java
|
||||
+++ b/src/main/java/net/minecraft/server/PacketDataSerializer.java
|
||||
@@ -33,6 +33,7 @@ public class PacketDataSerializer extends ByteBuf {
|
||||
|
@ -797,7 +666,7 @@ index d04afceb..a63a5811 100644
|
|||
for (int j = 1; j < 5; ++j) {
|
||||
if ((i & -1 << j * 7) == 0) {
|
||||
diff --git a/src/main/java/net/minecraft/server/PacketPlayOutMapChunk.java b/src/main/java/net/minecraft/server/PacketPlayOutMapChunk.java
|
||||
index 1aa36156..ae95fdf9 100644
|
||||
index a8363f47b3..33436ac65b 100644
|
||||
--- a/src/main/java/net/minecraft/server/PacketPlayOutMapChunk.java
|
||||
+++ b/src/main/java/net/minecraft/server/PacketPlayOutMapChunk.java
|
||||
@@ -13,7 +13,7 @@ public class PacketPlayOutMapChunk implements Packet<PacketListenerPlayOut> {
|
||||
|
@ -818,10 +687,10 @@ index 1aa36156..ae95fdf9 100644
|
|||
int j = 0;
|
||||
ChunkSection[] achunksection = chunk.getSections();
|
||||
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
index 0618962e..42e0630e 100644
|
||||
index 43bd6aba9d..7dee734a70 100644
|
||||
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
@@ -66,9 +66,9 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
|
||||
@@ -68,9 +68,9 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
|
||||
private final MinecraftServer minecraftServer;
|
||||
public EntityPlayer player;
|
||||
private int e;
|
||||
|
@ -835,28 +704,10 @@ index 0618962e..42e0630e 100644
|
|||
private volatile int chatThrottle;
|
||||
private static final AtomicIntegerFieldUpdater chatSpamField = AtomicIntegerFieldUpdater.newUpdater(PlayerConnection.class, "chatThrottle");
|
||||
diff --git a/src/main/java/net/minecraft/server/RegistryBlockID.java b/src/main/java/net/minecraft/server/RegistryBlockID.java
|
||||
index ef332d65..a804a67e 100644
|
||||
index 7cc7eb7735..a804a67e16 100644
|
||||
--- a/src/main/java/net/minecraft/server/RegistryBlockID.java
|
||||
+++ b/src/main/java/net/minecraft/server/RegistryBlockID.java
|
||||
@@ -8,7 +8,7 @@ import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
-public class RegistryBlockID<T> implements Registry<T> {
|
||||
+public class RegistryBlockID<T> implements Registry { // Paper - decompile fix
|
||||
|
||||
private int a;
|
||||
private final IdentityHashMap<T, Integer> b;
|
||||
@@ -27,7 +27,7 @@ public class RegistryBlockID<T> implements Registry<T> {
|
||||
this.b.put(t0, Integer.valueOf(i));
|
||||
|
||||
while (this.c.size() <= i) {
|
||||
- this.c.add((Object) null);
|
||||
+ this.c.add(null); // Paper - decompile fix
|
||||
}
|
||||
|
||||
this.c.set(i, t0);
|
||||
@@ -56,6 +56,7 @@ public class RegistryBlockID<T> implements Registry<T> {
|
||||
@@ -56,6 +56,7 @@ public class RegistryBlockID<T> implements Registry { // Paper - decompile fix
|
||||
return Iterators.filter(this.c.iterator(), Predicates.notNull());
|
||||
}
|
||||
|
||||
|
@ -864,52 +715,6 @@ index ef332d65..a804a67e 100644
|
|||
public int a() {
|
||||
return this.b.size();
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/ServerPing.java b/src/main/java/net/minecraft/server/ServerPing.java
|
||||
index 2179664a..d7e1ecc0 100644
|
||||
--- a/src/main/java/net/minecraft/server/ServerPing.java
|
||||
+++ b/src/main/java/net/minecraft/server/ServerPing.java
|
||||
@@ -102,11 +102,11 @@ public class ServerPing {
|
||||
return jsonobject;
|
||||
}
|
||||
|
||||
- public JsonElement serialize(Object object, Type type, JsonSerializationContext jsonserializationcontext) {
|
||||
+ public JsonElement serialize(ServerPing object, Type type, JsonSerializationContext jsonserializationcontext) { // Paper - decompile fix
|
||||
return this.a((ServerPing) object, type, jsonserializationcontext);
|
||||
}
|
||||
|
||||
- public Object deserialize(JsonElement jsonelement, Type type, JsonDeserializationContext jsondeserializationcontext) throws JsonParseException {
|
||||
+ public ServerPing deserialize(JsonElement jsonelement, Type type, JsonDeserializationContext jsondeserializationcontext) throws JsonParseException { // Paper - decompile fix
|
||||
return this.a(jsonelement, type, jsondeserializationcontext);
|
||||
}
|
||||
}
|
||||
@@ -147,11 +147,11 @@ public class ServerPing {
|
||||
return jsonobject;
|
||||
}
|
||||
|
||||
- public JsonElement serialize(Object object, Type type, JsonSerializationContext jsonserializationcontext) {
|
||||
+ public JsonElement serialize(ServerPing.ServerData object, Type type, JsonSerializationContext jsonserializationcontext) { // Paper - decompile fix
|
||||
return this.a((ServerPing.ServerData) object, type, jsonserializationcontext);
|
||||
}
|
||||
|
||||
- public Object deserialize(JsonElement jsonelement, Type type, JsonDeserializationContext jsondeserializationcontext) throws JsonParseException {
|
||||
+ public ServerPing.ServerData deserialize(JsonElement jsonelement, Type type, JsonDeserializationContext jsondeserializationcontext) throws JsonParseException { // Paper - decompile fix
|
||||
return this.a(jsonelement, type, jsondeserializationcontext);
|
||||
}
|
||||
}
|
||||
@@ -235,11 +235,11 @@ public class ServerPing {
|
||||
return jsonobject;
|
||||
}
|
||||
|
||||
- public JsonElement serialize(Object object, Type type, JsonSerializationContext jsonserializationcontext) {
|
||||
+ public JsonElement serialize(ServerPing.ServerPingPlayerSample object, Type type, JsonSerializationContext jsonserializationcontext) { // Paper - decompile fix
|
||||
return this.a((ServerPing.ServerPingPlayerSample) object, type, jsonserializationcontext);
|
||||
}
|
||||
|
||||
- public Object deserialize(JsonElement jsonelement, Type type, JsonDeserializationContext jsondeserializationcontext) throws JsonParseException {
|
||||
+ public ServerPing.ServerPingPlayerSample deserialize(JsonElement jsonelement, Type type, JsonDeserializationContext jsondeserializationcontext) throws JsonParseException { // Paper - decompile fix
|
||||
return this.a(jsonelement, type, jsondeserializationcontext);
|
||||
}
|
||||
}
|
||||
--
|
||||
2.14.1.windows.1
|
||||
2.18.0
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
From 4bffc6c4381b8f560de9b87dae45060fa43bf997 Mon Sep 17 00:00:00 2001
|
||||
From 914ca3a9a21de489bc689e6d0331e626f2b255e7 Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
Date: Wed, 4 Jul 2018 01:40:13 -0400
|
||||
Subject: [PATCH] Add MinecraftKey Information to Objects
|
||||
|
@ -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
|
||||
@@ -171,7 +171,7 @@ 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
|
||||
@@ -46,7 +46,7 @@ import org.bukkit.event.entity.EntityPortalEvent;
|
||||
|
@ -40,7 +40,7 @@ index a1050912b..7e691baf9 100644
|
|||
private int id;
|
||||
public boolean j;
|
||||
public final List<Entity> passengers;
|
||||
@@ -1763,12 +1763,29 @@ public abstract class Entity implements INamableTileEntity, ICommandListener {
|
||||
@@ -1758,12 +1758,29 @@ public abstract class Entity implements INamableTileEntity, ICommandListener {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -75,20 +75,20 @@ 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
|
||||
@@ -238,6 +238,7 @@ public class EntityTypes<T extends Entity> {
|
||||
@@ -240,6 +240,7 @@ public class EntityTypes<T extends Entity> {
|
||||
}
|
||||
}
|
||||
|
||||
+ 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 +1,9 @@
|
||||
|
@ -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
|
||||
@@ -7,11 +7,11 @@ import org.apache.logging.log4j.Logger;
|
||||
|
@ -147,5 +147,5 @@ index 8a0453245..5ca7fef51 100644
|
|||
public World getWorld() {
|
||||
return this.world;
|
||||
--
|
||||
2.17.1
|
||||
2.18.0
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
From 9194ef5bb3a3499c930324ad6b4451399c8d84fa Mon Sep 17 00:00:00 2001
|
||||
From 67a6288644176621a491a96d0d283fe92ee3f6c7 Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
Date: Wed, 4 Jul 2018 02:10:36 -0400
|
||||
Subject: [PATCH] Store reference to current Chunk for Entity and Block
|
||||
|
@ -8,19 +8,19 @@ This enables us a fast reference to the entities current chunk instead
|
|||
of having to look it up by hashmap lookups.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
|
||||
index 2d06202da..8d9aa271a 100644
|
||||
index 35cb5ca575..85f33c140e 100644
|
||||
--- a/src/main/java/net/minecraft/server/Chunk.java
|
||||
+++ b/src/main/java/net/minecraft/server/Chunk.java
|
||||
@@ -33,7 +33,7 @@ public class Chunk implements IChunkAccess {
|
||||
private final BiomeBase[] g;
|
||||
private final boolean[] h;
|
||||
private final Map<BlockPosition, NBTTagCompound> i;
|
||||
- private boolean j;
|
||||
+ private boolean j; public boolean isLoaded() { return j; } // Paper - OBFHELPER
|
||||
private final BiomeBase[] f;
|
||||
private final boolean[] g;
|
||||
private final Map<BlockPosition, NBTTagCompound> h;
|
||||
- private boolean i;
|
||||
+ private boolean i;public boolean isLoaded() { return i; } // Paper - OBFHELPER
|
||||
public final World world;
|
||||
public final Map<HeightMap.Type, HeightMap> heightMap;
|
||||
public final int locX;
|
||||
@@ -63,7 +63,30 @@ public class Chunk implements IChunkAccess {
|
||||
@@ -62,7 +62,30 @@ public class Chunk implements IChunkAccess {
|
||||
// CraftBukkit start - Neighbor loaded cache for chunk lighting and entity ticking
|
||||
private int neighbors = 0x1 << 12;
|
||||
public long chunkKey;
|
||||
|
@ -51,16 +51,16 @@ index 2d06202da..8d9aa271a 100644
|
|||
public boolean areNeighborsLoaded(final int radius) {
|
||||
switch (radius) {
|
||||
case 2:
|
||||
@@ -94,7 +117,7 @@ public class Chunk implements IChunkAccess {
|
||||
this.h = new boolean[256];
|
||||
this.i = Maps.newHashMap();
|
||||
@@ -93,7 +116,7 @@ public class Chunk implements IChunkAccess {
|
||||
this.g = new boolean[256];
|
||||
this.h = Maps.newHashMap();
|
||||
this.heightMap = Maps.newHashMap();
|
||||
- this.tileEntities = Maps.newHashMap();
|
||||
+ this.tileEntities = new TileEntityHashMap(); // Paper
|
||||
this.p = Maps.newHashMap();
|
||||
this.q = Maps.newHashMap();
|
||||
this.r = Maps.newHashMap();
|
||||
this.s = new ShortList[16];
|
||||
@@ -646,6 +669,9 @@ public class Chunk implements IChunkAccess {
|
||||
this.r = new ShortList[16];
|
||||
@@ -645,6 +668,9 @@ public class Chunk implements IChunkAccess {
|
||||
entity.af = k;
|
||||
entity.ag = this.locZ;
|
||||
this.entitySlices[k].add(entity);
|
||||
|
@ -70,7 +70,7 @@ index 2d06202da..8d9aa271a 100644
|
|||
}
|
||||
|
||||
public void a(HeightMap.Type heightmap_type, long[] along) {
|
||||
@@ -664,8 +690,12 @@ public class Chunk implements IChunkAccess {
|
||||
@@ -663,8 +689,12 @@ public class Chunk implements IChunkAccess {
|
||||
if (i >= this.entitySlices.length) {
|
||||
i = this.entitySlices.length - 1;
|
||||
}
|
||||
|
@ -85,7 +85,7 @@ index 2d06202da..8d9aa271a 100644
|
|||
}
|
||||
|
||||
public boolean c(BlockPosition blockposition) {
|
||||
@@ -829,6 +859,7 @@ public class Chunk implements IChunkAccess {
|
||||
@@ -830,6 +860,7 @@ public class Chunk implements IChunkAccess {
|
||||
}
|
||||
}
|
||||
// Spigot End
|
||||
|
@ -94,7 +94,7 @@ index 2d06202da..8d9aa271a 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 7e691baf9..19109ee1d 100644
|
||||
index 044f7b5aa0..591ae114cf 100644
|
||||
--- a/src/main/java/net/minecraft/server/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/server/Entity.java
|
||||
@@ -134,7 +134,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
|
@ -106,7 +106,7 @@ index 7e691baf9..19109ee1d 100644
|
|||
public int ae; public int getChunkX() { return ae; } // Paper - OBFHELPER
|
||||
public int af; public int getChunkY() { return af; } // Paper - OBFHELPER
|
||||
public int ag; public int getChunkZ() { return ag; } // Paper - OBFHELPER
|
||||
@@ -1764,6 +1764,39 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
@@ -1759,6 +1759,39 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
}
|
||||
|
||||
// Paper start
|
||||
|
@ -147,7 +147,7 @@ index 7e691baf9..19109ee1d 100644
|
|||
private String entityKeyString;
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/TileEntity.java b/src/main/java/net/minecraft/server/TileEntity.java
|
||||
index 5ca7fef51..9361667c3 100644
|
||||
index 7390061bf0..c69209497b 100644
|
||||
--- a/src/main/java/net/minecraft/server/TileEntity.java
|
||||
+++ b/src/main/java/net/minecraft/server/TileEntity.java
|
||||
@@ -41,6 +41,15 @@ public abstract class TileEntity implements KeyedObject { // Paper
|
||||
|
@ -167,7 +167,7 @@ index 5ca7fef51..9361667c3 100644
|
|||
|
||||
@Nullable
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
||||
index b542b17fd..9fc7ac8c0 100644
|
||||
index b542b17fd0..9fc7ac8c02 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
||||
@@ -9,6 +9,7 @@ import java.util.UUID;
|
||||
|
@ -192,5 +192,5 @@ index b542b17fd..9fc7ac8c0 100644
|
|||
/**
|
||||
* Order is *EXTREMELY* important -- keep it right! =D
|
||||
--
|
||||
2.17.1
|
||||
2.18.0
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
From cfcc186292e5c96e42aa2588663c3e9ff49c0e34 Mon Sep 17 00:00:00 2001
|
||||
From 3e64fc7d6db1a903430d4313f4da4d84173428c4 Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
Date: Wed, 4 Jul 2018 02:13:59 -0400
|
||||
Subject: [PATCH] Store counts for each Entity/Block Entity Type
|
||||
|
@ -6,10 +6,10 @@ Subject: [PATCH] Store counts for each Entity/Block Entity Type
|
|||
Opens door for future patches to optimize performance
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
|
||||
index 7837f1024c..24a2ec4b4a 100644
|
||||
index 85f33c140e..bcafd86fb8 100644
|
||||
--- a/src/main/java/net/minecraft/server/Chunk.java
|
||||
+++ b/src/main/java/net/minecraft/server/Chunk.java
|
||||
@@ -64,15 +64,19 @@ public class Chunk implements IChunkAccess {
|
||||
@@ -63,15 +63,19 @@ public class Chunk implements IChunkAccess {
|
||||
private int neighbors = 0x1 << 12;
|
||||
public long chunkKey;
|
||||
// Paper start
|
||||
|
@ -29,7 +29,7 @@ index 7837f1024c..24a2ec4b4a 100644
|
|||
}
|
||||
return replaced;
|
||||
}
|
||||
@@ -82,6 +86,7 @@ public class Chunk implements IChunkAccess {
|
||||
@@ -81,6 +85,7 @@ public class Chunk implements IChunkAccess {
|
||||
TileEntity removed = super.remove(key);
|
||||
if (removed != null) {
|
||||
removed.setCurrentChunk(null);
|
||||
|
@ -37,7 +37,7 @@ index 7837f1024c..24a2ec4b4a 100644
|
|||
}
|
||||
return removed;
|
||||
}
|
||||
@@ -671,6 +676,7 @@ public class Chunk implements IChunkAccess {
|
||||
@@ -670,6 +675,7 @@ public class Chunk implements IChunkAccess {
|
||||
this.entitySlices[k].add(entity);
|
||||
// Paper start
|
||||
entity.setCurrentChunk(this);
|
||||
|
@ -45,7 +45,7 @@ index 7837f1024c..24a2ec4b4a 100644
|
|||
// Paper end
|
||||
}
|
||||
|
||||
@@ -695,6 +701,7 @@ public class Chunk implements IChunkAccess {
|
||||
@@ -694,6 +700,7 @@ public class Chunk implements IChunkAccess {
|
||||
return;
|
||||
}
|
||||
entity.setCurrentChunk(null);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
From 145b2523893f196854951df2dbbcbd9a46aca84b Mon Sep 17 00:00:00 2001
|
||||
From b78abc658c7bb0dfd27c6ad4b701005462f2c7d5 Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
Date: Thu, 3 Mar 2016 04:00:11 -0600
|
||||
Subject: [PATCH] Timings v2
|
||||
|
@ -135,192 +135,6 @@ index 0000000000..4f624e39c7
|
|||
+ return Timings.ofSafe("## Packet - " + packet.getClass().getSimpleName(), packetProcessTimer);
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/co/aikar/timings/TimedChunkGenerator.java b/src/main/java/co/aikar/timings/TimedChunkGenerator.java
|
||||
new file mode 100644
|
||||
index 0000000000..0bb63600f3
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/co/aikar/timings/TimedChunkGenerator.java
|
||||
@@ -0,0 +1,180 @@
|
||||
+/*
|
||||
+ * This file is licensed under the MIT License (MIT).
|
||||
+ *
|
||||
+ * Copyright (c) 2014-2016 Daniel Ennis <http://aikar.co>
|
||||
+ *
|
||||
+ * 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 co.aikar.timings;
|
||||
+
|
||||
+import net.minecraft.server.BiomeBase;
|
||||
+import net.minecraft.server.BiomeBase.BiomeMeta;
|
||||
+import net.minecraft.server.BlockPosition;
|
||||
+import net.minecraft.server.Chunk;
|
||||
+import net.minecraft.server.EnumCreatureType;
|
||||
+import net.minecraft.server.GeneratorSettings;
|
||||
+import net.minecraft.server.IChunkAccess;
|
||||
+import net.minecraft.server.RegionLimitedWorldAccess;
|
||||
+import net.minecraft.server.StructureGenerator;
|
||||
+import net.minecraft.server.StructureStart;
|
||||
+import net.minecraft.server.World;
|
||||
+import net.minecraft.server.WorldChunkManager;
|
||||
+import net.minecraft.server.WorldGenFeatureConfiguration;
|
||||
+import net.minecraft.server.WorldGenStage;
|
||||
+import net.minecraft.server.WorldServer;
|
||||
+import org.bukkit.Location;
|
||||
+import org.bukkit.craftbukkit.generator.InternalChunkGenerator;
|
||||
+import org.bukkit.generator.BlockPopulator;
|
||||
+
|
||||
+import javax.annotation.Nullable;
|
||||
+import java.util.List;
|
||||
+import java.util.Random;
|
||||
+
|
||||
+import it.unimi.dsi.fastutil.longs.Long2ObjectMap;
|
||||
+import it.unimi.dsi.fastutil.longs.LongSet;
|
||||
+
|
||||
+// TODO: timing handlers
|
||||
+public class TimedChunkGenerator extends InternalChunkGenerator {
|
||||
+ private final WorldServer world;
|
||||
+ private final InternalChunkGenerator timedGenerator;
|
||||
+
|
||||
+ public TimedChunkGenerator(WorldServer worldServer, InternalChunkGenerator gen) {
|
||||
+ world = worldServer;
|
||||
+ timedGenerator = gen;
|
||||
+ }
|
||||
+
|
||||
+
|
||||
+ @Override
|
||||
+ public ChunkData generateChunkData(org.bukkit.World world, Random random, int x, int z, BiomeGrid biome) {
|
||||
+ return timedGenerator.generateChunkData(world, random, x, z, biome);
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public boolean canSpawn(org.bukkit.World world, int x, int z) {
|
||||
+ return timedGenerator.canSpawn(world, x, z);
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public List<BlockPopulator> getDefaultPopulators(org.bukkit.World world) {
|
||||
+ return timedGenerator.getDefaultPopulators(world);
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public Location getFixedSpawnLocation(org.bukkit.World world, Random random) {
|
||||
+ return timedGenerator.getFixedSpawnLocation(world, random);
|
||||
+ }
|
||||
+ /*
|
||||
+ @Override
|
||||
+ public Chunk getOrCreateChunk(int i, int j) {
|
||||
+ try (Timing ignored = world.timings.chunkGeneration.startTiming()) {
|
||||
+ return timedGenerator.getOrCreateChunk(i, j);
|
||||
+ }
|
||||
+ }
|
||||
+ */
|
||||
+
|
||||
+ @Override
|
||||
+ public void createChunk(IChunkAccess ichunkaccess) {
|
||||
+ try (Timing ignored = world.timings.chunkGeneration.startTiming()) {
|
||||
+ timedGenerator.createChunk(ichunkaccess);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public void addFeatures(RegionLimitedWorldAccess regionlimitedworldaccess, WorldGenStage.Features worldgenstage_features) {
|
||||
+ timedGenerator.addFeatures(regionlimitedworldaccess, worldgenstage_features);
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public void addDecorations(RegionLimitedWorldAccess regionlimitedworldaccess) {
|
||||
+ timedGenerator.addDecorations(regionlimitedworldaccess);
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public void addMobs(RegionLimitedWorldAccess regionlimitedworldaccess) {
|
||||
+ timedGenerator.addMobs(regionlimitedworldaccess);
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public List<BiomeBase.BiomeMeta> getMobsFor(EnumCreatureType enumcreaturetype, BlockPosition blockposition) {
|
||||
+ return timedGenerator.getMobsFor(enumcreaturetype, blockposition);
|
||||
+ }
|
||||
+
|
||||
+ @Nullable
|
||||
+ @Override
|
||||
+ public BlockPosition findNearestMapFeature(World world, String s, BlockPosition blockposition, int i) {
|
||||
+ return timedGenerator.findNearestMapFeature(world, s, blockposition, i);
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public GeneratorSettings getSettings() {
|
||||
+ return timedGenerator.getSettings();
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public int a(World world, boolean flag, boolean flag1) {
|
||||
+ return timedGenerator.a(world, flag, flag1);
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public WorldChunkManager getWorldChunkManager() {
|
||||
+ return timedGenerator.getWorldChunkManager();
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public long getSeed() {
|
||||
+ return timedGenerator.getSeed();
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public int getSpawnHeight() {
|
||||
+ return timedGenerator.getSpawnHeight();
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public int e() {
|
||||
+ return timedGenerator.e();
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public World getWorld() {
|
||||
+ return timedGenerator.getWorld();
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public Long2ObjectMap<LongSet> getStructureCache(StructureGenerator structuregenerator) {
|
||||
+ return timedGenerator.getStructureCache(structuregenerator);
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public Long2ObjectMap<StructureStart> getStructureStartCache(StructureGenerator structuregenerator) {
|
||||
+ return timedGenerator.getStructureStartCache(structuregenerator);
|
||||
+ }
|
||||
+
|
||||
+ @Nullable
|
||||
+ @Override
|
||||
+ public WorldGenFeatureConfiguration getFeatureConfiguration(BiomeBase biomebase, StructureGenerator structuregenerator) {
|
||||
+ return timedGenerator.getFeatureConfiguration(biomebase, structuregenerator);
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public boolean canSpawnStructure(BiomeBase biomebase, StructureGenerator structuregenerator) {
|
||||
+ return timedGenerator.canSpawnStructure(biomebase, structuregenerator);
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/co/aikar/timings/WorldTimingsHandler.java b/src/main/java/co/aikar/timings/WorldTimingsHandler.java
|
||||
new file mode 100644
|
||||
index 0000000000..145cb274b0
|
||||
|
@ -476,17 +290,14 @@ index d2efcca80a..4812da0dac 100644
|
|||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/Block.java b/src/main/java/net/minecraft/server/Block.java
|
||||
index 9e298f1216..a0c9fc617a 100644
|
||||
index 8811dbc9b3..7818a3b6a7 100644
|
||||
--- a/src/main/java/net/minecraft/server/Block.java
|
||||
+++ b/src/main/java/net/minecraft/server/Block.java
|
||||
@@ -28,8 +28,16 @@ public class Block implements IMaterial {
|
||||
private IBlockData blockData;
|
||||
protected final boolean o;
|
||||
private final boolean p;
|
||||
- @Nullable
|
||||
- private String name;
|
||||
+ @Nullable // Paper start
|
||||
+ public String name;
|
||||
@@ -23,6 +23,15 @@ public class Block implements IMaterial {
|
||||
protected final boolean i;
|
||||
protected final SoundEffectType stepSound;
|
||||
protected final Material material;
|
||||
+ // Paper start
|
||||
+ public co.aikar.timings.Timing timing;
|
||||
+ public co.aikar.timings.Timing getTiming() {
|
||||
+ if (timing == null) {
|
||||
|
@ -495,11 +306,11 @@ index 9e298f1216..a0c9fc617a 100644
|
|||
+ return timing;
|
||||
+ }
|
||||
+ // Paper end
|
||||
private static final ThreadLocal<Object2ByteLinkedOpenHashMap<Object>> r = ThreadLocal.withInitial(() -> {
|
||||
Object2ByteLinkedOpenHashMap object2bytelinkedopenhashmap = new Object2ByteLinkedOpenHashMap(200) {
|
||||
protected void rehash(int i) {}
|
||||
protected final MaterialMapColor l;
|
||||
private final float frictionFactor;
|
||||
protected final BlockStateList<Block, IBlockData> blockStateList;
|
||||
diff --git a/src/main/java/net/minecraft/server/ChunkMap.java b/src/main/java/net/minecraft/server/ChunkMap.java
|
||||
index 027b7cce98..4e51bd301a 100644
|
||||
index e3d1761b49..fbebd4591c 100644
|
||||
--- a/src/main/java/net/minecraft/server/ChunkMap.java
|
||||
+++ b/src/main/java/net/minecraft/server/ChunkMap.java
|
||||
@@ -14,6 +14,7 @@ public class ChunkMap extends Long2ObjectOpenHashMap<Chunk> {
|
||||
|
@ -530,27 +341,38 @@ index 027b7cce98..4e51bd301a 100644
|
|||
// CraftBukkit end
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
||||
index 00cd8d8cea..aabdc9e2f0 100644
|
||||
index 9e805c5d22..0034956af9 100644
|
||||
--- a/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
||||
@@ -122,14 +122,13 @@ public class ChunkProviderServer implements IChunkProvider {
|
||||
if (chunk != null) {
|
||||
return chunk;
|
||||
} else {
|
||||
- try {
|
||||
- world.timings.syncChunkLoadTimer.startTiming(); // Spigot
|
||||
+ try (co.aikar.timings.Timing timing = world.timings.chunkGeneration.startTiming()) {
|
||||
+ ; // Spigot
|
||||
chunk = (Chunk) this.generateChunk(i, j).get();
|
||||
return chunk;
|
||||
} catch (ExecutionException | InterruptedException interruptedexception) {
|
||||
throw this.a(i, j, (Throwable) interruptedexception);
|
||||
}
|
||||
- finally { world.timings.syncChunkLoadTimer.stopTiming(); } // Spigot
|
||||
}
|
||||
@@ -90,7 +90,7 @@ public class ChunkProviderServer implements IChunkProvider {
|
||||
}
|
||||
|
||||
@@ -232,7 +231,7 @@ public class ChunkProviderServer implements IChunkProvider {
|
||||
if (flag) {
|
||||
- try {
|
||||
+ try (co.aikar.timings.Timing timing = world.timings.syncChunkLoadTimer.startTiming()) { // Paper
|
||||
// CraftBukkit - decompile error
|
||||
chunk = this.chunkLoader.a(this.world, i, j, (chunk1) -> {
|
||||
chunk1.setLastSaved(this.world.getTime());
|
||||
@@ -106,8 +106,7 @@ public class ChunkProviderServer implements IChunkProvider {
|
||||
this.asyncTaskHandler.postToMainThread(chunk::addEntities);
|
||||
return chunk;
|
||||
} else if (flag1) {
|
||||
- try {
|
||||
- world.timings.syncChunkLoadTimer.startTiming(); // Spigot
|
||||
+ try (co.aikar.timings.Timing timing = world.timings.chunkGeneration.startTiming()) { // Paper
|
||||
this.batchScheduler.b();
|
||||
this.batchScheduler.a(new ChunkCoordIntPair(i, j));
|
||||
CompletableFuture<ProtoChunk> completablefuture = this.batchScheduler.c(); // CraftBukkit - decompile error
|
||||
@@ -116,7 +115,7 @@ public class ChunkProviderServer implements IChunkProvider {
|
||||
} catch (RuntimeException runtimeexception) {
|
||||
throw this.a(i, j, (Throwable) runtimeexception);
|
||||
}
|
||||
- finally { world.timings.syncChunkLoadTimer.stopTiming(); } // Spigot
|
||||
+ // finally { world.timings.syncChunkLoadTimer.stopTiming(); } // Spigot // Paper
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
@@ -206,7 +205,7 @@ public class ChunkProviderServer implements IChunkProvider {
|
||||
}
|
||||
|
||||
public void saveChunk(IChunkAccess ichunkaccess, boolean unloaded) { // Spigot
|
||||
|
@ -560,7 +382,7 @@ index 00cd8d8cea..aabdc9e2f0 100644
|
|||
this.chunkLoader.saveChunk(this.world, ichunkaccess, unloaded); // Spigot
|
||||
} catch (IOException ioexception) {
|
||||
diff --git a/src/main/java/net/minecraft/server/ChunkRegionLoader.java b/src/main/java/net/minecraft/server/ChunkRegionLoader.java
|
||||
index 88301ee61e..5001fd11dc 100644
|
||||
index df07b2b889..f969c036f3 100644
|
||||
--- a/src/main/java/net/minecraft/server/ChunkRegionLoader.java
|
||||
+++ b/src/main/java/net/minecraft/server/ChunkRegionLoader.java
|
||||
@@ -1,5 +1,6 @@
|
||||
|
@ -570,7 +392,7 @@ index 88301ee61e..5001fd11dc 100644
|
|||
import com.google.common.collect.Maps;
|
||||
import com.mojang.datafixers.DataFixTypes;
|
||||
import com.mojang.datafixers.DataFixer;
|
||||
@@ -690,7 +691,7 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver {
|
||||
@@ -678,7 +679,7 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver {
|
||||
public void loadEntities(NBTTagCompound nbttagcompound, Chunk chunk) {
|
||||
NBTTagList nbttaglist = nbttagcompound.getList("Entities", 10);
|
||||
World world = chunk.getWorld();
|
||||
|
@ -579,7 +401,7 @@ index 88301ee61e..5001fd11dc 100644
|
|||
|
||||
for (int i = 0; i < nbttaglist.size(); ++i) {
|
||||
NBTTagCompound nbttagcompound1 = nbttaglist.getCompound(i);
|
||||
@@ -699,8 +700,6 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver {
|
||||
@@ -687,8 +688,6 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver {
|
||||
chunk.f(true);
|
||||
}
|
||||
|
||||
|
@ -588,18 +410,18 @@ index 88301ee61e..5001fd11dc 100644
|
|||
NBTTagList nbttaglist1 = nbttagcompound.getList("TileEntities", 10);
|
||||
|
||||
for (int j = 0; j < nbttaglist1.size(); ++j) {
|
||||
@@ -717,8 +716,6 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver {
|
||||
@@ -705,8 +704,6 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver {
|
||||
}
|
||||
}
|
||||
}
|
||||
- world.timings.syncChunkLoadTileEntitiesTimer.stopTiming(); // Spigot
|
||||
- world.timings.syncChunkLoadTileTicksTimer.startTiming(); // Spigot
|
||||
|
||||
if (nbttagcompound.hasKeyOfType("TileTicks", 9) && world.I() instanceof TickListServer) {
|
||||
((TickListServer) world.I()).a(nbttagcompound.getList("TileTicks", 10));
|
||||
@@ -727,7 +724,7 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver {
|
||||
if (nbttagcompound.hasKeyOfType("LiquidTicks", 9) && world.H() instanceof TickListServer) {
|
||||
((TickListServer) world.H()).a(nbttagcompound.getList("LiquidTicks", 10));
|
||||
if (nbttagcompound.hasKeyOfType("TileTicks", 9) && world.J() instanceof TickListServer) {
|
||||
((TickListServer) world.J()).a(nbttagcompound.getList("TileTicks", 10));
|
||||
@@ -715,7 +712,7 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver {
|
||||
if (nbttagcompound.hasKeyOfType("LiquidTicks", 9) && world.I() instanceof TickListServer) {
|
||||
((TickListServer) world.I()).a(nbttagcompound.getList("LiquidTicks", 10));
|
||||
}
|
||||
- world.timings.syncChunkLoadTileTicksTimer.stopTiming(); // Spigot
|
||||
+ world.timings.chunkLoadLevelTimer.stopTiming(); // Spigot
|
||||
|
@ -607,7 +429,7 @@ index 88301ee61e..5001fd11dc 100644
|
|||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/DedicatedServer.java b/src/main/java/net/minecraft/server/DedicatedServer.java
|
||||
index 3706e44a34..bf1fffcfee 100644
|
||||
index efa738d4ec..dabad6b055 100644
|
||||
--- a/src/main/java/net/minecraft/server/DedicatedServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/DedicatedServer.java
|
||||
@@ -29,7 +29,7 @@ import org.apache.logging.log4j.Level;
|
||||
|
@ -622,7 +444,7 @@ index 3706e44a34..bf1fffcfee 100644
|
|||
@@ -443,7 +443,7 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
|
||||
}
|
||||
|
||||
public void aW() {
|
||||
public void aU() {
|
||||
- SpigotTimings.serverCommandTimer.startTiming(); // Spigot
|
||||
+ MinecraftTimings.serverCommandTimer.startTiming(); // Spigot
|
||||
while (!this.serverCommandQueue.isEmpty()) {
|
||||
|
@ -636,7 +458,7 @@ index 3706e44a34..bf1fffcfee 100644
|
|||
+ MinecraftTimings.serverCommandTimer.stopTiming(); // Spigot
|
||||
}
|
||||
|
||||
public boolean S() {
|
||||
public boolean Q() {
|
||||
@@ -708,7 +708,20 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
|
||||
return remoteControlCommandListener.getMessages();
|
||||
}
|
||||
|
@ -660,7 +482,7 @@ index 3706e44a34..bf1fffcfee 100644
|
|||
return waitable.get();
|
||||
} catch (java.util.concurrent.ExecutionException e) {
|
||||
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
||||
index 19109ee1dd..7c238d728b 100644
|
||||
index 591ae114cf..ec5c9fd735 100644
|
||||
--- a/src/main/java/net/minecraft/server/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/server/Entity.java
|
||||
@@ -29,7 +29,8 @@ import org.bukkit.command.CommandSender;
|
||||
|
@ -682,7 +504,7 @@ index 19109ee1dd..7c238d728b 100644
|
|||
// Spigot start
|
||||
public final byte activationType = org.spigotmc.ActivationRange.initializeEntityActivationType(this);
|
||||
public final boolean defaultActivationState;
|
||||
@@ -541,7 +542,6 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
@@ -536,7 +537,6 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
}
|
||||
|
||||
public void move(EnumMoveType enummovetype, double d0, double d1, double d2) {
|
||||
|
@ -690,7 +512,7 @@ index 19109ee1dd..7c238d728b 100644
|
|||
if (this.noclip) {
|
||||
this.a(this.getBoundingBox().d(d0, d1, d2));
|
||||
this.recalcPosition();
|
||||
@@ -890,7 +890,6 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
@@ -886,7 +886,6 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
|
||||
this.world.methodProfiler.e();
|
||||
}
|
||||
|
@ -699,7 +521,7 @@ index 19109ee1dd..7c238d728b 100644
|
|||
|
||||
protected float ab() {
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
index 5b33997529..1722855ac5 100644
|
||||
index 91c4785889..8a41a1dca8 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
@@ -32,7 +32,7 @@ import org.bukkit.event.entity.EntityTeleportEvent;
|
||||
|
@ -711,7 +533,7 @@ index 5b33997529..1722855ac5 100644
|
|||
|
||||
public abstract class EntityLiving extends Entity {
|
||||
|
||||
@@ -1985,7 +1985,6 @@ public abstract class EntityLiving extends Entity {
|
||||
@@ -2020,7 +2020,6 @@ public abstract class EntityLiving extends Entity {
|
||||
}
|
||||
|
||||
public void tick() {
|
||||
|
@ -719,7 +541,7 @@ index 5b33997529..1722855ac5 100644
|
|||
super.tick();
|
||||
this.cV();
|
||||
this.o();
|
||||
@@ -2059,9 +2058,7 @@ public abstract class EntityLiving extends Entity {
|
||||
@@ -2094,9 +2093,7 @@ public abstract class EntityLiving extends Entity {
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -729,7 +551,7 @@ index 5b33997529..1722855ac5 100644
|
|||
double d0 = this.locX - this.lastX;
|
||||
double d1 = this.locZ - this.lastZ;
|
||||
float f = (float) (d0 * d0 + d1 * d1);
|
||||
@@ -2137,8 +2134,6 @@ public abstract class EntityLiving extends Entity {
|
||||
@@ -2172,8 +2169,6 @@ public abstract class EntityLiving extends Entity {
|
||||
} else {
|
||||
this.bv = 0;
|
||||
}
|
||||
|
@ -738,7 +560,7 @@ index 5b33997529..1722855ac5 100644
|
|||
}
|
||||
|
||||
protected float e(float f, float f1) {
|
||||
@@ -2208,7 +2203,6 @@ public abstract class EntityLiving extends Entity {
|
||||
@@ -2243,7 +2238,6 @@ public abstract class EntityLiving extends Entity {
|
||||
}
|
||||
|
||||
this.world.methodProfiler.a("ai");
|
||||
|
@ -746,7 +568,7 @@ index 5b33997529..1722855ac5 100644
|
|||
if (this.isFrozen()) {
|
||||
this.bg = false;
|
||||
this.bh = 0.0F;
|
||||
@@ -2219,7 +2213,6 @@ public abstract class EntityLiving extends Entity {
|
||||
@@ -2254,7 +2248,6 @@ public abstract class EntityLiving extends Entity {
|
||||
this.doTick();
|
||||
this.world.methodProfiler.e();
|
||||
}
|
||||
|
@ -754,7 +576,7 @@ index 5b33997529..1722855ac5 100644
|
|||
|
||||
this.world.methodProfiler.e();
|
||||
this.world.methodProfiler.a("jump");
|
||||
@@ -2244,9 +2237,7 @@ public abstract class EntityLiving extends Entity {
|
||||
@@ -2279,9 +2272,7 @@ public abstract class EntityLiving extends Entity {
|
||||
this.n();
|
||||
AxisAlignedBB axisalignedbb = this.getBoundingBox();
|
||||
|
||||
|
@ -764,7 +586,7 @@ index 5b33997529..1722855ac5 100644
|
|||
this.world.methodProfiler.e();
|
||||
this.world.methodProfiler.a("push");
|
||||
if (this.bw > 0) {
|
||||
@@ -2254,9 +2245,7 @@ public abstract class EntityLiving extends Entity {
|
||||
@@ -2289,9 +2280,7 @@ public abstract class EntityLiving extends Entity {
|
||||
this.a(axisalignedbb, this.getBoundingBox());
|
||||
}
|
||||
|
||||
|
@ -806,7 +628,7 @@ index ae31935c48..70c9b1f50c 100644
|
|||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 1a59a6a1f2..ce4bf0a68f 100644
|
||||
index 2c69e68276..0ebe754619 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -1,5 +1,6 @@
|
||||
|
@ -815,8 +637,8 @@ index 1a59a6a1f2..ce4bf0a68f 100644
|
|||
+import co.aikar.timings.Timings;
|
||||
import com.google.common.base.Stopwatch;
|
||||
import com.google.common.collect.Lists;
|
||||
import com.google.common.collect.Queues;
|
||||
@@ -62,8 +63,8 @@ import org.bukkit.Bukkit;
|
||||
import com.google.common.collect.Maps;
|
||||
@@ -66,8 +67,8 @@ import org.bukkit.Bukkit;
|
||||
import org.bukkit.craftbukkit.CraftServer;
|
||||
import org.bukkit.craftbukkit.Main;
|
||||
// CraftBukkit end
|
||||
|
@ -826,7 +648,7 @@ index 1a59a6a1f2..ce4bf0a68f 100644
|
|||
|
||||
public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStatistics, ICommandListener, Runnable {
|
||||
|
||||
@@ -599,6 +600,7 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati
|
||||
@@ -616,6 +617,7 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati
|
||||
}
|
||||
// CraftBukkit end
|
||||
MinecraftServer.LOGGER.info("Stopping server");
|
||||
|
@ -834,16 +656,16 @@ index 1a59a6a1f2..ce4bf0a68f 100644
|
|||
// CraftBukkit start
|
||||
if (this.server != null) {
|
||||
this.server.disablePlugins();
|
||||
@@ -805,7 +807,7 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati
|
||||
public void u() {}
|
||||
@@ -817,7 +819,7 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati
|
||||
public void t() {}
|
||||
|
||||
protected void v() {
|
||||
protected void a(BooleanSupplier booleansupplier) {
|
||||
- SpigotTimings.serverTickTimer.startTiming(); // Spigot
|
||||
+ co.aikar.timings.TimingsManager.FULL_SERVER_TICK.startTiming(); // Paper
|
||||
this.slackActivityAccountant.tickStarted(); // Spigot
|
||||
long i = SystemUtils.c();
|
||||
|
||||
@@ -832,7 +834,6 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati
|
||||
@@ -844,7 +846,6 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati
|
||||
}
|
||||
|
||||
if (autosavePeriod > 0 && this.ticks % autosavePeriod == 0) { // CraftBukkit
|
||||
|
@ -851,7 +673,7 @@ index 1a59a6a1f2..ce4bf0a68f 100644
|
|||
this.methodProfiler.a("save");
|
||||
this.s.savePlayers();
|
||||
// Spigot Start
|
||||
@@ -847,7 +848,6 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati
|
||||
@@ -859,7 +860,6 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati
|
||||
// this.saveChunks(true);
|
||||
// Spigot End
|
||||
this.methodProfiler.e();
|
||||
|
@ -859,7 +681,7 @@ index 1a59a6a1f2..ce4bf0a68f 100644
|
|||
}
|
||||
|
||||
this.methodProfiler.a("snooper");
|
||||
@@ -868,14 +868,14 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati
|
||||
@@ -880,14 +880,14 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati
|
||||
this.methodProfiler.e();
|
||||
org.spigotmc.WatchdogThread.tick(); // Spigot
|
||||
this.slackActivityAccountant.tickEnded(l); // Spigot
|
||||
|
@ -868,7 +690,7 @@ index 1a59a6a1f2..ce4bf0a68f 100644
|
|||
+ co.aikar.timings.TimingsManager.FULL_SERVER_TICK.stopTiming(); // Paper
|
||||
}
|
||||
|
||||
public void w() {
|
||||
public void b(BooleanSupplier booleansupplier) {
|
||||
- SpigotTimings.schedulerTimer.startTiming(); // Spigot
|
||||
+ MinecraftTimings.bukkitSchedulerTimer.startTiming(); // Paper
|
||||
this.server.getScheduler().mainThreadHeartbeat(this.ticks); // CraftBukkit
|
||||
|
@ -878,8 +700,8 @@ index 1a59a6a1f2..ce4bf0a68f 100644
|
|||
this.methodProfiler.a("jobs");
|
||||
|
||||
FutureTask futuretask;
|
||||
@@ -883,26 +883,27 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati
|
||||
while ((futuretask = (FutureTask) this.g.poll()) != null) {
|
||||
@@ -895,26 +895,27 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati
|
||||
while ((futuretask = (FutureTask) this.f.poll()) != null) {
|
||||
SystemUtils.a(futuretask, MinecraftServer.LOGGER);
|
||||
}
|
||||
+ MinecraftTimings.minecraftSchedulerTimer.stopTiming(); // Paper
|
||||
|
@ -913,16 +735,16 @@ index 1a59a6a1f2..ce4bf0a68f 100644
|
|||
// Send time updates to everyone, it will get the right time from the world the player is in.
|
||||
if (this.ticks % 20 == 0) {
|
||||
for (int i = 0; i < this.getPlayerList().players.size(); ++i) {
|
||||
@@ -910,7 +911,7 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati
|
||||
@@ -922,7 +923,7 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati
|
||||
entityplayer.playerConnection.sendPacket(new PacketPlayOutUpdateTime(entityplayer.world.getTime(), entityplayer.getPlayerTime(), entityplayer.world.getGameRules().getBoolean("doDaylightCycle"))); // Add support for per player time
|
||||
}
|
||||
}
|
||||
- SpigotTimings.timeUpdateTimer.stopTiming(); // Spigot
|
||||
+ MinecraftTimings.timeUpdateTimer.stopTiming(); // Spigot
|
||||
|
||||
int i;
|
||||
|
||||
@@ -969,9 +970,7 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati
|
||||
// WorldServer worldserver; // CraftBukkit - dropped down
|
||||
long i;
|
||||
@@ -981,29 +982,27 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati
|
||||
|
||||
this.methodProfiler.e();
|
||||
this.methodProfiler.a("tracker");
|
||||
|
@ -932,7 +754,6 @@ index 1a59a6a1f2..ce4bf0a68f 100644
|
|||
this.methodProfiler.e();
|
||||
this.methodProfiler.e();
|
||||
}
|
||||
@@ -980,20 +979,19 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati
|
||||
}
|
||||
|
||||
this.methodProfiler.c("connection");
|
||||
|
@ -948,11 +769,11 @@ index 1a59a6a1f2..ce4bf0a68f 100644
|
|||
- SpigotTimings.playerListTimer.stopTiming(); // Spigot
|
||||
+ MinecraftTimings.playerListTimer.stopTiming(); // Spigot
|
||||
this.methodProfiler.c("tickables");
|
||||
-
|
||||
|
||||
- SpigotTimings.tickablesTimer.startTiming(); // Spigot
|
||||
+ MinecraftTimings.tickablesTimer.startTiming(); // Spigot
|
||||
for (i = 0; i < this.l.size(); ++i) {
|
||||
((ITickable) this.l.get(i)).Y_();
|
||||
for (int j = 0; j < this.k.size(); ++j) {
|
||||
((ITickable) this.k.get(j)).Y_();
|
||||
}
|
||||
- SpigotTimings.tickablesTimer.stopTiming(); // Spigot
|
||||
+ MinecraftTimings.tickablesTimer.stopTiming(); // Spigot
|
||||
|
@ -1054,10 +875,10 @@ index ac6d8cc6e6..d975c2ccf1 100644
|
|||
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
index 42e0630e60..5d42cfe81c 100644
|
||||
index 7dee734a70..37284fae4d 100644
|
||||
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
@@ -57,6 +57,7 @@ import org.bukkit.inventory.CraftingInventory;
|
||||
@@ -59,6 +59,7 @@ import org.bukkit.inventory.CraftingInventory;
|
||||
import org.bukkit.inventory.EquipmentSlot;
|
||||
import org.bukkit.inventory.InventoryView;
|
||||
import org.bukkit.util.NumberConversions;
|
||||
|
@ -1065,7 +886,7 @@ index 42e0630e60..5d42cfe81c 100644
|
|||
// CraftBukkit end
|
||||
|
||||
public class PlayerConnection implements PacketListenerPlayIn, ITickable {
|
||||
@@ -1615,7 +1616,7 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
|
||||
@@ -1625,7 +1626,7 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
|
||||
// CraftBukkit end
|
||||
|
||||
private void handleCommand(String s) {
|
||||
|
@ -1074,7 +895,7 @@ index 42e0630e60..5d42cfe81c 100644
|
|||
// CraftBukkit start - whole method
|
||||
if ( org.spigotmc.SpigotConfig.logCommands ) // Spigot
|
||||
this.LOGGER.info(this.player.getName() + " issued server command: " + s);
|
||||
@@ -1626,7 +1627,7 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
|
||||
@@ -1636,7 +1637,7 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
|
||||
this.server.getPluginManager().callEvent(event);
|
||||
|
||||
if (event.isCancelled()) {
|
||||
|
@ -1083,7 +904,7 @@ index 42e0630e60..5d42cfe81c 100644
|
|||
return;
|
||||
}
|
||||
|
||||
@@ -1639,7 +1640,7 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
|
||||
@@ -1649,7 +1650,7 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
|
||||
java.util.logging.Logger.getLogger(PlayerConnection.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
|
||||
return;
|
||||
} finally {
|
||||
|
@ -1116,7 +937,7 @@ index 889b32287e..69da194f52 100644
|
|||
throw CancelledPacketHandleException.INSTANCE;
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
|
||||
index e476d3433b..9cef6b9af6 100644
|
||||
index ead9697e65..26df2ff32f 100644
|
||||
--- a/src/main/java/net/minecraft/server/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/PlayerList.java
|
||||
@@ -1,5 +1,6 @@
|
||||
|
@ -1126,7 +947,7 @@ index e476d3433b..9cef6b9af6 100644
|
|||
import com.google.common.collect.Lists;
|
||||
import com.google.common.collect.Maps;
|
||||
import com.google.common.collect.Sets;
|
||||
@@ -1179,10 +1180,11 @@ public abstract class PlayerList {
|
||||
@@ -1173,10 +1174,11 @@ public abstract class PlayerList {
|
||||
}
|
||||
|
||||
public void savePlayers() {
|
||||
|
@ -1194,7 +1015,7 @@ index a07895935e..ee5c2421bb 100644
|
|||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/TileEntity.java b/src/main/java/net/minecraft/server/TileEntity.java
|
||||
index 9361667c3b..0d54513a44 100644
|
||||
index c69209497b..68ac014aab 100644
|
||||
--- a/src/main/java/net/minecraft/server/TileEntity.java
|
||||
+++ b/src/main/java/net/minecraft/server/TileEntity.java
|
||||
@@ -4,12 +4,13 @@ import javax.annotation.Nullable;
|
||||
|
@ -1214,7 +1035,7 @@ index 9361667c3b..0d54513a44 100644
|
|||
private final TileEntityTypes<?> e; public TileEntityTypes getTileEntityType() { return e; } // Paper - OBFHELPER
|
||||
protected World world;
|
||||
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
|
||||
index e1cf1e579a..3cb7c1d540 100644
|
||||
index 028678379a..c3c435cab9 100644
|
||||
--- a/src/main/java/net/minecraft/server/World.java
|
||||
+++ b/src/main/java/net/minecraft/server/World.java
|
||||
@@ -1,5 +1,6 @@
|
||||
|
@ -1223,8 +1044,8 @@ index e1cf1e579a..3cb7c1d540 100644
|
|||
+import co.aikar.timings.Timings;
|
||||
import com.google.common.base.MoreObjects;
|
||||
import com.google.common.collect.Lists;
|
||||
import java.util.ArrayList;
|
||||
@@ -20,13 +21,13 @@ import com.google.common.collect.Maps;
|
||||
import it.unimi.dsi.fastutil.longs.LongSet;
|
||||
@@ -26,13 +27,13 @@ import com.google.common.collect.Maps;
|
||||
import java.util.Map;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.block.BlockState;
|
||||
|
@ -1239,7 +1060,7 @@ index e1cf1e579a..3cb7c1d540 100644
|
|||
import org.bukkit.event.block.BlockCanBuildEvent;
|
||||
import org.bukkit.event.block.BlockPhysicsEvent;
|
||||
import org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason;
|
||||
@@ -129,7 +130,7 @@ public abstract class World implements GeneratorAccess, IIBlockAccess, AutoClose
|
||||
@@ -136,7 +137,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc
|
||||
|
||||
public final com.destroystokyo.paper.PaperWorldConfig paperConfig; // Paper
|
||||
|
||||
|
@ -1248,7 +1069,7 @@ index e1cf1e579a..3cb7c1d540 100644
|
|||
private boolean guardEntityList; // Spigot
|
||||
public static boolean haveWeSilencedAPhysicsCrash;
|
||||
public static String blockLocation;
|
||||
@@ -197,7 +198,7 @@ public abstract class World implements GeneratorAccess, IIBlockAccess, AutoClose
|
||||
@@ -205,7 +206,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc
|
||||
});
|
||||
this.getServer().addWorld(this.world);
|
||||
// CraftBukkit end
|
||||
|
@ -1257,7 +1078,7 @@ index e1cf1e579a..3cb7c1d540 100644
|
|||
this.entityLimiter = new org.spigotmc.TickLimiter(spigotConfig.entityMaxTickTime);
|
||||
this.tileLimiter = new org.spigotmc.TickLimiter(spigotConfig.tileMaxTickTime);
|
||||
}
|
||||
@@ -1110,6 +1111,7 @@ public abstract class World implements GeneratorAccess, IIBlockAccess, AutoClose
|
||||
@@ -1123,6 +1124,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc
|
||||
}
|
||||
|
||||
this.methodProfiler.c("remove");
|
||||
|
@ -1265,7 +1086,7 @@ index e1cf1e579a..3cb7c1d540 100644
|
|||
this.entityList.removeAll(this.g);
|
||||
|
||||
int j;
|
||||
@@ -1130,6 +1132,7 @@ public abstract class World implements GeneratorAccess, IIBlockAccess, AutoClose
|
||||
@@ -1143,6 +1145,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc
|
||||
|
||||
this.g.clear();
|
||||
this.p_();
|
||||
|
@ -1273,7 +1094,7 @@ index e1cf1e579a..3cb7c1d540 100644
|
|||
this.methodProfiler.c("regular");
|
||||
|
||||
CrashReportSystemDetails crashreportsystemdetails1;
|
||||
@@ -1139,6 +1142,7 @@ public abstract class World implements GeneratorAccess, IIBlockAccess, AutoClose
|
||||
@@ -1152,6 +1155,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc
|
||||
timings.entityTick.startTiming(); // Spigot
|
||||
guardEntityList = true; // Spigot
|
||||
// CraftBukkit start - Use field for loop variable
|
||||
|
@ -1281,7 +1102,7 @@ index e1cf1e579a..3cb7c1d540 100644
|
|||
int entitiesThisCycle = 0;
|
||||
if (tickPosition < 0) tickPosition = 0;
|
||||
for (entityLimiter.initTick();
|
||||
@@ -1160,10 +1164,11 @@ public abstract class World implements GeneratorAccess, IIBlockAccess, AutoClose
|
||||
@@ -1173,10 +1177,11 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc
|
||||
this.methodProfiler.a("tick");
|
||||
if (!entity.dead && !(entity instanceof EntityPlayer)) {
|
||||
try {
|
||||
|
@ -1295,7 +1116,7 @@ index e1cf1e579a..3cb7c1d540 100644
|
|||
crashreport1 = CrashReport.a(throwable1, "Ticking entity");
|
||||
crashreportsystemdetails1 = crashreport1.a("Entity being ticked");
|
||||
entity.appendEntityCrashDetails(crashreportsystemdetails1);
|
||||
@@ -1288,6 +1293,7 @@ public abstract class World implements GeneratorAccess, IIBlockAccess, AutoClose
|
||||
@@ -1301,6 +1306,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc
|
||||
}
|
||||
|
||||
timings.tileEntityPending.stopTiming(); // Spigot
|
||||
|
@ -1303,7 +1124,7 @@ index e1cf1e579a..3cb7c1d540 100644
|
|||
this.methodProfiler.e();
|
||||
this.methodProfiler.e();
|
||||
}
|
||||
@@ -1346,7 +1352,6 @@ public abstract class World implements GeneratorAccess, IIBlockAccess, AutoClose
|
||||
@@ -1359,7 +1365,6 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc
|
||||
}
|
||||
// CraftBukkit end
|
||||
|
||||
|
@ -1311,7 +1132,7 @@ index e1cf1e579a..3cb7c1d540 100644
|
|||
entity.N = entity.locX;
|
||||
entity.O = entity.locY;
|
||||
entity.P = entity.locZ;
|
||||
@@ -1354,6 +1359,7 @@ public abstract class World implements GeneratorAccess, IIBlockAccess, AutoClose
|
||||
@@ -1367,6 +1372,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc
|
||||
entity.lastPitch = entity.pitch;
|
||||
if (flag && entity.inChunk) {
|
||||
++entity.ticksLived;
|
||||
|
@ -1319,7 +1140,7 @@ index e1cf1e579a..3cb7c1d540 100644
|
|||
if (entity.isPassenger()) {
|
||||
entity.aH();
|
||||
} else {
|
||||
@@ -1417,8 +1423,6 @@ public abstract class World implements GeneratorAccess, IIBlockAccess, AutoClose
|
||||
@@ -1430,8 +1436,6 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1329,7 +1150,7 @@ index e1cf1e579a..3cb7c1d540 100644
|
|||
|
||||
public boolean a(@Nullable Entity entity, VoxelShape voxelshape) {
|
||||
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
|
||||
index 2c6f6de4ce..f032ecab64 100644
|
||||
index c276c259ae..badec349b7 100644
|
||||
--- a/src/main/java/net/minecraft/server/WorldServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/WorldServer.java
|
||||
@@ -1,5 +1,6 @@
|
||||
|
@ -1339,21 +1160,21 @@ index 2c6f6de4ce..f032ecab64 100644
|
|||
import com.google.common.collect.Lists;
|
||||
import com.google.common.collect.Maps;
|
||||
import com.google.common.util.concurrent.ListenableFuture;
|
||||
@@ -70,7 +71,7 @@ public class WorldServer extends World implements IAsyncTaskHandler {
|
||||
RegistryBlocks<MinecraftKey, Block> registryblocks1 = Block.REGISTRY; // CraftBukkit - decompile error
|
||||
@@ -71,7 +72,7 @@ public class WorldServer extends World implements IAsyncTaskHandler {
|
||||
IRegistry<Block> iregistry1 = IRegistry.BLOCK; // CraftBukkit - decompile error
|
||||
|
||||
Block.REGISTRY.getClass();
|
||||
- this.nextTickListBlock = new TickListServer<>(this, predicate, function, registryblocks1::get, this::b); // CraftBukkit - decompile error
|
||||
+ this.nextTickListBlock = new TickListServer<>(this, predicate, function, registryblocks1::get, this::b, "Blocks"); // CraftBukkit - decompile error // Paper - Timings v2
|
||||
Predicate<FluidType> predicate2 = (fluidtype) -> {
|
||||
IRegistry.BLOCK.getClass();
|
||||
- this.nextTickListBlock = new TickListServer<>(this, predicate, function, iregistry1::getOrDefault, this::b); // CraftBukkit - decompile error
|
||||
+ this.nextTickListBlock = new TickListServer<>(this, predicate, function, iregistry1::getOrDefault, this::b, "Blocks"); // CraftBukkit - decompile error // Paper - Timings v2
|
||||
Predicate<FluidType> predicate2 = (fluidtype) -> { // CraftBukkit - decompile error
|
||||
return fluidtype == null || fluidtype == FluidTypes.a;
|
||||
};
|
||||
@@ -79,7 +80,7 @@ public class WorldServer extends World implements IAsyncTaskHandler {
|
||||
function = registryblocks::b;
|
||||
RegistryBlocks<MinecraftKey, FluidType> registryblocks2 = FluidType.c; // CraftBukkit - decompile error
|
||||
FluidType.c.getClass();
|
||||
- this.nextTickListFluid = new TickListServer<>(this, predicate2, function, registryblocks2::get, this::a); // CraftBukkit - decompile error
|
||||
+ this.nextTickListFluid = new TickListServer<>(this, predicate2, function, registryblocks2::get, this::a, "Fluids"); // CraftBukkit - decompile error // Paper - Timings v2
|
||||
@@ -80,7 +81,7 @@ public class WorldServer extends World implements IAsyncTaskHandler {
|
||||
function = iregistry::getKey;
|
||||
IRegistry<FluidType> iregistry2 = IRegistry.FLUID; // CraftBukkit - decompile error
|
||||
IRegistry.FLUID.getClass();
|
||||
- this.nextTickListFluid = new TickListServer<>(this, predicate2, function, iregistry2::getOrDefault, this::a); // CraftBukkit - decompile error
|
||||
+ this.nextTickListFluid = new TickListServer<>(this, predicate2, function, iregistry2::getOrDefault, this::a, "Fluids"); // CraftBukkit - decompile error // Paper - Timings v2
|
||||
this.siegeManager = new VillageSiege(this);
|
||||
this.d = new ObjectLinkedOpenHashSet();
|
||||
this.server = minecraftserver;
|
||||
|
@ -1363,13 +1184,13 @@ index 2c6f6de4ce..f032ecab64 100644
|
|||
this.methodProfiler.c("tickPending");
|
||||
- timings.doTickPending.startTiming(); // Spigot
|
||||
+ timings.scheduledBlocks.startTiming(); // Paper
|
||||
this.p();
|
||||
this.q();
|
||||
- timings.doTickPending.stopTiming(); // Spigot
|
||||
+ timings.scheduledBlocks.stopTiming(); // Paper
|
||||
this.methodProfiler.c("tickBlocks");
|
||||
- timings.doTickTiles.startTiming(); // Spigot
|
||||
+ timings.chunkTicks.startTiming(); // Paper
|
||||
this.l();
|
||||
this.n_();
|
||||
- timings.doTickTiles.stopTiming(); // Spigot
|
||||
+ timings.chunkTicks.stopTiming(); // Paper
|
||||
this.methodProfiler.c("chunkMap");
|
||||
|
@ -1392,18 +1213,9 @@ index 2c6f6de4ce..f032ecab64 100644
|
|||
}
|
||||
|
||||
this.methodProfiler.e();
|
||||
@@ -717,7 +719,7 @@ public class WorldServer extends World implements IAsyncTaskHandler {
|
||||
gen = new org.bukkit.craftbukkit.generator.NormalChunkGenerator(this, this.getSeed());
|
||||
}
|
||||
|
||||
- return new ChunkProviderServer(this, ichunkloader, gen, this.server);
|
||||
+ return new ChunkProviderServer(this, ichunkloader, new co.aikar.timings.TimedChunkGenerator(this, gen), this.server); // Paper
|
||||
// CraftBukkit end
|
||||
}
|
||||
|
||||
@@ -869,6 +871,7 @@ public class WorldServer extends World implements IAsyncTaskHandler {
|
||||
|
||||
if (chunkproviderserver.e()) {
|
||||
if (chunkproviderserver.d()) {
|
||||
org.bukkit.Bukkit.getPluginManager().callEvent(new org.bukkit.event.world.WorldSaveEvent(getWorld())); // CraftBukkit
|
||||
+ timings.worldSave.startTiming(); // Paper
|
||||
if (iprogressupdate != null) {
|
||||
|
@ -1417,7 +1229,7 @@ index 2c6f6de4ce..f032ecab64 100644
|
|||
chunkproviderserver.a(flag);
|
||||
+ timings.worldSaveChunks.stopTiming(); // Paper
|
||||
// CraftBukkit - ArrayList -> Collection
|
||||
Collection arraylist = chunkproviderserver.a();
|
||||
java.util.Collection arraylist = chunkproviderserver.a();
|
||||
Iterator iterator = arraylist.iterator();
|
||||
@@ -890,7 +895,7 @@ public class WorldServer extends World implements IAsyncTaskHandler {
|
||||
chunkproviderserver.unload(chunk);
|
||||
|
@ -1434,21 +1246,21 @@ index 2c6f6de4ce..f032ecab64 100644
|
|||
protected void a() throws ExceptionWorldConflict {
|
||||
+ timings.worldSaveLevel.startTiming(); // Paper
|
||||
this.checkSession();
|
||||
WorldServer[] aworldserver = this.server.worldServer;
|
||||
int i = aworldserver.length;
|
||||
@@ -933,6 +939,7 @@ public class WorldServer extends World implements IAsyncTaskHandler {
|
||||
this.worldData.c(this.server.aR().c());
|
||||
Iterator iterator = this.server.getWorlds().iterator();
|
||||
|
||||
@@ -932,6 +938,7 @@ public class WorldServer extends World implements IAsyncTaskHandler {
|
||||
this.worldData.c(this.server.aP().c());
|
||||
this.dataManager.saveWorldData(this.worldData, this.server.getPlayerList().t());
|
||||
this.worldMaps.a();
|
||||
this.h().a();
|
||||
+ timings.worldSaveLevel.stopTiming(); // Paper
|
||||
}
|
||||
|
||||
// CraftBukkit start
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index ed3c23b74e..a4112c54ea 100644
|
||||
index 46a9ff9482..9ba50a2daa 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -1847,12 +1847,31 @@ public final class CraftServer implements Server {
|
||||
@@ -1867,12 +1867,31 @@ public final class CraftServer implements Server {
|
||||
private final Spigot spigot = new Spigot()
|
||||
{
|
||||
|
||||
|
@ -1697,7 +1509,7 @@ index 413dd35f06..52a8c48fa4 100644
|
|||
|
||||
public void callStage3(QueuedChunk queuedChunk, Chunk chunk, Runnable runnable) throws RuntimeException {
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
index 390fd92738..563e90d4dc 100644
|
||||
index 9f78f2c4ae..b8bdcb6b74 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
@@ -1715,6 +1715,12 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
From 71c3064807448910dfda790cbc35d23fc2f4dae3 Mon Sep 17 00:00:00 2001
|
||||
From f53a589e0196b116fe888b7cdadc4d356f122ba6 Mon Sep 17 00:00:00 2001
|
||||
From: Zach Brown <zach.brown@destroystokyo.com>
|
||||
Date: Thu, 3 Mar 2016 03:53:43 -0600
|
||||
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
|
||||
@@ -108,4 +108,10 @@ 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
|
||||
@@ -199,6 +199,7 @@ public abstract class World implements GeneratorAccess, IIBlockAccess, AutoClose
|
||||
@@ -207,6 +207,7 @@ 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
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
From 12112e5c3e7cc51ef4a93b606052097a421c0896 Mon Sep 17 00:00:00 2001
|
||||
From 5b4305e22c82f4e10966cb8a0682ac1467972358 Mon Sep 17 00:00:00 2001
|
||||
From: Byteflux <byte@byteflux.net>
|
||||
Date: Tue, 1 Mar 2016 14:14:15 -0600
|
||||
Subject: [PATCH] Drop falling block and tnt entities at the specified height
|
||||
|
||||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
index cef0c47ac..38a697e1b 100644
|
||||
index cef0c47ac7..38a697e1b7 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
@@ -114,4 +114,14 @@ public class PaperWorldConfig {
|
||||
|
@ -24,10 +24,10 @@ index cef0c47ac..38a697e1b 100644
|
|||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
||||
index 7c238d728..334f7403f 100644
|
||||
index ec5c9fd735..15b6067aab 100644
|
||||
--- a/src/main/java/net/minecraft/server/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/server/Entity.java
|
||||
@@ -1867,6 +1867,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
@@ -1862,6 +1862,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
return this.a(itemstack, 0.0F);
|
||||
}
|
||||
|
||||
|
@ -36,7 +36,7 @@ index 7c238d728..334f7403f 100644
|
|||
public EntityItem a(ItemStack itemstack, float f) {
|
||||
if (itemstack.isEmpty()) {
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityFallingBlock.java b/src/main/java/net/minecraft/server/EntityFallingBlock.java
|
||||
index e7e7d57c4..5e01aa0f8 100644
|
||||
index 01045058ce..25960cff2a 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityFallingBlock.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityFallingBlock.java
|
||||
@@ -86,6 +86,17 @@ public class EntityFallingBlock extends Entity {
|
||||
|
@ -58,7 +58,7 @@ index e7e7d57c4..5e01aa0f8 100644
|
|||
blockposition = new BlockPosition(this);
|
||||
boolean flag = this.block.getBlock() instanceof BlockConcretePowder;
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityTNTPrimed.java b/src/main/java/net/minecraft/server/EntityTNTPrimed.java
|
||||
index 7edc02852..5ceb3f206 100644
|
||||
index 7edc028527..5ceb3f2068 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityTNTPrimed.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityTNTPrimed.java
|
||||
@@ -57,6 +57,13 @@ public class EntityTNTPrimed extends Entity {
|
||||
|
@ -76,5 +76,5 @@ index 7edc02852..5ceb3f206 100644
|
|||
this.motY *= 0.9800000190734863D;
|
||||
this.motZ *= 0.9800000190734863D;
|
||||
--
|
||||
2.17.1
|
||||
2.18.0
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
From a23e0846cb2432daf8507b2f154c35f709946c77 Mon Sep 17 00:00:00 2001
|
||||
From ecb394dbc65b8055e6ad852c4544a8a396f94577 Mon Sep 17 00:00:00 2001
|
||||
From: Zach Brown <zach.brown@destroystokyo.com>
|
||||
Date: Tue, 1 Mar 2016 14:32:43 -0600
|
||||
Subject: [PATCH] Show 'Paper' in client crashes, server lists, and Mojang
|
||||
|
@ -25,10 +25,10 @@ index 220ca7bca0..eb4b08be46 100644
|
|||
}
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index ce4bf0a68f..c72bdd29d1 100644
|
||||
index 0ebe754619..8dc922ccd0 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -1205,7 +1205,7 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati
|
||||
@@ -1209,7 +1209,7 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati
|
||||
}
|
||||
|
||||
public String getServerModName() {
|
||||
|
@ -38,10 +38,10 @@ index ce4bf0a68f..c72bdd29d1 100644
|
|||
|
||||
public CrashReport b(CrashReport crashreport) {
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index a4112c54ea..567af5b9fa 100644
|
||||
index 9ba50a2daa..6414f3d6b0 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -154,7 +154,7 @@ import org.bukkit.event.server.TabCompleteEvent;
|
||||
@@ -155,7 +155,7 @@ import org.bukkit.event.server.TabCompleteEvent;
|
||||
import net.md_5.bungee.api.chat.BaseComponent;
|
||||
|
||||
public final class CraftServer implements Server {
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
From ed167340cd2c4dc93a1daf5e1f56c15ef3de5956 Mon Sep 17 00:00:00 2001
|
||||
From aee8a7585f861c88ebca81c869f19e645de71abb Mon Sep 17 00:00:00 2001
|
||||
From: Jedediah Smith <jedediah@silencegreys.com>
|
||||
Date: Tue, 1 Mar 2016 14:47:52 -0600
|
||||
Subject: [PATCH] Player affects spawning API
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java
|
||||
index c5bc976c79..ca14080ccd 100644
|
||||
index 72477ec9ad..63f78924cb 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityHuman.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityHuman.java
|
||||
@@ -72,6 +72,9 @@ public abstract class EntityHuman extends EntityLiving {
|
||||
|
@ -19,7 +19,7 @@ index c5bc976c79..ca14080ccd 100644
|
|||
// CraftBukkit start
|
||||
public boolean fauxSleeping;
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityInsentient.java b/src/main/java/net/minecraft/server/EntityInsentient.java
|
||||
index 98b28e8573..0cfda190bc 100644
|
||||
index d4e688d4c0..ec06f4badb 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityInsentient.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityInsentient.java
|
||||
@@ -619,7 +619,7 @@ public abstract class EntityInsentient extends EntityLiving {
|
||||
|
@ -32,11 +32,11 @@ index 98b28e8573..0cfda190bc 100644
|
|||
double d1 = entityhuman.locY - this.locY;
|
||||
double d2 = entityhuman.locZ - this.locZ;
|
||||
diff --git a/src/main/java/net/minecraft/server/EntitySilverfish.java b/src/main/java/net/minecraft/server/EntitySilverfish.java
|
||||
index 75040a0f21..683191c4a8 100644
|
||||
index 850569f6b7..f958bd5bac 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntitySilverfish.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntitySilverfish.java
|
||||
@@ -96,7 +96,7 @@ public class EntitySilverfish extends EntityMonster {
|
||||
if (super.a(generatoraccess)) {
|
||||
if (super.a(generatoraccess, flag)) {
|
||||
EntityHuman entityhuman = generatoraccess.b(this, 5.0D);
|
||||
|
||||
- return entityhuman == null;
|
||||
|
@ -45,7 +45,7 @@ index 75040a0f21..683191c4a8 100644
|
|||
return false;
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/SpawnerCreature.java b/src/main/java/net/minecraft/server/SpawnerCreature.java
|
||||
index e54dcaa994..b12e767db9 100644
|
||||
index cbdd2431fd..9e24b77ad1 100644
|
||||
--- a/src/main/java/net/minecraft/server/SpawnerCreature.java
|
||||
+++ b/src/main/java/net/minecraft/server/SpawnerCreature.java
|
||||
@@ -37,7 +37,7 @@ public final class SpawnerCreature {
|
||||
|
@ -58,10 +58,10 @@ index e54dcaa994..b12e767db9 100644
|
|||
|
||||
j = MathHelper.floor(entityhuman.locZ / 16.0D);
|
||||
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
|
||||
index 38d169cc14..d0516b0885 100644
|
||||
index 30a46a50fb..dc49d9917e 100644
|
||||
--- a/src/main/java/net/minecraft/server/World.java
|
||||
+++ b/src/main/java/net/minecraft/server/World.java
|
||||
@@ -28,6 +28,7 @@ import org.bukkit.craftbukkit.block.data.CraftBlockData;
|
||||
@@ -34,6 +34,7 @@ import org.bukkit.craftbukkit.block.data.CraftBlockData;
|
||||
import org.bukkit.craftbukkit.event.CraftEventFactory;
|
||||
import org.bukkit.craftbukkit.util.CraftMagicNumbers;
|
||||
import org.bukkit.craftbukkit.util.LongHashSet; // Paper
|
||||
|
@ -69,17 +69,17 @@ index 38d169cc14..d0516b0885 100644
|
|||
import org.bukkit.event.block.BlockCanBuildEvent;
|
||||
import org.bukkit.event.block.BlockPhysicsEvent;
|
||||
import org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason;
|
||||
@@ -2422,7 +2423,7 @@ public abstract class World implements GeneratorAccess, IIBlockAccess, AutoClose
|
||||
@@ -2432,7 +2433,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc
|
||||
for (int i = 0; i < this.players.size(); ++i) {
|
||||
EntityHuman entityhuman = (EntityHuman) this.players.get(i);
|
||||
|
||||
- if (IEntitySelector.e.test(entityhuman)) {
|
||||
+ if (IEntitySelector.e.test(entityhuman) && entityhuman.affectsSpawning) { // Paper - Affects Spawning API
|
||||
- if (IEntitySelector.f.test(entityhuman)) {
|
||||
+ if (IEntitySelector.f.test(entityhuman) && entityhuman.affectsSpawning) { // Paper - Affects Spawning API
|
||||
double d4 = entityhuman.d(d0, d1, d2);
|
||||
|
||||
if (d3 < 0.0D || d4 < d3 * d3) {
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
index 563e90d4dc..cfea81bf78 100644
|
||||
index b8bdcb6b74..91e585048a 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
@@ -1628,7 +1628,19 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
From ea2724d8433bd98200623fc0b3b9c6e9c9a4f406 Mon Sep 17 00:00:00 2001
|
||||
From d221792884ce8965482fa88f3e5b5374a300964a Mon Sep 17 00:00:00 2001
|
||||
From: Byteflux <byte@byteflux.net>
|
||||
Date: Tue, 1 Mar 2016 15:08:03 -0600
|
||||
Subject: [PATCH] Remove invalid mob spawner tile entities
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
|
||||
index 0a0d04cf6..adf3dee2e 100644
|
||||
index bcafd86fb8..8507392628 100644
|
||||
--- a/src/main/java/net/minecraft/server/Chunk.java
|
||||
+++ b/src/main/java/net/minecraft/server/Chunk.java
|
||||
@@ -774,6 +774,10 @@ public class Chunk implements IChunkAccess {
|
||||
@@ -773,6 +773,10 @@ public class Chunk implements IChunkAccess {
|
||||
tileentity.z();
|
||||
this.tileEntities.put(blockposition, tileentity);
|
||||
// CraftBukkit start
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
From 03261a6b50ee347b4be1165cead324e26e363737 Mon Sep 17 00:00:00 2001
|
||||
From d966e6583b4b867cac3037e053195d2cac50e5f0 Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
Date: Tue, 1 Mar 2016 23:09:29 -0600
|
||||
Subject: [PATCH] Further improve server tick loop
|
||||
|
@ -12,10 +12,10 @@ Previous implementation did not calculate TPS correctly.
|
|||
Switch to a realistic rolling average and factor in std deviation as an extra reporting variable
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index c72bdd29d1..687250c639 100644
|
||||
index 8dc922ccd0..e8c3dcc244 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -142,7 +142,7 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati
|
||||
@@ -145,7 +145,7 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati
|
||||
public org.bukkit.command.ConsoleCommandSender console;
|
||||
public org.bukkit.command.RemoteConsoleCommandSender remoteConsole;
|
||||
public ConsoleReader reader;
|
||||
|
@ -24,35 +24,37 @@ index c72bdd29d1..687250c639 100644
|
|||
public final Thread primaryThread;
|
||||
public java.util.Queue<Runnable> processQueue = new java.util.concurrent.ConcurrentLinkedQueue<Runnable>();
|
||||
public int autosavePeriod;
|
||||
@@ -150,10 +150,6 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati
|
||||
public CommandDispatcher vanillaCommandDispatcher;
|
||||
// CraftBukkit end
|
||||
@@ -155,7 +155,7 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati
|
||||
// Spigot start
|
||||
- public static final int TPS = 20;
|
||||
- public static final int TICK_TIME = 1000000000 / TPS;
|
||||
public static final int TPS = 20;
|
||||
public static final int TICK_TIME = 1000000000 / TPS;
|
||||
- private static final int SAMPLE_INTERVAL = 100;
|
||||
- public final double[] recentTps = new double[ 3 ];
|
||||
+ private static final int SAMPLE_INTERVAL = 20; // Paper
|
||||
public final double[] recentTps = new double[ 3 ];
|
||||
public final SlackActivityAccountant slackActivityAccountant = new SlackActivityAccountant();
|
||||
// Spigot end
|
||||
|
||||
@@ -676,12 +672,54 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati
|
||||
this.isRunning = false;
|
||||
@@ -685,7 +685,7 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati
|
||||
}
|
||||
|
||||
- // Spigot Start
|
||||
- private static double calcTps(double avg, double exp, double tps)
|
||||
- {
|
||||
- return ( avg * exp ) + ( tps * ( 1 - exp ) );
|
||||
private boolean aT() {
|
||||
- return SystemUtils.b() < this.aa;
|
||||
+ return System.nanoTime() - lastTick + catchupTime < TICK_TIME; // Paper - improved "are we lagging" check to match our own
|
||||
}
|
||||
|
||||
// Spigot Start
|
||||
@@ -693,6 +693,53 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati
|
||||
{
|
||||
return ( avg * exp ) + ( tps * ( 1 - exp ) );
|
||||
}
|
||||
+
|
||||
+ // Paper start - Further improve server tick loop
|
||||
+ private static final int TPS = 20;
|
||||
+ private static final long SEC_IN_NANO = 1000000000;
|
||||
+ public static final long TICK_TIME = SEC_IN_NANO / TPS;
|
||||
+ private static final long MAX_CATCHUP_BUFFER = TICK_TIME * TPS * 60L;
|
||||
+ private static final int SAMPLE_INTERVAL = 20;
|
||||
+ private long lastTick = 0;
|
||||
+ private long catchupTime = 0;
|
||||
+ public final RollingAverage tps1 = new RollingAverage(60);
|
||||
+ public final RollingAverage tps5 = new RollingAverage(60 * 5);
|
||||
+ public final RollingAverage tps15 = new RollingAverage(60 * 15);
|
||||
+ public double[] recentTps = new double[3]; // Paper - Fine have your darn compat with bad plugins
|
||||
+
|
||||
+ public static class RollingAverage {
|
||||
+ private final int size;
|
||||
|
@ -89,18 +91,18 @@ index c72bdd29d1..687250c639 100644
|
|||
+ public double getAverage() {
|
||||
+ return total / time;
|
||||
+ }
|
||||
}
|
||||
- // Spigot End
|
||||
+ }
|
||||
+ // Paper End
|
||||
// Spigot End
|
||||
|
||||
public void run() {
|
||||
try {
|
||||
@@ -693,29 +731,46 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati
|
||||
@@ -705,29 +752,47 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati
|
||||
|
||||
// Spigot start
|
||||
Arrays.fill( recentTps, 20 );
|
||||
- long lastTick = System.nanoTime(), catchupTime = 0, curTime, wait, tickSection = lastTick, tickCount = 1;
|
||||
+ long start = System.nanoTime(), lastTick = start - TICK_TIME, catchupTime = 0, curTime, wait, tickSection = start; // Paper - Further improve server tick loop
|
||||
+ long start = System.nanoTime(), curTime, wait, tickSection = start; // Paper - Further improve server tick loop
|
||||
+ lastTick = start - TICK_TIME; // Paper
|
||||
while (this.isRunning) {
|
||||
curTime = System.nanoTime();
|
||||
- wait = TICK_TIME - (curTime - lastTick) - catchupTime;
|
||||
|
@ -151,14 +153,14 @@ index c72bdd29d1..687250c639 100644
|
|||
|
||||
- MinecraftServer.currentTick = (int) (System.currentTimeMillis() / 50); // CraftBukkit
|
||||
+ //MinecraftServer.currentTick = (int) (System.currentTimeMillis() / 50); // CraftBukkit // Paper - don't overwrite current tick time
|
||||
this.v();
|
||||
this.a(this::aT);
|
||||
this.aa += 50L;
|
||||
// Spigot end
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 567af5b9fa..1c003a3898 100644
|
||||
index 6414f3d6b0..f066af3fe5 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -1844,6 +1844,17 @@ public final class CraftServer implements Server {
|
||||
@@ -1864,6 +1864,17 @@ public final class CraftServer implements Server {
|
||||
return CraftMagicNumbers.INSTANCE;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
From 580473495d8bc3798ec58d731342c35d82c5a306 Mon Sep 17 00:00:00 2001
|
||||
From 461fec266464fc475ee8800bed57be571fcd9670 Mon Sep 17 00:00:00 2001
|
||||
From: Byteflux <byte@byteflux.net>
|
||||
Date: Tue, 1 Mar 2016 23:45:08 -0600
|
||||
Subject: [PATCH] Entity Origin API
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
||||
index 334f7403f..106cf19d8 100644
|
||||
index 15b6067aab..02ac5c4c0c 100644
|
||||
--- a/src/main/java/net/minecraft/server/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/server/Entity.java
|
||||
@@ -162,6 +162,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
|
@ -16,7 +16,7 @@ index 334f7403f..106cf19d8 100644
|
|||
// Spigot start
|
||||
public final byte activationType = org.spigotmc.ActivationRange.initializeEntityActivationType(this);
|
||||
public final boolean defaultActivationState;
|
||||
@@ -1607,6 +1608,11 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
@@ -1603,6 +1604,11 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -28,7 +28,7 @@ index 334f7403f..106cf19d8 100644
|
|||
return nbttagcompound;
|
||||
} catch (Throwable throwable) {
|
||||
CrashReport crashreport = CrashReport.a(throwable, "Saving entity NBT");
|
||||
@@ -1749,6 +1755,13 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
@@ -1744,6 +1750,13 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
}
|
||||
// CraftBukkit end
|
||||
|
||||
|
@ -42,7 +42,7 @@ index 334f7403f..106cf19d8 100644
|
|||
} catch (Throwable throwable) {
|
||||
CrashReport crashreport = CrashReport.a(throwable, "Loading entity NBT");
|
||||
CrashReportSystemDetails crashreportsystemdetails = crashreport.a("Entity being loaded");
|
||||
@@ -1824,6 +1837,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
@@ -1819,6 +1832,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
|
||||
protected abstract void b(NBTTagCompound nbttagcompound);
|
||||
|
||||
|
@ -51,7 +51,7 @@ index 334f7403f..106cf19d8 100644
|
|||
NBTTagList nbttaglist = new NBTTagList();
|
||||
double[] adouble1 = adouble;
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityFallingBlock.java b/src/main/java/net/minecraft/server/EntityFallingBlock.java
|
||||
index 5e01aa0f8..33bc46b05 100644
|
||||
index 25960cff2a..1fb912eb0d 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityFallingBlock.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityFallingBlock.java
|
||||
@@ -249,6 +249,14 @@ public class EntityFallingBlock extends Entity {
|
||||
|
@ -70,7 +70,7 @@ index 5e01aa0f8..33bc46b05 100644
|
|||
|
||||
public void a(boolean flag) {
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityTNTPrimed.java b/src/main/java/net/minecraft/server/EntityTNTPrimed.java
|
||||
index 5ceb3f206..87f3205f8 100644
|
||||
index 5ceb3f2068..87f3205f82 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityTNTPrimed.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityTNTPrimed.java
|
||||
@@ -109,6 +109,14 @@ public class EntityTNTPrimed extends Entity {
|
||||
|
@ -89,7 +89,7 @@ index 5ceb3f206..87f3205f8 100644
|
|||
|
||||
@Nullable
|
||||
diff --git a/src/main/java/net/minecraft/server/NBTTagList.java b/src/main/java/net/minecraft/server/NBTTagList.java
|
||||
index a8280acf9..38dd8f17a 100644
|
||||
index a8280acf94..38dd8f17a6 100644
|
||||
--- a/src/main/java/net/minecraft/server/NBTTagList.java
|
||||
+++ b/src/main/java/net/minecraft/server/NBTTagList.java
|
||||
@@ -182,6 +182,7 @@ public class NBTTagList extends NBTList<NBTBase> {
|
||||
|
@ -101,10 +101,10 @@ index a8280acf9..38dd8f17a 100644
|
|||
if (i >= 0 && i < this.list.size()) {
|
||||
NBTBase nbtbase = (NBTBase) this.list.get(i);
|
||||
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
|
||||
index d0516b088..6bb52c7d4 100644
|
||||
index dc49d9917e..be2feb441d 100644
|
||||
--- a/src/main/java/net/minecraft/server/World.java
|
||||
+++ b/src/main/java/net/minecraft/server/World.java
|
||||
@@ -951,6 +951,12 @@ public abstract class World implements GeneratorAccess, IIBlockAccess, AutoClose
|
||||
@@ -961,6 +961,12 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc
|
||||
int j = MathHelper.floor(entity.locZ / 16.0D);
|
||||
boolean flag = entity.attachedToPlayer;
|
||||
|
||||
|
@ -118,7 +118,7 @@ index d0516b088..6bb52c7d4 100644
|
|||
flag = true;
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
||||
index 9fc7ac8c0..249d8115e 100644
|
||||
index 9fc7ac8c02..249d8115e8 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
||||
@@ -787,4 +787,12 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
|
||||
|
@ -135,5 +135,5 @@ index 9fc7ac8c0..249d8115e 100644
|
|||
+ // Paper end
|
||||
}
|
||||
--
|
||||
2.17.1
|
||||
2.18.0
|
||||
|
||||
|
|
|
@ -1,15 +1,15 @@
|
|||
From c8f9332ef5ecab31fc5d053393788f0701dd4397 Mon Sep 17 00:00:00 2001
|
||||
From 26889dd272c3420365e44b69a9b52eb1e876fdc4 Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
Date: Tue, 1 Mar 2016 23:52:34 -0600
|
||||
Subject: [PATCH] Prevent tile entity and entity crashes
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/TileEntity.java b/src/main/java/net/minecraft/server/TileEntity.java
|
||||
index 0d54513a4..d8d519143 100644
|
||||
index 68ac014aab..c5212417c6 100644
|
||||
--- a/src/main/java/net/minecraft/server/TileEntity.java
|
||||
+++ b/src/main/java/net/minecraft/server/TileEntity.java
|
||||
@@ -178,7 +178,12 @@ public abstract class TileEntity implements KeyedObject { // Paper
|
||||
return TileEntityTypes.a.b(this.C()) + " // " + this.getClass().getCanonicalName();
|
||||
return IRegistry.BLOCK_ENTITY_TYPE.getKey(this.C()) + " // " + this.getClass().getCanonicalName();
|
||||
});
|
||||
if (this.world != null) {
|
||||
- CrashReportSystemDetails.a(crashreportsystemdetails, this.position, this.getBlock());
|
||||
|
@ -23,10 +23,10 @@ index 0d54513a4..d8d519143 100644
|
|||
}
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
|
||||
index 6bb52c7d4..ada8376e8 100644
|
||||
index be2feb441d..0b38093f91 100644
|
||||
--- a/src/main/java/net/minecraft/server/World.java
|
||||
+++ b/src/main/java/net/minecraft/server/World.java
|
||||
@@ -1177,10 +1177,12 @@ public abstract class World implements GeneratorAccess, IIBlockAccess, AutoClose
|
||||
@@ -1190,10 +1190,12 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc
|
||||
entity.tickTimer.stopTiming(); // Paper
|
||||
} catch (Throwable throwable1) {
|
||||
entity.tickTimer.stopTiming();
|
||||
|
@ -43,7 +43,7 @@ index 6bb52c7d4..ada8376e8 100644
|
|||
}
|
||||
}
|
||||
|
||||
@@ -1243,10 +1245,13 @@ public abstract class World implements GeneratorAccess, IIBlockAccess, AutoClose
|
||||
@@ -1256,10 +1258,13 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc
|
||||
((ITickable) tileentity).Y_();
|
||||
this.methodProfiler.e();
|
||||
} catch (Throwable throwable2) {
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
From 7c9730ec3c04293e069dc8a489a3e3f370fb7a26 Mon Sep 17 00:00:00 2001
|
||||
From d80b7a127cccc204af74b7d87ee289ff70515d67 Mon Sep 17 00:00:00 2001
|
||||
From: Zach Brown <zach.brown@destroystokyo.com>
|
||||
Date: Tue, 1 Mar 2016 23:58:50 -0600
|
||||
Subject: [PATCH] Configurable top of nether void damage
|
||||
|
||||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
index 38a697e1b..68898d624 100644
|
||||
index 38a697e1b7..68898d624f 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
@@ -124,4 +124,10 @@ public class PaperWorldConfig {
|
||||
|
@ -20,7 +20,7 @@ index 38a697e1b..68898d624 100644
|
|||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
||||
index 106cf19d8..c7acd0629 100644
|
||||
index 02ac5c4c0c..f6cdff0ef9 100644
|
||||
--- a/src/main/java/net/minecraft/server/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/server/Entity.java
|
||||
@@ -462,9 +462,15 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
|
@ -54,7 +54,7 @@ index 106cf19d8..c7acd0629 100644
|
|||
protected void E() {
|
||||
if (this.portalCooldown > 0) {
|
||||
--this.portalCooldown;
|
||||
@@ -530,6 +544,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
@@ -525,6 +539,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
this.fireTicks = 0;
|
||||
}
|
||||
|
||||
|
@ -63,7 +63,7 @@ index 106cf19d8..c7acd0629 100644
|
|||
this.die();
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityMinecartAbstract.java b/src/main/java/net/minecraft/server/EntityMinecartAbstract.java
|
||||
index 6e48cf475..4644d7efe 100644
|
||||
index 025158675f..932fbff7c7 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityMinecartAbstract.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityMinecartAbstract.java
|
||||
@@ -201,9 +201,15 @@ public abstract class EntityMinecartAbstract extends Entity implements INamableT
|
||||
|
@ -83,5 +83,5 @@ index 6e48cf475..4644d7efe 100644
|
|||
int i;
|
||||
|
||||
--
|
||||
2.17.1
|
||||
2.18.0
|
||||
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
From 08717b8b84b939304bea31bc003e1ee04a3d30fc Mon Sep 17 00:00:00 2001
|
||||
From e46af66d39e91ea1e7ebf40c9e48fb40b2dfe506 Mon Sep 17 00:00:00 2001
|
||||
From: Zach Brown <zach.brown@destroystokyo.com>
|
||||
Date: Wed, 2 Mar 2016 00:03:55 -0600
|
||||
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
|
||||
@@ -169,7 +169,7 @@ public class WorldNBTStorage implements IDataManager, IPlayerFileData {
|
||||
@@ -166,7 +166,7 @@ public class WorldNBTStorage implements IDataManager, IPlayerFileData {
|
||||
File file = new File(this.playerDir, entityhuman.bu() + ".dat");
|
||||
// Spigot Start
|
||||
boolean usingWrongFile = false;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
From bd3f0e313c51ef6862f1a954ad030883532ed4d0 Mon Sep 17 00:00:00 2001
|
||||
From f8ed7cd4c678343912efeb6d8e785f1be0b92c5f Mon Sep 17 00:00:00 2001
|
||||
From: Byteflux <byte@byteflux.net>
|
||||
Date: Wed, 2 Mar 2016 00:52:31 -0600
|
||||
Subject: [PATCH] Lighting Queue
|
||||
|
@ -28,7 +28,7 @@ index 145cb274b0..eff9dcf54f 100644
|
|||
|
||||
public static Timing getTickList(WorldServer worldserver, String timingsType) {
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
index 68898d624f..4b36a0f053 100644
|
||||
index 39d565db1f..f0d1ae630e 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
@@ -130,4 +130,10 @@ public class PaperWorldConfig {
|
||||
|
@ -43,10 +43,10 @@ index 68898d624f..4b36a0f053 100644
|
|||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
|
||||
index 849d8de69b..01401c4447 100644
|
||||
index 8507392628..d2412624e1 100644
|
||||
--- a/src/main/java/net/minecraft/server/Chunk.java
|
||||
+++ b/src/main/java/net/minecraft/server/Chunk.java
|
||||
@@ -91,6 +91,7 @@ public class Chunk implements IChunkAccess {
|
||||
@@ -90,6 +90,7 @@ public class Chunk implements IChunkAccess {
|
||||
return removed;
|
||||
}
|
||||
}
|
||||
|
@ -54,7 +54,7 @@ index 849d8de69b..01401c4447 100644
|
|||
// Paper end
|
||||
public boolean areNeighborsLoaded(final int radius) {
|
||||
switch (radius) {
|
||||
@@ -281,6 +282,13 @@ public class Chunk implements IChunkAccess {
|
||||
@@ -280,6 +281,13 @@ public class Chunk implements IChunkAccess {
|
||||
private void g(boolean flag) {
|
||||
this.world.methodProfiler.a("recheckGaps");
|
||||
if (this.world.areChunksLoaded(new BlockPosition(this.locX * 16 + 8, 0, this.locZ * 16 + 8), 16)) {
|
||||
|
@ -67,8 +67,8 @@ index 849d8de69b..01401c4447 100644
|
|||
+ // Paper end
|
||||
for (int i = 0; i < 16; ++i) {
|
||||
for (int j = 0; j < 16; ++j) {
|
||||
if (this.h[i + j * 16]) {
|
||||
@@ -524,6 +532,7 @@ public class Chunk implements IChunkAccess {
|
||||
if (this.g[i + j * 16]) {
|
||||
@@ -523,6 +531,7 @@ public class Chunk implements IChunkAccess {
|
||||
if (flag1) {
|
||||
this.initLighting();
|
||||
} else {
|
||||
|
@ -76,7 +76,7 @@ index 849d8de69b..01401c4447 100644
|
|||
int i1 = iblockdata.b(this.world, blockposition);
|
||||
int j1 = iblockdata1.b(this.world, blockposition);
|
||||
|
||||
@@ -531,6 +540,7 @@ public class Chunk implements IChunkAccess {
|
||||
@@ -530,6 +539,7 @@ public class Chunk implements IChunkAccess {
|
||||
if (i1 != j1 && (i1 < j1 || this.getBrightness(EnumSkyBlock.SKY, blockposition) > 0 || this.getBrightness(EnumSkyBlock.BLOCK, blockposition) > 0)) {
|
||||
this.c(i, k);
|
||||
}
|
||||
|
@ -84,8 +84,8 @@ index 849d8de69b..01401c4447 100644
|
|||
}
|
||||
|
||||
TileEntity tileentity;
|
||||
@@ -1299,6 +1309,16 @@ public class Chunk implements IChunkAccess {
|
||||
return this.E == 8;
|
||||
@@ -1300,6 +1310,16 @@ public class Chunk implements IChunkAccess {
|
||||
return this.D == 8;
|
||||
}
|
||||
|
||||
+ // Paper start
|
||||
|
@ -102,10 +102,10 @@ index 849d8de69b..01401c4447 100644
|
|||
|
||||
IMMEDIATE, QUEUED, CHECK;
|
||||
diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
||||
index aabdc9e2f0..d025d949e3 100644
|
||||
index 0034956af9..1379b574ef 100644
|
||||
--- a/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
||||
@@ -333,6 +333,7 @@ public class ChunkProviderServer implements IChunkProvider {
|
||||
@@ -314,6 +314,7 @@ public class ChunkProviderServer implements IChunkProvider {
|
||||
return false;
|
||||
}
|
||||
save = event.isSaveChunk();
|
||||
|
@ -114,11 +114,11 @@ index aabdc9e2f0..d025d949e3 100644
|
|||
// Update neighbor counts
|
||||
for (int x = -2; x < 3; x++) {
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 6fbf841f06..9dc9668c45 100644
|
||||
index e8c3dcc244..c47f56ed8d 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -864,7 +864,7 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati
|
||||
protected void v() {
|
||||
@@ -886,7 +886,7 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati
|
||||
protected void a(BooleanSupplier booleansupplier) {
|
||||
co.aikar.timings.TimingsManager.FULL_SERVER_TICK.startTiming(); // Paper
|
||||
this.slackActivityAccountant.tickStarted(); // Spigot
|
||||
- long i = SystemUtils.c();
|
||||
|
@ -126,7 +126,7 @@ index 6fbf841f06..9dc9668c45 100644
|
|||
|
||||
++this.ticks;
|
||||
if (this.S) {
|
||||
@@ -922,6 +922,7 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati
|
||||
@@ -944,6 +944,7 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati
|
||||
this.methodProfiler.e();
|
||||
this.methodProfiler.e();
|
||||
org.spigotmc.WatchdogThread.tick(); // Spigot
|
||||
|
@ -136,7 +136,7 @@ index 6fbf841f06..9dc9668c45 100644
|
|||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/PaperLightingQueue.java b/src/main/java/net/minecraft/server/PaperLightingQueue.java
|
||||
new file mode 100644
|
||||
index 0000000000..345cd58240
|
||||
index 0000000000..60562f1fd2
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/net/minecraft/server/PaperLightingQueue.java
|
||||
@@ -0,0 +1,92 @@
|
||||
|
@ -159,7 +159,7 @@ index 0000000000..345cd58240
|
|||
+ final long maxTickTime = MAX_TIME - (startTime - curTime);
|
||||
+
|
||||
+ START:
|
||||
+ for (World world : MinecraftServer.getServer().worlds) {
|
||||
+ for (World world : MinecraftServer.getServer().getWorlds()) {
|
||||
+ if (!world.paperConfig.queueLightUpdates) {
|
||||
+ continue;
|
||||
+ }
|
||||
|
@ -233,10 +233,10 @@ index 0000000000..345cd58240
|
|||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
|
||||
index ada8376e8c..776882ba4f 100644
|
||||
index 0b38093f91..93d1449750 100644
|
||||
--- a/src/main/java/net/minecraft/server/World.java
|
||||
+++ b/src/main/java/net/minecraft/server/World.java
|
||||
@@ -325,7 +325,7 @@ public abstract class World implements GeneratorAccess, IIBlockAccess, AutoClose
|
||||
@@ -335,7 +335,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc
|
||||
|
||||
if (iblockdata2.b(this, blockposition) != iblockdata1.b(this, blockposition) || iblockdata2.e() != iblockdata1.e()) {
|
||||
this.methodProfiler.a("checkLight");
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
From e017ff95e08c7717f7bc428735b97eacfa48f9cd Mon Sep 17 00:00:00 2001
|
||||
From 07cd7c6cb6ebf9dabf473e6f87e56756bb943d51 Mon Sep 17 00:00:00 2001
|
||||
From: DoctorDark <doctordark11@gmail.com>
|
||||
Date: Wed, 16 Mar 2016 02:21:39 -0500
|
||||
Subject: [PATCH] Configurable end credits
|
||||
|
@ -20,25 +20,25 @@ index 4b36a0f053..53921b381e 100644
|
|||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||
index 3a04cac5c9..2dc70ffbf0 100644
|
||||
index 3112ee5453..9f23c0d2c2 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||
@@ -62,7 +62,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||
private long cv = SystemUtils.b();
|
||||
private Entity cw;
|
||||
@@ -61,7 +61,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||
private long cu = SystemUtils.b();
|
||||
private Entity cv;
|
||||
public boolean worldChangeInvuln;
|
||||
- private boolean cy;
|
||||
+ private boolean cy; private void setHasSeenCredits(boolean has) { this.cy = has; } // Paper - OBFHELPER
|
||||
private final RecipeBookServer cz;
|
||||
private Vec3D cA;
|
||||
private int cB;
|
||||
@@ -634,6 +634,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||
- private boolean cx;
|
||||
+ private boolean cx; private void setHasSeenCredits(boolean has) { this.cx = has; } // Paper - OBFHELPER
|
||||
private final RecipeBookServer cy;
|
||||
private Vec3D cz;
|
||||
private int cA;
|
||||
@@ -648,6 +648,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||
this.world.kill(this);
|
||||
if (!this.viewingCredits) {
|
||||
this.viewingCredits = true;
|
||||
+ if (world.paperConfig.disableEndCredits) this.setHasSeenCredits(true); // Paper - Toggle to always disable end credits
|
||||
this.playerConnection.sendPacket(new PacketPlayOutGameStateChange(4, this.cy ? 0.0F : 1.0F));
|
||||
this.cy = true;
|
||||
this.playerConnection.sendPacket(new PacketPlayOutGameStateChange(4, this.cx ? 0.0F : 1.0F));
|
||||
this.cx = true;
|
||||
}
|
||||
--
|
||||
2.18.0
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
From 9b56f5d637b6d50dc41d75c71e609141ae9174a7 Mon Sep 17 00:00:00 2001
|
||||
From 75395ac93dd5164936ba8c355b41edd55a8a1483 Mon Sep 17 00:00:00 2001
|
||||
From: Iceee <andrew@opticgaming.tv>
|
||||
Date: Wed, 2 Mar 2016 01:39:52 -0600
|
||||
Subject: [PATCH] Fix lag from explosions processing dead entities
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/Explosion.java b/src/main/java/net/minecraft/server/Explosion.java
|
||||
index 37e6e5922..6b9f6c956 100644
|
||||
index e5ba6eddd3..439d7ef40c 100644
|
||||
--- a/src/main/java/net/minecraft/server/Explosion.java
|
||||
+++ b/src/main/java/net/minecraft/server/Explosion.java
|
||||
@@ -110,7 +110,14 @@ public class Explosion {
|
||||
@@ -111,7 +111,14 @@ public class Explosion {
|
||||
int i1 = MathHelper.floor(this.posY + (double) f3 + 1.0D);
|
||||
int j1 = MathHelper.floor(this.posZ - (double) f3 - 1.0D);
|
||||
int k1 = MathHelper.floor(this.posZ + (double) f3 + 1.0D);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
From de1dc6533183312e946c2138dc81c82ce73a9def Mon Sep 17 00:00:00 2001
|
||||
From 4c8a9a911c8fa1fbd7920c736e653b5dc3976cb8 Mon Sep 17 00:00:00 2001
|
||||
From: Byteflux <byte@byteflux.net>
|
||||
Date: Wed, 2 Mar 2016 11:59:48 -0600
|
||||
Subject: [PATCH] Optimize explosions
|
||||
|
@ -10,7 +10,7 @@ This patch adds a per-tick cache that is used for storing and retrieving
|
|||
an entity's exposure during an explosion.
|
||||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
index 53921b381..ae4a7cb09 100644
|
||||
index aa2f5414b0..bd1ac77aef 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
@@ -142,4 +142,10 @@ public class PaperWorldConfig {
|
||||
|
@ -25,10 +25,10 @@ index 53921b381..ae4a7cb09 100644
|
|||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/Explosion.java b/src/main/java/net/minecraft/server/Explosion.java
|
||||
index e558a3a57..18c55402d 100644
|
||||
index 439d7ef40c..e440d6d631 100644
|
||||
--- a/src/main/java/net/minecraft/server/Explosion.java
|
||||
+++ b/src/main/java/net/minecraft/server/Explosion.java
|
||||
@@ -136,7 +136,7 @@ public class Explosion {
|
||||
@@ -137,7 +137,7 @@ public class Explosion {
|
||||
d8 /= d11;
|
||||
d9 /= d11;
|
||||
d10 /= d11;
|
||||
|
@ -37,7 +37,7 @@ index e558a3a57..18c55402d 100644
|
|||
double d13 = (1.0D - d7) * d12;
|
||||
|
||||
// CraftBukkit start
|
||||
@@ -312,4 +312,85 @@ public class Explosion {
|
||||
@@ -313,4 +313,85 @@ public class Explosion {
|
||||
public List<BlockPosition> getBlocks() {
|
||||
return this.blocks;
|
||||
}
|
||||
|
@ -124,22 +124,22 @@ index e558a3a57..18c55402d 100644
|
|||
+ // Paper end
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 1ac8d61cd..96d31f874 100644
|
||||
index c47f56ed8d..bdc779ef3b 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -1029,6 +1029,7 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati
|
||||
@@ -1051,6 +1051,7 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati
|
||||
worldserver.getTracker().updatePlayers();
|
||||
this.methodProfiler.e();
|
||||
this.methodProfiler.e();
|
||||
+ worldserver.explosionDensityCache.clear(); // Paper - Optimize explosions
|
||||
}
|
||||
}
|
||||
|
||||
// this.f[i][this.ticks % 100] = SystemUtils.c() - j; // CraftBukkit
|
||||
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
|
||||
index c40ecbc0c..1ca3eef11 100644
|
||||
index 93d1449750..9e192b7c04 100644
|
||||
--- a/src/main/java/net/minecraft/server/World.java
|
||||
+++ b/src/main/java/net/minecraft/server/World.java
|
||||
@@ -18,6 +18,7 @@ import org.apache.logging.log4j.Logger;
|
||||
@@ -24,6 +24,7 @@ import org.apache.logging.log4j.Logger;
|
||||
|
||||
// CraftBukkit start
|
||||
import com.google.common.collect.Maps;
|
||||
|
@ -147,7 +147,7 @@ index c40ecbc0c..1ca3eef11 100644
|
|||
import java.util.Map;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.block.BlockState;
|
||||
@@ -138,6 +139,7 @@ public abstract class World implements GeneratorAccess, IIBlockAccess, AutoClose
|
||||
@@ -145,6 +146,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc
|
||||
private org.spigotmc.TickLimiter entityLimiter;
|
||||
private org.spigotmc.TickLimiter tileLimiter;
|
||||
private int tileTickPosition;
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
From 45c7985fc49421f76238abbef111ffa5997b7270 Mon Sep 17 00:00:00 2001
|
||||
From 8cf00241b984108b5fa89837e961d8c767833922 Mon Sep 17 00:00:00 2001
|
||||
From: Byteflux <byte@byteflux.net>
|
||||
Date: Wed, 2 Mar 2016 14:35:27 -0600
|
||||
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
|
||||
@@ -72,6 +72,15 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||
@@ -71,6 +71,15 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||
public boolean f;
|
||||
public int ping;
|
||||
public boolean viewingCredits;
|
||||
|
@ -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
|
||||
@@ -1641,6 +1641,16 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
From 2e59841e1c882aa53a07a65e704833c05aaab624 Mon Sep 17 00:00:00 2001
|
||||
From f66b7805e8b3749a50b005653714f54c6d93a214 Mon Sep 17 00:00:00 2001
|
||||
From: Sudzzy <originmc@outlook.com>
|
||||
Date: Wed, 2 Mar 2016 14:48:03 -0600
|
||||
Subject: [PATCH] Disable explosion knockback
|
||||
|
@ -19,10 +19,10 @@ index ae4a7cb097..f2f45ae4a6 100644
|
|||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
index 1722855ac5..af595bf2bc 100644
|
||||
index 8a41a1dca8..dd216c64e9 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
@@ -1005,6 +1005,7 @@ public abstract class EntityLiving extends Entity {
|
||||
@@ -1006,6 +1006,7 @@ public abstract class EntityLiving extends Entity {
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -30,7 +30,7 @@ index 1722855ac5..af595bf2bc 100644
|
|||
if (flag1) {
|
||||
if (flag) {
|
||||
this.world.broadcastEntityEffect(this, (byte) 29);
|
||||
@@ -1021,6 +1022,7 @@ public abstract class EntityLiving extends Entity {
|
||||
@@ -1022,6 +1023,7 @@ public abstract class EntityLiving extends Entity {
|
||||
b0 = 2;
|
||||
}
|
||||
|
||||
|
@ -38,7 +38,7 @@ index 1722855ac5..af595bf2bc 100644
|
|||
this.world.broadcastEntityEffect(this, b0);
|
||||
}
|
||||
|
||||
@@ -1044,6 +1046,8 @@ public abstract class EntityLiving extends Entity {
|
||||
@@ -1045,6 +1047,8 @@ public abstract class EntityLiving extends Entity {
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -48,10 +48,10 @@ index 1722855ac5..af595bf2bc 100644
|
|||
if (!this.e(damagesource)) {
|
||||
SoundEffect soundeffect = this.cs();
|
||||
diff --git a/src/main/java/net/minecraft/server/Explosion.java b/src/main/java/net/minecraft/server/Explosion.java
|
||||
index 18c55402d9..7c676f9f34 100644
|
||||
index e440d6d631..3521d9e10c 100644
|
||||
--- a/src/main/java/net/minecraft/server/Explosion.java
|
||||
+++ b/src/main/java/net/minecraft/server/Explosion.java
|
||||
@@ -152,7 +152,7 @@ public class Explosion {
|
||||
@@ -153,7 +153,7 @@ public class Explosion {
|
||||
double d14 = d13;
|
||||
|
||||
if (entity instanceof EntityLiving) {
|
||||
|
@ -60,7 +60,7 @@ index 18c55402d9..7c676f9f34 100644
|
|||
}
|
||||
|
||||
entity.motX += d8 * d14;
|
||||
@@ -161,7 +161,7 @@ public class Explosion {
|
||||
@@ -162,7 +162,7 @@ public class Explosion {
|
||||
if (entity instanceof EntityHuman) {
|
||||
EntityHuman entityhuman = (EntityHuman) entity;
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
From 481e2235aad6d8ad72f169278fbb3da2f4a379a0 Mon Sep 17 00:00:00 2001
|
||||
From 3ddade42184d1b9996b47cf251dd031f40beb530 Mon Sep 17 00:00:00 2001
|
||||
From: Sudzzy <originmc@outlook.com>
|
||||
Date: Wed, 2 Mar 2016 23:34:44 -0600
|
||||
Subject: [PATCH] Configurable container update tick rate
|
||||
|
@ -19,10 +19,10 @@ index 59bd3e28f0..f8d2aae082 100644
|
|||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||
index b66df45bde..0b1c5ca475 100644
|
||||
index b44d056651..a9b08dcb0e 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||
@@ -81,6 +81,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||
@@ -80,6 +80,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||
this.viewDistance = viewDistance;
|
||||
}
|
||||
// Paper end
|
||||
|
@ -30,7 +30,7 @@ index b66df45bde..0b1c5ca475 100644
|
|||
|
||||
// CraftBukkit start
|
||||
public String displayName;
|
||||
@@ -344,7 +345,12 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||
@@ -343,7 +344,12 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||
--this.noDamageTicks;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
From b75dfb48523ff1f251bdce49dce849ad921b53d1 Mon Sep 17 00:00:00 2001
|
||||
From e7d0420983298221e86f3959e98a9acd7cbcc059 Mon Sep 17 00:00:00 2001
|
||||
From: Zach Brown <zach.brown@destroystokyo.com>
|
||||
Date: Wed, 2 Mar 2016 23:45:17 -0600
|
||||
Subject: [PATCH] Disable spigot tick limiters
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
|
||||
index 4a6e3c403..aed5e4330 100644
|
||||
index 9e192b7c04..8b90b13d15 100644
|
||||
--- a/src/main/java/net/minecraft/server/World.java
|
||||
+++ b/src/main/java/net/minecraft/server/World.java
|
||||
@@ -1154,10 +1154,10 @@ public abstract class World implements GeneratorAccess, IIBlockAccess, AutoClose
|
||||
@@ -1167,10 +1167,10 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc
|
||||
// CraftBukkit start - Use field for loop variable
|
||||
co.aikar.timings.TimingHistory.entityTicks += this.entityList.size(); // Paper
|
||||
int entitiesThisCycle = 0;
|
||||
|
@ -23,7 +23,7 @@ index 4a6e3c403..aed5e4330 100644
|
|||
tickPosition = (tickPosition < entityList.size()) ? tickPosition : 0;
|
||||
entity = (Entity) this.entityList.get(this.tickPosition);
|
||||
// CraftBukkit end
|
||||
@@ -1221,9 +1221,7 @@ public abstract class World implements GeneratorAccess, IIBlockAccess, AutoClose
|
||||
@@ -1234,9 +1234,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc
|
||||
// Spigot start
|
||||
// Iterator iterator = this.tileEntityListTick.iterator();
|
||||
int tilesThisCycle = 0;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
From 92075bd693c6b7c695b63e21d5570a9c952c8984 Mon Sep 17 00:00:00 2001
|
||||
From 0aab182446c577dec9f7bec0dc0973ea874945b7 Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
Date: Thu, 3 Mar 2016 01:17:12 -0600
|
||||
Subject: [PATCH] Ensure commands are not ran async
|
||||
|
@ -14,10 +14,10 @@ big slowdown in execution but throwing an exception at same time to raise awaren
|
|||
that it is happening so that plugin authors can fix their code to stop executing commands async.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
index 5d42cfe81c..dc38e4e043 100644
|
||||
index 37284fae4d..3257f41713 100644
|
||||
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
@@ -1548,6 +1548,29 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
|
||||
@@ -1558,6 +1558,29 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
|
||||
}
|
||||
|
||||
if (!async && s.startsWith("/")) {
|
||||
|
@ -48,10 +48,10 @@ index 5d42cfe81c..dc38e4e043 100644
|
|||
} else if (this.player.getChatFlags() == EntityHuman.EnumChatVisibility.SYSTEM) {
|
||||
// Do nothing, this is coming from a plugin
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 1c003a3898..d9cba38080 100644
|
||||
index f066af3fe5..e047d68f3e 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -691,6 +691,29 @@ public final class CraftServer implements Server {
|
||||
@@ -692,6 +692,29 @@ public final class CraftServer implements Server {
|
||||
Validate.notNull(commandLine, "CommandLine cannot be null");
|
||||
org.spigotmc.AsyncCatcher.catchOp( "command dispatch" ); // Spigot
|
||||
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
From 8d686401dc81d0556b8c9157171301b1b0661901 Mon Sep 17 00:00:00 2001
|
||||
From 53637e35e4d08e9a4d50f0c1b2416fb12097d3f2 Mon Sep 17 00:00:00 2001
|
||||
From: vemacs <d@nkmem.es>
|
||||
Date: Thu, 3 Mar 2016 01:19:22 -0600
|
||||
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
|
||||
@@ -178,4 +178,9 @@ public class PaperWorldConfig {
|
||||
|
@ -19,18 +19,18 @@ 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
|
||||
@@ -252,7 +252,7 @@ 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);
|
||||
--
|
||||
2.18.0
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
From 09dde82aeb83b408f1256e9ce7fefde0ced411ba Mon Sep 17 00:00:00 2001
|
||||
From 1df9f23dc917c635bee6505b3ea3d08e0179f328 Mon Sep 17 00:00:00 2001
|
||||
From: CullanP <cullanpage@gmail.com>
|
||||
Date: Thu, 3 Mar 2016 02:13:38 -0600
|
||||
Subject: [PATCH] Avoid hopper searches if there are no items
|
||||
|
@ -14,10 +14,10 @@ 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
|
||||
@@ -92,6 +92,10 @@ public class Chunk implements IChunkAccess {
|
||||
@@ -91,6 +91,10 @@ public class Chunk implements IChunkAccess {
|
||||
}
|
||||
}
|
||||
final PaperLightingQueue.LightingQueue lightingQueue = new PaperLightingQueue.LightingQueue(this);
|
||||
|
@ -28,7 +28,7 @@ index 01401c4447..57ebd1e77a 100644
|
|||
// Paper end
|
||||
public boolean areNeighborsLoaded(final int radius) {
|
||||
switch (radius) {
|
||||
@@ -685,6 +689,11 @@ public class Chunk implements IChunkAccess {
|
||||
@@ -684,6 +688,11 @@ public class Chunk implements IChunkAccess {
|
||||
entity.ag = this.locZ;
|
||||
this.entitySlices[k].add(entity);
|
||||
// Paper start
|
||||
|
@ -40,7 +40,7 @@ index 01401c4447..57ebd1e77a 100644
|
|||
entity.setCurrentChunk(this);
|
||||
entityCounts.increment(entity.getMinecraftKeyString());
|
||||
// Paper end
|
||||
@@ -710,6 +719,11 @@ public class Chunk implements IChunkAccess {
|
||||
@@ -709,6 +718,11 @@ public class Chunk implements IChunkAccess {
|
||||
if (!this.entitySlices[i].remove(entity)) {
|
||||
return;
|
||||
}
|
||||
|
@ -52,7 +52,7 @@ index 01401c4447..57ebd1e77a 100644
|
|||
entity.setCurrentChunk(null);
|
||||
entityCounts.decrement(entity.getMinecraftKeyString());
|
||||
// Paper end
|
||||
@@ -910,6 +924,15 @@ public class Chunk implements IChunkAccess {
|
||||
@@ -911,6 +925,15 @@ public class Chunk implements IChunkAccess {
|
||||
if (!this.entitySlices[k].isEmpty()) {
|
||||
Iterator iterator = this.entitySlices[k].iterator();
|
||||
|
||||
|
@ -68,7 +68,7 @@ index 01401c4447..57ebd1e77a 100644
|
|||
while (iterator.hasNext()) {
|
||||
Entity entity1 = (Entity) iterator.next();
|
||||
|
||||
@@ -946,7 +969,18 @@ public class Chunk implements IChunkAccess {
|
||||
@@ -947,7 +970,18 @@ public class Chunk implements IChunkAccess {
|
||||
i = MathHelper.clamp(i, 0, this.entitySlices.length - 1);
|
||||
j = MathHelper.clamp(j, 0, this.entitySlices.length - 1);
|
||||
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
From d517d0ead223fc0a5da5f4c77692abf9ee5203d0 Mon Sep 17 00:00:00 2001
|
||||
From 8bee6fed99116e8b3f4119b9e2c82c1d2cf0f30d Mon Sep 17 00:00:00 2001
|
||||
From: kashike <kashike@vq.lc>
|
||||
Date: Thu, 3 Mar 2016 02:15:57 -0600
|
||||
Subject: [PATCH] Expose server CommandMap
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index d9cba38080..5230867326 100644
|
||||
index e047d68f3e..6a7bdb9ab6 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -1589,6 +1589,7 @@ public final class CraftServer implements Server {
|
||||
@@ -1609,6 +1609,7 @@ public final class CraftServer implements Server {
|
||||
return helpMap;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,45 +1,11 @@
|
|||
From 5e67ca7f673b8643db71ce3c7923352e31be10b1 Mon Sep 17 00:00:00 2001
|
||||
From 5e5577be71456db68a07895d330eb51ef93d542a Mon Sep 17 00:00:00 2001
|
||||
From: Techcable <Techcable@outlook.com>
|
||||
Date: Thu, 3 Mar 2016 02:32:10 -0600
|
||||
Subject: [PATCH] Player Tab List and Title APIs
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/PacketPlayOutPlayerListHeaderFooter.java b/src/main/java/net/minecraft/server/PacketPlayOutPlayerListHeaderFooter.java
|
||||
index d7c583a71..7096799c5 100644
|
||||
--- a/src/main/java/net/minecraft/server/PacketPlayOutPlayerListHeaderFooter.java
|
||||
+++ b/src/main/java/net/minecraft/server/PacketPlayOutPlayerListHeaderFooter.java
|
||||
@@ -6,6 +6,7 @@ public class PacketPlayOutPlayerListHeaderFooter implements Packet<PacketListene
|
||||
|
||||
public IChatBaseComponent a; // PAIL
|
||||
public IChatBaseComponent b; // PAIL
|
||||
+ public net.md_5.bungee.api.chat.BaseComponent[] header, footer; // Paper
|
||||
|
||||
public PacketPlayOutPlayerListHeaderFooter() {}
|
||||
|
||||
@@ -15,8 +16,19 @@ public class PacketPlayOutPlayerListHeaderFooter implements Packet<PacketListene
|
||||
}
|
||||
|
||||
public void b(PacketDataSerializer packetdataserializer) throws IOException {
|
||||
- packetdataserializer.a(this.a);
|
||||
- packetdataserializer.a(this.b);
|
||||
+ // Paper start
|
||||
+ if (this.header != null) {
|
||||
+ packetdataserializer.a(net.md_5.bungee.chat.ComponentSerializer.toString(this.header));
|
||||
+ } else {
|
||||
+ packetdataserializer.a(this.a);
|
||||
+ }
|
||||
+
|
||||
+ if (this.footer != null) {
|
||||
+ packetdataserializer.a(net.md_5.bungee.chat.ComponentSerializer.toString(this.footer));
|
||||
+ } else {
|
||||
+ packetdataserializer.a(this.b);
|
||||
+ }
|
||||
+ // Paper end
|
||||
}
|
||||
|
||||
public void a(PacketListenerPlayOut packetlistenerplayout) {
|
||||
diff --git a/src/main/java/net/minecraft/server/PacketPlayOutTitle.java b/src/main/java/net/minecraft/server/PacketPlayOutTitle.java
|
||||
index 7b18c1640..900bd8357 100644
|
||||
index 7b18c16402..900bd83570 100644
|
||||
--- a/src/main/java/net/minecraft/server/PacketPlayOutTitle.java
|
||||
+++ b/src/main/java/net/minecraft/server/PacketPlayOutTitle.java
|
||||
@@ -11,6 +11,18 @@ public class PacketPlayOutTitle implements Packet<PacketListenerPlayOut> {
|
||||
|
@ -77,7 +43,7 @@ index 7b18c1640..900bd8357 100644
|
|||
|
||||
if (this.a == PacketPlayOutTitle.EnumTitleAction.TIMES) {
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
index 02d2c00c0..0beb10f82 100644
|
||||
index 3cc16b6923..eceba690af 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
@@ -1,5 +1,6 @@
|
||||
|
@ -87,17 +53,15 @@ index 02d2c00c0..0beb10f82 100644
|
|||
import com.google.common.base.Preconditions;
|
||||
import com.google.common.collect.ImmutableSet;
|
||||
import com.google.common.io.BaseEncoding;
|
||||
@@ -203,6 +204,85 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
@@ -203,6 +204,83 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
}
|
||||
}
|
||||
|
||||
+ // Paper start
|
||||
+ @Override
|
||||
+ public void setPlayerListHeaderFooter(BaseComponent[] header, BaseComponent[] footer) {
|
||||
+ PacketPlayOutPlayerListHeaderFooter packet = new PacketPlayOutPlayerListHeaderFooter();
|
||||
+ packet.header = header;
|
||||
+ packet.footer = footer;
|
||||
+ getHandle().playerConnection.sendPacket(packet);
|
||||
+ setPlayerListHeader(header == null ? null : net.md_5.bungee.chat.ComponentSerializer.toString(header));
|
||||
+ setPlayerListFooter(footer == null ? null : net.md_5.bungee.chat.ComponentSerializer.toString(footer));
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
|
|
|
@ -1,40 +1,28 @@
|
|||
From 03080d8f95d78cbce3ab4467477b14185dcdcc88 Mon Sep 17 00:00:00 2001
|
||||
From 5a524473ad69a38c362a3f2fc90811f9d2ffe8ba Mon Sep 17 00:00:00 2001
|
||||
From: Joseph Hirschfeld <joe@ibj.io>
|
||||
Date: Thu, 3 Mar 2016 02:39:54 -0600
|
||||
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
|
||||
@@ -35,7 +35,10 @@ 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();
|
||||
@@ -67,11 +70,11 @@ public abstract class World implements GeneratorAccess, IIBlockAccess, AutoClose
|
||||
@@ -73,11 +73,11 @@ 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();
|
||||
@@ -1125,20 +1128,20 @@ public abstract class World implements GeneratorAccess, IIBlockAccess, AutoClose
|
||||
@@ -1138,20 +1138,20 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc
|
||||
this.entityList.removeAll(this.g);
|
||||
|
||||
int j;
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
From c75d946dc9c6bf4a6fae51cbe0ef7bf3e4b506ad Mon Sep 17 00:00:00 2001
|
||||
From 34714cc6991d2727f764745fdae5a08c88a8e87f Mon Sep 17 00:00:00 2001
|
||||
From: Joseph Hirschfeld <joe@ibj.io>
|
||||
Date: Thu, 3 Mar 2016 02:46:17 -0600
|
||||
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
|
||||
@@ -183,4 +183,9 @@ 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
|
||||
@@ -13,7 +13,7 @@ import org.bukkit.util.Vector;
|
||||
|
@ -41,10 +41,10 @@ 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
|
||||
@@ -11,7 +11,7 @@ public class CraftTravelAgent extends PortalTravelAgent implements TravelAgent {
|
||||
@@ -12,7 +12,7 @@ public class CraftTravelAgent extends PortalTravelAgent implements TravelAgent {
|
||||
|
||||
public static TravelAgent DEFAULT = null;
|
||||
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
From 50d67616ec3a1650dfe76984418cfbe1cadaf22a Mon Sep 17 00:00:00 2001
|
||||
From 3adf13e17f92b08fbb27e257a72a0b0627ce6a89 Mon Sep 17 00:00:00 2001
|
||||
From: Joseph Hirschfeld <joe@ibj.io>
|
||||
Date: Thu, 3 Mar 2016 02:48:12 -0600
|
||||
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
|
||||
@@ -191,6 +191,7 @@ public final class CraftServer implements Server {
|
||||
@@ -192,6 +192,7 @@ public final class CraftServer implements Server {
|
||||
public boolean ignoreVanillaPermissions = false;
|
||||
private final List<CraftPlayer> playerView;
|
||||
public int reloadCount;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
From 3f536bfd455a44b15393e44e9798065e38949ed3 Mon Sep 17 00:00:00 2001
|
||||
From 4a30598e11988808422e02822c399e739869d129 Mon Sep 17 00:00:00 2001
|
||||
From: Sudzzy <originmc@outlook.com>
|
||||
Date: Thu, 3 Mar 2016 02:50:31 -0600
|
||||
Subject: [PATCH] Configurable inter-world teleportation safety
|
||||
|
@ -16,7 +16,7 @@ The wanted destination was on top of the emerald block however the player ended
|
|||
This only is the case if the player is teleporting between worlds.
|
||||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
index c98286999..4a2d29674 100644
|
||||
index c982869995..4a2d296746 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
@@ -188,4 +188,9 @@ public class PaperWorldConfig {
|
||||
|
@ -30,10 +30,10 @@ index c98286999..4a2d29674 100644
|
|||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
|
||||
index 90cb2d277..8b3c2d287 100644
|
||||
index 4320efaef5..9f2c7d3f45 100644
|
||||
--- a/src/main/java/net/minecraft/server/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/PlayerList.java
|
||||
@@ -798,7 +798,7 @@ public abstract class PlayerList {
|
||||
@@ -792,7 +792,7 @@ public abstract class PlayerList {
|
||||
exitWorld.getTravelAgent().adjustExit(entityplayer, exit, velocity);
|
||||
|
||||
entityplayer.worldChangeInvuln = true; // CraftBukkit - Set teleport invulnerability only if player changing worlds
|
||||
|
@ -43,10 +43,10 @@ index 90cb2d277..8b3c2d287 100644
|
|||
entityplayer.getBukkitEntity().setVelocity(velocity);
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
index 0beb10f82..59e60923b 100644
|
||||
index 8db92714ea..86f485e6ff 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
@@ -703,7 +703,8 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
@@ -701,7 +701,8 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
if (fromWorld == toWorld) {
|
||||
entity.playerConnection.teleport(to);
|
||||
} else {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
From e5d5c2bc2903a9b5d5399f3a709c2737560ee32b Mon Sep 17 00:00:00 2001
|
||||
From 5e1e6450f4fda96b2b9ab63bd59a16dad95fba6e Mon Sep 17 00:00:00 2001
|
||||
From: Joseph Hirschfeld <joe@ibj.io>
|
||||
Date: Thu, 3 Mar 2016 03:15:41 -0600
|
||||
Subject: [PATCH] Add exception reporting event
|
||||
|
@ -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 +1,38 @@
|
||||
|
@ -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
|
||||
@@ -1,5 +1,6 @@
|
||||
|
@ -60,16 +60,7 @@ index ea7d82f09..ec43c2659 100644
|
|||
import com.google.common.collect.Maps;
|
||||
import com.google.common.collect.Queues;
|
||||
import com.google.common.collect.Sets;
|
||||
@@ -24,6 +25,8 @@ 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 {
|
||||
|
||||
@@ -427,6 +430,7 @@ public class Chunk implements IChunkAccess {
|
||||
@@ -426,6 +427,7 @@ public class Chunk implements IChunkAccess {
|
||||
return this.getBlockData(i, j, k).b(this.world, new BlockPosition(i, j, k));
|
||||
}
|
||||
|
||||
|
@ -77,7 +68,7 @@ index ea7d82f09..ec43c2659 100644
|
|||
public IBlockData getType(BlockPosition blockposition) {
|
||||
return this.getBlockData(blockposition.getX(), blockposition.getY(), blockposition.getZ());
|
||||
}
|
||||
@@ -803,10 +807,15 @@ public class Chunk implements IChunkAccess {
|
||||
@@ -802,10 +804,15 @@ public class Chunk implements IChunkAccess {
|
||||
this.tileEntities.remove(blockposition);
|
||||
// Paper end
|
||||
} else {
|
||||
|
@ -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
|
||||
@@ -17,6 +17,7 @@ import java.util.concurrent.ExecutionException;
|
||||
@@ -15,6 +15,7 @@ import java.util.function.BooleanSupplier;
|
||||
import java.util.function.Consumer;
|
||||
import java.util.function.Function;
|
||||
import javax.annotation.Nullable;
|
||||
|
@ -109,20 +100,7 @@ index d025d949e..0e04d6598 100644
|
|||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
||||
@@ -225,7 +226,11 @@ 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
|
||||
}
|
||||
|
||||
}
|
||||
@@ -235,9 +240,14 @@ public class ChunkProviderServer implements IChunkProvider {
|
||||
@@ -209,9 +210,14 @@ public class ChunkProviderServer implements IChunkProvider {
|
||||
ichunkaccess.setLastSaved(this.world.getTime());
|
||||
this.chunkLoader.saveChunk(this.world, ichunkaccess, unloaded); // Spigot
|
||||
} catch (IOException ioexception) {
|
||||
|
@ -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
|
||||
@@ -1,5 +1,6 @@
|
||||
|
@ -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
|
||||
@@ -1,5 +1,6 @@
|
||||
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;
|
||||
@@ -74,6 +75,7 @@ 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) {
|
||||
@@ -131,6 +133,7 @@ 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
|
||||
@@ -1,5 +1,6 @@
|
||||
|
@ -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
|
||||
@@ -1,5 +1,6 @@
|
||||
|
@ -231,7 +182,7 @@ index 0e91aeec3..ff473a263 100644
|
|||
import com.google.common.collect.Maps;
|
||||
import java.io.DataInputStream;
|
||||
import java.io.DataOutputStream;
|
||||
@@ -69,6 +70,7 @@ public class RegionFileCache {
|
||||
@@ -71,6 +72,7 @@ public class RegionFileCache {
|
||||
}
|
||||
} catch (IOException ioexception) {
|
||||
ioexception.printStackTrace();
|
||||
|
@ -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
|
||||
@@ -10,6 +10,7 @@ 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
|
||||
@@ -1,5 +1,7 @@
|
||||
|
@ -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
|
||||
@@ -1,6 +1,8 @@
|
||||
|
@ -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;
|
||||
@@ -1183,8 +1185,10 @@ public abstract class World implements GeneratorAccess, IIBlockAccess, AutoClose
|
||||
import it.unimi.dsi.fastutil.longs.LongSet;
|
||||
@@ -1193,8 +1195,10 @@ 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
|
||||
@@ -1249,8 +1253,10 @@ public abstract class World implements GeneratorAccess, IIBlockAccess, AutoClose
|
||||
@@ -1259,8 +1263,10 @@ 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
|
||||
@@ -138,6 +138,7 @@ 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
|
||||
@@ -15,6 +15,9 @@ import java.util.concurrent.atomic.AtomicReference;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
From dec40f5aae3382fb517071d54d4580616f3dd847 Mon Sep 17 00:00:00 2001
|
||||
From 318ea0ac3b760220892f620d0218a490fcd390b5 Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
Date: Tue, 8 Mar 2016 23:25:45 -0500
|
||||
Subject: [PATCH] Disable Scoreboards for non players by default
|
||||
|
@ -25,10 +25,10 @@ index 4a2d296746..2b25da0465 100644
|
|||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
||||
index c7acd06298..27020c7e29 100644
|
||||
index f6cdff0ef9..9e1c427fcc 100644
|
||||
--- a/src/main/java/net/minecraft/server/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/server/Entity.java
|
||||
@@ -2248,6 +2248,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
@@ -2243,6 +2243,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
|
||||
@Nullable
|
||||
public ScoreboardTeamBase be() {
|
||||
|
@ -37,7 +37,7 @@ index c7acd06298..27020c7e29 100644
|
|||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
index af595bf2bc..5363a2c704 100644
|
||||
index dd216c64e9..ed6f5e70f3 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
@@ -538,6 +538,7 @@ public abstract class EntityLiving extends Entity {
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
From c7c1c0f7149429b16ae5919c8af00d870192266a Mon Sep 17 00:00:00 2001
|
||||
From d82d48df94d3dac694ab0f224e66da617ae13c17 Mon Sep 17 00:00:00 2001
|
||||
From: Jedediah Smith <jedediah@silencegreys.com>
|
||||
Date: Sat, 4 Apr 2015 23:17:52 -0400
|
||||
Subject: [PATCH] Complete resource pack API
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
index 9827e08b7d..5b045dc2a9 100644
|
||||
index 86f485e6ff..b56bb9d531 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
@@ -128,6 +128,10 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
|
@ -19,7 +19,7 @@ index 9827e08b7d..5b045dc2a9 100644
|
|||
|
||||
public CraftPlayer(CraftServer server, EntityPlayer entity) {
|
||||
super(server, entity);
|
||||
@@ -1741,6 +1745,32 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
@@ -1739,6 +1743,32 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
getHandle().server.getCommandDispatcher().a(getHandle());
|
||||
}
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
From c8b51eeedd60beed4dc70db20bba967b5f60e48e Mon Sep 17 00:00:00 2001
|
||||
From 0d3a01c3188c4dbdccdb1b700707e790777a5968 Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
Date: Fri, 4 Mar 2016 18:18:37 -0600
|
||||
Subject: [PATCH] Chunk save queue improvements
|
||||
|
@ -26,7 +26,7 @@ Then finally, Sleeping will by default be removed, but due to known issues with
|
|||
But if sleeps are to remain enabled, we at least lower the sleep interval so it doesn't have as much negative impact.
|
||||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||
index d48ef7e85..280cfd553 100644
|
||||
index 0d68ffd75a..fd00c320ce 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||
@@ -208,4 +208,10 @@ public class PaperConfig {
|
||||
|
@ -41,10 +41,10 @@ index d48ef7e85..280cfd553 100644
|
|||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/ChunkRegionLoader.java b/src/main/java/net/minecraft/server/ChunkRegionLoader.java
|
||||
index 5001fd11d..b247d5f07 100644
|
||||
index f969c036f3..2b0a088a6a 100644
|
||||
--- a/src/main/java/net/minecraft/server/ChunkRegionLoader.java
|
||||
+++ b/src/main/java/net/minecraft/server/ChunkRegionLoader.java
|
||||
@@ -25,6 +25,7 @@ import java.util.function.Consumer;
|
||||
@@ -22,6 +22,7 @@ import java.util.function.Consumer;
|
||||
import java.util.function.Function;
|
||||
import java.util.function.Predicate;
|
||||
import javax.annotation.Nullable;
|
||||
|
@ -52,7 +52,7 @@ index 5001fd11d..b247d5f07 100644
|
|||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
// Spigot start
|
||||
@@ -34,8 +35,21 @@ import org.spigotmc.SupplierUtils;
|
||||
@@ -31,6 +32,19 @@ import org.spigotmc.SupplierUtils;
|
||||
|
||||
public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver {
|
||||
|
||||
|
@ -66,16 +66,13 @@ index 5001fd11d..b247d5f07 100644
|
|||
+ this.compoundSupplier = compoundSupplier;
|
||||
+ }
|
||||
+ }
|
||||
+ private ConcurrentLinkedQueue<QueuedChunk> queue = new ConcurrentLinkedQueue<>();
|
||||
+ final private ConcurrentLinkedQueue<QueuedChunk> queue = new ConcurrentLinkedQueue<>();
|
||||
+ // Paper end
|
||||
+
|
||||
private static final Logger a = LogManager.getLogger();
|
||||
- private final Object2ObjectMap<ChunkCoordIntPair, Supplier<NBTTagCompound>> b = Object2ObjectMaps.synchronize(new Object2ObjectLinkedOpenHashMap()); // Spigot
|
||||
+ private final Object2ObjectMap<ChunkCoordIntPair, Supplier<NBTTagCompound>> b = new Object2ObjectLinkedOpenHashMap(); // Spigot // Paper - remove synchronized
|
||||
private final Map<ChunkCoordIntPair, Supplier<NBTTagCompound>> b = Maps.newHashMap();
|
||||
private final File c;
|
||||
private final DataFixer d;
|
||||
private PersistentStructureLegacy e;
|
||||
@@ -298,8 +312,8 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver {
|
||||
@@ -305,8 +319,8 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver {
|
||||
}
|
||||
};
|
||||
}
|
||||
|
@ -86,74 +83,64 @@ index 5001fd11d..b247d5f07 100644
|
|||
// Spigot end
|
||||
} catch (Exception exception) {
|
||||
ChunkRegionLoader.a.error("Failed to save chunk", exception);
|
||||
@@ -308,18 +322,22 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver {
|
||||
@@ -315,7 +329,10 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver {
|
||||
}
|
||||
|
||||
protected synchronized void a(ChunkCoordIntPair chunkcoordintpair, Supplier<NBTTagCompound> nbttagcompound) { // Spigot
|
||||
protected void a(ChunkCoordIntPair chunkcoordintpair, Supplier<NBTTagCompound> nbttagcompound) { // Spigot
|
||||
- this.b.put(chunkcoordintpair, nbttagcompound);
|
||||
+ synchronized (this.queue) { // Paper - synchronize while modifying the map
|
||||
+ queue.add(new QueuedChunk(chunkcoordintpair, nbttagcompound)); // Paper - Chunk queue improvements
|
||||
this.b.put(chunkcoordintpair, nbttagcompound);
|
||||
+ this.b.put(chunkcoordintpair, nbttagcompound);
|
||||
+ }
|
||||
FileIOThread.a().a(this);
|
||||
}
|
||||
|
||||
- public synchronized boolean a() {
|
||||
+ public boolean a() { // Paper - remove synchronized
|
||||
// CraftBukkit start
|
||||
return this.processSaveQueueEntry(false);
|
||||
@@ -325,19 +342,18 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver {
|
||||
}
|
||||
|
||||
- private synchronized boolean processSaveQueueEntry(boolean logCompletion) {
|
||||
- Iterator<Map.Entry<ChunkCoordIntPair, Supplier<NBTTagCompound>>> iter = this.b.entrySet().iterator(); // Spigot
|
||||
- if (!iter.hasNext()) {
|
||||
+ private boolean processSaveQueueEntry(boolean logCompletion) { // Paper - dont synchronize during save
|
||||
+ // CraftBukkit start
|
||||
private boolean processSaveQueueEntry(boolean logCompletion) {
|
||||
- Iterator iterator = this.b.entrySet().iterator();
|
||||
- if (!iterator.hasNext()) {
|
||||
+ // Paper start - Chunk queue improvements
|
||||
+ QueuedChunk chunk = queue.poll();
|
||||
+ if (chunk == null) {
|
||||
+ // Paper - end
|
||||
if (logCompletion) {
|
||||
// CraftBukkit end
|
||||
if (logCompletion) { // CraftBukkit
|
||||
ChunkRegionLoader.a.info("ThreadedAnvilChunkStorage ({}): All chunks are saved", this.c.getName());
|
||||
@@ -327,17 +345,13 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver {
|
||||
}
|
||||
|
||||
return false;
|
||||
} else {
|
||||
- // CraftBukkit start
|
||||
- Map.Entry<ChunkCoordIntPair, Supplier<NBTTagCompound>> entry = iter.next(); // Spigot
|
||||
- ChunkCoordIntPair chunkcoordintpair = entry.getKey();
|
||||
- Supplier<NBTTagCompound> value = entry.getValue(); // Spigot
|
||||
- // CraftBukkit end
|
||||
- Entry entry = (Entry) iterator.next();
|
||||
-
|
||||
- iterator.remove();
|
||||
- ChunkCoordIntPair chunkcoordintpair = (ChunkCoordIntPair) entry.getKey();
|
||||
- Supplier<NBTTagCompound> nbttagcompound = (Supplier<NBTTagCompound>) entry.getValue(); // Spigot
|
||||
+ ChunkCoordIntPair chunkcoordintpair = chunk.coords; // Paper - Chunk queue improvements
|
||||
+ Supplier<NBTTagCompound> nbttagcompound = chunk.compoundSupplier; // Spigot // Paper
|
||||
|
||||
boolean flag;
|
||||
if (nbttagcompound == null) {
|
||||
return true;
|
||||
@@ -346,6 +362,14 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver {
|
||||
// CraftBukkit start
|
||||
RegionFileCache.write(this.c, chunkcoordintpair.x, chunkcoordintpair.z, SupplierUtils.getIfExists(nbttagcompound)); // Spigot
|
||||
|
||||
try {
|
||||
// NBTTagCompound nbttagcompound = (NBTTagCompound) this.b.get(chunkcoordintpair); // CraftBukkit
|
||||
- NBTTagCompound nbttagcompound = SupplierUtils.getIfExists(value); // Spigot
|
||||
+ NBTTagCompound nbttagcompound = SupplierUtils.getIfExists(chunk.compoundSupplier); // Spigot // Paper
|
||||
|
||||
if (nbttagcompound != null) {
|
||||
try {
|
||||
@@ -349,7 +363,14 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver {
|
||||
|
||||
flag = true;
|
||||
} finally {
|
||||
- this.b.remove(chunkcoordintpair, value); // CraftBukkit // Spigot
|
||||
+ // Paper start - only synchronize here
|
||||
+ synchronized (this) {
|
||||
+ // Paper start remove from map only if this was the latest version of the chunk
|
||||
+ synchronized (this.queue) {
|
||||
+ // This will not equal if a newer version is still pending - wait until newest is saved to remove
|
||||
+ if (this.b.get(chunkcoordintpair) == chunk.compoundSupplier) {
|
||||
+ this.b.remove(chunkcoordintpair);
|
||||
+ }
|
||||
+ }
|
||||
+ // Paper start
|
||||
}
|
||||
|
||||
return flag;
|
||||
+ // Paper end
|
||||
/*
|
||||
NBTCompressedStreamTools.a(nbttagcompound, (DataOutput) dataoutputstream);
|
||||
dataoutputstream.close();
|
||||
diff --git a/src/main/java/net/minecraft/server/FileIOThread.java b/src/main/java/net/minecraft/server/FileIOThread.java
|
||||
index 34312667a..549fab9a5 100644
|
||||
index 8c3537ab8d..170c239b77 100644
|
||||
--- a/src/main/java/net/minecraft/server/FileIOThread.java
|
||||
+++ b/src/main/java/net/minecraft/server/FileIOThread.java
|
||||
@@ -43,11 +43,12 @@ public class FileIOThread implements Runnable {
|
||||
@@ -47,11 +47,12 @@ public class FileIOThread implements Runnable {
|
||||
++this.e;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,34 +1,12 @@
|
|||
From cd1396b77d29f151316d181df8ce104bd61c5974 Mon Sep 17 00:00:00 2001
|
||||
From 63f3b781dc0ddb6de219759f112f4d18cae510a5 Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
Date: Mon, 4 Mar 2013 23:46:10 -0500
|
||||
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
|
||||
@@ -354,11 +354,16 @@ 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
|
||||
@@ -238,8 +238,7 @@ public class RegionFile {
|
||||
|
@ -41,6 +19,40 @@ 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
|
||||
@@ -95,11 +95,29 @@ 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) {
|
||||
--
|
||||
2.18.0
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
From 6edc5b87fee0f325dfaa092a9f370179b57abfbd Mon Sep 17 00:00:00 2001
|
||||
From 9970b4b70fa0d3caf070bd3f2fcf1df6da43678f Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
Date: Fri, 18 Mar 2016 13:17:38 -0400
|
||||
Subject: [PATCH] Default loading permissions.yml before plugins
|
||||
|
@ -30,10 +30,10 @@ index fd00c320ce..620f23f4f0 100644
|
|||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 53adc9e1a0..b68af1c285 100644
|
||||
index bd99aa72c4..8d059d75ac 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -332,6 +332,7 @@ public final class CraftServer implements Server {
|
||||
@@ -333,6 +333,7 @@ public final class CraftServer implements Server {
|
||||
if (type == PluginLoadOrder.STARTUP) {
|
||||
helpMap.clear();
|
||||
helpMap.initializeGeneralTopics();
|
||||
|
@ -41,7 +41,7 @@ index 53adc9e1a0..b68af1c285 100644
|
|||
}
|
||||
|
||||
Plugin[] plugins = pluginManager.getPlugins();
|
||||
@@ -349,7 +350,7 @@ public final class CraftServer implements Server {
|
||||
@@ -350,7 +351,7 @@ public final class CraftServer implements Server {
|
||||
setVanillaCommands(false);
|
||||
// Spigot end
|
||||
commandMap.registerServerAliases();
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
From 31f99b0faa647c2f3dc0ba0a34aa710eb043aaf4 Mon Sep 17 00:00:00 2001
|
||||
From fb5423ad6bb093fea6bec62755ca086657c4004b Mon Sep 17 00:00:00 2001
|
||||
From: William <admin@domnian.com>
|
||||
Date: Fri, 18 Mar 2016 03:30:17 -0400
|
||||
Subject: [PATCH] Allow Reloading of Custom Permissions
|
||||
|
@ -6,10 +6,10 @@ 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
|
||||
@@ -1954,5 +1954,23 @@ public final class CraftServer implements Server {
|
||||
@@ -1974,5 +1974,23 @@ public final class CraftServer implements Server {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
From 98015c22852bc9ced6426fe6f8b716db1e00280f Mon Sep 17 00:00:00 2001
|
||||
From 956f4df222506ca586b2bfcef871bf851bb8733f Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
Date: Fri, 18 Mar 2016 13:50:14 -0400
|
||||
Subject: [PATCH] Remove Metadata on reload
|
||||
|
@ -7,10 +7,10 @@ Metadata is not meant to persist reload as things break badly with non primitive
|
|||
This will remove metadata on reload so it does not crash everything if a plugin uses it.
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index f70629a868..7ad009c073 100644
|
||||
index eacee4036e..272e127735 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -789,8 +789,18 @@ public final class CraftServer implements Server {
|
||||
@@ -790,8 +790,18 @@ public final class CraftServer implements Server {
|
||||
world.paperConfig.init(); // Paper
|
||||
}
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
From 9bdf8e39bf667d1c03da11f40e49c01a74539abe Mon Sep 17 00:00:00 2001
|
||||
From 651f454a03f6caa23e015e054b66bcb7b57d087c Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
Date: Thu, 28 May 2015 23:00:19 -0400
|
||||
Subject: [PATCH] Handle Item Meta Inconsistencies
|
||||
|
@ -18,7 +18,7 @@ For consistency, the old API methods now forward to use the
|
|||
ItemMeta API equivalents, and should deprecate the old API's.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/ItemStack.java b/src/main/java/net/minecraft/server/ItemStack.java
|
||||
index 0c54eaa52..c7ef9c689 100644
|
||||
index 318c4204df..56787ed25c 100644
|
||||
--- a/src/main/java/net/minecraft/server/ItemStack.java
|
||||
+++ b/src/main/java/net/minecraft/server/ItemStack.java
|
||||
@@ -7,6 +7,8 @@ import com.mojang.brigadier.StringReader;
|
||||
|
@ -70,7 +70,7 @@ index 0c54eaa52..c7ef9c689 100644
|
|||
|
||||
public IChatBaseComponent getName() {
|
||||
@@ -651,6 +671,7 @@ public final class ItemStack {
|
||||
nbttagcompound.setString("id", String.valueOf(Enchantment.enchantments.b(enchantment)));
|
||||
nbttagcompound.setString("id", String.valueOf(IRegistry.ENCHANTMENT.getKey(enchantment)));
|
||||
nbttagcompound.setShort("lvl", (short) ((byte) i));
|
||||
nbttaglist.add((NBTBase) nbttagcompound);
|
||||
+ processEnchantOrder(nbttagcompound); // Paper
|
||||
|
@ -78,7 +78,7 @@ index 0c54eaa52..c7ef9c689 100644
|
|||
|
||||
public boolean hasEnchantments() {
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
|
||||
index f4672b9a4..8c0409797 100644
|
||||
index ef4c49f1ff..69425e838f 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
|
||||
@@ -4,6 +4,7 @@ import static org.bukkit.craftbukkit.inventory.CraftMetaItem.ENCHANTMENTS;
|
||||
|
@ -201,7 +201,7 @@ index f4672b9a4..8c0409797 100644
|
|||
|
||||
static Map<Enchantment, Integer> getEnchantments(net.minecraft.server.ItemStack item) {
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
|
||||
index 1fe5ddcd5..1d3333fd7 100644
|
||||
index 3db06bed2c..3fd2088039 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
|
||||
@@ -8,12 +8,14 @@ import java.lang.reflect.Constructor;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
From 97b7c45703828056ac98602df86d699dd14efa52 Mon Sep 17 00:00:00 2001
|
||||
From 6e22f788fdc7627d53014e39fc83e9810d82ab64 Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
Date: Fri, 18 Mar 2016 15:12:22 -0400
|
||||
Subject: [PATCH] Configurable Non Player Arrow Despawn Rate
|
||||
|
@ -24,10 +24,10 @@ index 6f96627a2e..0de3007392 100644
|
|||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityArrow.java b/src/main/java/net/minecraft/server/EntityArrow.java
|
||||
index e16c8e8d98..75445b00dc 100644
|
||||
index b0f93d9cf5..c24225892f 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityArrow.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityArrow.java
|
||||
@@ -258,7 +258,7 @@ public abstract class EntityArrow extends Entity implements IProjectile {
|
||||
@@ -262,7 +262,7 @@ public abstract class EntityArrow extends Entity implements IProjectile {
|
||||
|
||||
protected void f() {
|
||||
++this.despawnCounter;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
From c896d823498f07c8b105f0f84936ff10cbf6736a Mon Sep 17 00:00:00 2001
|
||||
From 486b51b81a7ca05e4cdd916e72e92986452a7acb Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
Date: Fri, 18 Mar 2016 20:16:03 -0400
|
||||
Subject: [PATCH] Add World Util Methods
|
||||
|
@ -6,10 +6,10 @@ 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
|
||||
@@ -635,6 +635,7 @@ public class Chunk implements IChunkAccess {
|
||||
@@ -632,6 +632,7 @@ 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
|
||||
@@ -81,7 +81,7 @@ public abstract class World implements GeneratorAccess, IIBlockAccess, AutoClose
|
||||
@@ -84,7 +84,7 @@ 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;
|
||||
@@ -273,6 +273,63 @@ public abstract class World implements GeneratorAccess, IIBlockAccess, AutoClose
|
||||
@@ -274,6 +274,77 @@ 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) {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
From eacfdadd2d81da65924f23d25f0f08a0e94179b4 Mon Sep 17 00:00:00 2001
|
||||
From 9bea77a9d0eb0bba8a3c97c3782630e66e802bd5 Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
Date: Fri, 18 Mar 2016 21:22:56 -0400
|
||||
Subject: [PATCH] Optimized Light Level Comparisons
|
||||
|
@ -8,7 +8,7 @@ Use an optimized method to test if a block position meets a desired light level.
|
|||
This method benefits from returning as soon as the desired light level matches.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/BlockCrops.java b/src/main/java/net/minecraft/server/BlockCrops.java
|
||||
index b392846aa0..c64e6c197e 100644
|
||||
index 1506c9ede0..6ae6fc3ecb 100644
|
||||
--- a/src/main/java/net/minecraft/server/BlockCrops.java
|
||||
+++ b/src/main/java/net/minecraft/server/BlockCrops.java
|
||||
@@ -44,7 +44,7 @@ public class BlockCrops extends BlockPlant implements IBlockFragilePlantElement
|
||||
|
@ -21,7 +21,7 @@ index b392846aa0..c64e6c197e 100644
|
|||
|
||||
if (i < this.e()) {
|
||||
diff --git a/src/main/java/net/minecraft/server/BlockSapling.java b/src/main/java/net/minecraft/server/BlockSapling.java
|
||||
index 723e5c9b44..e24fb17366 100644
|
||||
index 42478d1fed..7426d14cbf 100644
|
||||
--- a/src/main/java/net/minecraft/server/BlockSapling.java
|
||||
+++ b/src/main/java/net/minecraft/server/BlockSapling.java
|
||||
@@ -30,7 +30,7 @@ public class BlockSapling extends BlockPlant implements IBlockFragilePlantElemen
|
||||
|
@ -34,7 +34,7 @@ index 723e5c9b44..e24fb17366 100644
|
|||
world.captureTreeGeneration = true;
|
||||
// CraftBukkit end
|
||||
diff --git a/src/main/java/net/minecraft/server/BlockStem.java b/src/main/java/net/minecraft/server/BlockStem.java
|
||||
index 0192f93864..334c42d0d8 100644
|
||||
index 4fc8c5d3c6..0fc39bb9fb 100644
|
||||
--- a/src/main/java/net/minecraft/server/BlockStem.java
|
||||
+++ b/src/main/java/net/minecraft/server/BlockStem.java
|
||||
@@ -27,7 +27,7 @@ public class BlockStem extends BlockPlant implements IBlockFragilePlantElement {
|
||||
|
@ -47,20 +47,20 @@ index 0192f93864..334c42d0d8 100644
|
|||
|
||||
if (random.nextInt((int) ((100.0F / (this == Blocks.PUMPKIN_STEM ? world.spigotConfig.pumpkinModifier : world.spigotConfig.melonModifier)) * (25.0F / f)) + 1) == 0) { // Spigot
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityMonster.java b/src/main/java/net/minecraft/server/EntityMonster.java
|
||||
index 04c3756ea3..e0e5ba539c 100644
|
||||
index a3449e9a8d..5f60bf04e6 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityMonster.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityMonster.java
|
||||
@@ -65,9 +65,18 @@ public abstract class EntityMonster extends EntityCreature implements IMonster {
|
||||
if (this.world.getBrightness(EnumSkyBlock.SKY, blockposition) > this.random.nextInt(32)) {
|
||||
return false;
|
||||
} else {
|
||||
- int i = this.world.X() ? this.world.d(blockposition, 10) : this.world.getLightLevel(blockposition);
|
||||
- int i = this.world.Y() ? this.world.d(blockposition, 10) : this.world.getLightLevel(blockposition);
|
||||
-
|
||||
- return i <= this.random.nextInt(8);
|
||||
+ // Paper start - optimized light check, returns faster
|
||||
+ boolean passes;
|
||||
+ if (this.world.X()) {
|
||||
+ int orig = world.getSkylightSubtracted();
|
||||
+ if (this.world.Y()) {
|
||||
+ final int orig = world.getSkylightSubtracted();
|
||||
+ world.setSkylightSubtracted(10);
|
||||
+ passes = !this.world.isLightLevel(blockposition, this.random.nextInt(8));
|
||||
+ world.setSkylightSubtracted(orig);
|
||||
|
@ -73,17 +73,17 @@ index 04c3756ea3..e0e5ba539c 100644
|
|||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityZombie.java b/src/main/java/net/minecraft/server/EntityZombie.java
|
||||
index 5c1bde19c5..2818ded921 100644
|
||||
index 1ab3072cc3..e5170bff5b 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityZombie.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityZombie.java
|
||||
@@ -262,7 +262,7 @@ public class EntityZombie extends EntityMonster {
|
||||
@@ -263,7 +263,7 @@ public class EntityZombie extends EntityMonster {
|
||||
int j1 = j + MathHelper.nextInt(this.random, 7, 40) * MathHelper.nextInt(this.random, -1, 1);
|
||||
int k1 = k + MathHelper.nextInt(this.random, 7, 40) * MathHelper.nextInt(this.random, -1, 1);
|
||||
|
||||
- if (this.world.getType(new BlockPosition(i1, j1 - 1, k1)).q() && this.world.getLightLevel(new BlockPosition(i1, j1, k1)) < 10) {
|
||||
+ if (this.world.getType(new BlockPosition(i1, j1 - 1, k1)).q() && !this.world.isLightLevel(new BlockPosition(i1, j1, k1), 10)) { // Paper
|
||||
entityzombie.setPosition((double) i1, (double) j1, (double) k1);
|
||||
if (!this.world.isPlayerNearby((double) i1, (double) j1, (double) k1, 7.0D) && this.world.b((Entity) entityzombie, entityzombie.getBoundingBox()) && this.world.getCubes(entityzombie, entityzombie.getBoundingBox()) && !this.world.containsLiquid(entityzombie.getBoundingBox())) {
|
||||
if (!this.world.isPlayerNearby((double) i1, (double) j1, (double) k1, 7.0D) && this.world.a_(entityzombie, entityzombie.getBoundingBox()) && this.world.getCubes(entityzombie, entityzombie.getBoundingBox()) && !this.world.containsLiquid(entityzombie.getBoundingBox())) {
|
||||
this.world.addEntity(entityzombie, CreatureSpawnEvent.SpawnReason.REINFORCEMENTS); // CraftBukkit
|
||||
--
|
||||
2.18.0
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
From ea8fdac269a25dbe9984c82bbe321a61a079f16e Mon Sep 17 00:00:00 2001
|
||||
From 4bf18616eaab7071c7f2b337dd9195d419103f4e Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
Date: Sat, 19 Mar 2016 15:16:54 -0400
|
||||
Subject: [PATCH] Pass world to Village creation
|
||||
|
@ -6,10 +6,10 @@ Subject: [PATCH] Pass world to Village creation
|
|||
fixes NPE bug #95
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/PersistentVillage.java b/src/main/java/net/minecraft/server/PersistentVillage.java
|
||||
index c09326636c..3219ccca40 100644
|
||||
index 98c6bbc183..7a9fb97530 100644
|
||||
--- a/src/main/java/net/minecraft/server/PersistentVillage.java
|
||||
+++ b/src/main/java/net/minecraft/server/PersistentVillage.java
|
||||
@@ -234,7 +234,7 @@ public class PersistentVillage extends PersistentBase {
|
||||
@@ -237,7 +237,7 @@ public class PersistentVillage extends PersistentBase {
|
||||
|
||||
for (int i = 0; i < nbttaglist.size(); ++i) {
|
||||
NBTTagCompound nbttagcompound1 = nbttaglist.getCompound(i);
|
||||
|
@ -19,7 +19,7 @@ index c09326636c..3219ccca40 100644
|
|||
village.a(nbttagcompound1);
|
||||
this.villages.add(village);
|
||||
diff --git a/src/main/java/net/minecraft/server/Village.java b/src/main/java/net/minecraft/server/Village.java
|
||||
index e742cbe120..dfcabb83a1 100644
|
||||
index f87e8e05af..bda67faefe 100644
|
||||
--- a/src/main/java/net/minecraft/server/Village.java
|
||||
+++ b/src/main/java/net/minecraft/server/Village.java
|
||||
@@ -24,7 +24,7 @@ public class Village {
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
From daf02c8da838148c6d5e145c4b89c8d64063168d Mon Sep 17 00:00:00 2001
|
||||
From 74df9791b9e08039c1dd88ae4f8557114b1de854 Mon Sep 17 00:00:00 2001
|
||||
From: Jedediah Smith <jedediah@silencegreys.com>
|
||||
Date: Sun, 21 Jun 2015 15:07:20 -0400
|
||||
Subject: [PATCH] Custom replacement for eaten items
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
index 5363a2c704..03c6c77a60 100644
|
||||
index ed6f5e70f3..442981f938 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
@@ -2564,12 +2564,13 @@ public abstract class EntityLiving extends Entity {
|
||||
@@ -2599,12 +2599,13 @@ public abstract class EntityLiving extends Entity {
|
||||
|
||||
protected void q() {
|
||||
if (!this.activeItem.isEmpty() && this.isHandRaised()) {
|
||||
|
@ -23,7 +23,7 @@ index 5363a2c704..03c6c77a60 100644
|
|||
world.getServer().getPluginManager().callEvent(event);
|
||||
|
||||
if (event.isCancelled()) {
|
||||
@@ -2584,9 +2585,20 @@ public abstract class EntityLiving extends Entity {
|
||||
@@ -2619,9 +2620,20 @@ public abstract class EntityLiving extends Entity {
|
||||
itemstack = this.activeItem.a(this.world, this);
|
||||
}
|
||||
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
From 31531d85e46c9c7c17eecd323aec769aa572cabb Mon Sep 17 00:00:00 2001
|
||||
From 78a9c971819c0eb757da00c04b27847e7826c7be Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
Date: Sun, 27 Sep 2015 01:18:02 -0400
|
||||
Subject: [PATCH] handle NaN health/absorb values and repair bad data
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
index 03c6c77a60..2d80f4e3e9 100644
|
||||
index 442981f938..edd2ffa394 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
@@ -499,7 +499,13 @@ public abstract class EntityLiving extends Entity {
|
||||
|
@ -34,7 +34,7 @@ index 03c6c77a60..2d80f4e3e9 100644
|
|||
// CraftBukkit start - Handle scaled health
|
||||
if (this instanceof EntityPlayer) {
|
||||
org.bukkit.craftbukkit.entity.CraftPlayer player = ((EntityPlayer) this).getBukkitEntity();
|
||||
@@ -2429,7 +2439,7 @@ public abstract class EntityLiving extends Entity {
|
||||
@@ -2464,7 +2474,7 @@ public abstract class EntityLiving extends Entity {
|
||||
}
|
||||
|
||||
public void setAbsorptionHearts(float f) {
|
||||
|
@ -44,10 +44,10 @@ index 03c6c77a60..2d80f4e3e9 100644
|
|||
}
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
index 1f716013ac..be29f85a05 100644
|
||||
index b56bb9d531..f4d06a9465 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
@@ -1552,6 +1552,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
@@ -1550,6 +1550,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
}
|
||||
|
||||
public void setRealHealth(double health) {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
From 968690c2207317f77f0b933b4a12d4c712de3c20 Mon Sep 17 00:00:00 2001
|
||||
From ccf9807fc0d57beb06724b3ede46c76296837330 Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
Date: Tue, 22 Mar 2016 00:55:23 -0400
|
||||
Subject: [PATCH] Don't teleport dead entities
|
||||
|
@ -7,10 +7,10 @@ Had some issue with this in past, and this is the vanilla logic.
|
|||
Potentially an old CB change that's no longer needed.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
||||
index 07172d3dd8..53ef6b0ed6 100644
|
||||
index 90960bd0b8..5ab98cbcf1 100644
|
||||
--- a/src/main/java/net/minecraft/server/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/server/Entity.java
|
||||
@@ -2565,7 +2565,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
@@ -2558,7 +2558,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
}
|
||||
|
||||
public Entity teleportTo(Location exit, boolean portal) {
|
||||
|
@ -18,7 +18,7 @@ index 07172d3dd8..53ef6b0ed6 100644
|
|||
+ if (!this.dead) { // Paper
|
||||
WorldServer worldserver = ((CraftWorld) getBukkitEntity().getLocation().getWorld()).getHandle();
|
||||
WorldServer worldserver1 = ((CraftWorld) exit.getWorld()).getHandle();
|
||||
int i = worldserver1.dimension;
|
||||
DimensionManager dimensionmanager = worldserver1.dimension;
|
||||
--
|
||||
2.18.0
|
||||
|
||||
|
|
|
@ -1,36 +1,39 @@
|
|||
From c186b41eb75af263e81c093dc4bc3a7db435a8ab Mon Sep 17 00:00:00 2001
|
||||
From 1371b24db386bfe8ce9a0cadbf71a118ad9bb4da Mon Sep 17 00:00:00 2001
|
||||
From: Zach Brown <zach.brown@destroystokyo.com>
|
||||
Date: Tue, 22 Mar 2016 12:04:28 -0500
|
||||
Subject: [PATCH] Configurable spawn chances for skeleton horses
|
||||
|
||||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
index 0de3007392..c2c33d75bf 100644
|
||||
index 0de3007392..b05277067a 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
@@ -212,4 +212,9 @@ public class PaperWorldConfig {
|
||||
@@ -212,4 +212,12 @@ public class PaperWorldConfig {
|
||||
}
|
||||
log("Non Player Arrow Despawn Rate: " + nonPlayerArrowDespawnRate);
|
||||
}
|
||||
+
|
||||
+ public double skeleHorseSpawnChance;
|
||||
+ private void skeleHorseSpawnChance() {
|
||||
+ skeleHorseSpawnChance = getDouble("skeleton-horse-thunder-spawn-chance", 0.01D); // -1.0D represents a "vanilla" state
|
||||
+ skeleHorseSpawnChance = getDouble("skeleton-horse-thunder-spawn-chance", 0.01D);
|
||||
+ if (skeleHorseSpawnChance < 0) {
|
||||
+ skeleHorseSpawnChance = 0.01D; // Vanilla value
|
||||
+ }
|
||||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
|
||||
index dd09ab20e7..ecee3b4064 100644
|
||||
index 1188184f13..253019d89b 100644
|
||||
--- a/src/main/java/net/minecraft/server/WorldServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/WorldServer.java
|
||||
@@ -498,7 +498,7 @@ public class WorldServer extends World implements IAsyncTaskHandler {
|
||||
@@ -497,7 +497,7 @@ public class WorldServer extends World implements IAsyncTaskHandler {
|
||||
blockposition = this.a(new BlockPosition(j + (l & 15), 0, k + (l >> 8 & 15)));
|
||||
if (this.isRainingAt(blockposition)) {
|
||||
DifficultyDamageScaler difficultydamagescaler = this.getDamageScaler(blockposition);
|
||||
- boolean flag2 = this.getGameRules().getBoolean("doMobSpawning") && this.random.nextDouble() < (double) difficultydamagescaler.b() * 0.01D;
|
||||
+ boolean flag2 = this.getGameRules().getBoolean("doMobSpawning") && this.random.nextDouble() < (double) difficultydamagescaler.b() * paperConfig.skeleHorseSpawnChance; // Paper
|
||||
|
||||
- if (this.getGameRules().getBoolean("doMobSpawning") && this.random.nextDouble() < (double) difficultydamagescaler.b() * 0.01D) {
|
||||
+ if (this.getGameRules().getBoolean("doMobSpawning") && this.random.nextDouble() < (double) difficultydamagescaler.b() * paperConfig.skeleHorseSpawnChance) {
|
||||
if (flag2) {
|
||||
EntityHorseSkeleton entityhorseskeleton = new EntityHorseSkeleton(this);
|
||||
|
||||
entityhorseskeleton.s(true);
|
||||
--
|
||||
2.18.0
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
From 42f660596a1ac2e6830fb330b21147014495a687 Mon Sep 17 00:00:00 2001
|
||||
From fab7f2c8c325f68616b896713a552c7336180264 Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
Date: Thu, 3 Mar 2016 02:07:55 -0600
|
||||
Subject: [PATCH] Optimize isValidLocation, getType and getBlockData for inling
|
||||
|
@ -31,10 +31,10 @@ index e2a7b4be2c..58f8b4b720 100644
|
|||
public BaseBlockPosition(int i, int j, int k) {
|
||||
this.a = i;
|
||||
diff --git a/src/main/java/net/minecraft/server/BlockPosition.java b/src/main/java/net/minecraft/server/BlockPosition.java
|
||||
index 7dbea90902..252e00e166 100644
|
||||
index ca5c56c2b6..42e5e9ad8f 100644
|
||||
--- a/src/main/java/net/minecraft/server/BlockPosition.java
|
||||
+++ b/src/main/java/net/minecraft/server/BlockPosition.java
|
||||
@@ -341,6 +341,16 @@ public class BlockPosition extends BaseBlockPosition {
|
||||
@@ -342,6 +342,16 @@ public class BlockPosition extends BaseBlockPosition {
|
||||
protected int b;
|
||||
protected int c;
|
||||
protected int d;
|
||||
|
@ -52,17 +52,18 @@ index 7dbea90902..252e00e166 100644
|
|||
public MutableBlockPosition() {
|
||||
this(0, 0, 0);
|
||||
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
|
||||
index ef6a54bcae..4b440c7077 100644
|
||||
index d86b925f0d..30dc4fb6df 100644
|
||||
--- a/src/main/java/net/minecraft/server/Chunk.java
|
||||
+++ b/src/main/java/net/minecraft/server/Chunk.java
|
||||
@@ -430,12 +430,24 @@ public class Chunk implements IChunkAccess {
|
||||
@@ -427,12 +427,24 @@ public class Chunk implements IChunkAccess {
|
||||
return this.getBlockData(i, j, k).b(this.world, new BlockPosition(i, j, k));
|
||||
}
|
||||
|
||||
- public IBlockData getBlockData(BlockPosition blockposition) { return getType(blockposition); } // Paper
|
||||
- public IBlockData getType(BlockPosition blockposition) {
|
||||
+ // Paper start - Optimize getBlockData to reduce instructions
|
||||
+ public IBlockData getBlockData(BlockPosition pos) { return getBlockData(pos.getX(), pos.getY(), pos.getZ()); } // Paper
|
||||
public IBlockData getType(BlockPosition blockposition) {
|
||||
+ public final IBlockData getBlockData(BlockPosition pos) { return getBlockData(pos.getX(), pos.getY(), pos.getZ()); } // Paper
|
||||
+ public final IBlockData getType(BlockPosition blockposition) {
|
||||
return this.getBlockData(blockposition.getX(), blockposition.getY(), blockposition.getZ());
|
||||
}
|
||||
|
||||
|
@ -79,7 +80,7 @@ index ef6a54bcae..4b440c7077 100644
|
|||
+
|
||||
+ public IBlockData getBlockData_unused(int i, int j, int k) {
|
||||
+ // Paper end
|
||||
if (this.world.R() == WorldType.DEBUG_ALL_BLOCK_STATES) {
|
||||
if (this.world.S() == WorldType.DEBUG_ALL_BLOCK_STATES) {
|
||||
IBlockData iblockdata = null;
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/ChunkSection.java b/src/main/java/net/minecraft/server/ChunkSection.java
|
||||
|
@ -96,10 +97,10 @@ index 35aea4829f..233cbb6d60 100644
|
|||
private NibbleArray skyLight;
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
|
||||
index 72c0c92ec1..1df7528949 100644
|
||||
index fd6f070417..45b0880607 100644
|
||||
--- a/src/main/java/net/minecraft/server/World.java
|
||||
+++ b/src/main/java/net/minecraft/server/World.java
|
||||
@@ -262,11 +262,11 @@ public abstract class World implements GeneratorAccess, IIBlockAccess, AutoClose
|
||||
@@ -263,11 +263,11 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc
|
||||
}
|
||||
|
||||
public static boolean isValidLocation(BlockPosition blockposition) {
|
||||
|
@ -113,7 +114,7 @@ index 72c0c92ec1..1df7528949 100644
|
|||
}
|
||||
|
||||
public boolean isEmpty(BlockPosition blockposition) {
|
||||
@@ -280,7 +280,7 @@ public abstract class World implements GeneratorAccess, IIBlockAccess, AutoClose
|
||||
@@ -281,7 +281,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc
|
||||
// test if meets light level, return faster
|
||||
// logic copied from below
|
||||
public boolean isLightLevel(BlockPosition blockposition, int level) {
|
||||
|
@ -122,7 +123,7 @@ index 72c0c92ec1..1df7528949 100644
|
|||
if (this.getType(blockposition).c(this, blockposition)) {
|
||||
int sky = getSkylightSubtracted();
|
||||
if (this.getLightLevel(blockposition.up(), sky) >= level) {
|
||||
@@ -324,7 +324,7 @@ public abstract class World implements GeneratorAccess, IIBlockAccess, AutoClose
|
||||
@@ -325,7 +325,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc
|
||||
// CraftBukkit end
|
||||
Chunk chunk = this.getChunkIfLoaded(blockposition);
|
||||
if (chunk != null) {
|
||||
|
@ -131,7 +132,7 @@ index 72c0c92ec1..1df7528949 100644
|
|||
}
|
||||
return null;
|
||||
}
|
||||
@@ -359,7 +359,7 @@ public abstract class World implements GeneratorAccess, IIBlockAccess, AutoClose
|
||||
@@ -380,7 +380,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc
|
||||
return true;
|
||||
}
|
||||
// CraftBukkit end
|
||||
|
@ -140,7 +141,7 @@ index 72c0c92ec1..1df7528949 100644
|
|||
return false;
|
||||
} else if (!this.isClientSide && this.worldData.getType() == WorldType.DEBUG_ALL_BLOCK_STATES) {
|
||||
return false;
|
||||
@@ -680,11 +680,11 @@ public abstract class World implements GeneratorAccess, IIBlockAccess, AutoClose
|
||||
@@ -701,11 +701,11 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc
|
||||
blockposition = new BlockPosition(blockposition.getX(), 0, blockposition.getZ());
|
||||
}
|
||||
|
||||
|
@ -154,7 +155,7 @@ index 72c0c92ec1..1df7528949 100644
|
|||
if (this.isLoaded(blockposition)) {
|
||||
this.getChunkAtWorldCoords(blockposition).a(enumskyblock, blockposition, i);
|
||||
this.m(blockposition);
|
||||
@@ -711,7 +711,7 @@ public abstract class World implements GeneratorAccess, IIBlockAccess, AutoClose
|
||||
@@ -732,7 +732,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc
|
||||
}
|
||||
}
|
||||
// CraftBukkit end
|
||||
|
@ -163,7 +164,7 @@ index 72c0c92ec1..1df7528949 100644
|
|||
return Blocks.VOID_AIR.getBlockData();
|
||||
} else {
|
||||
Chunk chunk = this.getChunkAtWorldCoords(blockposition);
|
||||
@@ -721,7 +721,7 @@ public abstract class World implements GeneratorAccess, IIBlockAccess, AutoClose
|
||||
@@ -742,7 +742,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc
|
||||
}
|
||||
|
||||
public Fluid b(BlockPosition blockposition) {
|
||||
|
@ -172,7 +173,7 @@ index 72c0c92ec1..1df7528949 100644
|
|||
return FluidTypes.a.i();
|
||||
} else {
|
||||
Chunk chunk = this.getChunkAtWorldCoords(blockposition);
|
||||
@@ -1779,7 +1779,7 @@ public abstract class World implements GeneratorAccess, IIBlockAccess, AutoClose
|
||||
@@ -1803,7 +1803,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc
|
||||
public Map<BlockPosition, TileEntity> capturedTileEntities = Maps.newHashMap();
|
||||
@Nullable
|
||||
public TileEntity getTileEntity(BlockPosition blockposition) {
|
||||
|
@ -181,7 +182,7 @@ index 72c0c92ec1..1df7528949 100644
|
|||
return null;
|
||||
} else {
|
||||
// CraftBukkit start
|
||||
@@ -1820,7 +1820,7 @@ public abstract class World implements GeneratorAccess, IIBlockAccess, AutoClose
|
||||
@@ -1844,7 +1844,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc
|
||||
}
|
||||
|
||||
public void setTileEntity(BlockPosition blockposition, @Nullable TileEntity tileentity) {
|
||||
|
@ -190,7 +191,7 @@ index 72c0c92ec1..1df7528949 100644
|
|||
if (tileentity != null && !tileentity.x()) {
|
||||
// CraftBukkit start
|
||||
if (captureBlockStates) {
|
||||
@@ -1881,7 +1881,7 @@ public abstract class World implements GeneratorAccess, IIBlockAccess, AutoClose
|
||||
@@ -1905,7 +1905,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc
|
||||
}
|
||||
|
||||
public boolean p(BlockPosition blockposition) {
|
||||
|
@ -198,7 +199,7 @@ index 72c0c92ec1..1df7528949 100644
|
|||
+ if (blockposition.isInvalidYLocation()) { // Paper
|
||||
return false;
|
||||
} else {
|
||||
Chunk chunk = this.chunkProvider.getLoadedChunkAt(blockposition.getX() >> 4, blockposition.getZ() >> 4);
|
||||
Chunk chunk = this.chunkProvider.getChunkAt(blockposition.getX() >> 4, blockposition.getZ() >> 4, false, false);
|
||||
--
|
||||
2.18.0
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
From 47b1de18f9769b9514bdfa76a274b617af51a8a8 Mon Sep 17 00:00:00 2001
|
||||
From ad72279171cbc841b7cc23ea948ff03cb2963b80 Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
Date: Mon, 28 Mar 2016 19:55:45 -0400
|
||||
Subject: [PATCH] Option to disable BlockPhysicsEvent for Redstone
|
||||
|
@ -11,12 +11,12 @@ Defaulting this to false will provide substantial performance improvement
|
|||
by saving millions of event calls on redstone heavy servers.
|
||||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
index c2c33d75bf..b3b3baddc0 100644
|
||||
index b05277067a..5f3156af60 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
@@ -217,4 +217,9 @@ public class PaperWorldConfig {
|
||||
private void skeleHorseSpawnChance() {
|
||||
skeleHorseSpawnChance = getDouble("skeleton-horse-thunder-spawn-chance", 0.01D); // -1.0D represents a "vanilla" state
|
||||
@@ -220,4 +220,9 @@ public class PaperWorldConfig {
|
||||
skeleHorseSpawnChance = 0.01D; // Vanilla value
|
||||
}
|
||||
}
|
||||
+
|
||||
+ public boolean firePhysicsEventForRedstone = false;
|
||||
|
@ -25,10 +25,10 @@ index c2c33d75bf..b3b3baddc0 100644
|
|||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
|
||||
index 1df7528949..87fd23c7f8 100644
|
||||
index 45b0880607..8f3b1d529a 100644
|
||||
--- a/src/main/java/net/minecraft/server/World.java
|
||||
+++ b/src/main/java/net/minecraft/server/World.java
|
||||
@@ -593,7 +593,7 @@ public abstract class World implements GeneratorAccess, IIBlockAccess, AutoClose
|
||||
@@ -614,7 +614,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc
|
||||
try {
|
||||
// CraftBukkit start
|
||||
CraftWorld world = ((WorldServer) this).getWorld();
|
||||
|
@ -38,10 +38,10 @@ index 1df7528949..87fd23c7f8 100644
|
|||
this.getServer().getPluginManager().callEvent(event);
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
|
||||
index ecee3b4064..96002184bb 100644
|
||||
index 253019d89b..8f704a0e0b 100644
|
||||
--- a/src/main/java/net/minecraft/server/WorldServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/WorldServer.java
|
||||
@@ -36,6 +36,7 @@ import org.bukkit.event.weather.LightningStrikeEvent;
|
||||
@@ -37,6 +37,7 @@ import org.bukkit.event.weather.LightningStrikeEvent;
|
||||
public class WorldServer extends World implements IAsyncTaskHandler {
|
||||
|
||||
private static final Logger a = LogManager.getLogger();
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
From 3c1a47e5259a7de1ea0fa2e0d6cfbdda0e3990ba Mon Sep 17 00:00:00 2001
|
||||
From 23dbf833e038bf5d565bba44919c95322ef55e3e Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
Date: Mon, 28 Mar 2016 20:32:58 -0400
|
||||
Subject: [PATCH] Entity AddTo/RemoveFrom World Events
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
|
||||
index 87fd23c7f8..83955fdd81 100644
|
||||
index 8f3b1d529a..7f39a321db 100644
|
||||
--- a/src/main/java/net/minecraft/server/World.java
|
||||
+++ b/src/main/java/net/minecraft/server/World.java
|
||||
@@ -1048,6 +1048,7 @@ public abstract class World implements GeneratorAccess, IIBlockAccess, AutoClose
|
||||
@@ -1069,6 +1069,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc
|
||||
}
|
||||
|
||||
entity.valid = true; // CraftBukkit
|
||||
|
@ -16,7 +16,7 @@ index 87fd23c7f8..83955fdd81 100644
|
|||
}
|
||||
|
||||
protected void c(Entity entity) {
|
||||
@@ -1055,6 +1056,7 @@ public abstract class World implements GeneratorAccess, IIBlockAccess, AutoClose
|
||||
@@ -1076,6 +1077,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc
|
||||
((IWorldAccess) this.v.get(i)).b(entity);
|
||||
}
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
From eb14acc9a6e994a5003d6f2650bbb85b0605d937 Mon Sep 17 00:00:00 2001
|
||||
From 4faf295c8925f103c186ca0a838540d4c658c75a Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
Date: Mon, 28 Mar 2016 20:46:14 -0400
|
||||
Subject: [PATCH] Configurable Chunk Inhabited Timer
|
||||
|
@ -9,10 +9,10 @@ aspects of vanilla gameplay to this factor.
|
|||
For people who want all chunks to be treated equally, you can disable the timer.
|
||||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
index b3b3baddc0..613964ce04 100644
|
||||
index 5f3156af60..f62faf81e7 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
@@ -222,4 +222,9 @@ public class PaperWorldConfig {
|
||||
@@ -225,4 +225,9 @@ public class PaperWorldConfig {
|
||||
private void firePhysicsEventForRedstone() {
|
||||
firePhysicsEventForRedstone = getBoolean("fire-physics-event-for-redstone", firePhysicsEventForRedstone);
|
||||
}
|
||||
|
@ -23,24 +23,15 @@ index b3b3baddc0..613964ce04 100644
|
|||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
|
||||
index 4b440c7077..e8a943cf74 100644
|
||||
index 30dc4fb6df..0ef1a8c7d3 100644
|
||||
--- a/src/main/java/net/minecraft/server/Chunk.java
|
||||
+++ b/src/main/java/net/minecraft/server/Chunk.java
|
||||
@@ -55,7 +55,7 @@ public class Chunk implements IChunkAccess {
|
||||
private long lastSaved;
|
||||
private boolean y;
|
||||
private int z;
|
||||
- private long A;
|
||||
+ private long A; public long getInhabitedTime() { return A; } // Paper - OBFHELPER
|
||||
private int B;
|
||||
private final ConcurrentLinkedQueue<BlockPosition> C;
|
||||
public boolean d;
|
||||
@@ -1240,7 +1240,7 @@ public class Chunk implements IChunkAccess {
|
||||
@@ -1239,7 +1239,7 @@ public class Chunk implements IChunkAccess {
|
||||
}
|
||||
|
||||
public long m() {
|
||||
- return this.A;
|
||||
+ return world.paperConfig.useInhabitedTime ? getInhabitedTime() : 0; // Paper
|
||||
- return this.z;
|
||||
+ return world.paperConfig.useInhabitedTime ? this.z : 0; // Paper
|
||||
}
|
||||
|
||||
public void b(long i) {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
From 3c28cee211dd1246032623ac8b6c39a617213ad1 Mon Sep 17 00:00:00 2001
|
||||
From 50e9e6cf5da5ca1f8164d381866328dffc36fcd4 Mon Sep 17 00:00:00 2001
|
||||
From: Antony Riley <antony@cyberiantiger.org>
|
||||
Date: Tue, 29 Mar 2016 08:22:55 +0300
|
||||
Subject: [PATCH] Sanitise RegionFileCache and make configurable.
|
||||
|
@ -25,7 +25,7 @@ index 620f23f4f0..a6042ca607 100644
|
|||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/RegionFileCache.java b/src/main/java/net/minecraft/server/RegionFileCache.java
|
||||
index ff473a263f..3b8d01ea1a 100644
|
||||
index 2217adf99c..c0ab543b91 100644
|
||||
--- a/src/main/java/net/minecraft/server/RegionFileCache.java
|
||||
+++ b/src/main/java/net/minecraft/server/RegionFileCache.java
|
||||
@@ -9,10 +9,12 @@ import java.io.IOException;
|
||||
|
@ -53,9 +53,9 @@ index ff473a263f..3b8d01ea1a 100644
|
|||
}
|
||||
|
||||
RegionFile regionfile1 = new RegionFile(file2);
|
||||
@@ -58,6 +60,22 @@ public class RegionFileCache {
|
||||
}
|
||||
@@ -60,6 +62,22 @@ public class RegionFileCache {
|
||||
}
|
||||
// CraftBukkit end
|
||||
|
||||
+ // Paper Start
|
||||
+ private static synchronized void trimCache() {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
From a11649b5e8780aa5325a96eb2632b0b35d9156c0 Mon Sep 17 00:00:00 2001
|
||||
From 883ae24227ae7d3d77fb1cdf092799df76d9841e Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
Date: Thu, 31 Mar 2016 19:17:58 -0400
|
||||
Subject: [PATCH] Do not load chunks for light checks
|
||||
|
@ -7,10 +7,10 @@ Should only happen for blocks on the edge that uses neighbors light level
|
|||
(certain blocks). In that case, there will be 3-4 other neighbors to get a light level from.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
|
||||
index 83955fdd81..dcc1d08b16 100644
|
||||
index 7f39a321db..c862f36628 100644
|
||||
--- a/src/main/java/net/minecraft/server/World.java
|
||||
+++ b/src/main/java/net/minecraft/server/World.java
|
||||
@@ -636,6 +636,7 @@ public abstract class World implements GeneratorAccess, IIBlockAccess, AutoClose
|
||||
@@ -657,6 +657,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc
|
||||
if (blockposition.getY() >= 256) {
|
||||
blockposition = new BlockPosition(blockposition.getX(), 255, blockposition.getZ());
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
From d5dc1be98794dc8986745880f7a6ab802fbf8e93 Mon Sep 17 00:00:00 2001
|
||||
From 1a421550b37ed9ab1ebc5ce9982d279eb701db40 Mon Sep 17 00:00:00 2001
|
||||
From: Jedediah Smith <jedediah@silencegreys.com>
|
||||
Date: Sat, 2 Apr 2016 05:09:16 -0400
|
||||
Subject: [PATCH] Add PlayerUseUnknownEntityEvent
|
||||
|
@ -18,10 +18,10 @@ 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
|
||||
@@ -1893,6 +1893,16 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
|
||||
@@ -1903,6 +1903,16 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
From ccb7c36c3b7bec200c4a6d5182f1bc8d8bc9632a Mon Sep 17 00:00:00 2001
|
||||
From 288d52655275ce5ae4920f64ee897a79a4f259a5 Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
Date: Sun, 3 Apr 2016 16:28:17 -0400
|
||||
Subject: [PATCH] Configurable Grass Spread Tick Rate
|
||||
|
||||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
index 613964ce04..bb1c1c57cc 100644
|
||||
index f62faf81e7..ee38eb8e05 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
@@ -227,4 +227,10 @@ public class PaperWorldConfig {
|
||||
@@ -230,4 +230,10 @@ public class PaperWorldConfig {
|
||||
private void useInhabitedTime() {
|
||||
useInhabitedTime = getBoolean("use-chunk-inhabited-timer", true);
|
||||
}
|
||||
|
@ -20,7 +20,7 @@ index 613964ce04..bb1c1c57cc 100644
|
|||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/BlockDirtSnowSpreadable.java b/src/main/java/net/minecraft/server/BlockDirtSnowSpreadable.java
|
||||
index 6343fb1e0d..903e8241b8 100644
|
||||
index b0e08a3365..52ae980d37 100644
|
||||
--- a/src/main/java/net/minecraft/server/BlockDirtSnowSpreadable.java
|
||||
+++ b/src/main/java/net/minecraft/server/BlockDirtSnowSpreadable.java
|
||||
@@ -21,6 +21,7 @@ public abstract class BlockDirtSnowSpreadable extends BlockDirtSnow {
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue