Yatopia/patches/server/0001-Yatopia-Server-Fixes.patch
Ivan Pekov 830bb6b70d
Updated Upstream and Sidestream(s) (Tuinity/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:
f559558 Updated Upstream (Paper)

Purpur Changes:
1eaac71 Updated Upstream (Paper & Tuinity)
137523f Fix allowing color codes in signs
2020-11-08 18:59:56 +02:00

1900 lines
106 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: YatopiaMC <yatopiamc@gmail.com>
Date: Sun, 25 Oct 2020 12:23:35 -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 fb4a5ca220c9ef0916ecd4249a0ec7d1d8024ef1..899ca7bf676ccd874e317ba7e19b733fbf444baa 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 426ea234638270358fdf9337ea373ab680f37326..6e4e183c3169a484f482d96ba3441eb16c2053d9 100644
--- a/src/main/java/net/minecraft/server/ChunkProviderServer.java
+++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java
@@ -740,11 +740,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")));
@@ -973,11 +973,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
@@ -1040,15 +1040,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 82dc54fdb927f57bfb7f01fcd36f6d981e250fdc..8fc4d3d250367cc2d141b110833cb1e3572bd7f0 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 af() {
@@ -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() {
@@ -2418,7 +2418,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
@@ -2428,7 +2428,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;
@@ -2815,14 +2815,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) {
@@ -2855,10 +2855,10 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
}
this.bN();
- 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 f6797925365836b6c2d3d2c48c746a4d58e28bf3..3f50afcaec6d1523a5baca4102a08ee058b89dd9 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 66a82793860986ac7b9a1e9d278b71552978933d..bee5b047a5b44a7eb1ea860b5573d8a04f788580 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
@@ -785,30 +785,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 009ac0fa6474b89e69db11377202e59cdf4a61d6..9ae1b9b40324da3d7a35bf8bbd6b3bea242f2b73 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 cN() {
@@ -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();
- this.world.getMethodProfiler().enter("jump");
+ //this.world.getMethodProfiler().exit(); // Akarin - remove caller
+ //this.world.getMethodProfiler().enter("jump"); // Akarin - remove caller
if (this.jumping && this.cT()) {
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.dO() && this.aG()) {
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 ca7f9dc54ed2e58f521613b5d8027494bd20edd2..b54ead67c3b7634fb252436b6902b9a4322a7966 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 56677b8bf45af217c0a4a50fc7aea76ca012cbd7..5ba8313c196bf4ffed6c22e1461a8219fbe2f2d9 100644
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
@@ -919,7 +919,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
@@ -942,8 +942,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
@@ -960,7 +960,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 7f75be31cba2e3c97afad94c3c7d8196bb468040..559edd9df30c700806b829aa0e09453e0e289319 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 41aa0d32c9e7f9c67ebd2e724304253b8fc8a09b..648a7d48162b2a2712382ed7055ccaf97c200daf 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..b7dfa73d4119fe1195412e9ce60fe982ffc42c55 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)) {
+ this.tickDespawnCounter();
+ }
+ // 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 21fec686282d2d2190e26e541d5b2b4d3d03c730..12922030c7ab0267018158d3fccb0eeedc370b7c 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -1299,7 +1299,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 19d98e9eaa25968b49bab6d3d26974c8ae6f56f5..86533746815701288b4dcc85a429c8bcf1b25cb5 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
@@ -157,6 +158,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);
@@ -449,9 +451,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 2efe5db22422b25d0237744fa384f8974a52fbc2..1f77b251d7e7b0f023793cbf0876fc067caa75c1 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 78dc3c38def9cadd5fe504b1c66470e444a433c4..fbe1d388fa721e09ab63bed618bc20b958c652fe 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java
+++ b/src/main/java/net/minecraft/server/WorldServer.java
@@ -872,9 +872,9 @@ public class WorldServer extends World implements GeneratorAccessSeed {
// Tuinity end - optimise checkDespawn
this.ticking = true;
- gameprofilerfiller.enter("world border");
+ //gameprofilerfiller.enter("world border"); // Akarin - remove caller
this.getWorldBorder().s();
- gameprofilerfiller.exitEnter("weather");
+ //gameprofilerfiller.exitEnter("weather"); // Akarin - remove caller
boolean flag = this.isRaining();
if (this.getDimensionManager().hasSkyLight()) {
@@ -1007,11 +1007,11 @@ public class WorldServer extends World implements GeneratorAccessSeed {
this.Q();
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();
@@ -1020,17 +1020,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.ak();
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) {
@@ -1170,7 +1170,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.W() && this.random.nextInt(100000) == 0) { // Paper - Disable thunder
@@ -1410,13 +1410,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);
@@ -1458,7 +1458,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();
@@ -1469,7 +1469,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);
@@ -1491,7 +1491,7 @@ public class WorldServer extends World implements GeneratorAccessSeed {
public void chunkCheck(Entity entity) {
if (entity.cl()) {
- this.getMethodProfiler().enter("chunkCheck");
+ //this.getMethodProfiler().enter("chunkCheck"); // Akarin - remove caller
int i = MathHelper.floor(entity.locX() / 16.0D);
int j = Math.min(15, Math.max(0, MathHelper.floor(entity.locY() / 16.0D))); // Paper - stay consistent with chunk add/remove behavior
int k = MathHelper.floor(entity.locZ() / 16.0D);
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 8aa3dd3a0a0db575292be8d9c73bb3083849622b..0000000000000000000000000000000000000000
--- a/src/main/java/net/minecraft/server/WorldServer.java.rej
+++ /dev/null
@@ -1,91 +0,0 @@
-diff a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java (rejected hunks)
-@@ -752,9 +752,9 @@ public class WorldServer extends World implements GeneratorAccessSeed {
- GameProfilerFiller gameprofilerfiller = this.getMethodProfiler();
-
- this.ticking = true;
-- gameprofilerfiller.enter("world border");
-+ //gameprofilerfiller.enter("world border"); // Akarin - remove caller
- this.getWorldBorder().s();
-- gameprofilerfiller.exitEnter("weather");
-+ //gameprofilerfiller.exitEnter("weather"); // Akarin - remove caller
- boolean flag = this.isRaining();
-
- if (this.getDimensionManager().hasSkyLight()) {
-@@ -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);
-@@ -1349,7 +1349,7 @@ public class WorldServer extends World implements GeneratorAccessSeed {
-
- public void chunkCheck(Entity entity) {
- if (entity.ck()) {
-- this.getMethodProfiler().enter("chunkCheck");
-+ //this.getMethodProfiler().enter("chunkCheck"); // Akarin - remove caller
- int i = MathHelper.floor(entity.locX() / 16.0D);
- int j = Math.min(15, Math.max(0, MathHelper.floor(entity.locY() / 16.0D))); // Paper - stay consistent with chunk add/remove behavior
- int k = MathHelper.floor(entity.locZ() / 16.0D);
diff --git a/src/main/java/net/pl3x/purpur/PurpurConfig.java b/src/main/java/net/pl3x/purpur/PurpurConfig.java
index 31f918778317f05bd5b09f4a8ee55bb4b71defd1..cb568bd17f4ac650f20859d2ac8d430bc928d718 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);
@@ -172,4 +167,14 @@ public class PurpurConfig {
private static void fixItemPositionDesync() {
fixItemPositionDesync = getBoolean("settings.fix-item-position-desync", fixItemPositionDesync);
}
+
+ public static boolean allowInfinityMending = false;
+ private static void enchantmentSettings() {
+ if (version < 5) {
+ boolean oldValue = getBoolean("settings.enchantment.allow-infinite-and-mending-together", false);
+ set("settings.enchantment.allow-infinity-and-mending-together", oldValue);
+ set("settings.enchantment.allow-infinite-and-mending-together", null);
+ }
+ allowInfinityMending = getBoolean("settings.enchantment.allow-infinity-and-mending-together", allowInfinityMending);
+ }
}
diff --git a/src/main/java/net/pl3x/purpur/PurpurConfig.java.rej b/src/main/java/net/pl3x/purpur/PurpurConfig.java.rej
deleted file mode 100644
index 59a692200527a94c1f67d7058579a08803089509..0000000000000000000000000000000000000000
--- a/src/main/java/net/pl3x/purpur/PurpurConfig.java.rej
+++ /dev/null
@@ -1,18 +0,0 @@
-diff a/src/main/java/net/pl3x/purpur/PurpurConfig.java b/src/main/java/net/pl3x/purpur/PurpurConfig.java (rejected hunks)
-@@ -194,6 +194,16 @@ public class PurpurConfig {
- cryingObsidianValidForPortalFrame = getBoolean("settings.blocks.crying_obsidian.valid-for-portal-frame", cryingObsidianValidForPortalFrame);
- }
-
-+ public static boolean allowInfinityMending = false;
-+ private static void enchantmentSettings() {
-+ if (version < 5) {
-+ boolean oldValue = getBoolean("settings.enchantment.allow-infinite-and-mending-together", false);
-+ set("settings.enchantment.allow-infinity-and-mending-together", oldValue);
-+ set("settings.enchantment.allow-infinite-and-mending-together", null);
-+ }
-+ allowInfinityMending = getBoolean("settings.enchantment.allow-infinity-and-mending-together", allowInfinityMending);
-+ }
-+
- public static boolean endermanShortHeight = false;
- private static void entitySettings() {
- endermanShortHeight = getBoolean("settings.entity.enderman.short-height", endermanShortHeight);
diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
index 361f7857e461578e90cb71e15027dadaf794cb69..142120d9fe4b6a621957b8e7b21dd757a8eb38a2 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,123 @@ 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);
+ }
+
+ public boolean infinityWorksWithNormalArrows = true;
+ public boolean infinityWorksWithSpectralArrows = false;
+ public boolean infinityWorksWithTippedArrows = false;
+ private void infinityArrowsSettings() {
+ infinityWorksWithNormalArrows = getBoolean("gameplay-mechanics.infinity-bow.normal-arrows", infinityWorksWithNormalArrows);
+ infinityWorksWithSpectralArrows = getBoolean("gameplay-mechanics.infinity-bow.spectral-arrows", infinityWorksWithSpectralArrows);
+ infinityWorksWithTippedArrows = getBoolean("gameplay-mechanics.infinity-bow.tipped-arrows", infinityWorksWithTippedArrows);
+ }
}
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 f8757d6440fd513860d0c908c011f0833c486be8..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)
-@@ -147,6 +147,15 @@ public class PurpurWorldConfig {
- idleTimeoutUpdateTabList = getBoolean("gameplay-mechanics.player.idle-timeout.update-tab-list", idleTimeoutUpdateTabList);
- }
-
-+ public boolean infinityWorksWithNormalArrows = true;
-+ public boolean infinityWorksWithSpectralArrows = false;
-+ public boolean infinityWorksWithTippedArrows = false;
-+ private void infinityArrowsSettings() {
-+ infinityWorksWithNormalArrows = getBoolean("gameplay-mechanics.infinity-bow.normal-arrows", infinityWorksWithNormalArrows);
-+ infinityWorksWithSpectralArrows = getBoolean("gameplay-mechanics.infinity-bow.spectral-arrows", infinityWorksWithSpectralArrows);
-+ infinityWorksWithTippedArrows = getBoolean("gameplay-mechanics.infinity-bow.tipped-arrows", infinityWorksWithTippedArrows);
-+ }
-+
- public int dragonFireballDespawnRate = -1;
- public int eggDespawnRate = -1;
- public int enderPearlDespawnRate = -1;
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 1ed00fb04c8c8b5a823894a4c3df8f2eca4dd5ad..6c7eabe57ade13d9ac2a2bbfc406fcf73553bd78 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
@@ -2301,6 +2303,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();
@@ -2438,4 +2447,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 1f7601aede1b8460f48ebaae18b9c5b68bc044c8..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)
-@@ -2443,5 +2443,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 210cb10ea75b99d3b5d7b5bce5cea44e3cc0fc20..62012d2b780d3399bd641ca3ca4a4ac127e3bcb5 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()