mirror of
https://github.com/YatopiaMC/Yatopia.git
synced 2024-11-26 04:25:39 +01:00
43e33eb332
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: e76c58e Merge branch 'master' of https://github.com/Spottedleaf/Tuinity into ver/1.16.4 8954b61 Updated Upstream (Paper) Origami Changes: 2cff647 Update Paper Purpur Changes: 4a9c016 [ci-skip] Don't cancel TPSBar task if it wasn't started c32e46e Movement options for armour stands (#140) 9370140 Updated Upstream (Paper) f74bcbd [ci-skip] Update license info in readme 299b43a [ci-skip] Rebuild patches 03365bb Farmland trampling changes (#138) 984a268 Add StructureGenerateEvent (#137) 15d23a1 Add EntityTeleportHinderedEvent (#136) 8795c74 [ci-skip] Update Gradle to 6.8 e9be2a2 [ci-skip] change image link to purpur site d09cf68 [ci-skip] Stop patching symptoms. Patch the root cause dd65bd1 Fix typo 7a6e6ec Updated Upstream (Paper) bf7e290 Hide server-ip from timings be50f97 move timings config to the right place (#130) f1390cd Ignore blocks above Note Blocks (#135) c50344d Resolves #132 Add mobGriefing bypass to everything else bba9cff [ci-skip] Update README.md AirplaneLite Changes: 36cc1d3 Updated Upstream (Tuinity) bc0fef0 Don't spawn lightning on chunk load 15c06b8 Fix other comments 47f98d6 License information 4705af8 Fix comments 432cf4b Optimize random calls in chunk ticking
47 lines
2.8 KiB
Diff
47 lines
2.8 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Ivan Pekov <ivan@mrivanplays.com>
|
|
Date: Wed, 23 Dec 2020 08:42:18 +0200
|
|
Subject: [PATCH] Configurable enchanting table tick
|
|
|
|
Also don't tick blockentity beehive if there are no bees in it.
|
|
This patch is a leftover from the original tile entity optimisations, which was majorly flawed.
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/TileEntityBeehive.java b/src/main/java/net/minecraft/server/TileEntityBeehive.java
|
|
index a60e0872d51aeb330bd5334e35f18ad0ed63834e..70239fa5ac05464606ad917b3c3498156c12c536 100644
|
|
--- a/src/main/java/net/minecraft/server/TileEntityBeehive.java
|
|
+++ b/src/main/java/net/minecraft/server/TileEntityBeehive.java
|
|
@@ -286,6 +286,7 @@ public class TileEntityBeehive extends TileEntity implements ITickable {
|
|
|
|
@Override
|
|
public void tick() {
|
|
+ if (this.bees.size() == 0) { return; } // Yatopia - TE optimizations
|
|
if (!this.world.isClientSide) {
|
|
this.y();
|
|
BlockPosition blockposition = this.getPosition();
|
|
diff --git a/src/main/java/net/minecraft/server/TileEntityEnchantTable.java b/src/main/java/net/minecraft/server/TileEntityEnchantTable.java
|
|
index 9b0c75332d9815657d96183e51e40cf14ee3ed75..e3de65b58a599b375b3be7470d918038b5379471 100644
|
|
--- a/src/main/java/net/minecraft/server/TileEntityEnchantTable.java
|
|
+++ b/src/main/java/net/minecraft/server/TileEntityEnchantTable.java
|
|
@@ -43,6 +43,7 @@ public class TileEntityEnchantTable extends TileEntity implements INamableTileEn
|
|
|
|
@Override
|
|
public void tick() {
|
|
+ if (!org.yatopiamc.yatopia.server.YatopiaConfig.shouldTickEnchantingTables) { return; } // Yatopia - TE optimizations
|
|
this.j = this.i;
|
|
this.l = this.k;
|
|
EntityHuman entityhuman = this.world.a((double) this.position.getX() + 0.5D, (double) this.position.getY() + 0.5D, (double) this.position.getZ() + 0.5D, 3.0D, false);
|
|
diff --git a/src/main/java/org/yatopiamc/yatopia/server/YatopiaConfig.java b/src/main/java/org/yatopiamc/yatopia/server/YatopiaConfig.java
|
|
index 34b5a087d1d5d84b193adbd756add060a2d49354..2d4fb0a4664578f8d5c23db854eb8f2764724940 100644
|
|
--- a/src/main/java/org/yatopiamc/yatopia/server/YatopiaConfig.java
|
|
+++ b/src/main/java/org/yatopiamc/yatopia/server/YatopiaConfig.java
|
|
@@ -283,4 +283,9 @@ public class YatopiaConfig {
|
|
checkVehicleMovedQuickly = getBoolean("settings.checks.vehicle-moved-quickly", checkVehicleMovedQuickly);
|
|
checkVehicleMovedWrongly = getBoolean("settings.checks.vehicle-moved-wrongly", checkVehicleMovedWrongly);
|
|
}
|
|
+
|
|
+ public static boolean shouldTickEnchantingTables = false;
|
|
+ private static void tickEnchantingTables() {
|
|
+ shouldTickEnchantingTables = getBoolean("settings.tick.enchanting-tables", shouldTickEnchantingTables);
|
|
+ }
|
|
}
|