mirror of
https://github.com/YatopiaMC/Yatopia.git
synced 2024-11-22 02:25:51 +01:00
Updated Upstream and Sidestream(s) (Purpur/AirplaneLite) (#389)
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. Purpur Changes: 5cff60d Toggle for water sensitive mobs getting damaged by... water (#161) AirplaneLite Changes: 1b11269 This works, last time f763e5b Keep one patch ca87ae0 Keep empty API directory 53d0334 Rebrand as "Airplane" 1e153e0 Merge pull request #3 from DeadSteve51/patch-1 0829860 Remove actions links 12cc4d7 Adds more info to the README, mostly from the Discord a78a63c Add new downloads URL 2a05c35 Force workflow run
This commit is contained in:
parent
6f638c7944
commit
b774a5d8a8
6
.gitmodules
vendored
6
.gitmodules
vendored
@ -12,9 +12,9 @@
|
||||
url = https://github.com/pl3xgaming/Purpur.git
|
||||
branch = ver/1.16.5
|
||||
|
||||
[submodule "upstream/AirplaneLite"]
|
||||
path = upstream/AirplaneLite
|
||||
url = https://github.com/Technove/AirplaneLite.git
|
||||
[submodule "upstream/Airplane"]
|
||||
path = upstream/Airplane
|
||||
url = https://github.com/Technove/Airplane.git
|
||||
branch = master
|
||||
|
||||
[submodule "upstream/Akarin"]
|
||||
|
@ -4,4 +4,4 @@
|
||||
All patches (.patch files) marked with "hydrogen" are licensed under LGPL3 found [here](https://github.com/jellysquid3/hydrogen-fabric/blob/1.16.x/LICENSE.txt).<br>
|
||||
All patches (.patch files) marked with "krypton" are licensed under MIT found [here](https://github.com/astei/krypton/blob/master/LICENSE).<br>
|
||||
All other patches (.patch files) included in this repo are licensed under the MIT license found [here](MIT.md).<br>
|
||||
See [EMC](https://github.com/starlis/empirecraft/blob/master/README.md), [Akarin](https://github.com/Akarin-project/Akarin/blob/1.16.3/LICENSE.md), [Purpur](https://github.com/pl3xgaming/Purpur/blob/ver/1.16.5/LICENSE), [AirplaneLite](https://github.com/Technove/AirplaneLite/blob/master/PATCHES-LICENSE), [Origami](https://github.com/Minebench/Origami/blob/1.16/PATCHES-LICENSE), and [Tuinity](https://github.com/Spottedleaf/Tuinity/blob/master/PATCHES-LICENSE) for the license of patches automatically pulled during upstream updates.
|
||||
See [EMC](https://github.com/starlis/empirecraft/blob/master/README.md), [Akarin](https://github.com/Akarin-project/Akarin/blob/1.16.3/LICENSE.md), [Purpur](https://github.com/pl3xgaming/Purpur/blob/ver/1.16.5/LICENSE), [Airplane](https://github.com/Technove/Airplane/blob/master/PATCHES-LICENSE), [Origami](https://github.com/Minebench/Origami/blob/1.16/PATCHES-LICENSE), and [Tuinity](https://github.com/Spottedleaf/Tuinity/blob/master/PATCHES-LICENSE) for the license of patches automatically pulled during upstream updates.
|
||||
|
@ -67,7 +67,7 @@ # Patches
|
||||
| server | Add wither skeleton takes wither damage option | William Blake Galbreath | |
|
||||
| server | Advancement API | William Blake Galbreath | |
|
||||
| api | Advancement API | William Blake Galbreath | |
|
||||
| server | AirplaneLite MC Dev Fixes | Paul Sauve | |
|
||||
| server | Airplane MC Dev Fixes | Paul Sauve | |
|
||||
| server | Allow Entities to be removed from a world while ticking | Spottedleaf | |
|
||||
| server | Allow anvil colors | William Blake Galbreath | |
|
||||
| server | Allow color codes in books | William Blake Galbreath | |
|
||||
@ -343,6 +343,7 @@ # Patches
|
||||
| server | Time scoreboard search | Spottedleaf | |
|
||||
| server | Timings stuff | William Blake Galbreath | |
|
||||
| server | Toggle for Zombified Piglin death always counting as player | jmp | |
|
||||
| server | Toggle for water sensitive mob damage | YouHaveTrouble | |
|
||||
| server | Totems work in inventory | draycia | |
|
||||
| server | Tuinity POM Changes | Spottedleaf | |
|
||||
| api | Tuinity POM Changes | Spottedleaf | |
|
||||
|
@ -17,7 +17,7 @@ ## So what is Yatopia?
|
||||
* [Lithium](https://github.com/jellysquid3/lithium-fabric)
|
||||
* [Origami](https://github.com/Minebench/Origami)
|
||||
* [Purpur](https://github.com/pl3xgaming/Purpur)
|
||||
* [AirplaneLite](https://github.com/Technove/AirplaneLite)
|
||||
* [Airplane](https://github.com/Technove/Airplane)
|
||||
* [Hydrogen](https://github.com/jellysquid3/hydrogen-fabric)
|
||||
* [Krypton](https://github.com/astei/krypton)
|
||||
|
||||
|
@ -1,9 +1,9 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Paul Sauve <paul@technove.co>
|
||||
Date: Sat, 31 Oct 2020 19:21:42 -0500
|
||||
Subject: [PATCH] AirplaneLite MC Dev Fixes
|
||||
Subject: [PATCH] Airplane MC Dev Fixes
|
||||
|
||||
Airplane Lite
|
||||
Airplane
|
||||
Copyright (C) 2020 Technove LLC
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
@ -20,7 +20,7 @@ You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/LootTableInfo.java b/src/main/java/net/minecraft/server/LootTableInfo.java
|
||||
index addeb268d4d487e18ddaadebf96f078fd079246f..268147484805e9fff298d2f5006f1c594c485342 100644
|
||||
index addeb268d4d487e18ddaadebf96f078fd079246f..cbd034127de8a30b82b27c367bdd9270b43b98b0 100644
|
||||
--- a/src/main/java/net/minecraft/server/LootTableInfo.java
|
||||
+++ b/src/main/java/net/minecraft/server/LootTableInfo.java
|
||||
@@ -53,7 +53,7 @@ public class LootTableInfo {
|
||||
@ -28,7 +28,7 @@ index addeb268d4d487e18ddaadebf96f078fd079246f..268147484805e9fff298d2f5006f1c59
|
||||
@Nullable
|
||||
public <T> T getContextParameter(LootContextParameter<T> lootcontextparameter) {
|
||||
- return this.h.get(lootcontextparameter);
|
||||
+ return (T) this.h.get(lootcontextparameter); // AirplaneL - compile error
|
||||
+ return (T) this.h.get(lootcontextparameter); // Airplane - compile error
|
||||
}
|
||||
|
||||
public boolean a(LootTable loottable) {
|
||||
@ -37,7 +37,7 @@ index addeb268d4d487e18ddaadebf96f078fd079246f..268147484805e9fff298d2f5006f1c59
|
||||
|
||||
public <T> T a(LootContextParameter<T> lootcontextparameter) {
|
||||
- T t0 = this.b.get(lootcontextparameter);
|
||||
+ T t0 = (T) this.b.get(lootcontextparameter); // AirplaneL - compile error
|
||||
+ T t0 = (T) this.b.get(lootcontextparameter); // Airplane - compile error
|
||||
|
||||
if (t0 == null) {
|
||||
throw new IllegalArgumentException("No parameter " + lootcontextparameter);
|
||||
@ -46,7 +46,7 @@ index addeb268d4d487e18ddaadebf96f078fd079246f..268147484805e9fff298d2f5006f1c59
|
||||
@Nullable
|
||||
public <T> T b(LootContextParameter<T> lootcontextparameter) {
|
||||
- return this.b.get(lootcontextparameter);
|
||||
+ return (T) this.b.get(lootcontextparameter); // AirplaneL - compile error
|
||||
+ return (T) this.b.get(lootcontextparameter); // Airplane - compile error
|
||||
}
|
||||
|
||||
public LootTableInfo build(LootContextParameterSet lootcontextparameterset) {
|
@ -3,6 +3,21 @@ From: Paul Sauve <paul@technove.co>
|
||||
Date: Sat, 23 Jan 2021 16:42:24 -0600
|
||||
Subject: [PATCH] Remove streams
|
||||
|
||||
Airplane
|
||||
Copyright (C) 2020 Technove LLC
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/BehaviorBetterJob.java b/src/main/java/net/minecraft/server/BehaviorBetterJob.java
|
||||
index 19f8cf4384ff7a1515ad33a5f573ea0061bab93d..e6507a9bef705e1496497ad6b58a546348a0779e 100644
|
@ -10,7 +10,7 @@ a lot of dynamic checks for both of these, which result in extra work.
|
||||
As well, since the fluid collision option is set to NONE, the entire
|
||||
fluid collision system is completely unneeded, yet used anyways.
|
||||
|
||||
Airplane Lite
|
||||
Airplane
|
||||
Copyright (C) 2020 Technove LLC
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
@ -27,47 +27,47 @@ You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
index 330f27f649a2ab1567ebc1b547f1f2a5ce645055..f4822131f544a335d5db1d8e928a24409027924e 100644
|
||||
index 5f9d8999ae7a1d742918e58c0f1bb36fc74d45fe..15d74cb75725b4c53747848ca9b034c95a372a2f 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
@@ -3053,7 +3053,7 @@ public abstract class EntityLiving extends Entity {
|
||||
@@ -3054,7 +3054,7 @@ public abstract class EntityLiving extends Entity {
|
||||
Vec3D vec3d = new Vec3D(this.locX(), this.getHeadY(), this.locZ());
|
||||
Vec3D vec3d1 = new Vec3D(entity.locX(), entity.getHeadY(), entity.locZ());
|
||||
|
||||
- return this.world.rayTrace(new RayTrace(vec3d, vec3d1, RayTrace.BlockCollisionOption.COLLIDER, RayTrace.FluidCollisionOption.NONE, this)).getType() == MovingObjectPosition.EnumMovingObjectType.MISS;
|
||||
+ return this.world.rayTraceDirect(vec3d, vec3d1, VoxelShapeCollision.a(this)) == MovingObjectPosition.EnumMovingObjectType.MISS; // AirplaneL - use direct method
|
||||
+ return this.world.rayTraceDirect(vec3d, vec3d1, VoxelShapeCollision.a(this)) == MovingObjectPosition.EnumMovingObjectType.MISS; // Airplane - use direct method
|
||||
}
|
||||
|
||||
@Override
|
||||
diff --git a/src/main/java/net/minecraft/server/IBlockAccess.java b/src/main/java/net/minecraft/server/IBlockAccess.java
|
||||
index 5c3eb4fc7e5aec2ad8d0050673fc8f4d2bff6a71..376ff36062d85b8ea8b004d9266ee9ee382b2942 100644
|
||||
index 5c3eb4fc7e5aec2ad8d0050673fc8f4d2bff6a71..15f20132d5777c5e0162aa91e6e968e1e8b1cc2d 100644
|
||||
--- a/src/main/java/net/minecraft/server/IBlockAccess.java
|
||||
+++ b/src/main/java/net/minecraft/server/IBlockAccess.java
|
||||
@@ -44,6 +44,15 @@ public interface IBlockAccess {
|
||||
return BlockPosition.a(axisalignedbb).map(this::getType);
|
||||
}
|
||||
|
||||
+ // AirplaneL start - broken down variant of below rayTraceBlock, used by World#rayTraceDirect
|
||||
+ // Airplane start - broken down variant of below rayTraceBlock, used by World#rayTraceDirect
|
||||
+ default MovingObjectPosition.EnumMovingObjectType rayTraceBlockDirect(Vec3D vec3d, Vec3D vec3d1, BlockPosition blockposition, IBlockData iblockdata, VoxelShapeCollision voxelshapecoll) {
|
||||
+ VoxelShape voxelshape = RayTrace.BlockCollisionOption.COLLIDER.get(iblockdata, this, blockposition, voxelshapecoll);
|
||||
+ MovingObjectPositionBlock movingobjectpositionblock = this.rayTrace(vec3d, vec3d1, blockposition, voxelshape, iblockdata);
|
||||
+
|
||||
+ return movingobjectpositionblock == null ? null : movingobjectpositionblock.getType();
|
||||
+ }
|
||||
+ // AirplaneL end
|
||||
+ // Airplane end
|
||||
+
|
||||
// CraftBukkit start - moved block handling into separate method for use by Block#rayTrace
|
||||
default MovingObjectPositionBlock rayTraceBlock(RayTrace raytrace1, BlockPosition blockposition) {
|
||||
// Paper start - Prevent raytrace from loading chunks
|
||||
diff --git a/src/main/java/net/minecraft/server/MathHelper.java b/src/main/java/net/minecraft/server/MathHelper.java
|
||||
index 2e7721a650c5a351b3584665bd236f92ef577761..8a6b623084fdc5ee2b0718f9e72f7c52a0d58d91 100644
|
||||
index 2e7721a650c5a351b3584665bd236f92ef577761..b3c2b461b2a654a9e37a57f2f62b3ba8b5bb1634 100644
|
||||
--- a/src/main/java/net/minecraft/server/MathHelper.java
|
||||
+++ b/src/main/java/net/minecraft/server/MathHelper.java
|
||||
@@ -238,6 +238,7 @@ public class MathHelper {
|
||||
return f - (float) d(f);
|
||||
}
|
||||
|
||||
+ public static double getDecimals(double num) { return h(num); } // AirplaneL
|
||||
+ public static double getDecimals(double num) { return h(num); } // Airplane
|
||||
public static double h(double d0) {
|
||||
return d0 - (double) d(d0);
|
||||
}
|
||||
@ -75,7 +75,7 @@ index 2e7721a650c5a351b3584665bd236f92ef577761..8a6b623084fdc5ee2b0718f9e72f7c52
|
||||
return f1 + f * (f2 - f1);
|
||||
}
|
||||
|
||||
+ public static double linearInterpolation(double value1, double value2, double amount) { return d(value1, value2, amount); } // AirplaneL - OBFHELPER
|
||||
+ public static double linearInterpolation(double value1, double value2, double amount) { return d(value1, value2, amount); } // Airplane - OBFHELPER
|
||||
public static double d(double d0, double d1, double d2) {
|
||||
return d1 + d0 * (d2 - d1);
|
||||
}
|
||||
@ -83,19 +83,19 @@ index 2e7721a650c5a351b3584665bd236f92ef577761..8a6b623084fdc5ee2b0718f9e72f7c52
|
||||
return d0 * d0 * d0 * (d0 * (d0 * 6.0D - 15.0D) + 10.0D);
|
||||
}
|
||||
|
||||
+ public static int sign(double num) { return k(num); } // AirplaneL - OBFHELPER
|
||||
+ public static int sign(double num) { return k(num); } // Airplane - OBFHELPER
|
||||
public static int k(double d0) {
|
||||
return d0 == 0.0D ? 0 : (d0 > 0.0D ? 1 : -1);
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
|
||||
index 91aa8a2bc111ee6935ada0ae471fe1a3bc8fad80..87a4e53ad1ea1978bc9a0c335293190460efde8b 100644
|
||||
index 91aa8a2bc111ee6935ada0ae471fe1a3bc8fad80..0e6813601f082a9e81278cebbfadbaca5769802a 100644
|
||||
--- a/src/main/java/net/minecraft/server/World.java
|
||||
+++ b/src/main/java/net/minecraft/server/World.java
|
||||
@@ -332,6 +332,91 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
|
||||
return null;
|
||||
}
|
||||
|
||||
+ // AirplaneL start - broken down method of raytracing for EntityLiving#hasLineOfSight, replaces IBlockAccess#rayTrace(RayTrace)
|
||||
+ // Airplane start - broken down method of raytracing for EntityLiving#hasLineOfSight, replaces IBlockAccess#rayTrace(RayTrace)
|
||||
+ protected MovingObjectPosition.EnumMovingObjectType rayTraceDirect(Vec3D vec3d, Vec3D vec3d1, VoxelShapeCollision voxelshapecoll) {
|
||||
+ // most of this code comes from IBlockAccess#a(RayTrace, BiFunction, Function), but removes the needless functions
|
||||
+ if (vec3d.equals(vec3d1)) {
|
||||
@ -178,7 +178,7 @@ index 91aa8a2bc111ee6935ada0ae471fe1a3bc8fad80..87a4e53ad1ea1978bc9a0c3352931904
|
||||
+
|
||||
+ return result;
|
||||
+ }
|
||||
+ // AirplaneL end
|
||||
+ // Airplane end
|
||||
+
|
||||
public static boolean isValidLocation(BlockPosition blockposition) {
|
||||
return blockposition.isValidLocation(); // Paper - use better/optimized check
|
@ -7,7 +7,7 @@ Paper added a fancy sorting comparison due to Bukkit recipes breaking
|
||||
the vanilla one, however this is far more advanced than what you need
|
||||
for all the vanilla recipes.
|
||||
|
||||
Airplane Lite
|
||||
Airplane
|
||||
Copyright (C) 2020 Technove LLC
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
@ -24,23 +24,23 @@ You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/ShapelessRecipes.java b/src/main/java/net/minecraft/server/ShapelessRecipes.java
|
||||
index 61d88dbaa1f5c543be610ce0914b2c89d8ad40ee..e7870de2467ca28070c234a39452778a3ac08862 100644
|
||||
index 61d88dbaa1f5c543be610ce0914b2c89d8ad40ee..11fbbe86978055ece0cb47eee531093e59f61dcf 100644
|
||||
--- a/src/main/java/net/minecraft/server/ShapelessRecipes.java
|
||||
+++ b/src/main/java/net/minecraft/server/ShapelessRecipes.java
|
||||
@@ -17,8 +17,16 @@ public class ShapelessRecipes implements RecipeCrafting {
|
||||
private final String group;
|
||||
private final ItemStack result;
|
||||
private final NonNullList<RecipeItemStack> ingredients;
|
||||
+ private final boolean isBukkit; // AirplaneL
|
||||
+ private final boolean isBukkit; // Airplane
|
||||
|
||||
+ // AirplaneL start - add isBukkit constructor param
|
||||
+ // Airplane start - add isBukkit constructor param
|
||||
public ShapelessRecipes(MinecraftKey minecraftkey, String s, ItemStack itemstack, NonNullList<RecipeItemStack> nonnulllist) {
|
||||
+ this(minecraftkey, s, itemstack, nonnulllist, false);
|
||||
+ }
|
||||
+
|
||||
+ public ShapelessRecipes(MinecraftKey minecraftkey, String s, ItemStack itemstack, NonNullList<RecipeItemStack> nonnulllist, boolean isBukkit) {
|
||||
+ this.isBukkit = isBukkit;
|
||||
+ // AirplaneL end
|
||||
+ // Airplane end
|
||||
this.key = minecraftkey;
|
||||
this.group = s;
|
||||
this.result = itemstack;
|
||||
@ -48,7 +48,7 @@ index 61d88dbaa1f5c543be610ce0914b2c89d8ad40ee..e7870de2467ca28070c234a39452778a
|
||||
}
|
||||
|
||||
public boolean a(InventoryCrafting inventorycrafting, World world) {
|
||||
+ // AirplaneL start
|
||||
+ // Airplane start
|
||||
+ if (!this.isBukkit) {
|
||||
+ java.util.List<RecipeItemStack> ingredients = com.google.common.collect.Lists.newArrayList(this.ingredients.toArray(new RecipeItemStack[0]));
|
||||
+
|
||||
@ -68,13 +68,13 @@ index 61d88dbaa1f5c543be610ce0914b2c89d8ad40ee..e7870de2467ca28070c234a39452778a
|
||||
+
|
||||
+ return ingredients.isEmpty();
|
||||
+ }
|
||||
+ // AirplaneL end
|
||||
+ // Airplane end
|
||||
+
|
||||
AutoRecipeStackManager autorecipestackmanager = new AutoRecipeStackManager();
|
||||
int i = 0;
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftShapelessRecipe.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftShapelessRecipe.java
|
||||
index 4aba511fe8078164bf1467b39645dd9bf6a931e7..e1a8f54450de4f173e59cd1851124b7b8621af7d 100644
|
||||
index 4aba511fe8078164bf1467b39645dd9bf6a931e7..56b781e438f0cf1c12dd55eb37356601e47de47f 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftShapelessRecipe.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftShapelessRecipe.java
|
||||
@@ -44,6 +44,6 @@ public class CraftShapelessRecipe extends ShapelessRecipe implements CraftRecipe
|
||||
@ -82,6 +82,6 @@ index 4aba511fe8078164bf1467b39645dd9bf6a931e7..e1a8f54450de4f173e59cd1851124b7b
|
||||
}
|
||||
|
||||
- MinecraftServer.getServer().getCraftingManager().addRecipe(new ShapelessRecipes(CraftNamespacedKey.toMinecraft(this.getKey()), this.getGroup(), CraftItemStack.asNMSCopy(this.getResult()), data));
|
||||
+ MinecraftServer.getServer().getCraftingManager().addRecipe(new ShapelessRecipes(CraftNamespacedKey.toMinecraft(this.getKey()), this.getGroup(), CraftItemStack.asNMSCopy(this.getResult()), data, true)); // AirplaneL
|
||||
+ MinecraftServer.getServer().getCraftingManager().addRecipe(new ShapelessRecipes(CraftNamespacedKey.toMinecraft(this.getKey()), this.getGroup(), CraftItemStack.asNMSCopy(this.getResult()), data, true)); // Airplane
|
||||
}
|
||||
}
|
@ -3,7 +3,7 @@ From: Paul Sauve <paul@technove.co>
|
||||
Date: Sat, 31 Oct 2020 19:03:25 -0500
|
||||
Subject: [PATCH] Queue lighting update only once
|
||||
|
||||
Airplane Lite
|
||||
Airplane
|
||||
Copyright (C) 2020 Technove LLC
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
@ -20,14 +20,14 @@ You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
||||
index 9e6381a60b804a957eda5b72582d5545faebcb3e..0dddb334c70b4692c1a83544c3d18dcf154c6c18 100644
|
||||
index 9e6381a60b804a957eda5b72582d5545faebcb3e..1da5c7def8b476cf638548b05d3e2015bc372f51 100644
|
||||
--- a/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
||||
@@ -996,6 +996,7 @@ public class ChunkProviderServer extends IChunkProvider {
|
||||
// Paper - moved up
|
||||
// Tuinity start - optimise chunk tick iteration
|
||||
com.tuinity.tuinity.util.maplist.IteratorSafeOrderedReferenceSet.Iterator<Chunk> iterator = this.entityTickingChunks.iterator();
|
||||
+ boolean updateLighting = false; // AirplaneL
|
||||
+ boolean updateLighting = false; // Airplane
|
||||
try {
|
||||
while (iterator.hasNext()) {
|
||||
Chunk chunk = iterator.next();
|
||||
@ -36,7 +36,7 @@ index 9e6381a60b804a957eda5b72582d5545faebcb3e..0dddb334c70b4692c1a83544c3d18dcf
|
||||
|
||||
this.world.timings.chunkTicks.startTiming(); // Spigot // Paper
|
||||
- this.world.a(chunk, k);
|
||||
+ if (this.world.abool(chunk, k)) updateLighting = true; // AirplaneL
|
||||
+ if (this.world.abool(chunk, k)) updateLighting = true; // Airplane
|
||||
this.world.timings.chunkTicks.stopTiming(); // Spigot // Paper
|
||||
MinecraftServer.getServer().executeMidTickTasks(); // Tuinity - exec chunk tasks during world tick
|
||||
}
|
||||
@ -44,12 +44,12 @@ index 9e6381a60b804a957eda5b72582d5545faebcb3e..0dddb334c70b4692c1a83544c3d18dcf
|
||||
} finally {
|
||||
iterator.finishedIterating();
|
||||
}
|
||||
+ if (updateLighting) this.getLightEngine().queueUpdate(); // AirplaneL
|
||||
+ if (updateLighting) this.getLightEngine().queueUpdate(); // Airplane
|
||||
// Tuinity end - optimise chunk tick iteration
|
||||
this.world.getMethodProfiler().enter("customSpawners");
|
||||
if (flag1) {
|
||||
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
|
||||
index cb2c429bda81b8c151a50ef3627716fef1e422d0..1b9ca06c9bb9dd288570d6fae0c30952d0b7f488 100644
|
||||
index cb2c429bda81b8c151a50ef3627716fef1e422d0..7e48b44047b09b44b2005e67ea1ef6bb2f2de6bc 100644
|
||||
--- a/src/main/java/net/minecraft/server/WorldServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/WorldServer.java
|
||||
@@ -1019,7 +1019,10 @@ public class WorldServer extends World implements GeneratorAccessSeed {
|
||||
@ -57,10 +57,10 @@ index cb2c429bda81b8c151a50ef3627716fef1e422d0..1b9ca06c9bb9dd288570d6fae0c30952
|
||||
// Paper end
|
||||
|
||||
- public void a(Chunk chunk, int i) { final int randomTickSpeed = i; // Paper
|
||||
+ // AirplaneL start - create version of chunk tick that returns a bool for updating lighting
|
||||
+ // Airplane start - create version of chunk tick that returns a bool for updating lighting
|
||||
+ public void a(Chunk chunk, int i) { this.abool(chunk, i); }
|
||||
+ public boolean abool(Chunk chunk, int i) { final int randomTickSpeed = i; // Paper
|
||||
+ // AirplaneL end
|
||||
+ // Airplane end
|
||||
ChunkCoordIntPair chunkcoordintpair = chunk.getPos();
|
||||
boolean flag = this.isRaining();
|
||||
int j = chunkcoordintpair.d();
|
||||
@ -69,13 +69,13 @@ index cb2c429bda81b8c151a50ef3627716fef1e422d0..1b9ca06c9bb9dd288570d6fae0c30952
|
||||
gameprofilerfiller.exit();
|
||||
timings.chunkTicksBlocks.stopTiming(); // Paper
|
||||
- getChunkProvider().getLightEngine().queueUpdate(); // Paper
|
||||
+ // AirplaneL start
|
||||
+ // Airplane start
|
||||
+ //getChunkProvider().getLightEngine().queueUpdate(); // Paper
|
||||
+ return true;
|
||||
+ // AirplaneL end
|
||||
+ // Airplane end
|
||||
// Paper end
|
||||
}
|
||||
+ return false; // AirplaneL
|
||||
+ return false; // Airplane
|
||||
}
|
||||
|
||||
protected BlockPosition a(BlockPosition blockposition) {
|
@ -3,7 +3,7 @@ From: Paul Sauve <paul@technove.co>
|
||||
Date: Sat, 31 Oct 2020 19:22:37 -0500
|
||||
Subject: [PATCH] Use unmodifiableMap instead of making copy
|
||||
|
||||
Airplane Lite
|
||||
Airplane
|
||||
Copyright (C) 2020 Technove LLC
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
@ -20,7 +20,7 @@ You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/LootTableInfo.java b/src/main/java/net/minecraft/server/LootTableInfo.java
|
||||
index 268147484805e9fff298d2f5006f1c594c485342..1a87d73e116d3662bbc709adaf2ef7e4dd12f865 100644
|
||||
index cbd034127de8a30b82b27c367bdd9270b43b98b0..25b6e240cf135da0643250b3f498a077dae070da 100644
|
||||
--- a/src/main/java/net/minecraft/server/LootTableInfo.java
|
||||
+++ b/src/main/java/net/minecraft/server/LootTableInfo.java
|
||||
@@ -34,8 +34,8 @@ public class LootTableInfo {
|
||||
@ -29,8 +29,8 @@ index 268147484805e9fff298d2f5006f1c594c485342..1a87d73e116d3662bbc709adaf2ef7e4
|
||||
this.f = function1;
|
||||
- this.h = ImmutableMap.copyOf(map);
|
||||
- this.i = ImmutableMap.copyOf(map1);
|
||||
+ this.h = java.util.Collections.unmodifiableMap(map); // AirplaneL
|
||||
+ this.i = java.util.Collections.unmodifiableMap(map1); // AirplaneL
|
||||
+ this.h = java.util.Collections.unmodifiableMap(map); // Airplane
|
||||
+ this.i = java.util.Collections.unmodifiableMap(map1); // Airplane
|
||||
}
|
||||
|
||||
public boolean hasContextParameter(LootContextParameter<?> lootcontextparameter) {
|
@ -6,7 +6,7 @@ Subject: [PATCH] Swap priority of checks in chunk ticking
|
||||
World.V showed up a lot in lag spikes for some reason, although I wonder
|
||||
if it's just Spark getting JVM safe points.
|
||||
|
||||
Airplane Lite
|
||||
Airplane
|
||||
Copyright (C) 2020 Technove LLC
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
@ -23,7 +23,7 @@ You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
|
||||
index 1b9ca06c9bb9dd288570d6fae0c30952d0b7f488..4ba2e7fc8d90ec582b5976f4a99c70240e0cac50 100644
|
||||
index 7e48b44047b09b44b2005e67ea1ef6bb2f2de6bc..994c1822a4b53552befc64d88e922285715fa31d 100644
|
||||
--- a/src/main/java/net/minecraft/server/WorldServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/WorldServer.java
|
||||
@@ -1032,7 +1032,7 @@ public class WorldServer extends World implements GeneratorAccessSeed {
|
||||
@ -31,7 +31,7 @@ index 1b9ca06c9bb9dd288570d6fae0c30952d0b7f488..4ba2e7fc8d90ec582b5976f4a99c7024
|
||||
final BlockPosition.MutableBlockPosition blockposition = this.chunkTickMutablePosition; // Paper - use mutable to reduce allocation rate, final to force compile fail on change
|
||||
|
||||
- if (!this.paperConfig.disableThunder && flag && this.W() && this.random.nextInt(100000) == 0) { // Paper - Disable thunder
|
||||
+ if (!this.paperConfig.disableThunder && flag && this.random.nextInt(100000) == 0 && this.W()) { // Paper - Disable thunder // AirplaneL - check this.W last
|
||||
+ if (!this.paperConfig.disableThunder && flag && this.random.nextInt(100000) == 0 && this.W()) { // Paper - Disable thunder // Airplane - check this.W last
|
||||
blockposition.setValues(this.a(this.a(j, 0, k, 15))); // Paper
|
||||
if (this.isRainingAt(blockposition)) {
|
||||
DifficultyDamageScaler difficultydamagescaler = this.getDamageScaler(blockposition);
|
@ -3,7 +3,7 @@ From: Paul Sauve <paul@technove.co>
|
||||
Date: Sun, 13 Dec 2020 17:52:35 -0600
|
||||
Subject: [PATCH] Reduce projectile chunk loading
|
||||
|
||||
Airplane Lite
|
||||
Airplane
|
||||
Copyright (C) 2020 Technove LLC
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
@ -20,7 +20,7 @@ You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityProjectile.java b/src/main/java/net/minecraft/server/EntityProjectile.java
|
||||
index d85a19905efab7189e461a61becb6ca2b8c50803..71ff64c09858890b61b1cc9ea8e591ff4cf6c28b 100644
|
||||
index d85a19905efab7189e461a61becb6ca2b8c50803..4b3d5731a18177c74f02eef91820720104145d1c 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityProjectile.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityProjectile.java
|
||||
@@ -85,6 +85,37 @@ public abstract class EntityProjectile extends IProjectile {
|
||||
@ -32,7 +32,7 @@ index d85a19905efab7189e461a61becb6ca2b8c50803..71ff64c09858890b61b1cc9ea8e591ff
|
||||
+
|
||||
+ private int buffered = 0;
|
||||
+
|
||||
+ // AirplaneL start
|
||||
+ // Airplane start
|
||||
+ @Override
|
||||
+ public void setPosition(double d0, double d1, double d2) {
|
||||
+ if (loadedTick != MinecraftServer.currentTick) {
|
||||
@ -44,8 +44,8 @@ index d85a19905efab7189e461a61becb6ca2b8c50803..71ff64c09858890b61b1cc9ea8e591ff
|
||||
+ if (previousX != newX || previousZ != newZ) {
|
||||
+ boolean isLoaded = this.world.isChunkLoaded(newX, newZ);
|
||||
+ if (!isLoaded) {
|
||||
+ if (loadedThisTick > 10) { // AirplaneL 10 = max chunks to load from projectiles in a tick todo config
|
||||
+ if (++buffered > 20) { // AirplaneL 20 = max chunks a single projectile loads overall todo config
|
||||
+ if (loadedThisTick > 10) { // Airplane 10 = max chunks to load from projectiles in a tick todo config
|
||||
+ if (++buffered > 20) { // Airplane 20 = max chunks a single projectile loads overall todo config
|
||||
+ this.die();
|
||||
+ }
|
||||
+ return;
|
||||
@ -56,7 +56,7 @@ index d85a19905efab7189e461a61becb6ca2b8c50803..71ff64c09858890b61b1cc9ea8e591ff
|
||||
+ }
|
||||
+ super.setPosition(d0, d1, d2);
|
||||
+ }
|
||||
+ // AirplaneL end
|
||||
+ // Airplane end
|
||||
+
|
||||
protected float k() {
|
||||
return 0.03F;
|
@ -17,7 +17,7 @@ it, while checking if it's 0 for the current chunk.
|
||||
Depending on configuration for things that tick in a chunk, this is a
|
||||
5-10% improvement.
|
||||
|
||||
Airplane Lite
|
||||
Airplane
|
||||
Copyright (C) 2020 Technove LLC
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
@ -34,14 +34,14 @@ You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
|
||||
index ae07ea2a34f5cd82ce2eae523359cb7540065335..8b7fd21e6b366196fbc9cd44a340335c4cf9205f 100644
|
||||
index ae07ea2a34f5cd82ce2eae523359cb7540065335..7b8036840dcca16904b3063c209d5ff10ab8a6af 100644
|
||||
--- a/src/main/java/net/minecraft/server/Chunk.java
|
||||
+++ b/src/main/java/net/minecraft/server/Chunk.java
|
||||
@@ -53,6 +53,17 @@ public class Chunk implements IChunkAccess {
|
||||
private final ChunkCoordIntPair loc; public final long coordinateKey; public final int locX; public final int locZ; // Paper - cache coordinate key
|
||||
private volatile boolean x;
|
||||
|
||||
+ // AirplaneL start - instead of using a random every time the chunk is ticked, define when lightning strikes preemptively
|
||||
+ // Airplane start - instead of using a random every time the chunk is ticked, define when lightning strikes preemptively
|
||||
+ private int lightningTick = -1;
|
||||
+ public boolean shouldDoLightning() {
|
||||
+ boolean doTick = this.lightningTick == 0;
|
||||
@ -50,42 +50,42 @@ index ae07ea2a34f5cd82ce2eae523359cb7540065335..8b7fd21e6b366196fbc9cd44a340335c
|
||||
+ }
|
||||
+ return doTick;
|
||||
+ }
|
||||
+ // AirplaneL end
|
||||
+ // Airplane end
|
||||
+
|
||||
public Chunk(World world, ChunkCoordIntPair chunkcoordintpair, BiomeStorage biomestorage) {
|
||||
this(world, chunkcoordintpair, biomestorage, ChunkConverter.a, TickListEmpty.b(), TickListEmpty.b(), 0L, (ChunkSection[]) null, (Consumer) null);
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
||||
index 0dddb334c70b4692c1a83544c3d18dcf154c6c18..23cea240ed7d8937df49a9c3e24191cb785ad730 100644
|
||||
index 1da5c7def8b476cf638548b05d3e2015bc372f51..03bcd704e3c08f5b54b124df1583e3ccdb4cb485 100644
|
||||
--- a/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
||||
@@ -965,6 +965,7 @@ public class ChunkProviderServer extends IChunkProvider {
|
||||
}
|
||||
// Paper end - optimize isOutisdeRange
|
||||
this.world.getMethodProfiler().enter("pollingChunks");
|
||||
+ this.world.resetIceAndSnowTick(); // AirplaneL - reset ice & snow tick random
|
||||
+ this.world.resetIceAndSnowTick(); // Airplane - reset ice & snow tick random
|
||||
int k = this.world.getGameRules().getInt(GameRules.RANDOM_TICK_SPEED);
|
||||
boolean flag2 = world.ticksPerAnimalSpawns != 0L && worlddata.getTime() % world.ticksPerAnimalSpawns == 0L; // CraftBukkit
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
|
||||
index 4ba2e7fc8d90ec582b5976f4a99c70240e0cac50..44d1a7dad0ec12b275e8d27be47d929ae8c8f6e1 100644
|
||||
index 994c1822a4b53552befc64d88e922285715fa31d..2a60d8fc88ab83a157f00ce5e5ccd99ce3660453 100644
|
||||
--- a/src/main/java/net/minecraft/server/WorldServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/WorldServer.java
|
||||
@@ -1019,6 +1019,8 @@ public class WorldServer extends World implements GeneratorAccessSeed {
|
||||
private final com.destroystokyo.paper.util.math.ThreadUnsafeRandom randomTickRandom = new com.destroystokyo.paper.util.math.ThreadUnsafeRandom();
|
||||
// Paper end
|
||||
|
||||
+ private int currentIceAndSnowTick = 0; protected void resetIceAndSnowTick() { this.currentIceAndSnowTick = this.randomTickRandom.nextInt(16); } // AirplaneL
|
||||
+ private int currentIceAndSnowTick = 0; protected void resetIceAndSnowTick() { this.currentIceAndSnowTick = this.randomTickRandom.nextInt(16); } // Airplane
|
||||
+
|
||||
// AirplaneL start - create version of chunk tick that returns a bool for updating lighting
|
||||
// Airplane start - create version of chunk tick that returns a bool for updating lighting
|
||||
public void a(Chunk chunk, int i) { this.abool(chunk, i); }
|
||||
public boolean abool(Chunk chunk, int i) { final int randomTickSpeed = i; // Paper
|
||||
@@ -1032,7 +1034,7 @@ public class WorldServer extends World implements GeneratorAccessSeed {
|
||||
gameprofilerfiller.enter("thunder");
|
||||
final BlockPosition.MutableBlockPosition blockposition = this.chunkTickMutablePosition; // Paper - use mutable to reduce allocation rate, final to force compile fail on change
|
||||
|
||||
- if (!this.paperConfig.disableThunder && flag && this.random.nextInt(100000) == 0 && this.W()) { // Paper - Disable thunder // AirplaneL - check this.W last
|
||||
+ if (!this.paperConfig.disableThunder && flag && chunk.shouldDoLightning() && this.W()) { // Paper - Disable thunder // AirplaneL - check this.W last // AirplaneL - replace random with shouldDoLighting
|
||||
- if (!this.paperConfig.disableThunder && flag && this.random.nextInt(100000) == 0 && this.W()) { // Paper - Disable thunder // Airplane - check this.W last
|
||||
+ if (!this.paperConfig.disableThunder && flag && chunk.shouldDoLightning() && this.W()) { // Paper - Disable thunder // Airplane - check this.W last // Airplane - replace random with shouldDoLighting
|
||||
blockposition.setValues(this.a(this.a(j, 0, k, 15))); // Paper
|
||||
if (this.isRainingAt(blockposition)) {
|
||||
DifficultyDamageScaler difficultydamagescaler = this.getDamageScaler(blockposition);
|
||||
@ -94,7 +94,7 @@ index 4ba2e7fc8d90ec582b5976f4a99c70240e0cac50..44d1a7dad0ec12b275e8d27be47d929a
|
||||
|
||||
gameprofilerfiller.exitEnter("iceandsnow");
|
||||
- if (!this.paperConfig.disableIceAndSnow && this.randomTickRandom.nextInt(16) == 0) { // Paper - Disable ice and snow // Paper - optimise random ticking
|
||||
+ if (!this.paperConfig.disableIceAndSnow && (this.currentIceAndSnowTick++ & 15) == 0) { // Paper - Disable ice and snow // Paper - optimise random ticking // AirplaneL - optimize further random ticking
|
||||
+ if (!this.paperConfig.disableIceAndSnow && (this.currentIceAndSnowTick++ & 15) == 0) { // Paper - Disable ice and snow // Paper - optimise random ticking // Airplane - optimize further random ticking
|
||||
// Paper start - optimise chunk ticking
|
||||
this.getRandomBlockPosition(j, 0, k, 15, blockposition);
|
||||
int normalY = chunk.getHighestBlockY(HeightMap.Type.MOTION_BLOCKING, blockposition.getX() & 15, blockposition.getZ() & 15);
|
@ -3,7 +3,7 @@ From: Paul Sauve <paul@technove.co>
|
||||
Date: Fri, 15 Jan 2021 20:08:54 -0600
|
||||
Subject: [PATCH] Don't get entity equipment if not needed
|
||||
|
||||
Airplane Lite
|
||||
Airplane
|
||||
Copyright (C) 2020 Technove LLC
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
@ -20,7 +20,7 @@ You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
index f4822131f544a335d5db1d8e928a24409027924e..f2adabadfe1ec3a294db6feebda4945760340dff 100644
|
||||
index 15d74cb75725b4c53747848ca9b034c95a372a2f..95ccaab19b46785dd515b9d444557ae56de8ab89 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
@@ -820,11 +820,13 @@ public abstract class EntityLiving extends Entity {
|
||||
@ -29,14 +29,14 @@ index f4822131f544a335d5db1d8e928a24409027924e..f2adabadfe1ec3a294db6feebda49457
|
||||
if (entity != null) {
|
||||
- ItemStack itemstack = this.getEquipment(EnumItemSlot.HEAD);
|
||||
- Item item = itemstack.getItem();
|
||||
+ // AirplaneL start - don't get equipment if not needed
|
||||
+ // Airplane start - don't get equipment if not needed
|
||||
+ //ItemStack itemstack = this.getEquipment(EnumItemSlot.HEAD);
|
||||
+ //Item item = itemstack.getItem();
|
||||
EntityTypes<?> entitytypes = entity.getEntityType();
|
||||
|
||||
- if (entitytypes == EntityTypes.SKELETON && item == Items.SKELETON_SKULL || entitytypes == EntityTypes.ZOMBIE && item == Items.ZOMBIE_HEAD || entitytypes == EntityTypes.CREEPER && item == Items.CREEPER_HEAD) {
|
||||
+ if (entitytypes == EntityTypes.SKELETON && this.getEquipment(EnumItemSlot.HEAD).getItem() == Items.SKELETON_SKULL || entitytypes == EntityTypes.ZOMBIE && this.getEquipment(EnumItemSlot.HEAD).getItem() == Items.ZOMBIE_HEAD || entitytypes == EntityTypes.CREEPER && this.getEquipment(EnumItemSlot.HEAD).getItem() == Items.CREEPER_HEAD) {
|
||||
+ // AirplaneL end
|
||||
+ // Airplane end
|
||||
d0 *= 0.5D;
|
||||
}
|
||||
}
|
@ -19,7 +19,7 @@ index 657885cdaa086293f6b5aa6f3058acd16df0ba35..8724ad342bec7c733b3c825bd62dbfa5
|
||||
|
||||
Block.a(iblockdata, iblockdata1, generatoraccess, blockposition_mutableblockposition, i, j);
|
||||
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
|
||||
index 87a4e53ad1ea1978bc9a0c335293190460efde8b..f2512fd66849cfa743cf7bfdffcb4c26178ffebf 100644
|
||||
index 0e6813601f082a9e81278cebbfadbaca5769802a..edd864a699c4fed0e7da4c3ca0d220a1029f3c63 100644
|
||||
--- a/src/main/java/net/minecraft/server/World.java
|
||||
+++ b/src/main/java/net/minecraft/server/World.java
|
||||
@@ -774,7 +774,8 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
|
||||
|
@ -129,7 +129,7 @@ index 0000000000000000000000000000000000000000..fe7330fabe386966c2d203a190a00a78
|
||||
+}
|
||||
\ No newline at end of file
|
||||
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
|
||||
index f2512fd66849cfa743cf7bfdffcb4c26178ffebf..b47bc7cadd34f4592605c1ecfdfcb33e2d580034 100644
|
||||
index edd864a699c4fed0e7da4c3ca0d220a1029f3c63..e592ca980967804cf5ac9cbf2a917d584a23163b 100644
|
||||
--- a/src/main/java/net/minecraft/server/World.java
|
||||
+++ b/src/main/java/net/minecraft/server/World.java
|
||||
@@ -97,6 +97,8 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
|
||||
|
@ -5,7 +5,7 @@ Subject: [PATCH] Don't wake up entities when damage event is cancelled
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
index f2adabadfe1ec3a294db6feebda4945760340dff..c1a9aa32d8bb224236fad16758e80952ab1ba6c8 100644
|
||||
index 95ccaab19b46785dd515b9d444557ae56de8ab89..a198bdf26b60caea8c8b105cb0e4b82c0340fede 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
@@ -1118,9 +1118,12 @@ public abstract class EntityLiving extends Entity {
|
||||
|
@ -0,0 +1,152 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: YouHaveTrouble <garrenpolska@gmail.com>
|
||||
Date: Fri, 5 Feb 2021 01:11:22 +0100
|
||||
Subject: [PATCH] Toggle for water sensitive mob damage
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityBlaze.java b/src/main/java/net/minecraft/server/EntityBlaze.java
|
||||
index 90b90fa33b39020189a1d4a5826fa3ab720488cd..b4db9869d172406f4eff84cfb2648b5c6c6d00e2 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityBlaze.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityBlaze.java
|
||||
@@ -116,7 +116,7 @@ public class EntityBlaze extends EntityMonster {
|
||||
|
||||
@Override
|
||||
public boolean dO() {
|
||||
- return true;
|
||||
+ return world.purpurConfig.blazeTakeDamageFromWater; // Purpur - Toggle for water sensitive mob damage
|
||||
}
|
||||
|
||||
@Override
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityEnderman.java b/src/main/java/net/minecraft/server/EntityEnderman.java
|
||||
index beee80c3d8277f2d784fb6b8a4152a871ee020b0..b884addf2ce6f1ef7394658078deb2e75370654f 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityEnderman.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityEnderman.java
|
||||
@@ -234,7 +234,7 @@ public class EntityEnderman extends EntityMonster implements IEntityAngerable {
|
||||
|
||||
@Override
|
||||
public boolean dO() {
|
||||
- return true;
|
||||
+ return world.purpurConfig.endermanTakeDamageFromWater; // Purpur - Toggle for water sensitive mob damage
|
||||
}
|
||||
|
||||
@Override
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityInsentient.java b/src/main/java/net/minecraft/server/EntityInsentient.java
|
||||
index 03f480e29b92e278e1d4901ee4388f02ef6e3a82..dac0d2f9f4c8c909f0c03baa30c0565633d3af42 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityInsentient.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityInsentient.java
|
||||
@@ -786,7 +786,8 @@ public abstract class EntityInsentient extends EntityLiving {
|
||||
if (goalFloat.validConditions()) goalFloat.update();
|
||||
this.getControllerJump().jumpIfSet();
|
||||
}
|
||||
- if ((this instanceof EntityBlaze || this instanceof EntityEnderman) && isInWaterOrRainOrBubble()) {
|
||||
+
|
||||
+ if (isSensitiveToWater() && isInWaterOrRainOrBubble()) { // Purpur - Toggle for water sensitive mob damage
|
||||
damageEntity(DamageSource.DROWN, 1.0F);
|
||||
}
|
||||
return;
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
index 330f27f649a2ab1567ebc1b547f1f2a5ce645055..5f9d8999ae7a1d742918e58c0f1bb36fc74d45fe 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
@@ -2876,6 +2876,7 @@ public abstract class EntityLiving extends Entity {
|
||||
|
||||
}
|
||||
|
||||
+ public boolean isSensitiveToWater() { return dO(); } // Purpur - OBFHELPER
|
||||
public boolean dO() {
|
||||
return false;
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/EntitySnowman.java b/src/main/java/net/minecraft/server/EntitySnowman.java
|
||||
index 550decf12140596e63b57a7ee5940e4f7b7dbc0b..286c956bc56ff2adc75b35ac8bfaaf985d9e3368 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntitySnowman.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntitySnowman.java
|
||||
@@ -71,7 +71,7 @@ public class EntitySnowman extends EntityGolem implements IShearable, IRangedEnt
|
||||
|
||||
@Override
|
||||
public boolean dO() {
|
||||
- return true;
|
||||
+ return world.purpurConfig.snowGolemTakeDamageFromWater; // Purpur - Toggle for water sensitive mob damage
|
||||
}
|
||||
|
||||
@Override
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityStrider.java b/src/main/java/net/minecraft/server/EntityStrider.java
|
||||
index 964956a0027bf0941ff75d658be760b754772fa0..7c5472a5138011a3376b7b6ec2467bdfc1739033 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityStrider.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityStrider.java
|
||||
@@ -338,7 +338,7 @@ public class EntityStrider extends EntityAnimal implements ISteerable, ISaddleab
|
||||
|
||||
@Override
|
||||
public boolean dO() {
|
||||
- return true;
|
||||
+ return world.purpurConfig.striderTakeDamageFromWater; // Purpur - Toggle for water sensitive mob damage
|
||||
}
|
||||
|
||||
@Override
|
||||
diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
||||
index 074ebb5ee808875b1a90b70e42ef440af002f5c6..42e09d1a20de61b68fedd4ca56517e06aa18f173 100644
|
||||
--- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
||||
+++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
||||
@@ -569,6 +569,7 @@ public class PurpurWorldConfig {
|
||||
public boolean blazeRidableInWater = false;
|
||||
public double blazeMaxY = 256D;
|
||||
public double blazeMaxHealth = 20.0D;
|
||||
+ public boolean blazeTakeDamageFromWater = true;
|
||||
private void blazeSettings() {
|
||||
blazeRidable = getBoolean("mobs.blaze.ridable", blazeRidable);
|
||||
blazeRidableInWater = getBoolean("mobs.blaze.ridable-in-water", blazeRidableInWater);
|
||||
@@ -579,6 +580,7 @@ public class PurpurWorldConfig {
|
||||
set("mobs.blaze.attributes.max_health", oldValue);
|
||||
}
|
||||
blazeMaxHealth = getDouble("mobs.blaze.attributes.max_health", blazeMaxHealth);
|
||||
+ blazeTakeDamageFromWater = getBoolean("mobs.blaze.takes-damage-from-water", blazeTakeDamageFromWater);
|
||||
}
|
||||
|
||||
public boolean catRidable = false;
|
||||
@@ -793,6 +795,7 @@ public class PurpurWorldConfig {
|
||||
public boolean endermanBypassMobGriefing = false;
|
||||
public boolean endermanDespawnEvenWithBlock = false;
|
||||
public double endermanMaxHealth = 40.0D;
|
||||
+ public boolean endermanTakeDamageFromWater = true;
|
||||
private void endermanSettings() {
|
||||
endermanRidable = getBoolean("mobs.enderman.ridable", endermanRidable);
|
||||
endermanRidableInWater = getBoolean("mobs.enderman.ridable-in-water", endermanRidableInWater);
|
||||
@@ -805,6 +808,7 @@ public class PurpurWorldConfig {
|
||||
set("mobs.enderman.attributes.max_health", oldValue);
|
||||
}
|
||||
endermanMaxHealth = getDouble("mobs.enderman.attributes.max_health", endermanMaxHealth);
|
||||
+ endermanTakeDamageFromWater = getBoolean("mobs.enderman.takes-damage-from-water", endermanTakeDamageFromWater);
|
||||
}
|
||||
|
||||
public boolean endermiteRidable = false;
|
||||
@@ -1490,6 +1494,7 @@ public class PurpurWorldConfig {
|
||||
public float snowGolemSnowBallModifier = 10.0F;
|
||||
public double snowGolemAttackDistance = 1.25D;
|
||||
public double snowGolemMaxHealth = 4.0D;
|
||||
+ public boolean snowGolemTakeDamageFromWater = true;
|
||||
private void snowGolemSettings() {
|
||||
snowGolemRidable = getBoolean("mobs.snow_golem.ridable", snowGolemRidable);
|
||||
snowGolemRidableInWater = getBoolean("mobs.snow_golem.ridable-in-water", snowGolemRidableInWater);
|
||||
@@ -1507,6 +1512,7 @@ public class PurpurWorldConfig {
|
||||
set("mobs.snow_golem.attributes.max_health", oldValue);
|
||||
}
|
||||
snowGolemMaxHealth = getDouble("mobs.snow_golem.attributes.max_health", snowGolemMaxHealth);
|
||||
+ snowGolemTakeDamageFromWater = getBoolean("mobs.snow_golem.takes-damage-from-water", snowGolemTakeDamageFromWater);
|
||||
}
|
||||
|
||||
public boolean squidRidable = false;
|
||||
@@ -1560,6 +1566,7 @@ public class PurpurWorldConfig {
|
||||
public int striderBreedingTicks = 6000;
|
||||
public boolean striderGiveSaddleBack = false;
|
||||
public double striderMaxHealth = 20.0D;
|
||||
+ public boolean striderTakeDamageFromWater = true;
|
||||
private void striderSettings() {
|
||||
striderRidable = getBoolean("mobs.strider.ridable", striderRidable);
|
||||
striderRidableInWater = getBoolean("mobs.strider.ridable-in-water", striderRidableInWater);
|
||||
@@ -1571,6 +1578,7 @@ public class PurpurWorldConfig {
|
||||
set("mobs.strider.attributes.max_health", oldValue);
|
||||
}
|
||||
striderMaxHealth = getDouble("mobs.strider.attributes.max_health", striderMaxHealth);
|
||||
+ striderTakeDamageFromWater = getBoolean("mobs.strider.takes-damage-from-water", striderTakeDamageFromWater);
|
||||
}
|
||||
|
||||
public boolean tropicalFishRidable = false;
|
@ -47,7 +47,7 @@ index 3ee8d31c453105eca7b96bede39a9ebbf40e1c2c..0a9f03526abf0638ada15d9810b94988
|
||||
this.setAllowFlight(dedicatedserverproperties.allowFlight);
|
||||
this.setResourcePack(dedicatedserverproperties.resourcePack, this.ba());
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
index c1a9aa32d8bb224236fad16758e80952ab1ba6c8..0ddca6cbd14c1c3a60d3a311ef728a4c6447af4a 100644
|
||||
index a198bdf26b60caea8c8b105cb0e4b82c0340fede..39280197902b330dd3d39c721cdef744a15b0550 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
@@ -271,6 +271,7 @@ public abstract class EntityLiving extends Entity {
|
||||
|
@ -59,10 +59,10 @@ index f452cc575adf9137f3b9f1eef1904f8116c7a7ec..15aa603a771c327879a4088609850fb8
|
||||
}
|
||||
\ No newline at end of file
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
index 0ddca6cbd14c1c3a60d3a311ef728a4c6447af4a..10204a9aa0e995dd9b3547c6ef03b597a48c5604 100644
|
||||
index 39280197902b330dd3d39c721cdef744a15b0550..04623e988ea1f908087b75b729aa1076fb76d8fb 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
@@ -2939,7 +2939,7 @@ public abstract class EntityLiving extends Entity {
|
||||
@@ -2940,7 +2940,7 @@ public abstract class EntityLiving extends Entity {
|
||||
// Paper - end don't run getEntities if we're not going to use its result
|
||||
// Tuinity start - reduce memory allocation from collideNearby
|
||||
List<Entity> list = com.tuinity.tuinity.util.CachedLists.getTempGetEntitiesList();
|
||||
|
@ -39,7 +39,7 @@ index 5d3bb5f393a1e0e4a2e8b9a466530a91279697a9..7f084e7f11a829c10d113c7fb39eec0b
|
||||
if (enumdirection2 != EnumDirection.DOWN && world.isBlockFacePowered(blockposition1.shift(enumdirection2), enumdirection2)) {
|
||||
return true;
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
index 10204a9aa0e995dd9b3547c6ef03b597a48c5604..89066081dc903f8e2a9cbeab803a6c85042ac212 100644
|
||||
index 04623e988ea1f908087b75b729aa1076fb76d8fb..d165d1ec9c2d81f26df0a1a4d5d5f79a6358552b 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
@@ -2623,10 +2623,12 @@ public abstract class EntityLiving extends Entity {
|
||||
|
@ -5,7 +5,7 @@ Subject: [PATCH] Optimize TileEntity load/unload
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
|
||||
index b47bc7cadd34f4592605c1ecfdfcb33e2d580034..626fab23a727073f502d934fc8f8616326ee8b52 100644
|
||||
index e592ca980967804cf5ac9cbf2a917d584a23163b..fe3b5e9e00900a553a2bbaf0bcd0f0d8c876d5b6 100644
|
||||
--- a/src/main/java/net/minecraft/server/World.java
|
||||
+++ b/src/main/java/net/minecraft/server/World.java
|
||||
@@ -42,8 +42,8 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
|
||||
|
@ -6,7 +6,7 @@ Subject: [PATCH] Optimize some stuff in WorldServer ticking
|
||||
Replaced some streams and some array lists with glue lists
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
|
||||
index 44d1a7dad0ec12b275e8d27be47d929ae8c8f6e1..af9a28daeaddfa0ba3104bbb01a2b6f29a97c06d 100644
|
||||
index 2a60d8fc88ab83a157f00ce5e5ccd99ce3660453..7fa720de5c24820d2cd7eea5f74d6c1502afe461 100644
|
||||
--- a/src/main/java/net/minecraft/server/WorldServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/WorldServer.java
|
||||
@@ -780,12 +780,21 @@ public class WorldServer extends World implements GeneratorAccessSeed {
|
||||
|
@ -18,7 +18,7 @@ index 3c4c3e43b5b947f7332f2dd6d1f1dae4be7708ab..be4193a1c1f4d7bb62d42b786f33f636
|
||||
return this.size == 0 && this.pendingTasks.isEmpty();
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
|
||||
index af9a28daeaddfa0ba3104bbb01a2b6f29a97c06d..a9669bf5b52580c745f747e69c0c6aae273a6bca 100644
|
||||
index 7fa720de5c24820d2cd7eea5f74d6c1502afe461..2734b76f58401bdddf6407db7c7c445d489ad488 100644
|
||||
--- a/src/main/java/net/minecraft/server/WorldServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/WorldServer.java
|
||||
@@ -1792,6 +1792,7 @@ public class WorldServer extends World implements GeneratorAccessSeed {
|
||||
|
@ -334,7 +334,7 @@ index 0000000000000000000000000000000000000000..a5314a0396f4a8f373d855e873820ddd
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
|
||||
index 8b7fd21e6b366196fbc9cd44a340335c4cf9205f..8b8ecc2d8925b3c209d99e101f6e478b08d86db9 100644
|
||||
index 7b8036840dcca16904b3063c209d5ff10ab8a6af..6bc5fedc4d8effa530799eac814f626dfeed2105 100644
|
||||
--- a/src/main/java/net/minecraft/server/Chunk.java
|
||||
+++ b/src/main/java/net/minecraft/server/Chunk.java
|
||||
@@ -336,6 +336,14 @@ public class Chunk implements IChunkAccess {
|
||||
|
@ -108,7 +108,7 @@ index 0668d383db1f3a81d1053954d72678c7ac5aecec..7b9f83e63d0f9cd83a246be33af4ab91
|
||||
ChatComponentText chatcomponenttext = new ChatComponentText("Internal server error");
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
|
||||
index 626fab23a727073f502d934fc8f8616326ee8b52..ccf13e4daf0524c7a0c8de3b574cea8c188011ce 100644
|
||||
index fe3b5e9e00900a553a2bbaf0bcd0f0d8c876d5b6..746ee21f175c80e8cddb21a6a626f978da8952dd 100644
|
||||
--- a/src/main/java/net/minecraft/server/World.java
|
||||
+++ b/src/main/java/net/minecraft/server/World.java
|
||||
@@ -988,6 +988,10 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
|
||||
|
1
upstream/Airplane
Submodule
1
upstream/Airplane
Submodule
@ -0,0 +1 @@
|
||||
Subproject commit 1b11269397834a35d06fd62e08d71d06bb6416eb
|
@ -1 +0,0 @@
|
||||
Subproject commit 10c581013c9d6cad870988764e929c9ead682561
|
@ -1 +1 @@
|
||||
Subproject commit e581a731bf4b650fca48657de4e438fd413c5167
|
||||
Subproject commit 5cff60d5c6a3563d0f8dd6f611ad1ade913bcc1c
|
1
upstreamCommits/Airplane
Normal file
1
upstreamCommits/Airplane
Normal file
@ -0,0 +1 @@
|
||||
1b11269397834a35d06fd62e08d71d06bb6416eb
|
@ -1 +0,0 @@
|
||||
10c581013c9d6cad870988764e929c9ead682561
|
@ -1 +1 @@
|
||||
e581a731bf4b650fca48657de4e438fd413c5167
|
||||
5cff60d5c6a3563d0f8dd6f611ad1ade913bcc1c
|
4
upstreamConfig/0003-Airplane.properties
Normal file
4
upstreamConfig/0003-Airplane.properties
Normal file
@ -0,0 +1,4 @@
|
||||
name=Airplane
|
||||
useBlackList=False
|
||||
list=server/Airplane-MC-Dev-Fixes.patch,server/Remove-streams.patch,server/Strip-raytracing-for-EntityLiving-hasLineOfSight.patch,server/Simpler-ShapelessRecipes-comparison-for-Vanilla.patch,server/Queue-lighting-update-only-once.patch,server/Use-unmodifiableMap-instead-of-making-copy.patch,server/Swap-priority-of-checks-in-chunk-ticking.patch,server/Reduce-projectile-chunk-loading.patch,server/Optimize-random-calls-in-chunk-ticking.patch,server/Don-t-get-entity-equipment-if-not-needed.patch
|
||||
branch=origin/master
|
@ -1,4 +0,0 @@
|
||||
name=AirplaneLite
|
||||
useBlackList=False
|
||||
list=server/AirplaneLite-MC-Dev-Fixes.patch,server/Remove-streams.patch,server/Strip-raytracing-for-EntityLiving-hasLineOfSight.patch,server/Simpler-ShapelessRecipes-comparison-for-Vanilla.patch,server/Queue-lighting-update-only-once.patch,server/Use-unmodifiableMap-instead-of-making-copy.patch,server/Swap-priority-of-checks-in-chunk-ticking.patch,server/Reduce-projectile-chunk-loading.patch,server/Optimize-random-calls-in-chunk-ticking.patch,server/Don-t-get-entity-equipment-if-not-needed.patch
|
||||
branch=origin/master
|
Loading…
Reference in New Issue
Block a user