Yatopia/patches/server/0001-Yatopia-Server-Fixes.patch
Ivan Pekov 252bf7e437
Updated Upstream and Sidestream(s) (Tuinity/Origami/Purpur)
Upstream/An Sidestream has released updates that appears to apply and compile correctly
This update has NOT been tested by YatopiaMC and as with ANY update, please do your own testing.

Tuinity Changes:
82e5dfb Updated Upstream (Paper)

Origami Changes:
7e2a3f6 Update Paper

Purpur Changes:
5cc7709 Make mobs avoid stonecutter blocks
129484a Stonecutter damage
8295d22 Updated Upstream (Paper)
d23a158 Infinity bow settings
5c0a270 Make infinite lava number of required sources configurable
ef17322 Update readme
70e2ec0 Cleanup codebase
81ca45c Flying squids! Oh my!
2020-10-08 14:24:41 +03:00

1811 lines
101 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Bud Gidiere <sgidiere@gmail.com>
Date: Thu, 6 Aug 2020 19:47:50 -0500
Subject: [PATCH] Yatopia-Server-Fixes
diff --git a/src/main/java/com/destroystokyo/paper/server/ticklist/PaperTickList.java b/src/main/java/com/destroystokyo/paper/server/ticklist/PaperTickList.java
index dee9655b89d061ec8218ea2c54660c6003e8548f..253b73cfc597d4c7106d969be7b18c68166128ae 100644
--- a/src/main/java/com/destroystokyo/paper/server/ticklist/PaperTickList.java
+++ b/src/main/java/com/destroystokyo/paper/server/ticklist/PaperTickList.java
@@ -295,7 +295,7 @@ public final class PaperTickList<T> extends TickListServer<T> { // extend to avo
this.shortScheduledIndex = getNextIndex(this.shortScheduledIndex, SHORT_SCHEDULE_TICK_THRESHOLD);
this.timingCleanup.stopTiming();
- this.world.getMethodProfiler().exitEnter("ticking");
+ //this.world.getMethodProfiler().exitEnter("ticking"); // Akarin - remove caller
this.timingTicking.startTiming();
for (final NextTickListEntry<T> toTick : this.toTickThisTick) {
diff --git a/src/main/java/com/destroystokyo/paper/server/ticklist/PaperTickList.java.rej b/src/main/java/com/destroystokyo/paper/server/ticklist/PaperTickList.java.rej
deleted file mode 100644
index c9fa39c5b4b013b56720e339463ffcb5fd3c13f9..0000000000000000000000000000000000000000
--- a/src/main/java/com/destroystokyo/paper/server/ticklist/PaperTickList.java.rej
+++ /dev/null
@@ -1,10 +0,0 @@
-diff a/src/main/java/com/destroystokyo/paper/server/ticklist/PaperTickList.java b/src/main/java/com/destroystokyo/paper/server/ticklist/PaperTickList.java (rejected hunks)
-@@ -283,7 +283,7 @@ public final class PaperTickList<T> extends TickListServer<T> { // extend to avo
- this.nextTick = this.world.getTime() + 1;
-
- this.timingCleanup.stopTiming();
-- this.world.getMethodProfiler().exitEnter("ticking");
-+ //this.world.getMethodProfiler().exitEnter("ticking"); // Akarin - remove caller
- this.timingTicking.startTiming();
-
- for (final NextTickListEntry<T> toTick : this.toTickThisTick) {
diff --git a/src/main/java/de/minebench/origami/OrigamiConfig.java b/src/main/java/de/minebench/origami/OrigamiConfig.java
index fe7330fabe386966c2d203a190a00a785ea21be0..537456a7427cddd6783f5b5d8ee2d655668c4c53 100644
--- a/src/main/java/de/minebench/origami/OrigamiConfig.java
+++ b/src/main/java/de/minebench/origami/OrigamiConfig.java
@@ -16,7 +16,7 @@ public final class OrigamiConfig {
private static final Object[] EMPTY = new Object[0];
private static File configFile;
- private static YamlConfiguration config;
+ public static YamlConfiguration config; // Yatopia
private static int configVersion;
public static void init(final File file) {
@@ -112,6 +112,28 @@ public final class OrigamiConfig {
config.addDefault("worlds.default." + path, Double.valueOf(dfl));
return config.getDouble("worlds." + worldName + "." + path, config.getDouble("worlds.default." + path, dfl));
}
+
+ public boolean tickEmptyHoppers = false;
+ public int fullHopperCooldown = 128;
+ private void hopperOptimizations() {
+ tickEmptyHoppers = getBoolean("tick-empty-hoppers", tickEmptyHoppers);
+ fullHopperCooldown = getInt("ticks-per.full-hopper-cooldown", fullHopperCooldown);
+ }
+
+ public boolean fastFeatureSearchDontLoad = false;
+ private void fastFeatureSearchDontLoad() {
+ fastFeatureSearchDontLoad = getBoolean("fast-feature-search-dont-load", false);
+ }
+
+ public boolean pigmenDontTargetUnlessHit = false;
+ private void pigmenDontTargetUnlessHit() {
+ pigmenDontTargetUnlessHit = getBoolean("pigmen.dont-target-unless-hit", pigmenDontTargetUnlessHit);
+ }
+
+ public boolean disableObserverClocks = false;
+ private void observerClock() {
+ disableObserverClocks = getBoolean("disable-observer-clocks", disableObserverClocks);
+ }
}
}
\ No newline at end of file
diff --git a/src/main/java/de/minebench/origami/OrigamiConfig.java.rej b/src/main/java/de/minebench/origami/OrigamiConfig.java.rej
deleted file mode 100644
index 02f5ccf54210776770d3215afb7c8e82f750d57e..0000000000000000000000000000000000000000
--- a/src/main/java/de/minebench/origami/OrigamiConfig.java.rej
+++ /dev/null
@@ -1,12 +0,0 @@
-diff a/src/main/java/de/minebench/origami/OrigamiConfig.java b/src/main/java/de/minebench/origami/OrigamiConfig.java (rejected hunks)
-@@ -153,6 +153,10 @@ public final class OrigamiConfig {
- public int getTickRate(String type, String typeName, String entityType, int def) {
- return tickRates.getOrDefault(type + "." + entityType + "." + typeName, tickRates.getOrDefault(type + "." + typeName, def));
- }
-+ public boolean pigmenDontTargetUnlessHit = false;
-+ private void pigmenDontTargetUnlessHit() {
-+ pigmenDontTargetUnlessHit = getBoolean("pigmen.dont-target-unless-hit", pigmenDontTargetUnlessHit);
-+ }
- public int pigmenPortalSpawn = 2000;
- public double pigmenPortalBoost = 0.0;
- public boolean pigmenFarmsWaterAi = false;
diff --git a/src/main/java/net/minecraft/server/BaseBlockPosition.java b/src/main/java/net/minecraft/server/BaseBlockPosition.java
index e811295b4d6afcd920f60e0ce5440e43300d9085..d1064bd1c76eb23ce12e4a0703ce9f2622952897 100644
--- a/src/main/java/net/minecraft/server/BaseBlockPosition.java
+++ b/src/main/java/net/minecraft/server/BaseBlockPosition.java
@@ -111,6 +111,7 @@ public class BaseBlockPosition implements Comparable<BaseBlockPosition> {
return this.distanceSquared((double) baseblockposition.getX(), (double) baseblockposition.getY(), (double) baseblockposition.getZ(), false) < d0 * d0;
}
+ public final boolean distanceSquared(IPosition pos, double dist) { return a(pos, dist); } // Yatopia - OBFHELPER
public boolean a(IPosition iposition, double d0) {
return this.distanceSquared(iposition.getX(), iposition.getY(), iposition.getZ(), true) < d0 * d0;
}
diff --git a/src/main/java/net/minecraft/server/Behavior.java b/src/main/java/net/minecraft/server/Behavior.java
index 0490f6bb798b94ce69a40f8a940caaa545c4a3c0..65cbe8ea9551ee804ca35a594680e845eebbacac 100644
--- a/src/main/java/net/minecraft/server/Behavior.java
+++ b/src/main/java/net/minecraft/server/Behavior.java
@@ -11,6 +11,7 @@ public abstract class Behavior<E extends EntityLiving> {
private long c;
private final int d;
private final int e;
+ co.aikar.timings.Timing timing; // Origami - behavior timing
public Behavior(Map<MemoryModuleType<?>, MemoryStatus> map) {
this(map, 60);
@@ -25,6 +26,9 @@ public abstract class Behavior<E extends EntityLiving> {
this.d = i;
this.e = j;
this.a = map;
+ // Origami start - behavior timing
+ timing = co.aikar.timings.WorldTimingsHandler.getBehaviorTimings(getClass().getSimpleName());
+ // Origami end
}
public Behavior.Status a() {
diff --git a/src/main/java/net/minecraft/server/Behavior.java.rej b/src/main/java/net/minecraft/server/Behavior.java.rej
deleted file mode 100644
index c3d129452b4f6ff2069bc066e594b1c632ceb0d4..0000000000000000000000000000000000000000
--- a/src/main/java/net/minecraft/server/Behavior.java.rej
+++ /dev/null
@@ -1,19 +0,0 @@
-diff a/src/main/java/net/minecraft/server/Behavior.java b/src/main/java/net/minecraft/server/Behavior.java (rejected hunks)
-@@ -15,6 +15,7 @@ public abstract class Behavior<E extends EntityLiving> {
- private final String configKey;
- private static final String RATE_TYPE = "behavior";
- // Origami end
-+ co.aikar.timings.Timing timing; // Origami - behavior timing
-
- public Behavior(Map<MemoryModuleType<?>, MemoryStatus> map) {
- this(map, 60);
-@@ -37,6 +38,9 @@ public abstract class Behavior<E extends EntityLiving> {
- }
- this.configKey = key;
- // Origami end
-+ // Origami start - behavior timing
-+ timing = co.aikar.timings.WorldTimingsHandler.getBehaviorTimings(key);
-+ // Origami end
- }
-
- public Behavior.Status a() {
diff --git a/src/main/java/net/minecraft/server/Block.java b/src/main/java/net/minecraft/server/Block.java
index 65e5b15dc3bf83206438f67053afde6857c97daa..9dfb331652c00904c29d1c6e700f68cf0bce67e8 100644
--- a/src/main/java/net/minecraft/server/Block.java
+++ b/src/main/java/net/minecraft/server/Block.java
@@ -225,6 +225,46 @@ public class Block extends BlockBase implements IMaterial {
}
+ // Purpur start
+ private static ItemStack applyDisplayNameAndLoreFromTile(ItemStack itemStack, TileEntity tile) {
+ if (itemStack.getItem() instanceof ItemBlock) {
+ if (tile != null && tile.getWorld() instanceof WorldServer && tile.getWorld().purpurConfig.persistentTileEntityDisplayNames) {
+ String name = tile.getPersistentDisplayName();
+ NBTTagList lore = tile.getPersistentLore();
+ if (tile instanceof INamableTileEntity) {
+ INamableTileEntity namedTile = (INamableTileEntity) tile;
+ if (namedTile.hasCustomName()) {
+ name = IChatBaseComponent.ChatSerializer.componentToJson(namedTile.getCustomName());
+ }
+ }
+
+ if (name != null || lore != null) {
+ NBTTagCompound display = itemStack.getSubTag("display");
+ if (display == null) {
+ display = new NBTTagCompound();
+ }
+
+ if (name != null) {
+ display.set("Name", NBTTagString.create(name));
+ }
+ if (lore != null) {
+ display.set("Lore", lore);
+ }
+
+ NBTTagCompound tag = itemStack.getTag();
+ if (tag == null) {
+ tag = new NBTTagCompound();
+ }
+ tag.set("display", display);
+
+ itemStack.setTag(tag);
+ }
+ }
+ }
+ return itemStack;
+ }
+ // Purpur end
+
public static void a(World world, BlockPosition blockposition, ItemStack itemstack) {
if (!world.isClientSide && !itemstack.isEmpty() && world.getGameRules().getBoolean(GameRules.DO_TILE_DROPS)) {
float f = 0.5F;
diff --git a/src/main/java/net/minecraft/server/Block.java.rej b/src/main/java/net/minecraft/server/Block.java.rej
deleted file mode 100644
index 371ae8819eb4f8e20bc765e09bfee9611f047595..0000000000000000000000000000000000000000
--- a/src/main/java/net/minecraft/server/Block.java.rej
+++ /dev/null
@@ -1,48 +0,0 @@
-diff a/src/main/java/net/minecraft/server/Block.java b/src/main/java/net/minecraft/server/Block.java (rejected hunks)
-@@ -224,6 +226,46 @@ public class Block extends BlockBase implements IMaterial {
-
- }
-
-+ // Purpur start
-+ private static ItemStack applyDisplayNameAndLoreFromTile(ItemStack itemStack, TileEntity tile) {
-+ if (itemStack.getItem() instanceof ItemBlock) {
-+ if (tile != null && tile.getWorld() instanceof WorldServer && tile.getWorld().purpurConfig.persistentTileEntityDisplayNames) {
-+ String name = tile.getPersistentDisplayName();
-+ NBTTagList lore = tile.getPersistentLore();
-+ if (tile instanceof INamableTileEntity) {
-+ INamableTileEntity namedTile = (INamableTileEntity) tile;
-+ if (namedTile.hasCustomName()) {
-+ name = IChatBaseComponent.ChatSerializer.componentToJson(namedTile.getCustomName());
-+ }
-+ }
-+
-+ if (name != null || lore != null) {
-+ NBTTagCompound display = itemStack.getSubTag("display");
-+ if (display == null) {
-+ display = new NBTTagCompound();
-+ }
-+
-+ if (name != null) {
-+ display.set("Name", NBTTagString.create(name));
-+ }
-+ if (lore != null) {
-+ display.set("Lore", lore);
-+ }
-+
-+ NBTTagCompound tag = itemStack.getTag();
-+ if (tag == null) {
-+ tag = new NBTTagCompound();
-+ }
-+ tag.set("display", display);
-+
-+ itemStack.setTag(tag);
-+ }
-+ }
-+ }
-+ return itemStack;
-+ }
-+ // Purpur end
-+
- public static void dropItem(World world, BlockPosition blockposition, ItemStack itemstack) { a(world, blockposition, itemstack); } // Purpur - OBFHELPER
- public static void a(World world, BlockPosition blockposition, ItemStack itemstack) {
- if (!world.isClientSide && !itemstack.isEmpty() && world.getGameRules().getBoolean(GameRules.DO_TILE_DROPS)) {
diff --git a/src/main/java/net/minecraft/server/BlockPosition.java b/src/main/java/net/minecraft/server/BlockPosition.java
index 2291135eaef64c403183724cb6e413cd7e472672..6fcc7ed7c129e6a33386d65b37cbba4a44e96f0f 100644
--- a/src/main/java/net/minecraft/server/BlockPosition.java
+++ b/src/main/java/net/minecraft/server/BlockPosition.java
@@ -56,6 +56,12 @@ public class BlockPosition extends BaseBlockPosition {
this(baseblockposition.getX(), baseblockposition.getY(), baseblockposition.getZ());
}
+ // Yatopia start - helper method
+ public BlockPosition(Entity entity) {
+ this(entity.locX(), entity.locY(), entity.locZ());
+ }
+ // Yatopia end
+
public static long getAdjacent(int baseX, int baseY, int baseZ, EnumDirection enumdirection) { return asLong(baseX + enumdirection.getAdjacentX(), baseY + enumdirection.getAdjacentY(), baseZ + enumdirection.getAdjacentZ()); } // Paper
public static long a(long i, EnumDirection enumdirection) {
return a(i, enumdirection.getAdjacentX(), enumdirection.getAdjacentY(), enumdirection.getAdjacentZ());
diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java
index 4dde4a9539216273a7d25d5bbda483e09bdba810..084a31f16c925ccdc58d6e4faeeb497f4de7b2ee 100644
--- a/src/main/java/net/minecraft/server/ChunkProviderServer.java
+++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java
@@ -742,11 +742,11 @@ public class ChunkProviderServer extends IChunkProvider {
if (this.a(playerchunk, l)) {
GameProfilerFiller gameprofilerfiller = this.world.getMethodProfiler();
- gameprofilerfiller.enter("chunkLoad");
+ //gameprofilerfiller.enter("chunkLoad"); // Akarin - remove caller
chunkMapDistance.delayDistanceManagerTick = false; // Paper - ensure this is never false
this.tickDistanceManager();
playerchunk = this.getChunk(k);
- gameprofilerfiller.exit();
+ //gameprofilerfiller.exit(); // Akarin - remove caller
if (this.a(playerchunk, l)) {
this.chunkMapDistance.removeTicketAtLevel(TicketType.REQUIRED_LOAD, chunkcoordintpair, l, identifier); // Tuinity
throw (IllegalStateException) SystemUtils.c((Throwable) (new IllegalStateException("No chunk holder after ticket has been added")));
@@ -975,11 +975,11 @@ public class ChunkProviderServer extends IChunkProvider {
player.playerNaturallySpawnedEvent = event;
}
// Paper end - optimize isOutisdeRange
- this.world.getMethodProfiler().enter("pollingChunks");
+ //this.world.getMethodProfiler().enter("pollingChunks"); // Akarin - remove caller
int k = this.world.getGameRules().getInt(GameRules.RANDOM_TICK_SPEED);
boolean flag2 = world.ticksPerAnimalSpawns != 0L && worlddata.getTime() % world.ticksPerAnimalSpawns == 0L; // CraftBukkit
- this.world.getMethodProfiler().enter("naturalSpawnCount");
+ //this.world.getMethodProfiler().enter("naturalSpawnCount"); // Akarin - remove caller
this.world.timings.countNaturalMobs.startTiming(); // Paper - timings
int l = this.chunkMapDistance.b();
// Paper start - per player mob spawning
@@ -1042,15 +1042,15 @@ public class ChunkProviderServer extends IChunkProvider {
iterator.finishedIterating();
}
// Tuinity end - optimise chunk tick iteration
- this.world.getMethodProfiler().enter("customSpawners");
+ //this.world.getMethodProfiler().enter("customSpawners"); // Akarin - remove caller
if (flag1) {
try (co.aikar.timings.Timing ignored = this.world.timings.miscMobSpawning.startTiming()) { // Paper - timings
this.world.doMobSpawning(this.allowMonsters, this.allowAnimals);
} // Paper - timings
}
- this.world.getMethodProfiler().exit();
- this.world.getMethodProfiler().exit();
+ //this.world.getMethodProfiler().exit(); // Akarin - remove caller
+ //this.world.getMethodProfiler().exit(); // Akarin - remove caller
}
// Tuinity start - controlled flush for entity tracker packets
diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java.rej b/src/main/java/net/minecraft/server/ChunkProviderServer.java.rej
deleted file mode 100644
index c2b788bb29fdfec9b4b6768a42e32e5af966f0ae..0000000000000000000000000000000000000000
--- a/src/main/java/net/minecraft/server/ChunkProviderServer.java.rej
+++ /dev/null
@@ -1,48 +0,0 @@
-diff a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java (rejected hunks)
-@@ -732,11 +732,11 @@ public class ChunkProviderServer extends IChunkProvider {
- if (this.a(playerchunk, l)) {
- GameProfilerFiller gameprofilerfiller = this.world.getMethodProfiler();
-
-- gameprofilerfiller.enter("chunkLoad");
-+ //gameprofilerfiller.enter("chunkLoad"); // Akarin - remove caller
- chunkMapDistance.delayDistanceManagerTick = false; // Paper - ensure this is never false
- this.tickDistanceManager();
- playerchunk = this.getChunk(k);
-- gameprofilerfiller.exit();
-+ //gameprofilerfiller.exit(); // Akarin - remove caller
- if (this.a(playerchunk, l)) {
- this.chunkMapDistance.removeTicketAtLevel(TicketType.REQUIRED_LOAD, chunkcoordintpair, l, identifier); // Tuinity
- throw (IllegalStateException) SystemUtils.c(new IllegalStateException("No chunk holder after ticket has been added"));
-@@ -971,11 +971,11 @@ public class ChunkProviderServer extends IChunkProvider {
- player.lastEntitySpawnRadiusSquared = (double)((range << 4) * (range << 4)); // used in isOutsideRange
- }
- // Paper end - optimize isOutisdeRange
-- this.world.getMethodProfiler().enter("pollingChunks");
-+ //this.world.getMethodProfiler().enter("pollingChunks"); // Akarin - remove caller
- int k = this.world.getGameRules().getInt(GameRules.RANDOM_TICK_SPEED);
- boolean flag2 = world.ticksPerAnimalSpawns != 0L && worlddata.getTime() % world.ticksPerAnimalSpawns == 0L; // CraftBukkit
-
-- this.world.getMethodProfiler().enter("naturalSpawnCount");
-+ //this.world.getMethodProfiler().enter("naturalSpawnCount"); // Akarin - remove caller
- this.world.timings.countNaturalMobs.startTiming(); // Paper - timings
- int l = this.chunkMapDistance.b();
- // Paper start - per player mob spawning
-@@ -1048,15 +1048,15 @@ public class ChunkProviderServer extends IChunkProvider {
- }
- }
- // Tuinity end - optimise chunk tick iteration
-- this.world.getMethodProfiler().enter("customSpawners");
-+ //this.world.getMethodProfiler().enter("customSpawners"); // Akarin - remove caller
- if (flag1) {
- try (co.aikar.timings.Timing ignored = this.world.timings.miscMobSpawning.startTiming()) { // Paper - timings
- this.world.doMobSpawning(this.allowMonsters, this.allowAnimals);
- } // Paper - timings
- }
-
-- this.world.getMethodProfiler().exit();
-- this.world.getMethodProfiler().exit();
-+ //this.world.getMethodProfiler().exit(); // Akarin - remove caller
-+ //this.world.getMethodProfiler().exit(); // Akarin - remove caller
- }
-
- // Tuinity start - controlled flush for entity tracker packets
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index d280ff20082fa526fa08c38eeff5ef21d3134e76..1ec7046dd79c07203d7c4a8c60145db9d0ac3b82 100644
--- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java
@@ -440,7 +440,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
public void setPosition(double d0, double d1, double d2) {
this.setPositionRaw(d0, d1, d2);
//this.a(this.size.a(d0, d1, d2)); // Paper - move into setPositionRaw
- if (valid) ((WorldServer) world).chunkCheck(this); // CraftBukkit
+ if (valid && !dead) ((WorldServer) world).chunkCheck(this); // CraftBukkit // Purpur
}
protected void ae() {
@@ -523,7 +523,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
}
this.justCreated = false;
- this.world.getMethodProfiler().exit();
+ //this.world.getMethodProfiler().exit(); // Akarin - remove caller
}
public void resetPortalCooldown() {
@@ -2388,7 +2388,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
WorldServer worldserver1 = minecraftserver.getWorldServer(resourcekey);
if (true && !this.isPassenger() && this.portalTicks++ >= i) { // CraftBukkit
- this.world.getMethodProfiler().enter("portal");
+ //this.world.getMethodProfiler().enter("portal"); // Akarin - remove caller
this.portalTicks = i;
this.resetPortalCooldown();
// CraftBukkit start
@@ -2398,7 +2398,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
this.b(worldserver1);
}
// CraftBukkit end
- this.world.getMethodProfiler().exit();
+ //this.world.getMethodProfiler().exit(); // Akarin - remove caller
}
this.inPortal = false;
@@ -2785,14 +2785,14 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
}
// Paper end
if (this.world instanceof WorldServer && !this.dead) {
- this.world.getMethodProfiler().enter("changeDimension");
+ //this.world.getMethodProfiler().enter("changeDimension"); // Akarin - remove caller
// CraftBukkit start
// this.decouple();
if (worldserver == null) {
return null;
}
// CraftBukkit end
- this.world.getMethodProfiler().enter("reposition");
+ //this.world.getMethodProfiler().enter("reposition"); // Akarin - remove caller
ShapeDetectorShape shapedetectorshape = (location == null) ? this.a(worldserver) : new ShapeDetectorShape(new Vec3D(location.getX(), location.getY(), location.getZ()), Vec3D.ORIGIN, this.yaw, this.pitch, worldserver, null); // CraftBukkit
if (shapedetectorshape == null) {
@@ -2825,10 +2825,10 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
}
this.bM();
- this.world.getMethodProfiler().exit();
+ //this.world.getMethodProfiler().exit(); // Akarin - remove caller
((WorldServer) this.world).resetEmptyTime();
worldserver.resetEmptyTime();
- this.world.getMethodProfiler().exit();
+ //this.world.getMethodProfiler().exit(); // Akarin - remove caller
return entity;
}
} else {
diff --git a/src/main/java/net/minecraft/server/Entity.java.rej b/src/main/java/net/minecraft/server/Entity.java.rej
deleted file mode 100644
index 2ed1659910c17646f3407a2245109501bc4c568a..0000000000000000000000000000000000000000
--- a/src/main/java/net/minecraft/server/Entity.java.rej
+++ /dev/null
@@ -1,85 +0,0 @@
-diff a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java (rejected hunks)
-@@ -523,7 +523,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
- }
-
- this.justCreated = false;
-- this.world.getMethodProfiler().exit();
-+ //this.world.getMethodProfiler().exit(); // Akarin - remove caller
- }
-
- // Paper start
-@@ -679,7 +679,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
- }
- }
-
-- this.world.getMethodProfiler().enter("move");
-+ //this.world.getMethodProfiler().enter("move"); // Akarin - remove caller
- if (this.x.g() > 1.0E-7D) {
- vec3d = vec3d.h(this.x);
- this.x = Vec3D.a;
-@@ -688,7 +688,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
- // Paper start - ignore movement changes while inactive.
- if (isTemporarilyActive && !(this instanceof EntityItem || this instanceof EntityMinecartAbstract) && vec3d == getMot() && enummovetype == EnumMoveType.SELF) {
- setMot(Vec3D.a);
-- this.world.getMethodProfiler().exit();
-+ //this.world.getMethodProfiler().exit(); // Akarin - remove caller
- return;
- }
- // Paper end
-@@ -2376,7 +2376,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
- WorldServer worldserver1 = minecraftserver.getWorldServer(resourcekey);
-
- if (true && !this.isPassenger() && this.portalTicks++ >= i) { // CraftBukkit
-- this.world.getMethodProfiler().enter("portal");
-+ //this.world.getMethodProfiler().enter("portal"); // Akarin - remove caller
- this.portalTicks = i;
- this.portalCooldown = this.getDefaultPortalCooldown();
- // CraftBukkit start
-@@ -2386,7 +2386,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
- this.a(worldserver1);
- }
- // CraftBukkit end
-- this.world.getMethodProfiler().exit();
-+ //this.world.getMethodProfiler().exit(); // Akarin - remove caller
- }
-
- this.inPortal = false;
-@@ -2770,14 +2770,14 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
- }
- // Paper end
- if (this.world instanceof WorldServer && !this.dead) {
-- this.world.getMethodProfiler().enter("changeDimension");
-+ //this.world.getMethodProfiler().enter("changeDimension"); // Akarin - remove caller
- // CraftBukkit start
- // this.decouple();
- if (worldserver == null){
- return null;
- }
- // CraftBukkit end
-- this.world.getMethodProfiler().enter("reposition");
-+ //this.world.getMethodProfiler().enter("reposition"); // Akarin - remove caller
- Vec3D vec3d = this.getMot();
- float f = 0.0F;
- BlockPosition blockposition = location; // CraftBukkit
-@@ -2856,7 +2856,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
- this.decouple();
- // CraftBukkit end
-
-- this.world.getMethodProfiler().exitEnter("reloading");
-+ //this.world.getMethodProfiler().exitEnter("reloading"); // Akarin - remove caller
- Entity entity = this.getEntityType().a((World) worldserver);
-
- if (entity != null) {
-@@ -2878,10 +2878,10 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
- }
-
- this.bJ();
-- this.world.getMethodProfiler().exit();
-+ //this.world.getMethodProfiler().exit(); // Akarin - remove caller
- ((WorldServer) this.world).resetEmptyTime();
- worldserver.resetEmptyTime();
-- this.world.getMethodProfiler().exit();
-+ //this.world.getMethodProfiler().exit(); // Akarin - remove caller
- return entity;
- } else {
- return null;
diff --git a/src/main/java/net/minecraft/server/EntityHoglin.java b/src/main/java/net/minecraft/server/EntityHoglin.java
index cf64c8ca2c5348782bf65a13f210564856b69311..5e3094198ce5b720a17db704ab295b1cd5a99ce9 100644
--- a/src/main/java/net/minecraft/server/EntityHoglin.java
+++ b/src/main/java/net/minecraft/server/EntityHoglin.java
@@ -13,7 +13,7 @@ public class EntityHoglin extends EntityAnimal implements IMonster, IOglin {
public int conversionTicks = 0;
public boolean cannotBeHunted = false;
protected static final ImmutableList<? extends SensorType<? extends Sensor<? super EntityHoglin>>> bo = ImmutableList.of(SensorType.c, SensorType.d, SensorType.n, SensorType.m);
- protected static final ImmutableList<? extends MemoryModuleType<?>> bp = ImmutableList.of(MemoryModuleType.BREED_TARGET, MemoryModuleType.MOBS, MemoryModuleType.VISIBLE_MOBS, MemoryModuleType.NEAREST_VISIBLE_PLAYER, MemoryModuleType.NEAREST_VISIBLE_TARGETABLE_PLAYER, MemoryModuleType.LOOK_TARGET, MemoryModuleType.WALK_TARGET, MemoryModuleType.CANT_REACH_WALK_TARGET_SINCE, MemoryModuleType.PATH, MemoryModuleType.ATTACK_TARGET, MemoryModuleType.ATTACK_COOLING_DOWN, MemoryModuleType.NEAREST_VISIBLE_ADULT_PIGLIN, new MemoryModuleType[]{MemoryModuleType.AVOID_TARGET, MemoryModuleType.VISIBLE_ADULT_PIGLIN_COUNT, MemoryModuleType.VISIBLE_ADULT_HOGLIN_COUNT, MemoryModuleType.NEAREST_VISIBLE_ADULT_HOGLINS, MemoryModuleType.NEAREST_VISIBLE_ADULY, MemoryModuleType.NEAREST_REPELLENT, MemoryModuleType.PACIFIED});
+ protected static final ImmutableList<MemoryModuleType<?>> bp = ImmutableList.of(MemoryModuleType.BREED_TARGET, MemoryModuleType.MOBS, MemoryModuleType.VISIBLE_MOBS, MemoryModuleType.NEAREST_VISIBLE_PLAYER, MemoryModuleType.NEAREST_VISIBLE_TARGETABLE_PLAYER, MemoryModuleType.LOOK_TARGET, MemoryModuleType.WALK_TARGET, MemoryModuleType.CANT_REACH_WALK_TARGET_SINCE, MemoryModuleType.PATH, MemoryModuleType.ATTACK_TARGET, MemoryModuleType.ATTACK_COOLING_DOWN, MemoryModuleType.NEAREST_VISIBLE_ADULT_PIGLIN, new MemoryModuleType[]{MemoryModuleType.AVOID_TARGET, MemoryModuleType.VISIBLE_ADULT_PIGLIN_COUNT, MemoryModuleType.VISIBLE_ADULT_HOGLIN_COUNT, MemoryModuleType.NEAREST_VISIBLE_ADULT_HOGLINS, MemoryModuleType.NEAREST_VISIBLE_ADULY, MemoryModuleType.NEAREST_REPELLENT, MemoryModuleType.PACIFIED}); // Yatopia - decompile fix
public EntityHoglin(EntityTypes<? extends EntityHoglin> entitytypes, World world) {
super(entitytypes, world);
@@ -77,14 +77,14 @@ public class EntityHoglin extends EntityAnimal implements IMonster, IOglin {
@Override
public BehaviorController<EntityHoglin> getBehaviorController() {
- return super.getBehaviorController();
+ return (BehaviorController<EntityHoglin>) super.getBehaviorController(); // Yatopia - decompile fix
}
@Override
protected void mobTick() {
- this.world.getMethodProfiler().enter("hoglinBrain");
- this.getBehaviorController().a((WorldServer) this.world, (EntityLiving) this);
- this.world.getMethodProfiler().exit();
+ //this.world.getMethodProfiler().enter("hoglinBrain"); // Akarin - remove caller
+ this.getBehaviorController().a((WorldServer) this.world, this); // Yatopia - decompile fix
+ //this.world.getMethodProfiler().exit(); // Akarin - remove caller
HoglinAI.a(this);
if (this.isConverting()) {
++this.conversionTicks;
@@ -259,7 +259,7 @@ public class EntityHoglin extends EntityAnimal implements IMonster, IOglin {
@Override
protected SoundEffect getSoundAmbient() {
- return this.world.isClientSide ? null : (SoundEffect) HoglinAI.b(this).orElse((Object) null);
+ return this.world.isClientSide ? null : (SoundEffect) HoglinAI.b(this).orElse(null); // Yatopia - decompile fix
}
@Override
diff --git a/src/main/java/net/minecraft/server/EntityHoglin.java.rej b/src/main/java/net/minecraft/server/EntityHoglin.java.rej
deleted file mode 100644
index be7a4b07540f6cc29c9ed76668bc1eaf9850013c..0000000000000000000000000000000000000000
--- a/src/main/java/net/minecraft/server/EntityHoglin.java.rej
+++ /dev/null
@@ -1,13 +0,0 @@
-diff a/src/main/java/net/minecraft/server/EntityHoglin.java b/src/main/java/net/minecraft/server/EntityHoglin.java (rejected hunks)
-@@ -83,9 +83,9 @@ public class EntityHoglin extends EntityAnimal implements IMonster, IOglin {
-
- @Override
- protected void mobTick() {
-- this.world.getMethodProfiler().enter("hoglinBrain");
-+ //this.world.getMethodProfiler().enter("hoglinBrain"); // Akarin - remove caller
- this.getBehaviorController().a((WorldServer) this.world, this); // CraftBukkit - decompile error
-- this.world.getMethodProfiler().exit();
-+ //this.world.getMethodProfiler().exit(); // Akarin - remove caller
- HoglinAI.a(this);
- if (this.eO()) {
- ++this.bz;
diff --git a/src/main/java/net/minecraft/server/EntityInsentient.java b/src/main/java/net/minecraft/server/EntityInsentient.java
index 082e34572174ca0bac5a09637886b1a3e579e3ff..9db5959b39d15c2fd832d3fbcfa63e95b79875c6 100644
--- a/src/main/java/net/minecraft/server/EntityInsentient.java
+++ b/src/main/java/net/minecraft/server/EntityInsentient.java
@@ -242,13 +242,13 @@ public abstract class EntityInsentient extends EntityLiving {
@Override
public void entityBaseTick() {
super.entityBaseTick();
- this.world.getMethodProfiler().enter("mobBaseTick");
+ //this.world.getMethodProfiler().enter("mobBaseTick"); // Akarin - remove caller
if (this.isAlive() && this.random.nextInt(1000) < this.e++) {
this.m();
this.F();
}
incrementTicksSinceLastInteraction(); // Purpur
- this.world.getMethodProfiler().exit();
+ //this.world.getMethodProfiler().exit(); // Akarin - remove caller
}
// Purpur start
@@ -779,30 +779,30 @@ public abstract class EntityInsentient extends EntityLiving {
return;
}
// Paper end
- this.world.getMethodProfiler().enter("sensing");
+ //this.world.getMethodProfiler().enter("sensing"); // Akarin - remove caller
this.bo.a();
- this.world.getMethodProfiler().exit();
- this.world.getMethodProfiler().enter("targetSelector");
+ //this.world.getMethodProfiler().exit(); // Akarin - remove caller
+ //this.world.getMethodProfiler().enter("targetSelector"); // Akarin - remove caller
this.targetSelector.doTick();
- this.world.getMethodProfiler().exit();
- this.world.getMethodProfiler().enter("goalSelector");
+ //this.world.getMethodProfiler().exit(); // Akarin - remove caller
+ //this.world.getMethodProfiler().enter("goalSelector"); // Akarin - remove caller
this.goalSelector.doTick();
- this.world.getMethodProfiler().exit();
- this.world.getMethodProfiler().enter("navigation");
+ //this.world.getMethodProfiler().exit(); // Akarin - remove caller
+ //this.world.getMethodProfiler().enter("navigation"); // Akarin - remove caller
this.navigation.c();
- this.world.getMethodProfiler().exit();
- this.world.getMethodProfiler().enter("mob tick");
+ //this.world.getMethodProfiler().exit(); // Akarin - remove caller
+ //this.world.getMethodProfiler().enter("mob tick"); // Akarin - remove caller
this.mobTick();
- this.world.getMethodProfiler().exit();
- this.world.getMethodProfiler().enter("controls");
- this.world.getMethodProfiler().enter("move");
+ //this.world.getMethodProfiler().exit(); // Akarin - remove caller
+ //this.world.getMethodProfiler().enter("controls"); // Akarin - remove caller
+ //this.world.getMethodProfiler().enter("move"); // Akarin - remove caller
this.moveController.a();
- this.world.getMethodProfiler().exitEnter("look");
+ //this.world.getMethodProfiler().exitEnter("look"); // Akarin - remove caller
this.lookController.a();
- this.world.getMethodProfiler().exitEnter("jump");
+ //this.world.getMethodProfiler().exitEnter("jump"); // Akarin - remove caller
this.bi.b();
- this.world.getMethodProfiler().exit();
- this.world.getMethodProfiler().exit();
+ //this.world.getMethodProfiler().exit(); // Akarin - remove caller
+ //this.world.getMethodProfiler().exit(); // Akarin - remove caller
this.M();
}
diff --git a/src/main/java/net/minecraft/server/EntityInsentient.java.rej b/src/main/java/net/minecraft/server/EntityInsentient.java.rej
deleted file mode 100644
index bccb7cd89241ca30549f5442a4ef9847cfdb67a9..0000000000000000000000000000000000000000
--- a/src/main/java/net/minecraft/server/EntityInsentient.java.rej
+++ /dev/null
@@ -1,64 +0,0 @@
-diff a/src/main/java/net/minecraft/server/EntityInsentient.java b/src/main/java/net/minecraft/server/EntityInsentient.java (rejected hunks)
-@@ -241,13 +241,13 @@ public abstract class EntityInsentient extends EntityLiving {
- @Override
- public void entityBaseTick() {
- super.entityBaseTick();
-- this.world.getMethodProfiler().enter("mobBaseTick");
-+ //this.world.getMethodProfiler().enter("mobBaseTick"); // Akarin - remove caller
- if (this.isAlive() && this.random.nextInt(1000) < this.e++) {
- this.eJ();
- this.F();
- }
-
-- this.world.getMethodProfiler().exit();
-+ //this.world.getMethodProfiler().exit(); // Akarin - remove caller
- }
-
- @Override
-@@ -747,30 +747,30 @@ public abstract class EntityInsentient extends EntityLiving {
- return;
- }
- // Paper end
-- this.world.getMethodProfiler().enter("sensing");
-+ //this.world.getMethodProfiler().enter("sensing"); // Akarin - remove caller
- this.bv.a();
-- this.world.getMethodProfiler().exit();
-- this.world.getMethodProfiler().enter("targetSelector");
-+ //this.world.getMethodProfiler().exit(); // Akarin - remove caller
-+ //this.world.getMethodProfiler().enter("targetSelector"); // Akarin - remove caller
- this.targetSelector.doTick();
-- this.world.getMethodProfiler().exit();
-- this.world.getMethodProfiler().enter("goalSelector");
-+ //this.world.getMethodProfiler().exit(); // Akarin - remove caller
-+ //this.world.getMethodProfiler().enter("goalSelector"); // Akarin - remove caller
- this.goalSelector.doTick();
-- this.world.getMethodProfiler().exit();
-- this.world.getMethodProfiler().enter("navigation");
-+ //this.world.getMethodProfiler().exit(); // Akarin - remove caller
-+ //this.world.getMethodProfiler().enter("navigation"); // Akarin - remove caller
- this.navigation.c();
-- this.world.getMethodProfiler().exit();
-- this.world.getMethodProfiler().enter("mob tick");
-+ //this.world.getMethodProfiler().exit(); // Akarin - remove caller
-+ //this.world.getMethodProfiler().enter("mob tick"); // Akarin - remove caller
- this.mobTick();
-- this.world.getMethodProfiler().exit();
-- this.world.getMethodProfiler().enter("controls");
-- this.world.getMethodProfiler().enter("move");
-+ //this.world.getMethodProfiler().exit(); // Akarin - remove caller
-+ //this.world.getMethodProfiler().enter("controls"); // Akarin - remove caller
-+ //this.world.getMethodProfiler().enter("move"); // Akarin - remove caller
- this.moveController.a();
-- this.world.getMethodProfiler().exitEnter("look");
-+ //this.world.getMethodProfiler().exitEnter("look"); // Akarin - remove caller
- this.lookController.a();
-- this.world.getMethodProfiler().exitEnter("jump");
-+ //this.world.getMethodProfiler().exitEnter("jump"); // Akarin - remove caller
- this.bp.b();
-- this.world.getMethodProfiler().exit();
-- this.world.getMethodProfiler().exit();
-+ //this.world.getMethodProfiler().exit(); // Akarin - remove caller
-+ //this.world.getMethodProfiler().exit(); // Akarin - remove caller
- this.M();
- }
-
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
index c3ab2adf438ec60248eafeaa169e6c5080f5ec0a..154cb30369fdda685dcb82051a5244dba4d5b912 100644
--- a/src/main/java/net/minecraft/server/EntityLiving.java
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
@@ -366,7 +366,7 @@ public abstract class EntityLiving extends Entity {
this.aD = this.aC;
this.lastYaw = this.yaw;
this.lastPitch = this.pitch;
- this.world.getMethodProfiler().exit();
+ //this.world.getMethodProfiler().exit(); // Akarin - remove caller
}
public boolean cM() {
@@ -2515,10 +2515,10 @@ public abstract class EntityLiving extends Entity {
}
this.aK += (f3 - this.aK) * 0.3F;
- this.world.getMethodProfiler().enter("headTurn");
+ //this.world.getMethodProfiler().enter("headTurn"); // Akarin - remove caller
f2 = this.f(f1, f2);
- this.world.getMethodProfiler().exit();
- this.world.getMethodProfiler().enter("rangeChecks");
+ //this.world.getMethodProfiler().exit(); // Akarin - remove caller
+ //this.world.getMethodProfiler().enter("rangeChecks"); // Akarin - remove caller
while (this.yaw - this.lastYaw < -180.0F) {
this.lastYaw -= 360.0F;
@@ -2552,7 +2552,7 @@ public abstract class EntityLiving extends Entity {
this.aD += 360.0F;
}
- this.world.getMethodProfiler().exit();
+ //this.world.getMethodProfiler().exit(); // Akarin - remove caller
this.aL += f2;
if (this.isGliding()) {
++this.be;
@@ -2751,19 +2751,19 @@ public abstract class EntityLiving extends Entity {
}
this.setMot(d4, d5, d6);
- this.world.getMethodProfiler().enter("ai");
+ //this.world.getMethodProfiler().enter("ai"); // Akarin - remove caller
if (this.isFrozen()) {
this.jumping = false;
this.aR = 0.0F;
this.aT = 0.0F;
} else if (this.doAITick()) {
- this.world.getMethodProfiler().enter("newAi");
+ //this.world.getMethodProfiler().enter("newAi"); // Akarin - remove caller
this.doTick();
- this.world.getMethodProfiler().exit();
+ //this.world.getMethodProfiler().exit(); // Akarin - remove caller
}
- this.world.getMethodProfiler().exit();
- this.world.getMethodProfiler().enter("jump");
+ //this.world.getMethodProfiler().exit(); // Akarin - remove caller
+ //this.world.getMethodProfiler().enter("jump"); // Akarin - remove caller
if (this.jumping && this.cS()) {
double d7;
@@ -2790,8 +2790,8 @@ public abstract class EntityLiving extends Entity {
this.jumpTicks = 0;
}
- this.world.getMethodProfiler().exit();
- this.world.getMethodProfiler().enter("travel");
+ //this.world.getMethodProfiler().exit(); // Akarin - remove caller
+ //this.world.getMethodProfiler().enter("travel"); // Akarin - remove caller
this.aR *= 0.98F;
this.aT *= 0.98F;
this.r();
@@ -2800,15 +2800,15 @@ public abstract class EntityLiving extends Entity {
// SpigotTimings.timerEntityAIMove.startTiming(); // Spigot // Paper
this.g(new Vec3D((double) this.aR, (double) this.aS, (double) this.aT));
// SpigotTimings.timerEntityAIMove.stopTiming(); // Spigot // Paper
- this.world.getMethodProfiler().exit();
- this.world.getMethodProfiler().enter("push");
+ //this.world.getMethodProfiler().exit(); // Akarin - remove caller
+ //this.world.getMethodProfiler().enter("push"); // Akarin - remove caller
if (this.bf > 0) {
--this.bf;
this.a(axisalignedbb, this.getBoundingBox());
}
this.collideNearby();
- this.world.getMethodProfiler().exit();
+ //this.world.getMethodProfiler().exit(); // Akarin - remove caller
if (!this.world.isClientSide && this.dN() && this.aF()) {
this.damageEntity(DamageSource.DROWN, 1.0F);
}
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java.rej b/src/main/java/net/minecraft/server/EntityLiving.java.rej
deleted file mode 100644
index 947d12a17358d209be65c828e9dd297c54af91ac..0000000000000000000000000000000000000000
--- a/src/main/java/net/minecraft/server/EntityLiving.java.rej
+++ /dev/null
@@ -1,87 +0,0 @@
-diff a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java (rejected hunks)
-@@ -365,7 +365,7 @@ public abstract class EntityLiving extends Entity {
- this.aK = this.aJ;
- this.lastYaw = this.yaw;
- this.lastPitch = this.pitch;
-- this.world.getMethodProfiler().exit();
-+ //this.world.getMethodProfiler().exit(); // Akarin - remove caller
- }
-
- public boolean cM() {
-@@ -2497,10 +2497,10 @@ public abstract class EntityLiving extends Entity {
- }
-
- this.aR += (f3 - this.aR) * 0.3F;
-- this.world.getMethodProfiler().enter("headTurn");
-+ //this.world.getMethodProfiler().enter("headTurn"); // Akarin - remove caller
- f2 = this.f(f1, f2);
-- this.world.getMethodProfiler().exit();
-- this.world.getMethodProfiler().enter("rangeChecks");
-+ //this.world.getMethodProfiler().exit(); // Akarin - remove caller
-+ //this.world.getMethodProfiler().enter("rangeChecks"); // Akarin - remove caller
-
- while (this.yaw - this.lastYaw < -180.0F) {
- this.lastYaw -= 360.0F;
-@@ -2534,7 +2534,7 @@ public abstract class EntityLiving extends Entity {
- this.aK += 360.0F;
- }
-
-- this.world.getMethodProfiler().exit();
-+ //this.world.getMethodProfiler().exit(); // Akarin - remove caller
- this.aS += f2;
- if (this.isGliding()) {
- ++this.bl;
-@@ -2733,19 +2733,19 @@ public abstract class EntityLiving extends Entity {
- }
-
- this.setMot(d4, d5, d6);
-- this.world.getMethodProfiler().enter("ai");
-+ //this.world.getMethodProfiler().enter("ai"); // Akarin - remove caller
- if (this.isFrozen()) {
- this.jumping = false;
- this.aY = 0.0F;
- this.ba = 0.0F;
- } else if (this.doAITick()) {
-- this.world.getMethodProfiler().enter("newAi");
-+ //this.world.getMethodProfiler().enter("newAi"); // Akarin - remove caller
- this.doTick();
-- this.world.getMethodProfiler().exit();
-+ //this.world.getMethodProfiler().exit(); // Akarin - remove caller
- }
-
-- this.world.getMethodProfiler().exit();
-- this.world.getMethodProfiler().enter("jump");
-+ //this.world.getMethodProfiler().exit(); // Akarin - remove caller
-+ //this.world.getMethodProfiler().enter("jump"); // Akarin - remove caller
- if (this.jumping && this.cS()) {
- double d7;
-
-@@ -2772,23 +2772,23 @@ public abstract class EntityLiving extends Entity {
- this.jumpTicks = 0;
- }
-
-- this.world.getMethodProfiler().exit();
-- this.world.getMethodProfiler().enter("travel");
-+ //this.world.getMethodProfiler().exit(); // Akarin - remove caller
-+ //this.world.getMethodProfiler().enter("travel"); // Akarin - remove caller
- this.aY *= 0.98F;
- this.ba *= 0.98F;
- this.t();
- AxisAlignedBB axisalignedbb = this.getBoundingBox();
-
- this.f(new Vec3D((double) this.aY, (double) this.aZ, (double) this.ba));
-- this.world.getMethodProfiler().exit();
-- this.world.getMethodProfiler().enter("push");
-+ //this.world.getMethodProfiler().exit(); // Akarin - remove caller
-+ //this.world.getMethodProfiler().enter("push"); // Akarin - remove caller
- if (this.bm > 0) {
- --this.bm;
- this.a(axisalignedbb, this.getBoundingBox());
- }
-
- this.collideNearby();
-- this.world.getMethodProfiler().exit();
-+ //this.world.getMethodProfiler().exit(); // Akarin - remove caller
- if (!this.world.isClientSide && this.dN() && this.aC()) {
- this.damageEntity(DamageSource.DROWN, 1.0F);
- }
diff --git a/src/main/java/net/minecraft/server/EntityPiglin.java b/src/main/java/net/minecraft/server/EntityPiglin.java
index e1b4330074cf3c3de31dbfcd9e1b99feb7baf669..2581c6da77c3fcec5a18f5fcacf30a36bf6b5ee6 100644
--- a/src/main/java/net/minecraft/server/EntityPiglin.java
+++ b/src/main/java/net/minecraft/server/EntityPiglin.java
@@ -143,7 +143,7 @@ public class EntityPiglin extends EntityPiglinAbstract implements ICrossbow {
@Override
public BehaviorController<EntityPiglin> getBehaviorController() {
- return super.getBehaviorController();
+ return (BehaviorController<EntityPiglin>) super.getBehaviorController(); // Yatopia - decompile fix
}
@Override
@@ -201,9 +201,9 @@ public class EntityPiglin extends EntityPiglinAbstract implements ICrossbow {
@Override
protected void mobTick() {
- this.world.getMethodProfiler().enter("piglinBrain");
- this.getBehaviorController().a((WorldServer) this.world, (EntityLiving) this);
- this.world.getMethodProfiler().exit();
+ //this.world.getMethodProfiler().enter("piglinBrain"); // Akarin - remove caller
+ this.getBehaviorController().a((WorldServer) this.world, this); // Yatopia - decompile fix
+ //this.world.getMethodProfiler().exit(); // Akarin - remove caller
PiglinAI.b(this);
super.mobTick();
}
@@ -341,7 +341,7 @@ public class EntityPiglin extends EntityPiglinAbstract implements ICrossbow {
@Override
protected SoundEffect getSoundAmbient() {
- return this.world.isClientSide ? null : (SoundEffect) PiglinAI.d(this).orElse((Object) null);
+ return this.world.isClientSide ? null : (SoundEffect) PiglinAI.d(this).orElse(null); // Yatopia - decompile fix
}
@Override
diff --git a/src/main/java/net/minecraft/server/EntityPiglin.java.rej b/src/main/java/net/minecraft/server/EntityPiglin.java.rej
deleted file mode 100644
index 9f3608357280a269c655b00feed22ebc29922d52..0000000000000000000000000000000000000000
--- a/src/main/java/net/minecraft/server/EntityPiglin.java.rej
+++ /dev/null
@@ -1,13 +0,0 @@
-diff a/src/main/java/net/minecraft/server/EntityPiglin.java b/src/main/java/net/minecraft/server/EntityPiglin.java (rejected hunks)
-@@ -235,9 +235,9 @@ public class EntityPiglin extends EntityMonster implements ICrossbow {
-
- @Override
- protected void mobTick() {
-- this.world.getMethodProfiler().enter("piglinBrain");
-+ //this.world.getMethodProfiler().enter("piglinBrain"); // Akarin - remove caller
- this.getBehaviorController().a((WorldServer) this.world, this); // CraftBukkit - decompile error
-- this.world.getMethodProfiler().exit();
-+ //this.world.getMethodProfiler().exit(); // Akarin - remove caller
- PiglinAI.b(this);
- if (this.eO()) {
- ++this.bA;
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
index 8e1655a975af24f6781a95be7030afa8f1b14472..b43b02c0bdd5dbf0b7d30de90bdc2f74c015ecc8 100644
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
@@ -916,7 +916,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
ShapeDetectorShape shapedetectorshape = this.a(worldserver);
if (shapedetectorshape != null) {
- worldserver1.getMethodProfiler().enter("moving");
+ //worldserver1.getMethodProfiler().enter("moving"); // Akarin - remove caller
worldserver = shapedetectorshape.world; // CraftBukkit
if (worldserver == null) { } else // CraftBukkit - empty to fall through to null to event
if (resourcekey == DimensionManager.OVERWORLD && worldserver.getTypeKey() == DimensionManager.THE_NETHER) { // CraftBukkit
@@ -939,8 +939,8 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
worldserver = ((CraftWorld) exit.getWorld()).getHandle();
// CraftBukkit end
- worldserver1.getMethodProfiler().exit();
- worldserver1.getMethodProfiler().enter("placing");
+ //worldserver1.getMethodProfiler().exit(); // Akarin - remove caller
+ //worldserver1.getMethodProfiler().enter("placing"); // Akarin - remove caller
if (true) { // CraftBukkit
this.worldChangeInvuln = true; // CraftBukkit - Set teleport invulnerability only if player changing worlds
@@ -957,7 +957,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
worldserver.addPlayerPortal(this);
this.playerConnection.teleport(exit); // CraftBukkit - use internal teleport without event
this.playerConnection.syncPosition(); // CraftBukkit - sync position after changing it (from PortalTravelAgent#findAndteleport)
- worldserver1.getMethodProfiler().exit();
+ //worldserver1.getMethodProfiler().exit(); // Akarin - remove caller
this.triggerDimensionAdvancements(worldserver1);
this.playerInteractManager.a(worldserver);
this.playerConnection.sendPacket(new PacketPlayOutAbilities(this.abilities));
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java.rej b/src/main/java/net/minecraft/server/EntityPlayer.java.rej
deleted file mode 100644
index f5c0ccfcbfeda191e3a077bb4313a8c8b8b4178d..0000000000000000000000000000000000000000
--- a/src/main/java/net/minecraft/server/EntityPlayer.java.rej
+++ /dev/null
@@ -1,30 +0,0 @@
-diff a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java (rejected hunks)
-@@ -900,7 +900,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
- float f1 = this.yaw;
- float f2 = f1;
-
-- worldserver1.getMethodProfiler().enter("moving");
-+ //worldserver1.getMethodProfiler().enter("moving"); // Akarin - remove caller
- double d3;
-
- if (worldserver == null) { } else // CraftBukkit - empty to fall through to null to event
-@@ -951,8 +951,8 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
- // CraftBukkit end
-
- // this.setPositionRotation(d0, d1, d2, f1, f); // CraftBukkit - PlayerTeleportEvent handles position changes
-- worldserver1.getMethodProfiler().exit();
-- worldserver1.getMethodProfiler().enter("placing");
-+ //worldserver1.getMethodProfiler().exit(); // Akarin - remove caller
-+ //worldserver1.getMethodProfiler().enter("placing"); // Akarin - remove caller
- // Spigot start - SPIGOT-5677, MC-114796: Fix portals generating outside world border
- double d4 = Math.max(-2.9999872E7D, worldserver.getWorldBorder().e() + 16.0D);
-
-@@ -1001,7 +1001,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
- // CraftBukkit end
- }
-
-- worldserver1.getMethodProfiler().exit();
-+ //worldserver1.getMethodProfiler().exit(); // Akarin - remove caller
- // CraftBukkit start - PlayerTeleportEvent
- PlayerTeleportEvent tpEvent = new PlayerTeleportEvent(this.getBukkitEntity(), enter, exit, cause);
- Bukkit.getServer().getPluginManager().callEvent(tpEvent);
diff --git a/src/main/java/net/minecraft/server/EntityVillager.java b/src/main/java/net/minecraft/server/EntityVillager.java
index f880a38bf6f829e1503ede67c72848fe3bfc240b..8c58564ee9397e549a51c1a7cb76156c26a82e0c 100644
--- a/src/main/java/net/minecraft/server/EntityVillager.java
+++ b/src/main/java/net/minecraft/server/EntityVillager.java
@@ -92,6 +92,13 @@ public class EntityVillager extends EntityVillagerAbstract implements Reputation
return behaviorcontroller;
}
+ // Purpur start
+ @Override
+ public boolean a(EntityHuman entityhuman) {
+ return world.purpurConfig.villagerCanBeLeashed && !this.isLeashed();
+ }
+ // Purpur end
+
public void c(WorldServer worldserver) {
BehaviorController<EntityVillager> behaviorcontroller = this.getBehaviorController();
@@ -167,13 +174,13 @@ public class EntityVillager extends EntityVillagerAbstract implements Reputation
@Override
protected void mobTick() { mobTick(false); }
protected void mobTick(boolean inactive) {
- this.world.getMethodProfiler().enter("villagerBrain");
+ //this.world.getMethodProfiler().enter("villagerBrain"); // Akarin - remove caller
// Purpur start
boolean tick = (world.getTime() + brainTickOffset) % world.purpurConfig.villagerBrainTicks == 0;
if (((WorldServer) world).getMinecraftServer().lagging ? tick : world.purpurConfig.villagerUseBrainTicksOnlyWhenLagging || tick)
// Purpur end
if (!inactive) this.getBehaviorController().a((WorldServer) this.world, this); // CraftBukkit - decompile error // Paper
- this.world.getMethodProfiler().exit();
+ //this.world.getMethodProfiler().exit(); // Akarin - remove caller
if (this.bF) {
this.bF = false;
}
diff --git a/src/main/java/net/minecraft/server/EntityVillager.java.rej b/src/main/java/net/minecraft/server/EntityVillager.java.rej
deleted file mode 100644
index 538b2c92e050176a1ac0bb4c2315f5b22c7f8eac..0000000000000000000000000000000000000000
--- a/src/main/java/net/minecraft/server/EntityVillager.java.rej
+++ /dev/null
@@ -1,13 +0,0 @@
-diff a/src/main/java/net/minecraft/server/EntityVillager.java b/src/main/java/net/minecraft/server/EntityVillager.java (rejected hunks)
-@@ -79,6 +79,11 @@ public class EntityVillager extends EntityVillagerAbstract implements Reputation
- protected void initPathfinder() {
- if (world.purpurConfig.villagerFollowEmeraldBlock) this.goalSelector.a(3, new PathfinderGoalTempt(this, 1.0D, false, TEMPT_ITEMS));
- }
-+
-+ @Override
-+ public boolean a(EntityHuman entityhuman) {
-+ return world.purpurConfig.villagerCanBeLeashed && !this.isLeashed();
-+ }
- // Purpur end
-
- @Override
diff --git a/src/main/java/net/minecraft/server/Explosion.java b/src/main/java/net/minecraft/server/Explosion.java
index 8886f7934df3549c4d28ab6359f4508ecc23f78d..43fe49e63ec2cdc4073f3c573ad4ac3a45cb993c 100644
--- a/src/main/java/net/minecraft/server/Explosion.java
+++ b/src/main/java/net/minecraft/server/Explosion.java
@@ -291,7 +291,7 @@ public class Explosion {
if (!iblockdata.isAir() && iblockdata.isDestroyable()) { // Paper
BlockPosition blockposition1 = blockposition.immutableCopy();
- this.world.getMethodProfiler().enter("explosion_blocks");
+ //this.world.getMethodProfiler().enter("explosion_blocks"); // Akarin - remove caller
if (block.a(this) && this.world instanceof WorldServer) {
TileEntity tileentity = block.isTileEntity() ? this.world.getTileEntity(blockposition) : null;
LootTableInfo.Builder loottableinfo_builder = (new LootTableInfo.Builder((WorldServer) this.world)).a(this.world.random).set(LootContextParameters.ORIGIN, Vec3D.a((BaseBlockPosition) blockposition)).set(LootContextParameters.TOOL, ItemStack.b).setOptional(LootContextParameters.BLOCK_ENTITY, tileentity).setOptional(LootContextParameters.THIS_ENTITY, this.source);
diff --git a/src/main/java/net/minecraft/server/Explosion.java.rej b/src/main/java/net/minecraft/server/Explosion.java.rej
deleted file mode 100644
index 98a910fa6bfc9542b1d1cb56b6621809acd6b279..0000000000000000000000000000000000000000
--- a/src/main/java/net/minecraft/server/Explosion.java.rej
+++ /dev/null
@@ -1,10 +0,0 @@
-diff a/src/main/java/net/minecraft/server/Explosion.java b/src/main/java/net/minecraft/server/Explosion.java (rejected hunks)
-@@ -281,7 +281,7 @@ public class Explosion {
- if (!iblockdata.isAir() && iblockdata.isDestroyable()) { // Paper
- BlockPosition blockposition1 = blockposition.immutableCopy();
-
-- this.world.getMethodProfiler().enter("explosion_blocks");
-+ //this.world.getMethodProfiler().enter("explosion_blocks"); // Akarin - remove caller
- if (block.a(this) && this.world instanceof WorldServer) {
- TileEntity tileentity = block.isTileEntity() ? this.world.getTileEntity(blockposition) : null;
- LootTableInfo.Builder loottableinfo_builder = (new LootTableInfo.Builder((WorldServer) this.world)).a(this.world.random).set(LootContextParameters.POSITION, blockposition).set(LootContextParameters.TOOL, ItemStack.b).setOptional(LootContextParameters.BLOCK_ENTITY, tileentity).setOptional(LootContextParameters.THIS_ENTITY, this.source);
diff --git a/src/main/java/net/minecraft/server/IProjectile.java b/src/main/java/net/minecraft/server/IProjectile.java
index 567c1bb19020a76b3ce03d8b79b8982d51238dde..97267c4a5040617a24f8131739cc5ee4ac14f34f 100644
--- a/src/main/java/net/minecraft/server/IProjectile.java
+++ b/src/main/java/net/minecraft/server/IProjectile.java
@@ -13,6 +13,7 @@ public abstract class IProjectile extends Entity {
private UUID shooter;
private int c;
private boolean d;
+ public int despawnCounter; // Purpur - moved from EntityArrow
IProjectile(EntityTypes<? extends IProjectile> entitytypes, World world) {
super(entitytypes, world);
@@ -90,6 +91,12 @@ public abstract class IProjectile extends Entity {
}
super.tick();
+
+ // Purpur start
+ if (!(this instanceof EntityArrow)) {
+ if (ticksLived > 200) this.tickDespawnCounter(); // Paper - tick despawnCounter regardless after 10 seconds
+ }
+ // Purpur end
}
private boolean h() {
diff --git a/src/main/java/net/minecraft/server/IProjectile.java.rej b/src/main/java/net/minecraft/server/IProjectile.java.rej
deleted file mode 100644
index 963c90c065a9e362c8c3030bb36ac6bf0c14a8e2..0000000000000000000000000000000000000000
--- a/src/main/java/net/minecraft/server/IProjectile.java.rej
+++ /dev/null
@@ -1,22 +0,0 @@
-diff a/src/main/java/net/minecraft/server/IProjectile.java b/src/main/java/net/minecraft/server/IProjectile.java (rejected hunks)
-@@ -13,6 +13,7 @@ public abstract class IProjectile extends Entity {
- private UUID shooter;
- private int c;
- private boolean d; public boolean leftOwner() { return d; } public void setLeftOwner(boolean leftOwner) { this.d = leftOwner; } // Purpur - OBFHELPER
-+ public int despawnCounter; // Purpur - moved from EntityArrow
-
- IProjectile(EntityTypes<? extends IProjectile> entitytypes, World world) {
- super(entitytypes, world);
-@@ -79,6 +91,12 @@ public abstract class IProjectile extends Entity {
- }
-
- super.tick();
-+
-+ // Purpur start
-+ if (!(this instanceof EntityArrow)) { // EntityArrow handles its own despawn counter
-+ this.tickDespawnCounter();
-+ }
-+ // Purpur end
- }
-
- public boolean checkIfLeftOwner() { return this.h(); } // Purpur - OBFHELPER
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index cd6c0753bdf11c2ae7075e40cd91cc517d8d71b9..8a454e66547ccb3ec2dfef922ec46b2a4595a81a 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -1295,7 +1295,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
playerSaveInterval = autosavePeriod;
}
// Paper end
- this.methodProfiler.enter("save");
+ //this.methodProfiler.enter("save"); // Akarin - remove caller
if (playerSaveInterval > 0) { // Paper
this.playerList.savePlayers(playerSaveInterval); // Paper
}// Paper
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java.rej b/src/main/java/net/minecraft/server/MinecraftServer.java.rej
deleted file mode 100644
index 2a6cb738059fb4bd0cc45f0db7aad25f7c46f9e5..0000000000000000000000000000000000000000
--- a/src/main/java/net/minecraft/server/MinecraftServer.java.rej
+++ /dev/null
@@ -1,10 +0,0 @@
-diff a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java (rejected hunks)
-@@ -1283,7 +1283,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
- //if (autosavePeriod > 0 && this.ticks % autosavePeriod == 0) { // CraftBukkit // Paper - move down
- //MinecraftServer.LOGGER.debug("Autosave started"); // Paper
- serverAutoSave = (autosavePeriod > 0 && this.ticks % autosavePeriod == 0); // Paper
-- this.methodProfiler.enter("save");
-+ //this.methodProfiler.enter("save"); // Akarin - remove caller
- if (autosavePeriod > 0 && this.ticks % autosavePeriod == 0) { // Paper
- this.playerList.savePlayers();
- }// Paper
diff --git a/src/main/java/net/minecraft/server/PortalTravelAgent.java b/src/main/java/net/minecraft/server/PortalTravelAgent.java
index e10995ec30dd9a10d781b3c1709fd2db5a9becdd..f6ffefd7e356c9c68cb6591cab55de9363442faf 100644
--- a/src/main/java/net/minecraft/server/PortalTravelAgent.java
+++ b/src/main/java/net/minecraft/server/PortalTravelAgent.java
@@ -23,15 +23,19 @@ public class PortalTravelAgent {
// CraftBukkit end
villageplace.a(this.world, blockposition, i);
- Optional<VillagePlaceRecord> optional = villageplace.b((villageplacetype) -> {
- return villageplacetype == VillagePlaceType.v;
- }, blockposition, i, VillagePlace.Occupancy.ANY).sorted(Comparator.comparingDouble((VillagePlaceRecord villageplacerecord) -> { // CraftBukkit - decompile error
+ Comparator<VillagePlaceRecord> comparator = Comparator.comparingDouble((VillagePlaceRecord villageplacerecord) -> { // CraftBukkit - decompile error // Yatopia
return villageplacerecord.f().j(blockposition);
}).thenComparingInt((villageplacerecord) -> {
return villageplacerecord.f().getY();
- })).filter((villageplacerecord) -> {
- return this.world.getType(villageplacerecord.f()).b(BlockProperties.E);
- }).findFirst();
+ }); // Yatopia
+ // Yatopia start
+ java.util.List<VillagePlaceRecord> list = villageplace.b(type -> type == VillagePlaceType.v, blockposition, i, VillagePlace.Occupancy.ANY).collect(java.util.stream.Collectors.toList());
+ Optional<VillagePlaceRecord> optional = Optional.empty();
+ if (!list.isEmpty()) {
+ list.sort(comparator);
+ optional = Optional.ofNullable(retrieveRecord(list));
+ }
+ // Yatopia end
return optional.map((villageplacerecord) -> {
BlockPosition blockposition1 = villageplacerecord.f();
@@ -45,6 +49,12 @@ public class PortalTravelAgent {
});
}
+ // Yatopia start
+ private VillagePlaceRecord retrieveRecord(java.util.List<VillagePlaceRecord> records) {
+ for (VillagePlaceRecord record : records) { if (world.getType(record.getPosition()).contains(BlockProperties.E)) { return record; } } return null;
+ }
+ // Yatopia end
+
public Optional<BlockUtil.Rectangle> createPortal(BlockPosition blockposition, EnumDirection.EnumAxis enumdirection_enumaxis) {
// CraftBukkit start
return this.createPortal(blockposition, enumdirection_enumaxis, null, 16);
diff --git a/src/main/java/net/minecraft/server/StructureGenerator.java b/src/main/java/net/minecraft/server/StructureGenerator.java
index c3bd58069d8dbdf36f70f1dafd7c24000f31708b..f915cb4e1110e39178527903ae93508f9459d7ca 100644
--- a/src/main/java/net/minecraft/server/StructureGenerator.java
+++ b/src/main/java/net/minecraft/server/StructureGenerator.java
@@ -143,6 +143,11 @@ public abstract class StructureGenerator<C extends WorldGenFeatureConfiguration>
int j2 = i1 + k * l1;
ChunkCoordIntPair chunkcoordintpair = this.a(structuresettingsfeature, j, seededrandom, i2, j2);
if (!iworldreader.getWorldBorder().isChunkInBounds(chunkcoordintpair.x, chunkcoordintpair.z)) { continue; } // Paper
+ // Origami start - seed based feature search doesn't load
+ if (iworldreader instanceof World && ((World) iworldreader).origamiConfig.fastFeatureSearchDontLoad) {
+ return chunkcoordintpair.l();
+ }
+ // Origami end
IChunkAccess ichunkaccess = iworldreader.getChunkAt(chunkcoordintpair.x, chunkcoordintpair.z, ChunkStatus.STRUCTURE_STARTS);
StructureStart<?> structurestart = structuremanager.a(SectionPosition.a(ichunkaccess.getPos(), 0), this, ichunkaccess);
diff --git a/src/main/java/net/minecraft/server/StructureGenerator.java.rej b/src/main/java/net/minecraft/server/StructureGenerator.java.rej
deleted file mode 100644
index 2ae4a20ca763c60c9661661d2ae558bd5b6f79a1..0000000000000000000000000000000000000000
--- a/src/main/java/net/minecraft/server/StructureGenerator.java.rej
+++ /dev/null
@@ -1,13 +0,0 @@
-diff a/src/main/java/net/minecraft/server/StructureGenerator.java b/src/main/java/net/minecraft/server/StructureGenerator.java (rejected hunks)
-@@ -143,6 +143,11 @@ public abstract class StructureGenerator<C extends WorldGenFeatureConfiguration>
- int j2 = i1 + k * l1;
- ChunkCoordIntPair chunkcoordintpair = this.a(structuresettingsfeature, j, seededrandom, i2, j2);
- if (!iworldreader.getWorldBorder().isChunkInBounds(chunkcoordintpair.x, chunkcoordintpair.z)) { continue; } // Paper
-+ // Origami start - seed based feature search doesn't load
-+ if (iworldreader instanceof World && ((World) iworldreader).origamiConfig.fastFeatureSearchDontLoad) {
-+ return chunkcoordintpair.l();
-+ }
-+ // Origami end
- // Origami start - option to only find generated features to not generate new chunks
- IChunkAccess ichunkaccess = iworldreader.getChunkAt(chunkcoordintpair.x, chunkcoordintpair.z, ChunkStatus.STRUCTURE_STARTS, !(iworldreader instanceof World) || !((World) iworldreader).origamiConfig.onlyFindGeneratedFeatures);
- if (ichunkaccess == null) {
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index c0815269be89c2b9d316ccaf8ccfa15beec98cc4..b06264b2315d7fed50946050445117c8aa930b3c 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -96,6 +96,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
public final com.tuinity.tuinity.config.TuinityConfig.WorldConfig tuinityConfig; // Tuinity - Server Config
public final net.pl3x.purpur.PurpurWorldConfig purpurConfig; // Purpur
+ public final de.minebench.origami.OrigamiConfig.WorldConfig origamiConfig; // Origami - World config
public final co.aikar.timings.WorldTimingsHandler timings; // Paper
public static BlockPosition lastPhysicsProblem; // Spigot
@@ -129,6 +130,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
this.paperConfig = new com.destroystokyo.paper.PaperWorldConfig((((WorldDataServer)worlddatamutable).getName()), this.spigotConfig); // Paper
this.tuinityConfig = new com.tuinity.tuinity.config.TuinityConfig.WorldConfig(((WorldDataServer)worlddatamutable).getName()); // Tuinity - Server Config
this.purpurConfig = new net.pl3x.purpur.PurpurWorldConfig((((WorldDataServer)worlddatamutable).getName())); // Purpur
+ this.origamiConfig = new de.minebench.origami.OrigamiConfig.WorldConfig(((WorldDataServer)worlddatamutable).getName()); // Origami
this.chunkPacketBlockController = this.paperConfig.antiXray ? new ChunkPacketBlockControllerAntiXray(this, executor) : ChunkPacketBlockController.NO_OPERATION_INSTANCE; // Paper - Anti-Xray
this.generator = gen;
this.world = new CraftWorld((WorldServer) this, gen, env);
@@ -421,9 +423,9 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
IBlockData iblockdata2 = this.getType(blockposition);
if ((i & 128) == 0 && iblockdata2 != iblockdata1 && (iblockdata2.b((IBlockAccess) this, blockposition) != iblockdata1.b((IBlockAccess) this, blockposition) || iblockdata2.f() != iblockdata1.f() || iblockdata2.e() || iblockdata1.e())) {
- this.getMethodProfiler().enter("queueCheckLight");
+ //this.getMethodProfiler().enter("queueCheckLight"); // Akarin - remove caller
this.getChunkProvider().getLightEngine().a(blockposition);
- this.getMethodProfiler().exit();
+ //this.getMethodProfiler().exit(); // Akarin - remove caller
}
/*
diff --git a/src/main/java/net/minecraft/server/World.java.rej b/src/main/java/net/minecraft/server/World.java.rej
deleted file mode 100644
index 313aa8f7d47c53a6a0130994c9d61d7c073c95c6..0000000000000000000000000000000000000000
--- a/src/main/java/net/minecraft/server/World.java.rej
+++ /dev/null
@@ -1,18 +0,0 @@
-diff a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java (rejected hunks)
-@@ -94,6 +94,8 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
- public final com.destroystokyo.paper.PaperWorldConfig paperConfig; // Paper
- public final ChunkPacketBlockController chunkPacketBlockController; // Paper - Anti-Xray
-
-+ public final de.minebench.origami.OrigamiConfig.WorldConfig origamiConfig; // Origami - World Config
-+
- public final co.aikar.timings.WorldTimingsHandler timings; // Paper
- public static BlockPosition lastPhysicsProblem; // Spigot
- private org.spigotmc.TickLimiter entityLimiter;
-@@ -124,6 +126,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
- protected World(WorldDataMutable worlddatamutable, ResourceKey<World> resourcekey, final DimensionManager dimensionmanager, Supplier<GameProfilerFiller> supplier, boolean flag, boolean flag1, long i, org.bukkit.generator.ChunkGenerator gen, org.bukkit.World.Environment env, java.util.concurrent.Executor executor) { // Paper
- this.spigotConfig = new org.spigotmc.SpigotWorldConfig(((WorldDataServer) worlddatamutable).getName()); // Spigot
- this.paperConfig = new com.destroystokyo.paper.PaperWorldConfig((((WorldDataServer)worlddatamutable).getName()), this.spigotConfig); // Paper
-+ this.origamiConfig = new de.minebench.origami.OrigamiConfig.WorldConfig(((WorldDataServer)worlddatamutable).getName()); // Origami - World Config
- this.chunkPacketBlockController = this.paperConfig.antiXray ? new ChunkPacketBlockControllerAntiXray(this, executor) : ChunkPacketBlockController.NO_OPERATION_INSTANCE; // Paper - Anti-Xray
- this.generator = gen;
- this.world = new CraftWorld((WorldServer) this, gen, env);
diff --git a/src/main/java/net/minecraft/server/WorldNBTStorage.java b/src/main/java/net/minecraft/server/WorldNBTStorage.java
index d627a25830646d8808950238f451fa0adbab4ec6..a959672f5857b987001252c3fd7ace9e83e07c9b 100644
--- a/src/main/java/net/minecraft/server/WorldNBTStorage.java
+++ b/src/main/java/net/minecraft/server/WorldNBTStorage.java
@@ -61,7 +61,7 @@ public class WorldNBTStorage {
}
// Spigot End
- if (file.exists() && file.isFile()) {
+ if (normalFile) { // Akarin - avoid double I/O operation
nbttagcompound = NBTCompressedStreamTools.a(file);
}
// Spigot Start
diff --git a/src/main/java/net/minecraft/server/WorldNBTStorage.java.rej b/src/main/java/net/minecraft/server/WorldNBTStorage.java.rej
deleted file mode 100644
index 3a35169eaf680c45fe42922eb5f0014fa422c31c..0000000000000000000000000000000000000000
--- a/src/main/java/net/minecraft/server/WorldNBTStorage.java.rej
+++ /dev/null
@@ -1,10 +0,0 @@
-diff a/src/main/java/net/minecraft/server/WorldNBTStorage.java b/src/main/java/net/minecraft/server/WorldNBTStorage.java (rejected hunks)
-@@ -62,7 +63,7 @@ public class WorldNBTStorage {
- }
- // Spigot End
-
-- if (file.exists() && file.isFile()) {
-+ if (normalFile) { // Akarin - avoid double I/O operation
- nbttagcompound = NBTCompressedStreamTools.a((InputStream) (new FileInputStream(file)));
- }
- // Spigot Start
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
index ba04eefa0c0017e3b321187dfae85c6a89be57c5..7c60ad59e7dbb2fd4089f762c9bbe1cb5f7b6054 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java
+++ b/src/main/java/net/minecraft/server/WorldServer.java
@@ -868,11 +868,11 @@ public class WorldServer extends World implements GeneratorAccessSeed {
this.P();
this.b();
- gameprofilerfiller.exitEnter("chunkSource");
+ //gameprofilerfiller.exitEnter("chunkSource"); // Akarin - remove caller
this.timings.chunkProviderTick.startTiming(); // Paper - timings
this.getChunkProvider().tick(booleansupplier);
this.timings.chunkProviderTick.stopTiming(); // Paper - timings
- gameprofilerfiller.exitEnter("tickPending");
+ //gameprofilerfiller.exitEnter("tickPending"); // Akarin - remove caller
timings.scheduledBlocks.startTiming(); // Paper
if (!this.isDebugWorld()) {
this.nextTickListBlock.b();
@@ -881,17 +881,17 @@ public class WorldServer extends World implements GeneratorAccessSeed {
timings.scheduledBlocks.stopTiming(); // Paper
// Tuinity - replace logic
- gameprofilerfiller.exitEnter("raid");
+ //gameprofilerfiller.exitEnter("raid"); // Akarin - remove caller
this.timings.raids.startTiming(); // Paper - timings
this.persistentRaid.a();
this.timings.raids.stopTiming(); // Paper - timings
- gameprofilerfiller.exitEnter("blockEvents");
+ //gameprofilerfiller.exitEnter("blockEvents"); // Akarin - remove caller
timings.doSounds.startTiming(); // Spigot
this.aj();
timings.doSounds.stopTiming(); // Spigot
// Tuinity - replace logic
this.ticking = false;
- gameprofilerfiller.exitEnter("entities");
+ //gameprofilerfiller.exitEnter("entities"); // Akarin - remove caller
boolean flag3 = true || !this.players.isEmpty() || !this.getForceLoadedChunks().isEmpty(); // CraftBukkit - this prevents entity cleanup, other issues on servers with no players
if (flag3) {
@@ -1031,7 +1031,7 @@ public class WorldServer extends World implements GeneratorAccessSeed {
int k = chunkcoordintpair.e();
GameProfilerFiller gameprofilerfiller = this.getMethodProfiler();
- gameprofilerfiller.enter("thunder");
+ //gameprofilerfiller.enter("thunder"); // Akarin - remove caller
final BlockPosition.MutableBlockPosition blockposition = this.chunkTickMutablePosition; // Paper - use mutable to reduce allocation rate, final to force compile fail on change
if (!this.paperConfig.disableThunder && flag && this.V() && this.random.nextInt(100000) == 0) { // Paper - Disable thunder
@@ -1271,13 +1271,13 @@ public class WorldServer extends World implements GeneratorAccessSeed {
gameprofilerfiller.a(() -> {
return IRegistry.ENTITY_TYPE.getKey(entity.getEntityType()).toString();
});
- gameprofilerfiller.c("tickNonPassenger");
+ //gameprofilerfiller.c("tickNonPassenger"); // Akarin - remove caller
if (isActive) { // Paper - EAR 2
TimingHistory.activatedEntityTicks++; // Paper
entity.tick();
entity.postTick(); // CraftBukkit
} else { entity.inactiveTick(); } // Paper - EAR 2
- gameprofilerfiller.exit();
+ //gameprofilerfiller.exit(); // Akarin - remove caller
}
this.chunkCheck(entity);
@@ -1319,7 +1319,7 @@ public class WorldServer extends World implements GeneratorAccessSeed {
gameprofilerfiller.a(() -> {
return IRegistry.ENTITY_TYPE.getKey(entity1.getEntityType()).toString();
});
- gameprofilerfiller.c("tickPassenger");
+ //gameprofilerfiller.c("tickPassenger"); // Akarin - remove caller
// Paper start - EAR 2
if (isActive) {
entity1.passengerTick();
@@ -1330,7 +1330,7 @@ public class WorldServer extends World implements GeneratorAccessSeed {
entity.syncPositionOf(entity1);
}
// Paper end - EAR 2
- gameprofilerfiller.exit();
+ //gameprofilerfiller.exit(); // Akarin - remove caller
}
this.chunkCheck(entity1);
diff --git a/src/main/java/net/minecraft/server/WorldServer.java.rej b/src/main/java/net/minecraft/server/WorldServer.java.rej
deleted file mode 100644
index 72e1528c1250a4b59abed862c8ccb2507a66c862..0000000000000000000000000000000000000000
--- a/src/main/java/net/minecraft/server/WorldServer.java.rej
+++ /dev/null
@@ -1,70 +0,0 @@
-diff a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java (rejected hunks)
-@@ -887,11 +887,11 @@ public class WorldServer extends World implements GeneratorAccessSeed {
-
- this.N();
- this.b();
-- gameprofilerfiller.exitEnter("chunkSource");
-+ //gameprofilerfiller.exitEnter("chunkSource"); // Akarin - remove caller
- this.timings.chunkProviderTick.startTiming(); // Paper - timings
- this.getChunkProvider().tick(booleansupplier);
- this.timings.chunkProviderTick.stopTiming(); // Paper - timings
-- gameprofilerfiller.exitEnter("tickPending");
-+ //gameprofilerfiller.exitEnter("tickPending"); // Akarin - remove caller
- timings.scheduledBlocks.startTiming(); // Paper
- if (!this.isDebugWorld()) {
- this.nextTickListBlock.b();
-@@ -900,17 +900,17 @@ public class WorldServer extends World implements GeneratorAccessSeed {
- timings.scheduledBlocks.stopTiming(); // Paper
-
- // Tuinity - replace logic
-- gameprofilerfiller.exitEnter("raid");
-+ //gameprofilerfiller.exitEnter("raid"); // Akarin - remove caller
- this.timings.raids.startTiming(); // Paper - timings
- this.persistentRaid.a();
- this.timings.raids.stopTiming(); // Paper - timings
-- gameprofilerfiller.exitEnter("blockEvents");
-+ //gameprofilerfiller.exitEnter("blockEvents"); // Akarin - remove caller
- timings.doSounds.startTiming(); // Spigot
- this.ah();
- timings.doSounds.stopTiming(); // Spigot
- // Tuinity - replace logic
- this.ticking = false;
-- gameprofilerfiller.exitEnter("entities");
-+ //gameprofilerfiller.exitEnter("entities"); // Akarin - remove caller
- boolean flag3 = true || !this.players.isEmpty() || !this.getForceLoadedChunks().isEmpty(); // CraftBukkit - this prevents entity cleanup, other issues on servers with no players
-
- if (flag3) {
-@@ -1049,7 +1049,7 @@ public class WorldServer extends World implements GeneratorAccessSeed {
- int k = chunkcoordintpair.e();
- GameProfilerFiller gameprofilerfiller = this.getMethodProfiler();
-
-- gameprofilerfiller.enter("thunder");
-+ //gameprofilerfiller.enter("thunder"); // Akarin - remove caller
- final BlockPosition.MutableBlockPosition blockposition = this.chunkTickMutablePosition; // Paper - use mutable to reduce allocation rate, final to force compile fail on change
-
- if (!this.paperConfig.disableThunder && flag && this.T() && this.random.nextInt(100000) == 0) { // Paper - Disable thunder
-@@ -1284,10 +1284,10 @@ public class WorldServer extends World implements GeneratorAccessSeed {
- gameprofilerfiller.a(() -> {
- return IRegistry.ENTITY_TYPE.getKey(entity.getEntityType()).toString();
- });
-- gameprofilerfiller.c("tickNonPassenger");
-+ //gameprofilerfiller.c("tickNonPassenger"); // Akarin - remove caller
- entity.tick();
- entity.postTick(); // CraftBukkit
-- gameprofilerfiller.exit();
-+ //gameprofilerfiller.exit(); // Akarin - remove caller
- }
-
- this.chunkCheck(entity);
-@@ -1325,9 +1325,9 @@ public class WorldServer extends World implements GeneratorAccessSeed {
- gameprofilerfiller.a(() -> {
- return IRegistry.ENTITY_TYPE.getKey(entity1.getEntityType()).toString();
- });
-- gameprofilerfiller.c("tickPassenger");
-+ //gameprofilerfiller.c("tickPassenger"); // Akarin - remove caller
- entity1.passengerTick();
-- gameprofilerfiller.exit();
-+ //gameprofilerfiller.exit(); // Akarin - remove caller
- }
-
- this.chunkCheck(entity1);
diff --git a/src/main/java/net/pl3x/purpur/PurpurConfig.java b/src/main/java/net/pl3x/purpur/PurpurConfig.java
index 4a7285bd8e9ba3b7ad94c67c1880cc216cea5bc9..75a1524791923864f325100c0e9ed3fa8f187247 100644
--- a/src/main/java/net/pl3x/purpur/PurpurConfig.java
+++ b/src/main/java/net/pl3x/purpur/PurpurConfig.java
@@ -129,11 +129,6 @@ public class PurpurConfig {
return config.getString(path, config.getString(path));
}
- public static String timingsUrl = "https://timings.pl3x.net";
- private static void timingsSettings() {
- timingsUrl = getString("settings.timings.url", timingsUrl);
- }
-
public static double laggingThreshold = 19.0D;
private static void tickLoopSettings() {
laggingThreshold = getDouble("settings.lagging-threshold", laggingThreshold);
diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
index 361f7857e461578e90cb71e15027dadaf794cb69..9fd735bb4e5590be1eec958f10acb76abb719dc1 100644
--- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
+++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
@@ -1,7 +1,14 @@
package net.pl3x.purpur;
+import java.util.ArrayList;
+import java.util.HashSet;
import org.bukkit.configuration.ConfigurationSection;
import java.util.List;
+import java.util.Set;
+import net.minecraft.server.Block;
+import net.minecraft.server.IRegistry;
+import net.minecraft.server.MinecraftKey;
+
import static net.pl3x.purpur.PurpurConfig.log;
public class PurpurWorldConfig {
@@ -56,4 +63,114 @@ public class PurpurWorldConfig {
PurpurConfig.config.addDefault("world-settings.default." + path, def);
return PurpurConfig.config.getString("world-settings." + worldName + "." + path, PurpurConfig.config.getString("world-settings.default." + path));
}
+
+ public int villagerBrainTicks = 1;
+ public boolean villagerUseBrainTicksOnlyWhenLagging = true;
+ public boolean villagerCanBeLeashed = false;
+ private void villagerSettings() {
+ villagerBrainTicks = getInt("mobs.villager.brain-ticks", villagerBrainTicks);
+ villagerUseBrainTicksOnlyWhenLagging = getBoolean("mobs.villager.use-brain-ticks-only-when-lagging", villagerUseBrainTicksOnlyWhenLagging);
+ villagerCanBeLeashed = getBoolean("mobs.villager.can-be-leashed", villagerCanBeLeashed);
+ }
+
+ public boolean villagerTraderCanBeLeashed = false;
+ private void villagerTraderSettings() {
+ villagerTraderCanBeLeashed = getBoolean("mobs.wandering_trader.can-be-leashed", villagerTraderCanBeLeashed);
+ }
+
+ public boolean saveProjectilesToDisk = true;
+ public boolean milkCuresBadOmen = true;
+ public boolean persistentTileEntityDisplayNames = false;
+ private void miscGameplayMechanicsSettings() {
+ saveProjectilesToDisk = getBoolean("gameplay-mechanics.save-projectiles-to-disk", saveProjectilesToDisk);
+ milkCuresBadOmen = getBoolean("gameplay-mechanics.milk-cures-bad-omen", milkCuresBadOmen);
+ persistentTileEntityDisplayNames = getBoolean("gameplay-mechanics.persistent-tileentity-display-names-and-lore", persistentTileEntityDisplayNames);
+ }
+
+ public boolean anvilAllowColors = false;
+ private void anvilSettings() {
+ anvilAllowColors = getBoolean("blocks.anvil.allow-colors", anvilAllowColors);
+ }
+
+ public int cowFeedMushrooms = 0;
+ private void cowSettings() {
+ cowFeedMushrooms = getInt("mobs.cow.feed-mushrooms-for-mooshroom", cowFeedMushrooms);
+ }
+
+ public boolean snowGolemDropsPumpkin = false;
+ public boolean snowGolemPutPumpkinBack = false;
+ private void snowGolemSettings() {
+ snowGolemDropsPumpkin = getBoolean("mobs.snow_golem.drop-pumpkin-when-sheared", snowGolemDropsPumpkin);
+ snowGolemPutPumpkinBack = getBoolean("mobs.snow_golem.pumpkin-can-be-added-back", snowGolemPutPumpkinBack);
+ }
+
+ public boolean farmlandGetsMoistFromBelow = false;
+ private void farmlandSettings() {
+ farmlandGetsMoistFromBelow = getBoolean("blocks.farmland.gets-moist-from-below", farmlandGetsMoistFromBelow);
+ }
+
+ public int entityLifeSpan = 0;
+ private void entitySettings() {
+ entityLifeSpan = getInt("gameplay-mechanics.entity-lifespan", entityLifeSpan);
+ }
+
+ public boolean squidImmuneToEAR = true;
+ public double squidOffsetWaterCheck = 0.0D;
+ private void squidSettings() {
+ squidImmuneToEAR = getBoolean("mobs.squid.immune-to-EAR", squidImmuneToEAR);
+ squidOffsetWaterCheck = getDouble("mobs.squid.water-offset-check", squidOffsetWaterCheck);
+ }
+
+ public Set<Block> noTickBlocks = new HashSet<>();
+ private void noTickBlocks() {
+ getList("blocks.no-tick", new ArrayList<>()).forEach(key -> {
+ Block block = IRegistry.BLOCK.get(new MinecraftKey(key.toString()));
+ if (!block.getBlockData().isAir()) {
+ noTickBlocks.add(block);
+ }
+ });
+ }
+
+ public boolean dolphinDisableTreasureSearching = false;
+ private void dolphinSettings() {
+ dolphinDisableTreasureSearching = getBoolean("mobs.dolphin.disable-treasure-searching", dolphinDisableTreasureSearching);
+ }
+
+ public boolean turtleEggsBreakFromExpOrbs = true;
+ public boolean turtleEggsBreakFromItems = true;
+ public boolean turtleEggsBreakFromMinecarts = true;
+ private void turtleEggSettings() {
+ turtleEggsBreakFromExpOrbs = getBoolean("blocks.turtle_egg.break-from-exp-orbs", turtleEggsBreakFromExpOrbs);
+ turtleEggsBreakFromItems = getBoolean("blocks.turtle_egg.break-from-items", turtleEggsBreakFromItems);
+ turtleEggsBreakFromMinecarts = getBoolean("blocks.turtle_egg.break-from-minecarts", turtleEggsBreakFromMinecarts);
+ }
+
+ public int dragonFireballDespawnRate = -1;
+ public int eggDespawnRate = -1;
+ public int enderPearlDespawnRate = -1;
+ public int expBottleDespawnRate = -1;
+ public int fireworkDespawnRate = -1;
+ public int fishingHookDespawnRate = -1;
+ public int largeFireballDespawnRate = -1;
+ public int llamaSpitDespawnRate = -1;
+ public int potionDespawnRate = -1;
+ public int shulkerBulletDespawnRate = -1;
+ public int smallFireballDespawnRate = -1;
+ public int snowballDespawnRate = -1;
+ public int witherSkullDespawnRate = -1;
+ private void projectileDespawnRateSettings() {
+ dragonFireballDespawnRate = getInt("gameplay-mechanics.projectile-despawn-rates.dragon_fireball", dragonFireballDespawnRate);
+ eggDespawnRate = getInt("gameplay-mechanics.projectile-despawn-rates.egg", eggDespawnRate);
+ enderPearlDespawnRate = getInt("gameplay-mechanics.projectile-despawn-rates.ender_pearl", enderPearlDespawnRate);
+ expBottleDespawnRate = getInt("gameplay-mechanics.projectile-despawn-rates.experience_bottle", expBottleDespawnRate);
+ fireworkDespawnRate = getInt("gameplay-mechanics.projectile-despawn-rates.firework_rocket", fireworkDespawnRate);
+ fishingHookDespawnRate = getInt("gameplay-mechanics.projectile-despawn-rates.fishing_bobber", fishingHookDespawnRate);
+ largeFireballDespawnRate = getInt("gameplay-mechanics.projectile-despawn-rates.fireball", largeFireballDespawnRate);
+ llamaSpitDespawnRate = getInt("gameplay-mechanics.projectile-despawn-rates.llama_spit", llamaSpitDespawnRate);
+ potionDespawnRate = getInt("gameplay-mechanics.projectile-despawn-rates.potion", potionDespawnRate);
+ shulkerBulletDespawnRate = getInt("gameplay-mechanics.projectile-despawn-rates.shulker_bullet", shulkerBulletDespawnRate);
+ smallFireballDespawnRate = getInt("gameplay-mechanics.projectile-despawn-rates.small_fireball", smallFireballDespawnRate);
+ snowballDespawnRate = getInt("gameplay-mechanics.projectile-despawn-rates.snowball", snowballDespawnRate);
+ witherSkullDespawnRate = getInt("gameplay-mechanics.projectile-despawn-rates.wither_skull", witherSkullDespawnRate);
+ }
}
diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java.rej b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java.rej
deleted file mode 100644
index c32fd03bad569d36b2225e89e9b550b08f83e4e2..0000000000000000000000000000000000000000
--- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java.rej
+++ /dev/null
@@ -1,17 +0,0 @@
-diff a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java (rejected hunks)
-@@ -182,6 +182,7 @@ public class PurpurWorldConfig {
- public boolean fixClimbingBypassingCrammingRule = false;
- public boolean milkCuresBadOmen = true;
- public boolean saveProjectilesToDisk = true;
-+ public boolean persistentTileEntityDisplayNames = false;
- public double tridentLoyaltyVoidReturnHeight = 0.0D;
- public double voidDamageHeight = -64.0D;
- public int raidCooldownSeconds = 0;
-@@ -194,6 +195,7 @@ public class PurpurWorldConfig {
- fixClimbingBypassingCrammingRule = getBoolean("gameplay-mechanics.fix-climbing-bypassing-cramming-rule", fixClimbingBypassingCrammingRule);
- milkCuresBadOmen = getBoolean("gameplay-mechanics.milk-cures-bad-omen", milkCuresBadOmen);
- saveProjectilesToDisk = getBoolean("gameplay-mechanics.save-projectiles-to-disk", saveProjectilesToDisk);
-+ persistentTileEntityDisplayNames = getBoolean("gameplay-mechanics.persistent-tileentity-display-names-and-lore", persistentTileEntityDisplayNames);
- tridentLoyaltyVoidReturnHeight = getDouble("gameplay-mechanics.trident-loyalty-void-return-height", tridentLoyaltyVoidReturnHeight);
- voidDamageHeight = getDouble("gameplay-mechanics.void-damage-height", voidDamageHeight);
- raidCooldownSeconds = getInt("gameplay-mechanics.raid-cooldown-seconds", raidCooldownSeconds);
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 3cc0feac5e69e70a996d45696682f1b638c23eec..ed594eb6c8102b0ce1b52f2d2db714aa9fdeffd0 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -858,6 +858,7 @@ public final class CraftServer implements Server {
com.destroystokyo.paper.PaperConfig.init((File) console.options.valueOf("paper-settings")); // Paper
com.tuinity.tuinity.config.TuinityConfig.init((File) console.options.valueOf("tuinity-settings")); // Tuinity - Server Config
net.pl3x.purpur.PurpurConfig.init((File) console.options.valueOf("purpur-settings")); // Purpur
+ de.minebench.origami.OrigamiConfig.init((File) console.options.valueOf("origami-settings")); // Origami
for (WorldServer world : console.getWorlds()) {
world.worldDataServer.setDifficulty(config.difficulty);
world.setSpawnFlags(config.spawnMonsters, config.spawnAnimals);
@@ -894,6 +895,7 @@ public final class CraftServer implements Server {
world.paperConfig.init(); // Paper
world.tuinityConfig.init(); // Tuinity - Server Config
world.purpurConfig.init(); // Purpur
+ world.origamiConfig.init(); // Origami
}
Plugin[] pluginClone = pluginManager.getPlugins().clone(); // Paper
@@ -2279,6 +2281,13 @@ public final class CraftServer implements Server {
}
// Purpur end
+ // Origami start
+ @Override
+ public YamlConfiguration getOrigamiConfig() {
+ return de.minebench.origami.OrigamiConfig.config;
+ }
+ // Origami end
+
@Override
public void restart() {
org.spigotmc.RestartCommand.restart();
@@ -2416,4 +2425,11 @@ public final class CraftServer implements Server {
return mobGoals;
}
// Paper end
+
+ // Purpur start
+ @Override
+ public boolean isLagging() {
+ return getServer().lagging;
+ }
+ // Purpur end
}
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java.rej b/src/main/java/org/bukkit/craftbukkit/CraftServer.java.rej
deleted file mode 100644
index 44b67715e6c1b113b4651a965e8006e9a10a05bf..0000000000000000000000000000000000000000
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java.rej
+++ /dev/null
@@ -1,12 +0,0 @@
-diff a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java (rejected hunks)
-@@ -2421,5 +2421,10 @@ public final class CraftServer implements Server {
- public String getServerName() {
- return getProperties().serverName;
- }
-+
-+ @Override
-+ public boolean isLagging() {
-+ return getServer().lagging;
-+ }
- // Purpur end
- }
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
index 16fd48c617ebced744966fd1b4cd155c20774ef4..b3651d69720cd40593d0febb58380203972ca87b 100644
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
@@ -154,6 +154,14 @@ public class Main {
.describedAs("Yml file");
// Purpur end
+ // Origami start
+ acceptsAll(asList("origami", "origami-settings"), "File for origami settings")
+ .withRequiredArg()
+ .ofType(File.class)
+ .defaultsTo(new File("origami.yml"))
+ .describedAs("Yml file");
+ // Origami end
+
// Paper start
acceptsAll(asList("server-name"), "Name of the server")
.withRequiredArg()
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java.rej b/src/main/java/org/bukkit/craftbukkit/Main.java.rej
deleted file mode 100644
index 27a6c3279b77f24edcea24f3a01559145d2f4da1..0000000000000000000000000000000000000000
--- a/src/main/java/org/bukkit/craftbukkit/Main.java.rej
+++ /dev/null
@@ -1,16 +0,0 @@
-diff a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java (rejected hunks)
-@@ -139,6 +139,14 @@ public class Main {
- .describedAs("Yml file");
- // Paper end
-
-+ // Origami Start - Server Config
-+ acceptsAll(asList("origami", "origami-settings"), "File for origami settings")
-+ .withRequiredArg()
-+ .ofType(File.class)
-+ .defaultsTo(new File("origami.yml"))
-+ .describedAs("Yml file");
-+ // Origami end - Server Config
-+
- // Paper start
- acceptsAll(asList("server-name"), "Name of the server")
- .withRequiredArg()