mirror of
https://github.com/YatopiaMC/Yatopia.git
synced 2024-11-26 04:25:39 +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
44 lines
2.3 KiB
Diff
44 lines
2.3 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: JellySquid <jellysquid+atwork@protonmail.com>
|
|
Date: Sat, 24 Oct 2020 19:36:50 -0500
|
|
Subject: [PATCH] lithium reduce allocations
|
|
|
|
This patch reduces object allocations in several places.
|
|
|
|
Parts of this patch were created for the Lithium project <https://github.com/jellysquid3/lithium-fabric> by JellySquid <jellysquid+atwork@protonmail.com> and 2No2Name <https://github.com/2No2Name> under the GNU LGPLv3 license.
|
|
Portions of this patch that were sourced from Lithium were remapped from Yarn mappings by Mykyta Komarnytskyy <nkomarn@hotmail.com>.
|
|
|
|
Co-authored-by: Mykyta Komarnytskyy <nkomarn@hotmail.com>
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/BlockComposter.java b/src/main/java/net/minecraft/server/BlockComposter.java
|
|
index 55a5999080b831217b88ed3657e95218fe982c18..8025b5d258fc761f1287a395889e352beb105ad7 100644
|
|
--- a/src/main/java/net/minecraft/server/BlockComposter.java
|
|
+++ b/src/main/java/net/minecraft/server/BlockComposter.java
|
|
@@ -305,7 +305,7 @@ public class BlockComposter extends Block implements IInventoryHolder {
|
|
|
|
@Override
|
|
public int[] getSlotsForFace(EnumDirection enumdirection) {
|
|
- return enumdirection == EnumDirection.UP ? new int[]{0} : new int[0];
|
|
+ return enumdirection == EnumDirection.UP ? org.yatopiamc.yatopia.server.util.Constants.ZERO_ARRAY : org.yatopiamc.yatopia.server.util.Constants.EMPTY_ARRAY; // Yatopia - avoid array allocation
|
|
}
|
|
|
|
@Override
|
|
@@ -355,7 +355,7 @@ public class BlockComposter extends Block implements IInventoryHolder {
|
|
|
|
@Override
|
|
public int[] getSlotsForFace(EnumDirection enumdirection) {
|
|
- return enumdirection == EnumDirection.DOWN ? new int[]{0} : new int[0];
|
|
+ return enumdirection == EnumDirection.DOWN ? org.yatopiamc.yatopia.server.util.Constants.ZERO_ARRAY : org.yatopiamc.yatopia.server.util.Constants.EMPTY_ARRAY; // Yatopia - avoid array allocation
|
|
}
|
|
|
|
@Override
|
|
@@ -391,7 +391,7 @@ public class BlockComposter extends Block implements IInventoryHolder {
|
|
|
|
@Override
|
|
public int[] getSlotsForFace(EnumDirection enumdirection) {
|
|
- return new int[0];
|
|
+ return org.yatopiamc.yatopia.server.util.Constants.EMPTY_ARRAY; // Yatopia - avoid array allocation
|
|
}
|
|
|
|
@Override
|