Added Brew Sealing: Equalize Brews for Shops

Craftable Brew Sealing Table
Equalizes Brews that are similar, for support in Shop Plugins
Sealed Brews are also always unlabeled and immutable
This commit is contained in:
Sn0wStorm
2020-04-05 22:47:46 +02:00
parent 948b843b59
commit 12b0a3c115
13 changed files with 327 additions and 45 deletions
+6 -4
View File
@@ -57,7 +57,7 @@ public class MCBarrel {
for (ItemStack item : inv.getContents()) {
if (item != null) {
Brew brew = Brew.get(item);
if (brew != null) {
if (brew != null && !brew.isStatic()) {
if (brews < maxBrews || maxBrews < 0) {
// The time is in minutes, but brew.age() expects time in mc-days
brew.age(item, ((float) time) / 20f, OAK);
@@ -66,9 +66,11 @@ public class MCBarrel {
}
}
}
loadTime = System.nanoTime() - loadTime;
float ftime = (float) (loadTime / 1000000.0);
P.p.debugLog("opening MC Barrel with potions (" + ftime + "ms)");
if (P.debug) {
loadTime = System.nanoTime() - loadTime;
float ftime = (float) (loadTime / 1000000.0);
P.p.debugLog("opening MC Barrel with potions (" + ftime + "ms)");
}
}
}
}