LootTable API & Replenishable Lootables Feature
Provides an API to control the loot table for an object. Also provides a feature that any Lootable Inventory (Chests in Structures) can automatically replenish after a given time. This feature is good for long term worlds so that newer players do not suffer with "Every chest has been looted" API and Event added to control the Auto Replenish feature for players.
This commit is contained in:
@@ -218,12 +218,9 @@ diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/j
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||
@@ -0,0 +0,0 @@ import java.lang.reflect.Modifier;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
+import java.util.concurrent.TimeUnit;
|
||||
@@ -0,0 +0,0 @@ import java.util.concurrent.TimeUnit;
|
||||
import java.util.logging.Level;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
+import com.google.common.collect.Lists;
|
||||
import net.minecraft.server.MinecraftServer;
|
||||
@@ -259,19 +256,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ " - Verbose: " + verboseTimings +
|
||||
+ " - Interval: " + timeSummary(Timings.getHistoryInterval() / 20) +
|
||||
+ " - Length: " + timeSummary(Timings.getHistoryLength() / 20));
|
||||
+ }
|
||||
+
|
||||
+ protected static String timeSummary(int seconds) {
|
||||
+ String time = "";
|
||||
+ if (seconds > 60 * 60) {
|
||||
+ time += TimeUnit.SECONDS.toHours(seconds) + "h";
|
||||
+ seconds /= 60;
|
||||
+ }
|
||||
+
|
||||
+ if (seconds > 0) {
|
||||
+ time += TimeUnit.SECONDS.toMinutes(seconds) + "m";
|
||||
+ }
|
||||
+ return time;
|
||||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/Block.java b/src/main/java/net/minecraft/server/Block.java
|
||||
|
||||
Reference in New Issue
Block a user