mirror of
https://github.com/YatopiaMC/Yatopia.git
synced 2024-11-22 18:46:27 +01:00
36030ef022
* Updated Upstream and Sidestream(s) (Paper/Tuinity/Purpur/Airplane/Empirecraft) 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. Paper Changes: 13a476e15 Deprecate PlayerLeaveBedEvent#setBedSpawn 3a1d95c71 [Auto] Updated Upstream (CraftBukkit) d4dcc1a2e Updated Upstream (CraftBukkit) e886d8118 Updated Upstream () 8bc0c6c31 Updated Upstream (CraftBukkit/Spigot) (#5169) 002f65b8b living entity allow attribute registration (#4723) 69a5c67b1 fix calling setSize on dead slimes causing invincibility (fixes #5137) (#5168) Tuinity Changes: 502d57b Updated Upstream (Paper) 87e0cd9 Print exceptions for light scheduling Purpur Changes: 7fc2d31 Updated Upstream (Paper & Tuinity) Airplane Changes: d7d1626 Remove multithreaded entity tracker 677ec73 Ensure armor change event is on main thread c07d254 Fix crash ec7605c Updated Upstream (Tuinity) 2768f39 Update DEAR commit message e975972 Multithreaded entity tracking 98244f9 Updated Upstream (Tuinity) 44b2499 Larger headings 2c4a7fb Merge pull request #6 from Encode42/master cc19631 More changes beba27a Badges and variables 0aeaf12 Improve readability, grammar, etc. Empirecraft Changes: bbc8d297 Updated Paper * Updated Upstream and Sidestream(s) (Paper/Origami) 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. Paper Changes: 3dadd97bb [CI-SKIP] [Meta] Exempt more labels from being marked as stale (#5142) 36a72cad3 [Auto] Updated Upstream (Bukkit/CraftBukkit/Spigot) Origami Changes: 168394a Access config after loading it... fixes velocity auto offline-mode c47b182 Add velocity to automatic offline mode
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 598f78502cd7ad15bc0f678df277f91b3ae376d4..69ef94e887fa9da1b3ddaf0a345fecc49d2866b5 100644
|
|
--- a/src/main/java/net/minecraft/server/TileEntityBeehive.java
|
|
+++ b/src/main/java/net/minecraft/server/TileEntityBeehive.java
|
|
@@ -285,6 +285,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 78decc9c7483f42acb65f342f12fc1d644440822..890247fadf69dabce6d1c23ba887f93ae5121e1e 100644
|
|
--- a/src/main/java/org/yatopiamc/yatopia/server/YatopiaConfig.java
|
|
+++ b/src/main/java/org/yatopiamc/yatopia/server/YatopiaConfig.java
|
|
@@ -260,4 +260,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);
|
|
+ }
|
|
}
|