mirror of
https://github.com/YatopiaMC/Yatopia.git
synced 2024-11-29 22:23:50 +01:00
c09ee99f7e
Closes #257 Ports 2 patches from Purpur: Infinity-bow-settings & Allow-infinite-and-mending-enchantments-together Added an option for infinity with no arrows too. Option for custom locale has come! You can put a locale.json file in your server folder to change it. We've got the finest patches from Hydrinity ( Mykyta approved & allowed ) too. We have some amazing new options in yatopia.yml, we're gonna have documentation for them soon so stay tuned! Last but not least, chunk generation patches. We've tested them extensively so no weirdness happens. Thanks for using Yatopia as your production server software. Co-authored-by: Ivan Pekov <ivan@mrivanplays.com>
54 lines
1.8 KiB
Diff
54 lines
1.8 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: JellySquid <jellysquid+atwork@protonmail.com>
|
|
Date: Mon, 11 May 2020 21:02:57 +0200
|
|
Subject: [PATCH] lithium MixinBox
|
|
|
|
Original code by JellySquid, licensed under GNU Lesser General Public License v3.0
|
|
you can find the original code on https://github.com/jellysquid3/lithium-fabric/tree/1.16.x/fabric (Yarn mappings)
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/AxisAlignedBB.java b/src/main/java/net/minecraft/server/AxisAlignedBB.java
|
|
index 6aa9f07336c23150ca72bdf3d45677e8d40ee4e9..e2d6b4ff007d5cef9bfbe2c989c2bb503c44508f 100644
|
|
--- a/src/main/java/net/minecraft/server/AxisAlignedBB.java
|
|
+++ b/src/main/java/net/minecraft/server/AxisAlignedBB.java
|
|
@@ -185,12 +185,38 @@ public class AxisAlignedBB {
|
|
return new AxisAlignedBB(vec3d.x, vec3d.y, vec3d.z, vec3d.x + 1.0D, vec3d.y + 1.0D, vec3d.z + 1.0D);
|
|
}
|
|
|
|
+ /**
|
|
+ * @reason Simplify the code to better help the JVM optimize it
|
|
+ * @author JellySquid
|
|
+ */
|
|
public double a(EnumDirection.EnumAxis enumdirection_enumaxis) {
|
|
- return enumdirection_enumaxis.a(this.minX, this.minY, this.minZ);
|
|
+ switch (enumdirection_enumaxis) {
|
|
+ case X:
|
|
+ return this.minX;
|
|
+ case Y:
|
|
+ return this.minY;
|
|
+ case Z:
|
|
+ return this.minZ;
|
|
+ }
|
|
+
|
|
+ throw new IllegalArgumentException();
|
|
}
|
|
|
|
+ /**
|
|
+ * @reason Simplify the code to better help the JVM optimize it
|
|
+ * @author JellySquid
|
|
+ */
|
|
public double b(EnumDirection.EnumAxis enumdirection_enumaxis) {
|
|
- return enumdirection_enumaxis.a(this.maxX, this.maxY, this.maxZ);
|
|
+ switch (enumdirection_enumaxis) {
|
|
+ case X:
|
|
+ return this.maxX;
|
|
+ case Y:
|
|
+ return this.maxY;
|
|
+ case Z:
|
|
+ return this.maxZ;
|
|
+ }
|
|
+
|
|
+ throw new IllegalArgumentException();
|
|
}
|
|
|
|
public boolean equals(Object object) {
|