mirror of
https://github.com/YatopiaMC/Yatopia.git
synced 2024-11-29 14:15:43 +01:00
7f24790a35
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: cf37529 Updated Upstream (Paper) EMC Changes: 27282006 Updated Paper 456edfa4 One more try to fix more chunks on reload Purpur Changes: 45d5e9a Fix dolphin spit and phantom flames 9e1b8e7 Clean up teleport outside border patch Add sleeping, inventory, and toWorld checks 8428580 [ci-skip] Add 'fast' argument to './purpur jar' to speed up jenkins build time cea486c Updated Upstream (Paper) 6cd244c Fix infinite furnaces triggering without lava source a989361 Fix infinite furnaces leaving empty buckets 6cf1672 Add config option for whether Nether Wart farming Villagers should throw extra Nether Warts at other Villagers 07d4056 Add toggle for Zombified Piglin death always counting as a player kill when angry (Zombified Piglin XP farm nerf option) 9935466 Add config option for Cleric Villagers to farm Nether Wart 47a1707 fix typos 6e42ce8 Updated Upstream (Paper) 740b7d2 [ci-skip] Update readme with downloads API info AirplaneLite Changes: 5526dde Add download link to readme
48 lines
2.5 KiB
Diff
48 lines
2.5 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Mykyta Komarnytskyy <nkomarn@hotmail.com>
|
|
Date: Sat, 24 Oct 2020 21:08:17 -0500
|
|
Subject: [PATCH] Configurable criterion triggers
|
|
|
|
This patch adds toggles for three criterion triggers that are called every tick. These can be very unnecessary, and especially in the case of CriterionTriggerEnterBlock, quite heavy.
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
|
|
index 42451ff5b9b345cd549fcbb496fc7bc053935580..1f54ce29006749e59cb4088b260b70596884a45d 100644
|
|
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
|
|
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
|
|
@@ -431,6 +431,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
|
|
|
@Override
|
|
protected void a(IBlockData iblockdata) {
|
|
+ if (org.yatopiamc.yatopia.server.YatopiaConfig.criterionTriggerEnterBlock) // Yatopia
|
|
CriterionTriggers.d.a(this, iblockdata);
|
|
}
|
|
|
|
@@ -573,7 +574,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
|
this.playerConnection.sendPacket(new PacketPlayOutExperience(this.exp, this.expTotal, this.expLevel));
|
|
}
|
|
|
|
- if (this.ticksLived % 20 == 0) {
|
|
+ if (org.yatopiamc.yatopia.server.YatopiaConfig.criterionTriggerLocation && this.ticksLived % 20 == 0) { // Yatopia
|
|
CriterionTriggers.p.a(this);
|
|
}
|
|
|
|
diff --git a/src/main/java/org/yatopiamc/yatopia/server/YatopiaConfig.java b/src/main/java/org/yatopiamc/yatopia/server/YatopiaConfig.java
|
|
index 2e08558eef23d40b3a704250dfe12bb7f4b660f3..5578f5784a87019d3f091173b25b5ec1cc059fd6 100644
|
|
--- a/src/main/java/org/yatopiamc/yatopia/server/YatopiaConfig.java
|
|
+++ b/src/main/java/org/yatopiamc/yatopia/server/YatopiaConfig.java
|
|
@@ -258,4 +258,14 @@ public class YatopiaConfig {
|
|
private static void intervals() {
|
|
playerTimeStatisticsInterval = Math.max(1, getInt("settings.intervals.player-time-statistics", 1));
|
|
}
|
|
+
|
|
+ public static boolean criterionTriggerLocation = true;
|
|
+ public static boolean criterionTriggerEnterBlock = true;
|
|
+ public static boolean criterionTriggerTick = true;
|
|
+ private static void criterionTriggers() {
|
|
+ criterionTriggerLocation = getBoolean("settings.criterion-triggers.location", true);
|
|
+ criterionTriggerEnterBlock = getBoolean("settings.criterion-triggers.enter-block", true);
|
|
+ criterionTriggerTick = getBoolean("settings.criterion-triggers.tick", true);
|
|
+ }
|
|
+
|
|
}
|