mirror of
https://github.com/Dreeam-qwq/Gale.git
synced 2025-12-23 16:59:23 +00:00
Updated Upstream (Paper)
This commit is contained in:
@@ -8,7 +8,7 @@ plugins {
|
||||
java
|
||||
`maven-publish`
|
||||
id("com.github.johnrengelman.shadow") version "8.1.1" apply false
|
||||
id("io.papermc.paperweight.patcher") version "1.5.13"
|
||||
id("io.papermc.paperweight.patcher") version "1.5.15"
|
||||
}
|
||||
|
||||
allprojects {
|
||||
@@ -60,7 +60,7 @@ repositories {
|
||||
|
||||
dependencies {
|
||||
remapper("net.fabricmc:tiny-remapper:0.10.1:fat")
|
||||
decompiler("net.minecraftforge:forgeflower:2.0.627.2")
|
||||
decompiler("org.vineflower:vineflower:1.10.1")
|
||||
paperclip("io.papermc:paperclip:3.0.3")
|
||||
}
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ group=org.galemc.gale
|
||||
version=1.20.4-R0.1-SNAPSHOT
|
||||
|
||||
mcVersion=1.20.4
|
||||
paperRef=a2035440cfe3ec829513a74b1309859fc15be972
|
||||
paperRef=862299b6a6588ff60db69dbc40e8514f9690d318
|
||||
|
||||
org.gradle.caching=true
|
||||
org.gradle.parallel=true
|
||||
|
||||
@@ -13,10 +13,10 @@ As part of: Paper (https://github.com/PaperMC/Paper)
|
||||
Licensed under: MIT (https://opensource.org/licenses/MIT)
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
|
||||
index 0eb61b090d6f8fa6d99735ff3680dac774c52c1f..0d443f469142766a1b6959d88930786e899b4aae 100644
|
||||
index 4ff1b38eb65f97344257204cf018f176f247ed36..bd6d14ffbbc93a94656255c395628df776334310 100644
|
||||
--- a/src/main/java/org/bukkit/Server.java
|
||||
+++ b/src/main/java/org/bukkit/Server.java
|
||||
@@ -2227,6 +2227,15 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
|
||||
@@ -2233,6 +2233,15 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
|
||||
{
|
||||
throw new UnsupportedOperationException("Not supported yet.");
|
||||
}
|
||||
|
||||
@@ -7,10 +7,10 @@ License: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html)
|
||||
Gale - https://galemc.org
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java
|
||||
index db46e3233edf18bd91a6da8612ccc9f0080d5c17..7e040ac2228e12c32a563a3c9325d55e6d91828e 100644
|
||||
index 9a428153f34291bdc026a71f7e60e285b7794b0c..ee513652ab11b9173e6dd83d9ff048ee50a5acd3 100644
|
||||
--- a/src/main/java/org/bukkit/Bukkit.java
|
||||
+++ b/src/main/java/org/bukkit/Bukkit.java
|
||||
@@ -2351,6 +2351,37 @@ public final class Bukkit {
|
||||
@@ -2357,6 +2357,37 @@ public final class Bukkit {
|
||||
return server.getTPS();
|
||||
}
|
||||
|
||||
@@ -49,10 +49,10 @@ index db46e3233edf18bd91a6da8612ccc9f0080d5c17..7e040ac2228e12c32a563a3c9325d55e
|
||||
* Get a sample of the servers last tick times (in nanos)
|
||||
*
|
||||
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
|
||||
index 0d443f469142766a1b6959d88930786e899b4aae..7ad9c543f8caf909f9548e2c549f29cf69407a29 100644
|
||||
index bd6d14ffbbc93a94656255c395628df776334310..bdf18c891ff90ca6173ff8af14f6ad6dbc370ae7 100644
|
||||
--- a/src/main/java/org/bukkit/Server.java
|
||||
+++ b/src/main/java/org/bukkit/Server.java
|
||||
@@ -2009,6 +2009,31 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
|
||||
@@ -2015,6 +2015,31 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
|
||||
@NotNull
|
||||
public double[] getTPS();
|
||||
|
||||
|
||||
@@ -37,10 +37,10 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java
|
||||
index 7e040ac2228e12c32a563a3c9325d55e6d91828e..2bff9e833c74f416b90bf9d2894117d91d2073c5 100644
|
||||
index ee513652ab11b9173e6dd83d9ff048ee50a5acd3..7b28cc23aa63431fe51fc8e51d5774f4a314945f 100644
|
||||
--- a/src/main/java/org/bukkit/Bukkit.java
|
||||
+++ b/src/main/java/org/bukkit/Bukkit.java
|
||||
@@ -2351,8 +2351,30 @@ public final class Bukkit {
|
||||
@@ -2357,8 +2357,30 @@ public final class Bukkit {
|
||||
return server.getTPS();
|
||||
}
|
||||
|
||||
@@ -72,10 +72,10 @@ index 7e040ac2228e12c32a563a3c9325d55e6d91828e..2bff9e833c74f416b90bf9d2894117d9
|
||||
* Gets the average server TPS over the last 1 minute
|
||||
*
|
||||
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
|
||||
index 7ad9c543f8caf909f9548e2c549f29cf69407a29..0c88ec1eba01cf07d87dbb0c66a1848597116692 100644
|
||||
index bdf18c891ff90ca6173ff8af14f6ad6dbc370ae7..e634f4ce24423fd955bac3cd717f78142e7e4e30 100644
|
||||
--- a/src/main/java/org/bukkit/Server.java
|
||||
+++ b/src/main/java/org/bukkit/Server.java
|
||||
@@ -2009,8 +2009,27 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
|
||||
@@ -2015,8 +2015,27 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
|
||||
@NotNull
|
||||
public double[] getTPS();
|
||||
|
||||
|
||||
@@ -23,10 +23,10 @@ The above copyright notice and this permission notice shall be included in all c
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java
|
||||
index 2bff9e833c74f416b90bf9d2894117d91d2073c5..12412ffbfa05f91d46509a90fe3af7085349eb63 100644
|
||||
index 7b28cc23aa63431fe51fc8e51d5774f4a314945f..d8201747ede92a0123eec012844a7a674e6947f5 100644
|
||||
--- a/src/main/java/org/bukkit/Bukkit.java
|
||||
+++ b/src/main/java/org/bukkit/Bukkit.java
|
||||
@@ -2927,6 +2927,20 @@ public final class Bukkit {
|
||||
@@ -2933,6 +2933,20 @@ public final class Bukkit {
|
||||
}
|
||||
// Paper end - Folia region threading API
|
||||
|
||||
@@ -48,10 +48,10 @@ index 2bff9e833c74f416b90bf9d2894117d91d2073c5..12412ffbfa05f91d46509a90fe3af708
|
||||
public static Server.Spigot spigot() {
|
||||
return server.spigot();
|
||||
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
|
||||
index 0c88ec1eba01cf07d87dbb0c66a1848597116692..bb73389fd8ffcc2fb89ece44e7704f87baa3058e 100644
|
||||
index e634f4ce24423fd955bac3cd717f78142e7e4e30..e0615e17765406bab75b5d16f9056d6821c577ee 100644
|
||||
--- a/src/main/java/org/bukkit/Server.java
|
||||
+++ b/src/main/java/org/bukkit/Server.java
|
||||
@@ -2565,4 +2565,30 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
|
||||
@@ -2571,4 +2571,30 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
|
||||
*/
|
||||
boolean isOwnedByCurrentRegion(@NotNull Entity entity);
|
||||
// Paper end - Folia region threading API
|
||||
|
||||
@@ -7,162 +7,59 @@ License: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html)
|
||||
Gale - https://galemc.org
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/commands/execution/tasks/BuildContexts.java b/src/main/java/net/minecraft/commands/execution/tasks/BuildContexts.java
|
||||
index 89f0f68b3e2be64bcbf8b173a51d56ea3a3fb4ea..446b7e585afccb034816a5371a3b7376cbef7177 100644
|
||||
index b0d26b0eadb2a43924629424a6c13198aace8f69..bcba8224b9a210bced04ff370a73b3067109fa71 100644
|
||||
--- a/src/main/java/net/minecraft/commands/execution/tasks/BuildContexts.java
|
||||
+++ b/src/main/java/net/minecraft/commands/execution/tasks/BuildContexts.java
|
||||
@@ -94,7 +94,7 @@ public class BuildContexts<T extends ExecutionCommandSource<T>> {
|
||||
@@ -52,7 +52,7 @@ public class BuildContexts<T extends ExecutionCommandSource<T>> {
|
||||
}
|
||||
|
||||
RedirectModifier<T> redirectModifier = commandContext.getRedirectModifier();
|
||||
- if (redirectModifier instanceof CustomModifierExecutor<T> customModifierExecutor) {
|
||||
+ if (redirectModifier instanceof CustomModifierExecutor customModifierExecutor) { // Gale - dev import deobfuscation fixes
|
||||
customModifierExecutor.apply(baseSource, list, contextChain, chainModifiers, ExecutionControl.create(context, frame));
|
||||
return;
|
||||
}
|
||||
@@ -92,11 +92,11 @@ public class BuildContexts<T extends ExecutionCommandSource<T>> {
|
||||
|
||||
if (list.isEmpty()) {
|
||||
if (chainModifiers.isReturn()) {
|
||||
- context.queueNext(new CommandQueueEntry<>(frame, FallthroughTask.instance()));
|
||||
+ context.queueNext(new CommandQueueEntry<>(frame, (EntryAction<T>) FallthroughTask.instance())); // Gale - dev import deobfuscation fixes
|
||||
}
|
||||
|
||||
} else {
|
||||
diff --git a/src/main/java/net/minecraft/server/network/TextFilterClient.java b/src/main/java/net/minecraft/server/network/TextFilterClient.java
|
||||
index 1b617a64f2f7a48a8b505ee87b61a040b80d8cc6..92f56e29ffb7386cbbf7893c000ff330eb997ba5 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/TextFilterClient.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/TextFilterClient.java
|
||||
@@ -98,38 +98,44 @@ public class TextFilterClient implements AutoCloseable {
|
||||
URL uRL2 = getEndpoint(uRI, jsonObject2, "join", "v1/join");
|
||||
URL uRL3 = getEndpoint(uRI, jsonObject2, "leave", "v1/leave");
|
||||
TextFilterClient.JoinOrLeaveEncoder joinOrLeaveEncoder = (profile) -> {
|
||||
- JsonObject jsonObject = new JsonObject();
|
||||
- jsonObject.addProperty("server", string2);
|
||||
- jsonObject.addProperty("room", string3);
|
||||
- jsonObject.addProperty("user_id", profile.getId().toString());
|
||||
- jsonObject.addProperty("user_display_name", profile.getName());
|
||||
- return jsonObject;
|
||||
+ // Gale start - dev import deobfuscation fixes
|
||||
+ JsonObject jsonObject1 = new JsonObject();
|
||||
+ jsonObject1.addProperty("server", string2);
|
||||
+ jsonObject1.addProperty("room", string3);
|
||||
+ jsonObject1.addProperty("user_id", profile.getId().toString());
|
||||
+ jsonObject1.addProperty("user_display_name", profile.getName());
|
||||
+ return jsonObject1;
|
||||
+ // Gale end - dev import deobfuscation fixes
|
||||
};
|
||||
TextFilterClient.MessageEncoder messageEncoder;
|
||||
if (bl) {
|
||||
messageEncoder = (profile, message) -> {
|
||||
- JsonObject jsonObject = new JsonObject();
|
||||
- jsonObject.addProperty("rule", i);
|
||||
- jsonObject.addProperty("server", string2);
|
||||
- jsonObject.addProperty("room", string3);
|
||||
- jsonObject.addProperty("player", profile.getId().toString());
|
||||
- jsonObject.addProperty("player_display_name", profile.getName());
|
||||
- jsonObject.addProperty("text", message);
|
||||
- jsonObject.addProperty("language", "*");
|
||||
- return jsonObject;
|
||||
+ // Gale start - dev import deobfuscation fixes
|
||||
+ JsonObject jsonObject1 = new JsonObject();
|
||||
+ jsonObject1.addProperty("rule", i);
|
||||
+ jsonObject1.addProperty("server", string2);
|
||||
+ jsonObject1.addProperty("room", string3);
|
||||
+ jsonObject1.addProperty("player", profile.getId().toString());
|
||||
+ jsonObject1.addProperty("player_display_name", profile.getName());
|
||||
+ jsonObject1.addProperty("text", message);
|
||||
+ jsonObject1.addProperty("language", "*");
|
||||
+ return jsonObject1;
|
||||
+ // Gale end - dev import deobfuscation fixes
|
||||
};
|
||||
} else {
|
||||
String string5 = String.valueOf(i);
|
||||
messageEncoder = (profile, message) -> {
|
||||
- JsonObject jsonObject = new JsonObject();
|
||||
- jsonObject.addProperty("rule_id", string5);
|
||||
- jsonObject.addProperty("category", string2);
|
||||
- jsonObject.addProperty("subcategory", string3);
|
||||
- jsonObject.addProperty("user_id", profile.getId().toString());
|
||||
- jsonObject.addProperty("user_display_name", profile.getName());
|
||||
- jsonObject.addProperty("text", message);
|
||||
- jsonObject.addProperty("language", "*");
|
||||
- return jsonObject;
|
||||
+ // Gale start - dev import deobfuscation fixes
|
||||
+ JsonObject jsonObject1 = new JsonObject();
|
||||
+ jsonObject1.addProperty("rule_id", string5);
|
||||
+ jsonObject1.addProperty("category", string2);
|
||||
+ jsonObject1.addProperty("subcategory", string3);
|
||||
+ jsonObject1.addProperty("user_id", profile.getId().toString());
|
||||
+ jsonObject1.addProperty("user_display_name", profile.getName());
|
||||
+ jsonObject1.addProperty("text", message);
|
||||
+ jsonObject1.addProperty("language", "*");
|
||||
+ return jsonObject1;
|
||||
+ // Gale end - dev import deobfuscation fixes
|
||||
};
|
||||
}
|
||||
CommandContext<T> commandContext2 = contextChain.getTopContext();
|
||||
- if (commandContext2.getCommand() instanceof CustomCommandExecutor<T> customCommandExecutor) {
|
||||
+ if (commandContext2.getCommand() instanceof CustomCommandExecutor customCommandExecutor) { // Gale - dev import deobfuscation fixes
|
||||
ExecutionControl<T> executionControl = ExecutionControl.create(context, frame);
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/util/ClassInstanceMultiMap.java b/src/main/java/net/minecraft/util/ClassInstanceMultiMap.java
|
||||
index 50a9f33aa31e9273c7c52d4bb2b02f0f884f7ba5..19779298b2b2ecbe30f9308dad1d80379220387a 100644
|
||||
--- a/src/main/java/net/minecraft/util/ClassInstanceMultiMap.java
|
||||
+++ b/src/main/java/net/minecraft/util/ClassInstanceMultiMap.java
|
||||
@@ -58,7 +58,7 @@ public class ClassInstanceMultiMap<T> extends AbstractCollection<T> {
|
||||
if (!this.baseClass.isAssignableFrom(type)) {
|
||||
throw new IllegalArgumentException("Don't know how to search for " + type);
|
||||
} else {
|
||||
- List<? extends T> list = this.byClass.computeIfAbsent(type, (typeClass) -> {
|
||||
+ List list = this.byClass.computeIfAbsent(type, (typeClass) -> { // Gale - dev import deobfuscation fixes
|
||||
return this.allInstances.stream().filter(typeClass::isInstance).collect(Collectors.toList());
|
||||
});
|
||||
return Collections.unmodifiableCollection(list);
|
||||
for (T executionCommandSource2 : list) {
|
||||
diff --git a/src/main/java/net/minecraft/util/ExtraCodecs.java b/src/main/java/net/minecraft/util/ExtraCodecs.java
|
||||
index fc10422e91d01615db15c750ae5d9f83d1bec94e..eafd1acdca9d34804b1894694f1856d5af6c1e51 100644
|
||||
index 0530b87c422a6b767c1a18434f93f18f16580785..64dd6f81e24d18df3b5efc87a0cb452759d3697a 100644
|
||||
--- a/src/main/java/net/minecraft/util/ExtraCodecs.java
|
||||
+++ b/src/main/java/net/minecraft/util/ExtraCodecs.java
|
||||
@@ -219,7 +219,7 @@ public class ExtraCodecs {
|
||||
}) : DataResult.success(is[0]);
|
||||
}, Character::toString);
|
||||
public static Codec<String> RESOURCE_PATH_CODEC = validate(Codec.STRING, (path) -> {
|
||||
- return !ResourceLocation.isValidPath(path) ? DataResult.error(() -> {
|
||||
+ return !ResourceLocation.isValidResourceLocation(path) ? DataResult.error(() -> { // Gale - dev import deobfuscation fixes
|
||||
return "Invalid string to use as a resource path element: " + path;
|
||||
}) : DataResult.success(path);
|
||||
});
|
||||
@@ -247,7 +247,7 @@ public class ExtraCodecs {
|
||||
return ImmutableList.of(leftFunction.apply(pair), rightFunction.apply(pair));
|
||||
});
|
||||
Codec<I> codec3 = RecordCodecBuilder.<Pair>create((instance) -> {
|
||||
- return instance.group(codec.fieldOf(leftFieldName).forGetter(Pair::getFirst), codec.fieldOf(rightFieldName).forGetter(Pair::getSecond)).apply(instance, Pair::of);
|
||||
+ return instance.group(codec.fieldOf(leftFieldName).forGetter(pair -> (P) pair.getFirst()), codec.fieldOf(rightFieldName).forGetter(pair -> (P) pair.getSecond())).apply(instance, Pair::of); // Gale - dev import deobfuscation fixes
|
||||
}).comapFlatMap((pair) -> {
|
||||
return combineFunction.apply((P)pair.getFirst(), (P)pair.getSecond());
|
||||
}, (pair) -> {
|
||||
@@ -272,7 +272,7 @@ public class ExtraCodecs {
|
||||
@@ -225,7 +225,7 @@ public class ExtraCodecs {
|
||||
return combineFunction.apply(object, object2);
|
||||
}), pair -> ImmutableList.of(leftFunction.apply((I)pair), rightFunction.apply((I)pair)));
|
||||
Codec<I> codec3 = RecordCodecBuilder.<Pair>create(
|
||||
- instance -> instance.group(codec.fieldOf(leftFieldName).forGetter(Pair::getFirst), codec.fieldOf(rightFieldName).forGetter(Pair::getSecond))
|
||||
+ instance -> instance.group(codec.fieldOf(leftFieldName).forGetter(pair -> (P) pair.getFirst()), codec.fieldOf(rightFieldName).forGetter(pair -> (P) pair.getSecond())) // Gale - dev import deobfuscation fixes
|
||||
.apply(instance, Pair::of)
|
||||
)
|
||||
.comapFlatMap(
|
||||
@@ -248,7 +248,7 @@ public class ExtraCodecs {
|
||||
Optional<Pair<A, T>> optional = dataResult.resultOrPartial(mutableObject::setValue);
|
||||
return optional.isPresent() ? dataResult : DataResult.error(() -> {
|
||||
return "(" + (String)mutableObject.getValue() + " -> using default)";
|
||||
- }, Pair.of(object, object));
|
||||
+ }, Pair.of(object, (T) object)); // Gale - dev import deobfuscation fixes
|
||||
return optional.isPresent()
|
||||
? dataResult
|
||||
- : DataResult.error(() -> "(" + mutableObject.getValue() + " -> using default)", Pair.of(object, object));
|
||||
+ : DataResult.error(() -> "(" + mutableObject.getValue() + " -> using default)", Pair.of((A) object, object)); // Gale - dev import deobfuscation fixes
|
||||
}
|
||||
|
||||
public <T> DataResult<T> coApply(DynamicOps<T> dynamicOps, A objectx, DataResult<T> dataResult) {
|
||||
@@ -574,8 +574,10 @@ public class ExtraCodecs {
|
||||
return object == null ? DataResult.error(() -> {
|
||||
return "Missing \"" + typeKey + "\" in: " + mapLike;
|
||||
}) : typeCodec.decode(dynamicOps, object).flatMap((pair) -> {
|
||||
- T object = Objects.requireNonNullElseGet(mapLike.get(parametersKey), dynamicOps::emptyMap);
|
||||
- return parametersCodecGetter.apply(pair.getFirst()).decode(dynamicOps, object).map(Pair::getFirst);
|
||||
+ // Gale start - dev import deobfuscation fixes
|
||||
+ T object2 = Objects.requireNonNullElseGet(mapLike.get(parametersKey), dynamicOps::emptyMap);
|
||||
+ return parametersCodecGetter.apply(pair.getFirst()).decode(dynamicOps, object2).map(Pair::getFirst);
|
||||
+ // Gale end - dev import deobfuscation fixes
|
||||
});
|
||||
}
|
||||
|
||||
@@ -591,7 +593,7 @@ public class ExtraCodecs {
|
||||
}
|
||||
|
||||
private <T, V2 extends V> DataResult<T> encode(Codec<V2> codec, V value, DynamicOps<T> ops) {
|
||||
- return codec.encodeStart(ops, value);
|
||||
+ return codec.encodeStart(ops, (V2) value); // Gale - dev import deobfuscation fixes
|
||||
}
|
||||
};
|
||||
}
|
||||
public <T> DataResult<T> coApply(DynamicOps<T> dynamicOps, A object, DataResult<T> dataResult) {
|
||||
diff --git a/src/main/java/net/minecraft/util/datafix/fixes/ChunkProtoTickListFix.java b/src/main/java/net/minecraft/util/datafix/fixes/ChunkProtoTickListFix.java
|
||||
index 2e650637afede22d314bbe4dd4e91806ce88dcc3..8081a24eb5a533a55cdca3c882ccc61255b8a76c 100644
|
||||
index c9101a3bf0cb2c9e49e0e768b379e8dd816012de..ec7f8ef7bcd0a6cf72d032714c3e1057704260e9 100644
|
||||
--- a/src/main/java/net/minecraft/util/datafix/fixes/ChunkProtoTickListFix.java
|
||||
+++ b/src/main/java/net/minecraft/util/datafix/fixes/ChunkProtoTickListFix.java
|
||||
@@ -17,6 +17,7 @@ import it.unimi.dsi.fastutil.ints.Int2ObjectArrayMap;
|
||||
@@ -18,6 +18,7 @@ import it.unimi.dsi.fastutil.ints.Int2ObjectArrayMap;
|
||||
import it.unimi.dsi.fastutil.ints.Int2ObjectMap;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
@@ -170,127 +67,20 @@ index 2e650637afede22d314bbe4dd4e91806ce88dcc3..8081a24eb5a533a55cdca3c882ccc612
|
||||
import java.util.Optional;
|
||||
import java.util.function.Function;
|
||||
import java.util.function.Supplier;
|
||||
@@ -51,23 +52,27 @@ public class ChunkProtoTickListFix extends DataFix {
|
||||
Dynamic<?> dynamic = typedx.get(DSL.remainderFinder());
|
||||
MutableInt mutableInt = new MutableInt();
|
||||
Int2ObjectMap<Supplier<ChunkProtoTickListFix.PoorMansPalettedContainer>> int2ObjectMap = new Int2ObjectArrayMap<>();
|
||||
- typedx.getOptionalTyped(opticFinder2).ifPresent((typed) -> {
|
||||
- typed.getAllTyped(opticFinder3).forEach((typedx) -> {
|
||||
- Dynamic<?> dynamic = typedx.get(DSL.remainderFinder());
|
||||
- int i = dynamic.get("Y").asInt(Integer.MAX_VALUE);
|
||||
+ // Gale start - dev import deobfuscation fixes
|
||||
+ typedx.getOptionalTyped(opticFinder2).ifPresent((typed2) -> {
|
||||
+ typed2.getAllTyped(opticFinder3).forEach((typedx2) -> {
|
||||
+ Dynamic<?> dynamic2 = typedx2.get(DSL.remainderFinder());
|
||||
+ int i = dynamic2.get("Y").asInt(Integer.MAX_VALUE);
|
||||
+ // Gale end - dev import deobfuscation fixes
|
||||
if (i != Integer.MAX_VALUE) {
|
||||
- if (typedx.getOptionalTyped(opticFinder5).isPresent()) {
|
||||
+ if (typedx2.getOptionalTyped(opticFinder5).isPresent()) { // Gale - dev import deobfuscation fixes
|
||||
mutableInt.setValue(Math.min(i, mutableInt.getValue()));
|
||||
}
|
||||
|
||||
- typedx.getOptionalTyped(opticFinder4).ifPresent((typed) -> {
|
||||
+ typedx2.getOptionalTyped(opticFinder4).ifPresent((typed3) -> { // Gale - dev import deobfuscation fixes
|
||||
int2ObjectMap.put(i, Suppliers.memoize(() -> {
|
||||
- List<? extends Dynamic<?>> list = typed.getOptionalTyped(opticFinder6).map((typedx) -> {
|
||||
- return typedx.write().result().map((dynamic) -> {
|
||||
- return dynamic.asList(Function.identity());
|
||||
+ // Gale start - dev import deobfuscation fixes
|
||||
+ List<? extends Dynamic<?>> list = typed.getOptionalTyped(opticFinder6).map((typedx3) -> {
|
||||
+ return typedx3.write().result().map((dynamic3) -> {
|
||||
+ return dynamic3.asList(Function.identity());
|
||||
+ // Gale end - dev import deobfuscation fixes
|
||||
}).orElse(Collections.emptyList());
|
||||
}).orElse(Collections.emptyList());
|
||||
- long[] ls = typed.get(DSL.remainderFinder()).get("data").asLongStream().toArray();
|
||||
+ long[] ls = typed3.get(DSL.remainderFinder()).get("data").asLongStream().toArray(); // Gale - dev import deobfuscation fixes
|
||||
return new ChunkProtoTickListFix.PoorMansPalettedContainer(list, ls);
|
||||
}));
|
||||
});
|
||||
@@ -76,8 +81,10 @@ public class ChunkProtoTickListFix extends DataFix {
|
||||
});
|
||||
byte b = mutableInt.getValue().byteValue();
|
||||
typedx = typedx.update(DSL.remainderFinder(), (dynamicx) -> {
|
||||
- return dynamicx.update("yPos", (dynamic) -> {
|
||||
- return dynamic.createByte(b);
|
||||
+ // Gale start - dev import deobfuscation fixes
|
||||
+ return dynamicx.update("yPos", (dynamic2) -> {
|
||||
+ return dynamic2.createByte(b);
|
||||
+ // Gale end - dev import deobfuscation fixes
|
||||
});
|
||||
});
|
||||
if (!typedx.getOptionalTyped(opticFinder7).isPresent() && !dynamic.get("fluid_ticks").result().isPresent()) {
|
||||
@@ -144,7 +151,7 @@ public class ChunkProtoTickListFix extends DataFix {
|
||||
int n = l >>> 4 & 15;
|
||||
@@ -183,7 +184,7 @@ public class ChunkProtoTickListFix extends DataFix {
|
||||
int o = l >>> 8 & 15;
|
||||
String string = function.apply(supplier != null ? supplier.get().get(m, n, o) : null);
|
||||
- return dynamic.createMap(ImmutableMap.builder().put(dynamic.createString("i"), dynamic.createString(string)).put(dynamic.createString("x"), dynamic.createInt(i * 16 + m)).put(dynamic.createString("y"), dynamic.createInt(j * 16 + n)).put(dynamic.createString("z"), dynamic.createInt(k * 16 + o)).put(dynamic.createString("t"), dynamic.createInt(0)).put(dynamic.createString("p"), dynamic.createInt(0)).build());
|
||||
+ return dynamic.createMap((Map) ImmutableMap.builder().put(dynamic.createString("i"), dynamic.createString(string)).put(dynamic.createString("x"), dynamic.createInt(i * 16 + m)).put(dynamic.createString("y"), dynamic.createInt(j * 16 + n)).put(dynamic.createString("z"), dynamic.createInt(k * 16 + o)).put(dynamic.createString("t"), dynamic.createInt(0)).put(dynamic.createString("p"), dynamic.createInt(0)).build()); // Gale - dev import deobfuscation fixes
|
||||
}
|
||||
|
||||
public static final class PoorMansPalettedContainer {
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/monster/Zoglin.java b/src/main/java/net/minecraft/world/entity/monster/Zoglin.java
|
||||
index b79c86272f12c4b1173ea494cbe09e1ecdc23533..05b4c054327bb86cf3b08e45916aac31aa9e000b 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/monster/Zoglin.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/monster/Zoglin.java
|
||||
@@ -184,7 +184,7 @@ public class Zoglin extends Monster implements Enemy, HoglinBase {
|
||||
|
||||
@Override
|
||||
public Brain<Zoglin> getBrain() {
|
||||
- return super.getBrain();
|
||||
+ return (Brain<Zoglin>) super.getBrain(); // Gale - dev import deobfuscation fixes
|
||||
}
|
||||
|
||||
protected void updateActivity() {
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/monster/breeze/Breeze.java b/src/main/java/net/minecraft/world/entity/monster/breeze/Breeze.java
|
||||
index 0b8992a9aea781470ab3b1880cf041972a20089d..d82f46f28ca3be96003269d881fe9911f81b8cec 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/monster/breeze/Breeze.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/monster/breeze/Breeze.java
|
||||
@@ -59,7 +59,7 @@ public class Breeze extends Monster {
|
||||
|
||||
@Override
|
||||
public Brain<Breeze> getBrain() {
|
||||
- return super.getBrain();
|
||||
+ return (Brain<Breeze>) super.getBrain(); // Gale - dev import deobfuscation fixes
|
||||
}
|
||||
|
||||
@Override
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/monster/piglin/PiglinBrute.java b/src/main/java/net/minecraft/world/entity/monster/piglin/PiglinBrute.java
|
||||
index d02ee11066fc4f07ccb110b09b86d895ff90d4f2..5d1a30e09870a5a535c71a2e44b8e6933de0c1e8 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/monster/piglin/PiglinBrute.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/monster/piglin/PiglinBrute.java
|
||||
@@ -70,7 +70,7 @@ public class PiglinBrute extends AbstractPiglin {
|
||||
|
||||
@Override
|
||||
public Brain<PiglinBrute> getBrain() {
|
||||
- return super.getBrain();
|
||||
+ return (Brain<PiglinBrute>) super.getBrain(); // Gale - dev import deobfuscation fixes
|
||||
}
|
||||
|
||||
@Override
|
||||
diff --git a/src/main/java/net/minecraft/world/item/BrushItem.java b/src/main/java/net/minecraft/world/item/BrushItem.java
|
||||
index 1482f3c93be0768098eccd286971e5945f6456d7..f46c16dd6ff9cd09ea579eecf99ce78c7eb39d49 100644
|
||||
--- a/src/main/java/net/minecraft/world/item/BrushItem.java
|
||||
+++ b/src/main/java/net/minecraft/world/item/BrushItem.java
|
||||
@@ -84,8 +84,10 @@ public class BrushItem extends Item {
|
||||
BlockEntity var18 = world.getBlockEntity(blockPos);
|
||||
if (var18 instanceof BrushableBlockEntity) {
|
||||
BrushableBlockEntity brushableBlockEntity = (BrushableBlockEntity)var18;
|
||||
- boolean bl2 = brushableBlockEntity.brush(world.getGameTime(), player, blockHitResult.getDirection());
|
||||
- if (bl2) {
|
||||
+ // Gale start - dev import deobfuscation fixes
|
||||
+ boolean bl22 = brushableBlockEntity.brush(world.getGameTime(), player, blockHitResult.getDirection());
|
||||
+ if (bl22) {
|
||||
+ // Gale end - dev import deobfuscation fixes
|
||||
EquipmentSlot equipmentSlot = stack.equals(player.getItemBySlot(EquipmentSlot.OFFHAND)) ? EquipmentSlot.OFFHAND : EquipmentSlot.MAINHAND;
|
||||
stack.hurtAndBreak(1, user, (userx) -> {
|
||||
userx.broadcastBreakEvent(equipmentSlot);
|
||||
return dynamic.createMap(
|
||||
- ImmutableMap.builder()
|
||||
+ (Map) ImmutableMap.builder() // Gale - dev import deobfuscation fixes
|
||||
.put(dynamic.createString("i"), dynamic.createString(string))
|
||||
.put(dynamic.createString("x"), dynamic.createInt(i * 16 + m))
|
||||
.put(dynamic.createString("y"), dynamic.createInt(j * 16 + n))
|
||||
diff --git a/src/main/java/net/minecraft/world/level/levelgen/SurfaceRules.java b/src/main/java/net/minecraft/world/level/levelgen/SurfaceRules.java
|
||||
index 915c1cbcc0ecf634cc76f02bba53dc82d22be698..0c05aa0d0938b19453f45adf5931c88713e3b227 100644
|
||||
index 71e1a68ae46475e7cdf37f32e101b3ca8847abd3..721dc2881c51a4bbcdaeaf3b309b316d26009535 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/levelgen/SurfaceRules.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/levelgen/SurfaceRules.java
|
||||
@@ -154,7 +154,7 @@ public class SurfaceRules {
|
||||
@@ -155,7 +155,7 @@ public class SurfaceRules {
|
||||
|
||||
@Override
|
||||
public SurfaceRules.SurfaceRule apply(SurfaceRules.Context context) {
|
||||
@@ -299,12 +89,12 @@ index 915c1cbcc0ecf634cc76f02bba53dc82d22be698..0c05aa0d0938b19453f45adf5931c887
|
||||
}
|
||||
}
|
||||
|
||||
@@ -176,10 +176,10 @@ public class SurfaceRules {
|
||||
@@ -177,10 +177,10 @@ public class SurfaceRules {
|
||||
}
|
||||
|
||||
@Override
|
||||
- public SurfaceRules.Condition apply(final SurfaceRules.Context context) {
|
||||
+ public SurfaceRules.Condition apply(final SurfaceRules.Context givenContext) { // Gale - dev import deobfuscation fixes
|
||||
- public SurfaceRules.Condition apply(SurfaceRules.Context context) {
|
||||
+ public SurfaceRules.Condition apply(SurfaceRules.Context givenContext) { // Gale - dev import deobfuscation fixes
|
||||
class BiomeCondition extends SurfaceRules.LazyYCondition {
|
||||
BiomeCondition() {
|
||||
- super(context);
|
||||
@@ -312,14 +102,14 @@ index 915c1cbcc0ecf634cc76f02bba53dc82d22be698..0c05aa0d0938b19453f45adf5931c887
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -494,12 +494,14 @@ public class SurfaceRules {
|
||||
@@ -514,12 +514,14 @@ public class SurfaceRules {
|
||||
}
|
||||
|
||||
@Override
|
||||
- public SurfaceRules.Condition apply(final SurfaceRules.Context context) {
|
||||
- public SurfaceRules.Condition apply(SurfaceRules.Context context) {
|
||||
- final NormalNoise normalNoise = context.randomState.getOrCreateNoise(this.noise);
|
||||
+ // Gale start - dev import deobfuscation fixes
|
||||
+ public SurfaceRules.Condition apply(final SurfaceRules.Context givenContext) {
|
||||
+ public SurfaceRules.Condition apply(SurfaceRules.Context givenContext) {
|
||||
+ final NormalNoise normalNoise = givenContext.randomState.getOrCreateNoise(this.noise);
|
||||
+ // Gale end - dev import deobfuscation fixes
|
||||
|
||||
@@ -330,12 +120,12 @@ index 915c1cbcc0ecf634cc76f02bba53dc82d22be698..0c05aa0d0938b19453f45adf5931c887
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -622,12 +624,12 @@ public class SurfaceRules {
|
||||
@@ -655,12 +657,12 @@ public class SurfaceRules {
|
||||
}
|
||||
|
||||
@Override
|
||||
- public SurfaceRules.Condition apply(final SurfaceRules.Context context) {
|
||||
+ public SurfaceRules.Condition apply(final SurfaceRules.Context givenContext) { // Gale - dev import deobfuscation fixes
|
||||
- public SurfaceRules.Condition apply(SurfaceRules.Context context) {
|
||||
+ public SurfaceRules.Condition apply(SurfaceRules.Context givenContext) { // Gale - dev import deobfuscation fixes
|
||||
final boolean bl = this.surfaceType == CaveSurface.CEILING;
|
||||
|
||||
class StoneDepthCondition extends SurfaceRules.LazyYCondition {
|
||||
@@ -345,16 +135,16 @@ index 915c1cbcc0ecf634cc76f02bba53dc82d22be698..0c05aa0d0938b19453f45adf5931c887
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -699,26 +701,32 @@ public class SurfaceRules {
|
||||
@@ -748,26 +750,32 @@ public class SurfaceRules {
|
||||
}
|
||||
|
||||
@Override
|
||||
- public SurfaceRules.Condition apply(final SurfaceRules.Context context) {
|
||||
- public SurfaceRules.Condition apply(SurfaceRules.Context context) {
|
||||
- final int i = this.trueAtAndBelow().resolveY(context.context);
|
||||
- final int j = this.falseAtAndAbove().resolveY(context.context);
|
||||
- final PositionalRandomFactory positionalRandomFactory = context.randomState.getOrCreateRandomFactory(this.randomName());
|
||||
+ // Gale start - dev import deobfuscation fixes
|
||||
+ public SurfaceRules.Condition apply(final SurfaceRules.Context givenContext) {
|
||||
+ public SurfaceRules.Condition apply(SurfaceRules.Context givenContext) {
|
||||
+ final int i = this.trueAtAndBelow().resolveY(givenContext.context);
|
||||
+ final int j = this.falseAtAndAbove().resolveY(givenContext.context);
|
||||
+ final PositionalRandomFactory positionalRandomFactory = givenContext.randomState.getOrCreateRandomFactory(this.randomName());
|
||||
@@ -379,21 +169,21 @@ index 915c1cbcc0ecf634cc76f02bba53dc82d22be698..0c05aa0d0938b19453f45adf5931c887
|
||||
+ } else if (i2 >= j) { // Gale - dev import deobfuscation fixes
|
||||
return false;
|
||||
} else {
|
||||
- double d = Mth.map((double)i, (double)i, (double)j, 1.0D, 0.0D);
|
||||
- double d = Mth.map((double)i, (double)i, (double)j, 1.0, 0.0);
|
||||
- RandomSource randomSource = positionalRandomFactory.at(this.context.blockX, i, this.context.blockZ);
|
||||
+ // Gale start - dev import deobfuscation fixes
|
||||
+ double d = Mth.map((double)i2, (double)i, (double)j, 1.0D, 0.0D);
|
||||
+ double d = Mth.map((double)i2, (double)i, (double)j, 1.0, 0.0);
|
||||
+ RandomSource randomSource = positionalRandomFactory.at(this.context.blockX, i2, this.context.blockZ);
|
||||
+ // Gale end - dev import deobfuscation fixes
|
||||
return (double)randomSource.nextFloat() < d;
|
||||
}
|
||||
}
|
||||
@@ -739,10 +747,10 @@ public class SurfaceRules {
|
||||
@@ -795,10 +803,10 @@ public class SurfaceRules {
|
||||
}
|
||||
|
||||
@Override
|
||||
- public SurfaceRules.Condition apply(final SurfaceRules.Context context) {
|
||||
+ public SurfaceRules.Condition apply(final SurfaceRules.Context givenContext) { // Gale - dev import deobfuscation fixes
|
||||
- public SurfaceRules.Condition apply(SurfaceRules.Context context) {
|
||||
+ public SurfaceRules.Condition apply(SurfaceRules.Context givenContext) { // Gale - dev import deobfuscation fixes
|
||||
class WaterCondition extends SurfaceRules.LazyYCondition {
|
||||
WaterCondition() {
|
||||
- super(context);
|
||||
@@ -401,12 +191,12 @@ index 915c1cbcc0ecf634cc76f02bba53dc82d22be698..0c05aa0d0938b19453f45adf5931c887
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -766,10 +774,10 @@ public class SurfaceRules {
|
||||
@@ -833,10 +841,10 @@ public class SurfaceRules {
|
||||
}
|
||||
|
||||
@Override
|
||||
- public SurfaceRules.Condition apply(final SurfaceRules.Context context) {
|
||||
+ public SurfaceRules.Condition apply(final SurfaceRules.Context givenContext) { // Gale - dev import deobfuscation fixes
|
||||
- public SurfaceRules.Condition apply(SurfaceRules.Context context) {
|
||||
+ public SurfaceRules.Condition apply(SurfaceRules.Context givenContext) { // Gale - dev import deobfuscation fixes
|
||||
class YCondition extends SurfaceRules.LazyYCondition {
|
||||
YCondition() {
|
||||
- super(context);
|
||||
@@ -414,62 +204,3 @@ index 915c1cbcc0ecf634cc76f02bba53dc82d22be698..0c05aa0d0938b19453f45adf5931c887
|
||||
}
|
||||
|
||||
@Override
|
||||
diff --git a/src/main/java/net/minecraft/world/level/levelgen/blending/Blender.java b/src/main/java/net/minecraft/world/level/levelgen/blending/Blender.java
|
||||
index 8d40205f56a7b204a65505f9e1b4e20000221755..a6434f2c2d1ddb33e7c51d0a099fd127d8a785e6 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/levelgen/blending/Blender.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/levelgen/blending/Blender.java
|
||||
@@ -113,13 +113,15 @@ public class Blender {
|
||||
MutableDouble mutableDouble3 = new MutableDouble(Double.POSITIVE_INFINITY);
|
||||
this.heightAndBiomeBlendingData.forEach((chunkPos, data) -> {
|
||||
data.iterateHeights(QuartPos.fromSection(ChunkPos.getX(chunkPos)), QuartPos.fromSection(ChunkPos.getZ(chunkPos)), (biomeX, biomeZ, height) -> {
|
||||
- double d = Mth.length((double)(i - biomeX), (double)(j - biomeZ));
|
||||
- if (!(d > (double)HEIGHT_BLENDING_RANGE_CELLS)) {
|
||||
- if (d < mutableDouble3.doubleValue()) {
|
||||
- mutableDouble3.setValue(d);
|
||||
+ // Gale start - dev import deobfuscation fixes
|
||||
+ double distance = Mth.length((double)(i - biomeX), (double)(j - biomeZ));
|
||||
+ if (!(distance > (double)HEIGHT_BLENDING_RANGE_CELLS)) {
|
||||
+ if (distance < mutableDouble3.doubleValue()) {
|
||||
+ mutableDouble3.setValue(distance);
|
||||
}
|
||||
|
||||
- double e = 1.0D / (d * d * d * d);
|
||||
+ double e = 1.0D / (distance * distance * distance * distance);
|
||||
+ // Gale end - dev import deobfuscation fixes
|
||||
mutableDouble2.add(height * e);
|
||||
mutableDouble.add(e);
|
||||
}
|
||||
@@ -156,13 +158,15 @@ public class Blender {
|
||||
MutableDouble mutableDouble3 = new MutableDouble(Double.POSITIVE_INFINITY);
|
||||
this.densityBlendingData.forEach((chunkPos, data) -> {
|
||||
data.iterateDensities(QuartPos.fromSection(ChunkPos.getX(chunkPos)), QuartPos.fromSection(ChunkPos.getZ(chunkPos)), j - 1, j + 1, (biomeX, halfSectionY, biomeZ, collidableBlockDensity) -> {
|
||||
- double d = Mth.length((double)(i - biomeX), (double)((j - halfSectionY) * 2), (double)(k - biomeZ));
|
||||
- if (!(d > 2.0D)) {
|
||||
- if (d < mutableDouble3.doubleValue()) {
|
||||
- mutableDouble3.setValue(d);
|
||||
+ // Gale start - dev import deobfuscation fixes
|
||||
+ double distance = Mth.length((double)(i - biomeX), (double)((j - halfSectionY) * 2), (double)(k - biomeZ));
|
||||
+ if (!(distance > 2.0D)) {
|
||||
+ if (distance < mutableDouble3.doubleValue()) {
|
||||
+ mutableDouble3.setValue(distance);
|
||||
}
|
||||
|
||||
- double e = 1.0D / (d * d * d * d);
|
||||
+ double e = 1.0D / (distance * distance * distance * distance);
|
||||
+ // Gale end - dev import deobfuscation fixes
|
||||
mutableDouble2.add(collidableBlockDensity * e);
|
||||
mutableDouble.add(e);
|
||||
}
|
||||
@@ -317,8 +321,10 @@ public class Blender {
|
||||
double f = (double)offsetZ + 0.5D + SHIFT_NOISE.getValue((double)offsetZ, (double)offsetX, (double)y) * 4.0D;
|
||||
return distanceGetter.getDistance(d, e, f) < 4.0D;
|
||||
};
|
||||
- Stream.of(GenerationStep.Carving.values()).map(chunk::getOrCreateCarvingMask).forEach((mask) -> {
|
||||
- mask.setAdditionalMask(mask);
|
||||
+ // Gale start - dev import deobfuscation fixes
|
||||
+ Stream.of(GenerationStep.Carving.values()).map(chunk::getOrCreateCarvingMask).forEach((carvingMask) -> {
|
||||
+ carvingMask.setAdditionalMask(mask);
|
||||
+ // Gale end - dev import deobfuscation fixes
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -221,7 +221,7 @@ index 94a9ed024d3859793618152ea559a168bbcbb5e2..e60008693e017bec1b4eb49c84be3898
|
||||
-<http://www.gnu.org/philosophy/why-not-lgpl.html>.
|
||||
+<https://www.gnu.org/philosophy/why-not-lgpl.html>.
|
||||
diff --git a/build.gradle.kts b/build.gradle.kts
|
||||
index 32839f9f0dc6009cf3346724a2ddbf74f56ac94c..8b5e71d2847db5e737f5380f41cc4696a038c397 100644
|
||||
index af2ced430f317ea5bcef154af014c0a18b2ffc72..b9d7ca20d2284a227c95b9c9e03549f28dc60a28 100644
|
||||
--- a/build.gradle.kts
|
||||
+++ b/build.gradle.kts
|
||||
@@ -87,7 +87,7 @@ tasks.jar {
|
||||
@@ -427,7 +427,7 @@ index c5d5648f4ca603ef2b1df723b58f9caf4dd3c722..e45e6b44b2a8f2cdae6e0048a812b921
|
||||
.completer(new ConsoleCommandCompleter(this.server))
|
||||
.option(LineReader.Option.COMPLETE_IN_WORD, true);
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 93b661e9cb7743aeff7da3972942cb73049a5e4c..9f5192212c492cefee9abd96aec6866e27ceb48e 100644
|
||||
index 27db614d46dffc2d10f18d79cc5a084f3421d86b..4318f6b4f83709ae2f1d4d8346e79b3e433abf19 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -952,7 +952,13 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -481,10 +481,10 @@ index e85b9bb3f9c225d289a4959921970b9963881199..79192e3a0f27d48f35c0378b58e58721
|
||||
// (async tasks must live with race-conditions if they attempt to cancel between these few lines of code)
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||
index 1324f05de8106032ce290e928cf106fb4f450517..050d6820efd55f73bf8aba915f6fb461bc884378 100644
|
||||
index 3c7a771c48cc2732cc038ca11bb93ec5f8c2d667..53b73cac093797de47a9e61a5fdab44aced54ebb 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||
@@ -497,7 +497,7 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
||||
@@ -502,7 +502,7 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
||||
|
||||
@Override
|
||||
public com.destroystokyo.paper.util.VersionFetcher getVersionFetcher() {
|
||||
|
||||
@@ -188,7 +188,7 @@ index 8f23276796037d048eb114952891a01a40971b3e..ac9ceb54b894119cb30a22d37e035e2c
|
||||
}
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 9f5192212c492cefee9abd96aec6866e27ceb48e..295b76c60d9395d0beb234aff5691388bd3fe437 100644
|
||||
index 4318f6b4f83709ae2f1d4d8346e79b3e433abf19..25bde42e2bc3201b8ddc2a70ccd1bfd8072e2f0e 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -3,9 +3,6 @@ package net.minecraft.server;
|
||||
@@ -244,26 +244,27 @@ index 9f5192212c492cefee9abd96aec6866e27ceb48e..295b76c60d9395d0beb234aff5691388
|
||||
|
||||
private void readScoreboard(DimensionDataStorage persistentStateManager) {
|
||||
diff --git a/src/main/java/net/minecraft/server/Services.java b/src/main/java/net/minecraft/server/Services.java
|
||||
index d89c624554ab08bd1b33a3f62b52aa57aaafb8b4..2f76d1be6b26e516d1ab13df8d05b1f54f1ff558 100644
|
||||
index 33e3815a0c979609d4c7ab83ad91e87ac07a556d..67d4a82f371a4772128cc2218fd0a18ce7500b4f 100644
|
||||
--- a/src/main/java/net/minecraft/server/Services.java
|
||||
+++ b/src/main/java/net/minecraft/server/Services.java
|
||||
@@ -9,12 +9,13 @@ import java.io.File;
|
||||
import javax.annotation.Nullable;
|
||||
@@ -10,13 +10,14 @@ import javax.annotation.Nullable;
|
||||
import net.minecraft.server.players.GameProfileCache;
|
||||
import net.minecraft.util.SignatureValidator;
|
||||
|
||||
+import org.galemc.gale.configuration.GaleConfigurations;
|
||||
|
||||
// Paper start - add paper configuration files
|
||||
-public record Services(MinecraftSessionService sessionService, ServicesKeySet servicesKeySet, GameProfileRepository profileRepository, GameProfileCache profileCache, @javax.annotation.Nullable io.papermc.paper.configuration.PaperConfigurations paperConfigurations) {
|
||||
+public record Services(MinecraftSessionService sessionService, ServicesKeySet servicesKeySet, GameProfileRepository profileRepository, GameProfileCache profileCache, @javax.annotation.Nullable io.papermc.paper.configuration.PaperConfigurations paperConfigurations, @javax.annotation.Nullable GaleConfigurations galeConfigurations) { // Gale - Gale configuration
|
||||
|
||||
public record Services(
|
||||
- MinecraftSessionService sessionService, ServicesKeySet servicesKeySet, GameProfileRepository profileRepository, GameProfileCache profileCache, @javax.annotation.Nullable io.papermc.paper.configuration.PaperConfigurations paperConfigurations // Paper - add paper configuration files
|
||||
+ MinecraftSessionService sessionService, ServicesKeySet servicesKeySet, GameProfileRepository profileRepository, GameProfileCache profileCache, @javax.annotation.Nullable io.papermc.paper.configuration.PaperConfigurations paperConfigurations, @javax.annotation.Nullable GaleConfigurations galeConfigurations // Paper - add paper configuration files // Gale - Gale configuration
|
||||
) {
|
||||
// Paper start - add paper configuration files
|
||||
public Services(MinecraftSessionService sessionService, ServicesKeySet servicesKeySet, GameProfileRepository profileRepository, GameProfileCache profileCache) {
|
||||
- this(sessionService, servicesKeySet, profileRepository, profileCache, null);
|
||||
+ this(sessionService, servicesKeySet, profileRepository, profileCache, null, null); // Gale - Gale configuration
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -22,6 +23,11 @@ public record Services(MinecraftSessionService sessionService, ServicesKeySet se
|
||||
@@ -24,6 +25,11 @@ public record Services(
|
||||
return java.util.Objects.requireNonNull(this.paperConfigurations);
|
||||
}
|
||||
// Paper end - add paper configuration files
|
||||
@@ -275,7 +276,7 @@ index d89c624554ab08bd1b33a3f62b52aa57aaafb8b4..2f76d1be6b26e516d1ab13df8d05b1f5
|
||||
public static final String USERID_CACHE_FILE = "usercache.json"; // Paper - private -> public
|
||||
|
||||
public static Services create(YggdrasilAuthenticationService authenticationService, File rootDirectory, File userCacheFile, joptsimple.OptionSet optionSet) throws Exception { // Paper - add optionset to load paper config files; add userCacheFile parameter
|
||||
@@ -32,7 +38,10 @@ public record Services(MinecraftSessionService sessionService, ServicesKeySet se
|
||||
@@ -34,7 +40,10 @@ public record Services(
|
||||
final java.nio.file.Path legacyConfigPath = ((File) optionSet.valueOf("paper-settings")).toPath();
|
||||
final java.nio.file.Path configDirPath = ((File) optionSet.valueOf("paper-settings-directory")).toPath();
|
||||
io.papermc.paper.configuration.PaperConfigurations paperConfigurations = io.papermc.paper.configuration.PaperConfigurations.setup(legacyConfigPath, configDirPath, rootDirectory.toPath(), (File) optionSet.valueOf("spigot-settings"));
|
||||
@@ -325,7 +326,7 @@ index 68d268b6fff126e8645b6deec3fb549ea2286b77..1243b375d2cbdf224fe174e75d427392
|
||||
if (this.convertOldUsers()) {
|
||||
this.getProfileCache().save(false); // Paper
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index bf5e47e8c3706590fdc0731bd9a5858b56d06136..675d2a1a19296e7390ffc92edb6d071925e51647 100644
|
||||
index 502bdc726b7890b00ee36871d905dea44e8719e3..fc4d69058e6f543afc7da493edb8ac43376413c4 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -134,12 +134,10 @@ import net.minecraft.world.level.chunk.storage.EntityStorage;
|
||||
@@ -351,7 +352,7 @@ index bf5e47e8c3706590fdc0731bd9a5858b56d06136..675d2a1a19296e7390ffc92edb6d0719
|
||||
this.convertable = convertable_conversionsession;
|
||||
this.uuid = WorldUUID.getUUID(convertable_conversionsession.levelDirectory.path().toFile());
|
||||
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
|
||||
index bc89f9e90af3d69872a58c47a4c2545ba91b6ba5..2161664f96bf130d6ca690be47dc7f3ff3a84cd0 100644
|
||||
index ca89d1593bf1b46c79a882db528cbca1359dc9d4..82db09234899606b217acb22b0eba2f8ee063812 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/Level.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/Level.java
|
||||
@@ -12,7 +12,6 @@ import java.util.function.Supplier;
|
||||
|
||||
@@ -85,7 +85,7 @@ index b7f338e982d0dcab99137ab6dc200b82ac6b7cba..7600991949de84b6667c0a80bfec4a13
|
||||
try {
|
||||
Commands.CURRENT_EXECUTION_CONTEXT.set(executioncontext1);
|
||||
diff --git a/src/main/java/net/minecraft/commands/execution/ExecutionContext.java b/src/main/java/net/minecraft/commands/execution/ExecutionContext.java
|
||||
index 38854a047c6da7e2551f206478d17628e765168d..cc827443a812735336e18ff3c7b7f15a448e02d0 100644
|
||||
index f626a2f28f2aebb3237cebb6afef3c4fa1a6cb37..2200d34ce40c61c0eee81b8f8903458c548e65ec 100644
|
||||
--- a/src/main/java/net/minecraft/commands/execution/ExecutionContext.java
|
||||
+++ b/src/main/java/net/minecraft/commands/execution/ExecutionContext.java
|
||||
@@ -20,7 +20,6 @@ public class ExecutionContext<T> implements AutoCloseable {
|
||||
@@ -108,7 +108,7 @@ index 38854a047c6da7e2551f206478d17628e765168d..cc827443a812735336e18ff3c7b7f15a
|
||||
this.commandQuota = maxCommandChainLength;
|
||||
}
|
||||
|
||||
@@ -128,7 +126,7 @@ public class ExecutionContext<T> implements AutoCloseable {
|
||||
@@ -130,7 +128,7 @@ public class ExecutionContext<T> implements AutoCloseable {
|
||||
}
|
||||
|
||||
public ProfilerFiller profiler() {
|
||||
@@ -118,22 +118,20 @@ index 38854a047c6da7e2551f206478d17628e765168d..cc827443a812735336e18ff3c7b7f15a
|
||||
|
||||
public int forkLimit() {
|
||||
diff --git a/src/main/java/net/minecraft/commands/execution/tasks/BuildContexts.java b/src/main/java/net/minecraft/commands/execution/tasks/BuildContexts.java
|
||||
index 446b7e585afccb034816a5371a3b7376cbef7177..f8e7b0336ca2545312d877db5a0f05386b025aed 100644
|
||||
index bcba8224b9a210bced04ff370a73b3067109fa71..260b3ea95a77e01ada2b0e40fbae511c8d5a26a9 100644
|
||||
--- a/src/main/java/net/minecraft/commands/execution/tasks/BuildContexts.java
|
||||
+++ b/src/main/java/net/minecraft/commands/execution/tasks/BuildContexts.java
|
||||
@@ -43,11 +43,7 @@ public class BuildContexts<T extends ExecutionCommandSource<T>> {
|
||||
@@ -42,9 +42,6 @@ public class BuildContexts<T extends ExecutionCommandSource<T>> {
|
||||
ChainModifiers chainModifiers = flags;
|
||||
List<T> list = sources;
|
||||
if (contextChain.getStage() != Stage.EXECUTE) {
|
||||
- context.profiler().push(() -> {
|
||||
- return "prepare " + this.commandInput;
|
||||
- });
|
||||
|
||||
- context.profiler().push(() -> "prepare " + this.commandInput);
|
||||
-
|
||||
- try {
|
||||
for(int i = context.forkLimit(); contextChain.getStage() != Stage.EXECUTE; contextChain = contextChain.nextStage()) {
|
||||
for (int i = context.forkLimit(); contextChain.getStage() != Stage.EXECUTE; contextChain = contextChain.nextStage()) {
|
||||
CommandContext<T> commandContext = contextChain.getTopContext();
|
||||
if (commandContext.isForked()) {
|
||||
@@ -87,9 +83,6 @@ public class BuildContexts<T extends ExecutionCommandSource<T>> {
|
||||
@@ -85,9 +82,6 @@ public class BuildContexts<T extends ExecutionCommandSource<T>> {
|
||||
list = list2;
|
||||
}
|
||||
}
|
||||
@@ -144,30 +142,29 @@ index 446b7e585afccb034816a5371a3b7376cbef7177..f8e7b0336ca2545312d877db5a0f0538
|
||||
|
||||
if (list.isEmpty()) {
|
||||
diff --git a/src/main/java/net/minecraft/commands/execution/tasks/ExecuteCommand.java b/src/main/java/net/minecraft/commands/execution/tasks/ExecuteCommand.java
|
||||
index 821dc4aeaf48460000682604fba51b340b9738e7..4f4540ed9b3e603eec0d46fb5b58de24f27e734b 100644
|
||||
index e9775b4506909bee65a74964f0d5391a0513de1d..1c4dd8acdcd571aceffe4b78599ca2c7362aea5d 100644
|
||||
--- a/src/main/java/net/minecraft/commands/execution/tasks/ExecuteCommand.java
|
||||
+++ b/src/main/java/net/minecraft/commands/execution/tasks/ExecuteCommand.java
|
||||
@@ -23,9 +23,6 @@ public class ExecuteCommand<T extends ExecutionCommandSource<T>> implements Unbo
|
||||
@@ -23,8 +23,6 @@ public class ExecuteCommand<T extends ExecutionCommandSource<T>> implements Unbo
|
||||
|
||||
@Override
|
||||
public void execute(T executionCommandSource, ExecutionContext<T> executionContext, Frame frame) {
|
||||
- executionContext.profiler().push(() -> {
|
||||
- return "execute " + this.commandInput;
|
||||
- });
|
||||
|
||||
- executionContext.profiler().push(() -> "execute " + this.commandInput);
|
||||
-
|
||||
try {
|
||||
executionContext.incrementCost();
|
||||
@@ -36,8 +33,6 @@ public class ExecuteCommand<T extends ExecutionCommandSource<T>> implements Unbo
|
||||
int i = ContextChain.runExecutable(
|
||||
@@ -36,8 +34,6 @@ public class ExecuteCommand<T extends ExecutionCommandSource<T>> implements Unbo
|
||||
}
|
||||
} catch (CommandSyntaxException var9) {
|
||||
executionCommandSource.handleError(var9, this.modifiers.isForked(), executionContext.tracer());
|
||||
- } finally {
|
||||
- executionContext.profiler().pop();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 2315d736b604ff35aa5bd839f3ea7bbc3f47e31c..68197cddec15d43f9de373d096be2507e3e36227 100644
|
||||
index 4062e400c4ad6f46e80405ec45864925a9e40ea9..d86c888095ca360bccca515dc4941f46c6944e0e 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -106,18 +106,9 @@ import net.minecraft.util.RandomSource;
|
||||
@@ -398,7 +395,7 @@ index 2315d736b604ff35aa5bd839f3ea7bbc3f47e31c..68197cddec15d43f9de373d096be2507
|
||||
}
|
||||
|
||||
public abstract boolean isSingleplayerOwner(GameProfile profile);
|
||||
@@ -2696,53 +2634,6 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -2698,53 +2636,6 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
}
|
||||
// CraftBukkit end
|
||||
|
||||
@@ -452,7 +449,7 @@ index 2315d736b604ff35aa5bd839f3ea7bbc3f47e31c..68197cddec15d43f9de373d096be2507
|
||||
public Path getWorldPath(LevelResource worldSavePath) {
|
||||
return this.storageSource.getLevelPath(worldSavePath);
|
||||
}
|
||||
@@ -2788,25 +2679,6 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -2790,25 +2681,6 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
return this.isSaving;
|
||||
}
|
||||
|
||||
@@ -478,7 +475,7 @@ index 2315d736b604ff35aa5bd839f3ea7bbc3f47e31c..68197cddec15d43f9de373d096be2507
|
||||
public int getMaxChainedNeighborUpdates() {
|
||||
return 1000000;
|
||||
}
|
||||
@@ -2847,56 +2719,6 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -2849,56 +2721,6 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
}
|
||||
}
|
||||
|
||||
@@ -536,18 +533,18 @@ index 2315d736b604ff35aa5bd839f3ea7bbc3f47e31c..68197cddec15d43f9de373d096be2507
|
||||
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/ReloadableServerResources.java b/src/main/java/net/minecraft/server/ReloadableServerResources.java
|
||||
index 3192ad97889f1a199b4b7b3dc43ff9bbafe748b3..28c77578f3d157c7fe47732850565b8e6ae69d03 100644
|
||||
index 2fe0672bb23c11b21aebf2600b8f4fc39f7dce42..643164a4360f9ad9ee3be2b32f410bfb7a6ce4df 100644
|
||||
--- a/src/main/java/net/minecraft/server/ReloadableServerResources.java
|
||||
+++ b/src/main/java/net/minecraft/server/ReloadableServerResources.java
|
||||
@@ -69,7 +69,7 @@ public class ReloadableServerResources {
|
||||
|
||||
public static CompletableFuture<ReloadableServerResources> loadResources(ResourceManager manager, RegistryAccess.Frozen dynamicRegistryManager, FeatureFlagSet enabledFeatures, Commands.CommandSelection environment, int functionPermissionLevel, Executor prepareExecutor, Executor applyExecutor) {
|
||||
ReloadableServerResources reloadableServerResources = new ReloadableServerResources(dynamicRegistryManager, enabledFeatures, environment, functionPermissionLevel);
|
||||
- return SimpleReloadInstance.create(manager, reloadableServerResources.listeners(), prepareExecutor, applyExecutor, DATA_RELOAD_INITIAL_TASK, LOGGER.isDebugEnabled()).done().whenComplete((void_, throwable) -> {
|
||||
+ return SimpleReloadInstance.create(manager, reloadableServerResources.listeners(), prepareExecutor, applyExecutor, DATA_RELOAD_INITIAL_TASK, false).done().whenComplete((void_, throwable) -> { // Gale - Purpur - remove vanilla profiler
|
||||
reloadableServerResources.commandBuildContext.missingTagAccessPolicy(CommandBuildContext.MissingTagAccessPolicy.FAIL);
|
||||
}).thenApply((void_) -> {
|
||||
return reloadableServerResources;
|
||||
@@ -82,7 +82,7 @@ public class ReloadableServerResources {
|
||||
dynamicRegistryManager, enabledFeatures, environment, functionPermissionLevel
|
||||
);
|
||||
return SimpleReloadInstance.create(
|
||||
- manager, reloadableServerResources.listeners(), prepareExecutor, applyExecutor, DATA_RELOAD_INITIAL_TASK, LOGGER.isDebugEnabled()
|
||||
+ manager, reloadableServerResources.listeners(), prepareExecutor, applyExecutor, DATA_RELOAD_INITIAL_TASK, false // Gale - Purpur - remove vanilla profiler
|
||||
)
|
||||
.done()
|
||||
.whenComplete(
|
||||
diff --git a/src/main/java/net/minecraft/server/ServerFunctionManager.java b/src/main/java/net/minecraft/server/ServerFunctionManager.java
|
||||
index df0c15f6b5b2224d53e4f8fad42b9a1e5f33dc25..caa6dcfec13728863dcf21f9f778665b2bcd3d50 100644
|
||||
--- a/src/main/java/net/minecraft/server/ServerFunctionManager.java
|
||||
@@ -756,7 +753,7 @@ index 366c0c9b45a819f7f94ebe3e49b8ab7f9edf9ce7..20ec10b843f90d2077f49d293d65fa6e
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index 675d2a1a19296e7390ffc92edb6d071925e51647..8ffd3b1193233040013e435f26f3a3768c7ad8fd 100644
|
||||
index fc4d69058e6f543afc7da493edb8ac43376413c4..7484d6d7ad43b5c0a94e24ec3d61675065ca6edd 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -78,7 +78,6 @@ import net.minecraft.util.Mth;
|
||||
@@ -967,7 +964,7 @@ index 675d2a1a19296e7390ffc92edb6d071925e51647..8ffd3b1193233040013e435f26f3a376
|
||||
|
||||
while (iterator.hasNext()) {
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
index 58591bf2f63b9c5e97d9ce4188dff3366968a178..deb9a8931bbc6d8687d629fac9787361fc96aae6 100644
|
||||
index b3781efbd3edcf102fe1bda5d6149915dc1127c6..91545e7fdb3a8da1a708dac9126178cfcc1cef3a 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
@@ -1213,7 +1213,6 @@ public class ServerPlayer extends Player {
|
||||
@@ -1016,30 +1013,36 @@ index 0306771b8f90dcdd77f151c19c6c2d75c41f8feb..e7583996cc6d750cbd72f749de39ecde
|
||||
|
||||
public void suspendFlushing() {
|
||||
diff --git a/src/main/java/net/minecraft/server/packs/resources/PreparableReloadListener.java b/src/main/java/net/minecraft/server/packs/resources/PreparableReloadListener.java
|
||||
index 828196decc89e7e03f88c4a3208ee1ab2bb69242..ff1ac081ba9de69bd684a26a6455ac2b6cd2cae9 100644
|
||||
index 60d33ac7ab7b610e9d5104ac9c7029ba4fc26cdf..55dc48bd8e32cd392a4d44e5c8b278c226782de0 100644
|
||||
--- a/src/main/java/net/minecraft/server/packs/resources/PreparableReloadListener.java
|
||||
+++ b/src/main/java/net/minecraft/server/packs/resources/PreparableReloadListener.java
|
||||
@@ -5,7 +5,13 @@ import java.util.concurrent.Executor;
|
||||
@@ -5,14 +5,18 @@ import java.util.concurrent.Executor;
|
||||
import net.minecraft.util.profiling.ProfilerFiller;
|
||||
|
||||
public interface PreparableReloadListener {
|
||||
- CompletableFuture<Void> reload(PreparableReloadListener.PreparationBarrier synchronizer, ResourceManager manager, ProfilerFiller prepareProfiler, ProfilerFiller applyProfiler, Executor prepareExecutor, Executor applyExecutor);
|
||||
+ // Gale start - Purpur - remove vanilla profiler
|
||||
+ default CompletableFuture<Void> reload(PreparableReloadListener.PreparationBarrier synchronizer, ResourceManager manager, ProfilerFiller prepareProfiler, ProfilerFiller applyProfiler, Executor prepareExecutor, Executor applyExecutor) {
|
||||
+ return this.reload(synchronizer, manager, prepareExecutor, applyExecutor);
|
||||
+ }
|
||||
+
|
||||
+ CompletableFuture<Void> reload(PreparableReloadListener.PreparationBarrier synchronizer, ResourceManager manager, Executor prepareExecutor, Executor applyExecutor);
|
||||
+
|
||||
CompletableFuture<Void> reload(
|
||||
PreparableReloadListener.PreparationBarrier synchronizer,
|
||||
ResourceManager manager,
|
||||
- ProfilerFiller prepareProfiler,
|
||||
- ProfilerFiller applyProfiler,
|
||||
Executor prepareExecutor,
|
||||
Executor applyExecutor
|
||||
);
|
||||
+ // Gale end - Purpur - remove vanilla profiler
|
||||
|
||||
default String getName() {
|
||||
return this.getClass().getSimpleName();
|
||||
diff --git a/src/main/java/net/minecraft/server/packs/resources/ReloadableResourceManager.java b/src/main/java/net/minecraft/server/packs/resources/ReloadableResourceManager.java
|
||||
index c83c6fe5f7e2dc00a36cdd76c23317f232a2336b..47091691ca667e8ee58fa96ee9a2a827bcee5ce3 100644
|
||||
index f0257e295d9e856391b8e881370610c06fab9fba..7b327b59374474f68b189cefbf97d4a4b4478472 100644
|
||||
--- a/src/main/java/net/minecraft/server/packs/resources/ReloadableResourceManager.java
|
||||
+++ b/src/main/java/net/minecraft/server/packs/resources/ReloadableResourceManager.java
|
||||
@@ -43,7 +43,7 @@ public class ReloadableResourceManager implements ResourceManager, AutoCloseable
|
||||
}));
|
||||
@@ -41,7 +41,7 @@ public class ReloadableResourceManager implements ResourceManager, AutoCloseable
|
||||
LOGGER.info("Reloading ResourceManager: {}", LogUtils.defer(() -> packs.stream().map(PackResources::packId).collect(Collectors.joining(", "))));
|
||||
this.resources.close();
|
||||
this.resources = new MultiPackResourceManager(this.type, packs);
|
||||
- return SimpleReloadInstance.create(this.resources, this.listeners, prepareExecutor, applyExecutor, initialStage, LOGGER.isDebugEnabled());
|
||||
@@ -1048,33 +1051,44 @@ index c83c6fe5f7e2dc00a36cdd76c23317f232a2336b..47091691ca667e8ee58fa96ee9a2a827
|
||||
|
||||
@Override
|
||||
diff --git a/src/main/java/net/minecraft/server/packs/resources/ResourceManagerReloadListener.java b/src/main/java/net/minecraft/server/packs/resources/ResourceManagerReloadListener.java
|
||||
index 9ddbfcf80d9a381dace78a62880f85a4d767e0eb..61a7c5e253e790b1e966c704af2f9645322a026e 100644
|
||||
index f14113eef226e906c0d21641e74a27471254909d..649e8a76e8964786ddb91bd69dd10ddb641ac547 100644
|
||||
--- a/src/main/java/net/minecraft/server/packs/resources/ResourceManagerReloadListener.java
|
||||
+++ b/src/main/java/net/minecraft/server/packs/resources/ResourceManagerReloadListener.java
|
||||
@@ -3,17 +3,12 @@ package net.minecraft.server.packs.resources;
|
||||
@@ -3,26 +3,19 @@ package net.minecraft.server.packs.resources;
|
||||
import java.util.concurrent.CompletableFuture;
|
||||
import java.util.concurrent.Executor;
|
||||
import net.minecraft.util.Unit;
|
||||
-import net.minecraft.util.profiling.ProfilerFiller;
|
||||
|
||||
public interface ResourceManagerReloadListener extends PreparableReloadListener {
|
||||
+ // Gale start - Purpur - remove vanilla profiler
|
||||
@Override
|
||||
- default CompletableFuture<Void> reload(PreparableReloadListener.PreparationBarrier synchronizer, ResourceManager manager, ProfilerFiller prepareProfiler, ProfilerFiller applyProfiler, Executor prepareExecutor, Executor applyExecutor) {
|
||||
+ default CompletableFuture<Void> reload(PreparableReloadListener.PreparationBarrier synchronizer, ResourceManager manager, Executor prepareExecutor, Executor applyExecutor) { // Gale - Purpur - remove vanilla profiler
|
||||
return synchronizer.wait(Unit.INSTANCE).thenRunAsync(() -> {
|
||||
default CompletableFuture<Void> reload(
|
||||
PreparableReloadListener.PreparationBarrier synchronizer,
|
||||
ResourceManager manager,
|
||||
- ProfilerFiller prepareProfiler,
|
||||
- ProfilerFiller applyProfiler,
|
||||
Executor prepareExecutor,
|
||||
Executor applyExecutor
|
||||
) {
|
||||
- return synchronizer.wait(Unit.INSTANCE).thenRunAsync(() -> {
|
||||
- applyProfiler.startTick();
|
||||
- applyProfiler.push("listener");
|
||||
this.onResourceManagerReload(manager);
|
||||
- this.onResourceManagerReload(manager);
|
||||
- applyProfiler.pop();
|
||||
- applyProfiler.endTick();
|
||||
}, applyExecutor);
|
||||
- }, applyExecutor);
|
||||
+ return synchronizer.wait(Unit.INSTANCE).thenRunAsync(() -> this.onResourceManagerReload(manager), applyExecutor);
|
||||
}
|
||||
+ // Gale end - Purpur - remove vanilla profiler
|
||||
|
||||
void onResourceManagerReload(ResourceManager manager);
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/packs/resources/SimplePreparableReloadListener.java b/src/main/java/net/minecraft/server/packs/resources/SimplePreparableReloadListener.java
|
||||
index 7ab57748b2f2aea1003d9b7e70e76c372aa1e432..47e75ec4a01f8a456ec6ebc13031c1f0c5537d6a 100644
|
||||
index 298e3eddd600f0b2e48ce2d4080cf68adff59a3a..61a7c2e1d073e5b4b7947618b57bef5a62565087 100644
|
||||
--- a/src/main/java/net/minecraft/server/packs/resources/SimplePreparableReloadListener.java
|
||||
+++ b/src/main/java/net/minecraft/server/packs/resources/SimplePreparableReloadListener.java
|
||||
@@ -2,15 +2,17 @@ package net.minecraft.server.packs.resources;
|
||||
@@ -2,6 +2,8 @@ package net.minecraft.server.packs.resources;
|
||||
|
||||
import java.util.concurrent.CompletableFuture;
|
||||
import java.util.concurrent.Executor;
|
||||
@@ -1083,20 +1097,25 @@ index 7ab57748b2f2aea1003d9b7e70e76c372aa1e432..47e75ec4a01f8a456ec6ebc13031c1f0
|
||||
import net.minecraft.util.profiling.ProfilerFiller;
|
||||
|
||||
public abstract class SimplePreparableReloadListener<T> implements PreparableReloadListener {
|
||||
@Override
|
||||
- public final CompletableFuture<Void> reload(PreparableReloadListener.PreparationBarrier synchronizer, ResourceManager manager, ProfilerFiller prepareProfiler, ProfilerFiller applyProfiler, Executor prepareExecutor, Executor applyExecutor) {
|
||||
+ public final CompletableFuture<Void> reload(PreparableReloadListener.PreparationBarrier synchronizer, ResourceManager manager, Executor prepareExecutor, Executor applyExecutor) { // Gale - Purpur - remove vanilla profiler
|
||||
return CompletableFuture.supplyAsync(() -> {
|
||||
- return this.prepare(manager, prepareProfiler);
|
||||
+ return this.prepare(manager, InactiveProfiler.INSTANCE); // Gale - Purpur - remove vanilla profiler
|
||||
}, prepareExecutor).thenCompose(synchronizer::wait).thenAcceptAsync((prepared) -> {
|
||||
- this.apply(prepared, manager, applyProfiler);
|
||||
+ this.apply(prepared, manager, InactiveProfiler.INSTANCE); // Gale - Purpur - remove vanilla profiler
|
||||
}, applyExecutor);
|
||||
@@ -9,14 +11,12 @@ public abstract class SimplePreparableReloadListener<T> implements PreparableRel
|
||||
public final CompletableFuture<Void> reload(
|
||||
PreparableReloadListener.PreparationBarrier synchronizer,
|
||||
ResourceManager manager,
|
||||
- ProfilerFiller prepareProfiler,
|
||||
- ProfilerFiller applyProfiler,
|
||||
Executor prepareExecutor,
|
||||
Executor applyExecutor
|
||||
) {
|
||||
- return CompletableFuture.<T>supplyAsync(() -> this.prepare(manager, prepareProfiler), prepareExecutor)
|
||||
+ return CompletableFuture.<T>supplyAsync(() -> this.prepare(manager, InactiveProfiler.INSTANCE), prepareExecutor) // Gale - Purpur - remove vanilla profiler
|
||||
.thenCompose(synchronizer::wait)
|
||||
- .thenAcceptAsync(prepared -> this.apply((T)prepared, manager, applyProfiler), applyExecutor);
|
||||
+ .thenAcceptAsync(prepared -> this.apply((T)prepared, manager, InactiveProfiler.INSTANCE), applyExecutor); // Gale - Purpur - remove vanilla profiler
|
||||
}
|
||||
|
||||
protected abstract T prepare(ResourceManager manager, ProfilerFiller profiler);
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index b2eff51f1ad1e702525ef298807ea7d2083f6218..f222d987a47cc3913c5a48505d272d72c4b4432c 100644
|
||||
index 637478fd8a284e6833cf8f5fa17ccf9d73d1dd3f..d7da3bb9e6c7900a211ddd35471799d9a3d63f17 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -833,7 +833,6 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
@@ -1125,7 +1144,7 @@ index b2eff51f1ad1e702525ef298807ea7d2083f6218..f222d987a47cc3913c5a48505d272d72
|
||||
this.stuckSpeedMultiplier = Vec3.ZERO;
|
||||
@@ -1122,7 +1119,6 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
// Paper start - ignore movement changes while inactive.
|
||||
if (isTemporarilyActive && !(this instanceof ItemEntity || this instanceof net.minecraft.world.entity.vehicle.AbstractMinecart) && movement == getDeltaMovement() && movementType == MoverType.SELF) {
|
||||
if (isTemporarilyActive && !(this instanceof ItemEntity) && movement == getDeltaMovement() && movementType == MoverType.SELF) {
|
||||
setDeltaMovement(Vec3.ZERO);
|
||||
- this.level.getProfiler().pop();
|
||||
return;
|
||||
@@ -1211,7 +1230,7 @@ index b2eff51f1ad1e702525ef298807ea7d2083f6218..f222d987a47cc3913c5a48505d272d72
|
||||
}
|
||||
} else {
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
index 23570a0b1227a840b9c1e6ae326827ea655bb5f7..8e375654bf60e1b4f82718e23968c3ab1f799c34 100644
|
||||
index e9bb7feb591032904516d1b9374f486d8a7d066c..c49b788af3f66edaef4aa153e6cb323283e552f8 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -405,7 +405,6 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
@@ -1395,10 +1414,10 @@ index 2439f8d48daca7329049436414f06a36b4b79029..dee9ee5e5917f48b8e1c078710c6d67d
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/ai/goal/GoalSelector.java b/src/main/java/net/minecraft/world/entity/ai/goal/GoalSelector.java
|
||||
index 676f5485a4ca9252e911213dcda8d51776b637b6..fda42ae6579819aa140766829d852633415e8d76 100644
|
||||
index 38af5c7280366fd6ec077f3d914ea5f3ee77451a..91d1088dbf1c0cfb3694d37b4e491e601507421c 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/ai/goal/GoalSelector.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/ai/goal/GoalSelector.java
|
||||
@@ -11,7 +11,6 @@ import java.util.Set;
|
||||
@@ -12,7 +12,6 @@ import java.util.Map.Entry;
|
||||
import java.util.function.Predicate;
|
||||
import java.util.function.Supplier;
|
||||
import java.util.stream.Stream;
|
||||
@@ -1406,7 +1425,7 @@ index 676f5485a4ca9252e911213dcda8d51776b637b6..fda42ae6579819aa140766829d852633
|
||||
import org.slf4j.Logger;
|
||||
|
||||
public class GoalSelector {
|
||||
@@ -29,7 +28,6 @@ public class GoalSelector {
|
||||
@@ -30,7 +29,6 @@ public class GoalSelector {
|
||||
};
|
||||
private final Map<Goal.Flag, WrappedGoal> lockedFlags = new EnumMap<>(Goal.Flag.class);
|
||||
private final Set<WrappedGoal> availableGoals = Sets.newLinkedHashSet();
|
||||
@@ -1414,7 +1433,7 @@ index 676f5485a4ca9252e911213dcda8d51776b637b6..fda42ae6579819aa140766829d852633
|
||||
private final EnumSet<Goal.Flag> disabledFlags = EnumSet.noneOf(Goal.Flag.class); // Paper unused, but dummy to prevent plugins from crashing as hard. Theyll need to support paper in a special case if this is super important, but really doesn't seem like it would be.
|
||||
private final com.destroystokyo.paper.util.set.OptimizedSmallEnumSet<net.minecraft.world.entity.ai.goal.Goal.Flag> goalTypes = new com.destroystokyo.paper.util.set.OptimizedSmallEnumSet<>(Goal.Flag.class); // Paper - remove streams from pathfindergoalselector
|
||||
private int tickCount;
|
||||
@@ -37,9 +35,7 @@ public class GoalSelector {
|
||||
@@ -38,9 +36,7 @@ public class GoalSelector {
|
||||
private int curRate;
|
||||
private static final Goal.Flag[] GOAL_FLAG_VALUES = Goal.Flag.values(); // Paper - remove streams from pathfindergoalselector
|
||||
|
||||
@@ -1425,27 +1444,27 @@ index 676f5485a4ca9252e911213dcda8d51776b637b6..fda42ae6579819aa140766829d852633
|
||||
|
||||
public void addGoal(int priority, Goal goal) {
|
||||
this.availableGoals.add(new WrappedGoal(priority, goal));
|
||||
@@ -102,9 +98,6 @@ public class GoalSelector {
|
||||
@@ -101,9 +97,6 @@ public class GoalSelector {
|
||||
}
|
||||
|
||||
public void tick() {
|
||||
- ProfilerFiller profilerFiller = this.profiler.get();
|
||||
- profilerFiller.push("goalCleanup");
|
||||
-
|
||||
for(WrappedGoal wrappedGoal : this.availableGoals) {
|
||||
if (wrappedGoal.isRunning() && (goalContainsAnyFlags(wrappedGoal, this.goalTypes) || !wrappedGoal.canContinueToUse())) {
|
||||
for (WrappedGoal wrappedGoal : this.availableGoals) {
|
||||
if (wrappedGoal.isRunning() && (goalContainsAnyFlags(wrappedGoal, this.goalTypes) || !wrappedGoal.canContinueToUse())) { // Paper - Perf: optimize goal types by removing streams
|
||||
wrappedGoal.stop();
|
||||
@@ -120,9 +113,6 @@ public class GoalSelector {
|
||||
@@ -119,9 +112,6 @@ public class GoalSelector {
|
||||
}
|
||||
}
|
||||
|
||||
- profilerFiller.pop();
|
||||
- profilerFiller.push("goalUpdate");
|
||||
-
|
||||
for(WrappedGoal wrappedGoal2 : this.availableGoals) {
|
||||
for (WrappedGoal wrappedGoal2 : this.availableGoals) {
|
||||
// Paper start
|
||||
if (!wrappedGoal2.isRunning() && !goalContainsAnyFlags(wrappedGoal2, this.goalTypes) && goalCanBeReplacedForAllFlags(wrappedGoal2, this.lockedFlags) && wrappedGoal2.canUse()) {
|
||||
@@ -141,21 +131,15 @@ public class GoalSelector {
|
||||
@@ -140,21 +130,15 @@ public class GoalSelector {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1457,7 +1476,7 @@ index 676f5485a4ca9252e911213dcda8d51776b637b6..fda42ae6579819aa140766829d852633
|
||||
- ProfilerFiller profilerFiller = this.profiler.get();
|
||||
- profilerFiller.push("goalTick");
|
||||
-
|
||||
for(WrappedGoal wrappedGoal : this.availableGoals) {
|
||||
for (WrappedGoal wrappedGoal : this.availableGoals) {
|
||||
if (wrappedGoal.isRunning() && (tickAll || wrappedGoal.requiresUpdateEveryTick())) {
|
||||
wrappedGoal.tick();
|
||||
}
|
||||
@@ -1468,10 +1487,10 @@ index 676f5485a4ca9252e911213dcda8d51776b637b6..fda42ae6579819aa140766829d852633
|
||||
|
||||
public Set<WrappedGoal> getAvailableGoals() {
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/ai/navigation/PathNavigation.java b/src/main/java/net/minecraft/world/entity/ai/navigation/PathNavigation.java
|
||||
index a04fb58c29b462e20ed0b702cef478e3985b7cd2..33983ed67ad6b0d25d2ae00e03415bda940584eb 100644
|
||||
index e3a7eaf31ab19cc9f23a0c87649b74bb42976cb4..cf57d0f4636ec3f93992626f06fe9c10c7cac19a 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/ai/navigation/PathNavigation.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/ai/navigation/PathNavigation.java
|
||||
@@ -173,12 +173,10 @@ public abstract class PathNavigation {
|
||||
@@ -172,12 +172,10 @@ public abstract class PathNavigation {
|
||||
}
|
||||
}
|
||||
// Paper end - EntityPathfindEvent
|
||||
@@ -1552,10 +1571,10 @@ index 84ae19bf9bddd2b6ee4737577d8836d59be028c2..52e5f367bf20427a532f59bc20610f05
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/animal/frog/Frog.java b/src/main/java/net/minecraft/world/entity/animal/frog/Frog.java
|
||||
index 295769d039f2a1e4f48912a60f9dbe267d8992c1..81e69ea2858228942177e54c92b50b2b908bc010 100644
|
||||
index a03fb7aa9f4528f4885db88eaf480202d5f54750..dfb1f7db2db231049cebf0283ab879618eddaba6 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/animal/frog/Frog.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/animal/frog/Frog.java
|
||||
@@ -161,12 +161,8 @@ public class Frog extends Animal implements VariantHolder<FrogVariant> {
|
||||
@@ -185,12 +185,8 @@ public class Frog extends Animal implements VariantHolder<FrogVariant> {
|
||||
|
||||
@Override
|
||||
protected void customServerAiStep() {
|
||||
@@ -1619,10 +1638,10 @@ index 0a5b953bd8c0c7f181da4090b950e9e6524b6d61..817f269d28305ae2d08b3f680d06af74
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/monster/Zoglin.java b/src/main/java/net/minecraft/world/entity/monster/Zoglin.java
|
||||
index 05b4c054327bb86cf3b08e45916aac31aa9e000b..3e79562f51efbac51785fa0998d6a1a6e3036939 100644
|
||||
index 728f3dff42678ed48c8921ea0e960f48724a9183..6c1a402e45d7b224c41696bb8bc0e09da076ae4d 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/monster/Zoglin.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/monster/Zoglin.java
|
||||
@@ -200,9 +200,7 @@ public class Zoglin extends Monster implements Enemy, HoglinBase {
|
||||
@@ -241,9 +241,7 @@ public class Zoglin extends Monster implements Enemy, HoglinBase {
|
||||
|
||||
@Override
|
||||
protected void customServerAiStep() {
|
||||
@@ -1633,10 +1652,10 @@ index 05b4c054327bb86cf3b08e45916aac31aa9e000b..3e79562f51efbac51785fa0998d6a1a6
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/monster/breeze/Breeze.java b/src/main/java/net/minecraft/world/entity/monster/breeze/Breeze.java
|
||||
index 1268ce642a79495450845734085f281589415fef..9672afb372e3b376d46864fed5bc8af12aaae48a 100644
|
||||
index b5ef8d9e55656100085a4d9858c3530bb08d3c16..2099c26aad87765e505ffc74566fc44167095fcb 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/monster/breeze/Breeze.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/monster/breeze/Breeze.java
|
||||
@@ -200,10 +200,7 @@ public class Breeze extends Monster {
|
||||
@@ -202,10 +202,7 @@ public class Breeze extends Monster {
|
||||
|
||||
@Override
|
||||
protected void customServerAiStep() {
|
||||
@@ -1648,10 +1667,10 @@ index 1268ce642a79495450845734085f281589415fef..9672afb372e3b376d46864fed5bc8af1
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/monster/hoglin/Hoglin.java b/src/main/java/net/minecraft/world/entity/monster/hoglin/Hoglin.java
|
||||
index 01a2016ac82807d28ffe407b7dbb74bdbcde503e..c97a3c7060b846aa92a730760e3428ba98919879 100644
|
||||
index 050ffa4a23feba29fdf4c6a175cdff4e5009027d..6b0f5aa9e49c7ff8784ae7a016c4403acf98ca1e 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/monster/hoglin/Hoglin.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/monster/hoglin/Hoglin.java
|
||||
@@ -130,9 +130,7 @@ public class Hoglin extends Animal implements Enemy, HoglinBase {
|
||||
@@ -157,9 +157,7 @@ public class Hoglin extends Animal implements Enemy, HoglinBase {
|
||||
|
||||
@Override
|
||||
protected void customServerAiStep() {
|
||||
@@ -1660,7 +1679,7 @@ index 01a2016ac82807d28ffe407b7dbb74bdbcde503e..c97a3c7060b846aa92a730760e3428ba
|
||||
- this.level().getProfiler().pop();
|
||||
HoglinAi.updateActivity(this);
|
||||
if (this.isConverting()) {
|
||||
++this.timeInOverworld;
|
||||
this.timeInOverworld++;
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/monster/piglin/Piglin.java b/src/main/java/net/minecraft/world/entity/monster/piglin/Piglin.java
|
||||
index a9813da7f2b248f98f22e0ad2e7842915025ec12..104f3ed9230f6397bfe306b7fbfb9893b7c8e94d 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/monster/piglin/Piglin.java
|
||||
@@ -1676,10 +1695,10 @@ index a9813da7f2b248f98f22e0ad2e7842915025ec12..104f3ed9230f6397bfe306b7fbfb9893
|
||||
super.customServerAiStep();
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/monster/piglin/PiglinBrute.java b/src/main/java/net/minecraft/world/entity/monster/piglin/PiglinBrute.java
|
||||
index 5d1a30e09870a5a535c71a2e44b8e6933de0c1e8..5aab051998b67b7ba95cbf568de60e325b905eab 100644
|
||||
index 1afd5245267866c498d4b0d90ca55cda2ede8ca9..76916f1f23c274f615aeccb4dc48649483cdcdb5 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/monster/piglin/PiglinBrute.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/monster/piglin/PiglinBrute.java
|
||||
@@ -85,9 +85,7 @@ public class PiglinBrute extends AbstractPiglin {
|
||||
@@ -113,9 +113,7 @@ public class PiglinBrute extends AbstractPiglin {
|
||||
|
||||
@Override
|
||||
protected void customServerAiStep() {
|
||||
@@ -1738,7 +1757,7 @@ index 90a82bd7977ebe520bdcc2ab99e11452d5cf4a21..dae299512dd458ec3765f2940505e6b4
|
||||
|
||||
if (this.fire) {
|
||||
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
|
||||
index 2161664f96bf130d6ca690be47dc7f3ff3a84cd0..21a350cab63e8bb3062ec38686fdc1b630f01857 100644
|
||||
index 82db09234899606b217acb22b0eba2f8ee063812..5c18961b46867e51930527c0e720be08c9ac0fcb 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/Level.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/Level.java
|
||||
@@ -130,7 +130,6 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
@@ -1835,7 +1854,7 @@ index da7489986848316fed029b71d1bc4e1248c9c9a8..71581713596594f8f8c39dac4971111e
|
||||
|
||||
// Paper start - Add mobcaps commands
|
||||
diff --git a/src/main/java/net/minecraft/world/level/PathNavigationRegion.java b/src/main/java/net/minecraft/world/level/PathNavigationRegion.java
|
||||
index 0f1025495237aebe30132ace0832aa5718d6f9bb..9c2321ebb1237b4ecd3e7f7053e5039b800d89ff 100644
|
||||
index c5454b92ca2565461c799d7340160f9fb72c1b0f..a1a4b99167919bedb8a45c3b81889f58f2abfbcc 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/PathNavigationRegion.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/PathNavigationRegion.java
|
||||
@@ -8,7 +8,6 @@ import net.minecraft.core.BlockPos;
|
||||
@@ -1846,7 +1865,7 @@ index 0f1025495237aebe30132ace0832aa5718d6f9bb..9c2321ebb1237b4ecd3e7f7053e5039b
|
||||
import net.minecraft.server.level.ServerLevel;
|
||||
import net.minecraft.world.entity.Entity;
|
||||
import net.minecraft.world.level.biome.Biome;
|
||||
@@ -154,8 +153,4 @@ public class PathNavigationRegion implements BlockGetter, CollisionGetter {
|
||||
@@ -151,8 +150,4 @@ public class PathNavigationRegion implements BlockGetter, CollisionGetter {
|
||||
public int getHeight() {
|
||||
return this.level.getHeight();
|
||||
}
|
||||
@@ -1856,7 +1875,7 @@ index 0f1025495237aebe30132ace0832aa5718d6f9bb..9c2321ebb1237b4ecd3e7f7053e5039b
|
||||
- }
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
|
||||
index 6ec3fc801453fd54c25b642e6fa71c19b463311d..b02a2ca45152693e9974e802866feaa6bd2f2508 100644
|
||||
index 465458e8a7dbaf9afb32709a71c7b2620d1e1fd2..18ecd049d916c385c2c3e57213a100332a0c30ce 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
|
||||
@@ -25,7 +25,6 @@ import net.minecraft.network.FriendlyByteBuf;
|
||||
@@ -1891,9 +1910,9 @@ index 6ec3fc801453fd54c25b642e6fa71c19b463311d..b02a2ca45152693e9974e802866feaa6
|
||||
this.blockEntity.tickTimer.startTiming(); // Spigot
|
||||
BlockState iblockdata = LevelChunk.this.getBlockState(blockposition);
|
||||
|
||||
@@ -1173,8 +1164,6 @@ public class LevelChunk extends ChunkAccess {
|
||||
this.loggedInvalidBlockState = true;
|
||||
LevelChunk.LOGGER.warn("Block entity {} @ {} state {} invalid for ticking:", new Object[]{LogUtils.defer(this::getType), LogUtils.defer(this::getPos), iblockdata});
|
||||
@@ -1178,8 +1169,6 @@ public class LevelChunk extends ChunkAccess {
|
||||
}
|
||||
// Paper end - Remove the Block Entity if it's invalid
|
||||
}
|
||||
-
|
||||
- gameprofilerfiller.pop();
|
||||
@@ -1901,7 +1920,7 @@ index 6ec3fc801453fd54c25b642e6fa71c19b463311d..b02a2ca45152693e9974e802866feaa6
|
||||
if (throwable instanceof ThreadDeath) throw throwable; // Paper
|
||||
// Paper start - Prevent block entity and entity crashes
|
||||
diff --git a/src/main/java/net/minecraft/world/level/pathfinder/PathFinder.java b/src/main/java/net/minecraft/world/level/pathfinder/PathFinder.java
|
||||
index 8aa4ac3a6affbe888d6084a27b668c58dfda6c79..61d5fe8e5344a6cb94d427859488c34821c8a3f6 100644
|
||||
index d1e1f12451058f7f276f8277536a4c0a4d736601..ad8b94cd37eb00c50af5b9c51c35b098a9ad67a3 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/pathfinder/PathFinder.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/pathfinder/PathFinder.java
|
||||
@@ -12,7 +12,6 @@ import java.util.function.Function;
|
||||
@@ -1932,7 +1951,7 @@ index 8aa4ac3a6affbe888d6084a27b668c58dfda6c79..61d5fe8e5344a6cb94d427859488c348
|
||||
// Set<Target> set = positions.keySet();
|
||||
startNode.g = 0.0F;
|
||||
startNode.h = this.getBestH(startNode, positions); // Paper - optimize collection
|
||||
@@ -123,7 +120,6 @@ public class PathFinder {
|
||||
@@ -122,7 +119,6 @@ public class PathFinder {
|
||||
if (best == null || comparator.compare(path, best) < 0)
|
||||
best = path;
|
||||
}
|
||||
@@ -1962,10 +1981,10 @@ index 3ddf6ab00de2456ebf504985b88994f970e3b5c4..3b2eb7738380c9385c0227e6f04e3c16
|
||||
CompletableFuture<?>[] acompletablefuture = (CompletableFuture[]) LootDataType.values().map((lootdatatype) -> {
|
||||
return LootDataManager.scheduleElementParse(lootdatatype, manager, prepareExecutor, map);
|
||||
diff --git a/src/main/java/net/minecraft/world/ticks/LevelTicks.java b/src/main/java/net/minecraft/world/ticks/LevelTicks.java
|
||||
index 1d7c663fa0e550bd0cfb9a4b83ccd7e2968666f0..cf685940e09251bef1a3d06f1e2468ce4ff46cc5 100644
|
||||
index 7a69564572357a7acc043e35b9c113beeb738951..6e24b2c1b9ac9f1be02a6cc88085cbbcbfee1a02 100644
|
||||
--- a/src/main/java/net/minecraft/world/ticks/LevelTicks.java
|
||||
+++ b/src/main/java/net/minecraft/world/ticks/LevelTicks.java
|
||||
@@ -23,7 +23,6 @@ import net.minecraft.Util;
|
||||
@@ -24,14 +24,12 @@ import net.minecraft.Util;
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.SectionPos;
|
||||
import net.minecraft.core.Vec3i;
|
||||
@@ -1973,16 +1992,15 @@ index 1d7c663fa0e550bd0cfb9a4b83ccd7e2968666f0..cf685940e09251bef1a3d06f1e2468ce
|
||||
import net.minecraft.world.level.ChunkPos;
|
||||
import net.minecraft.world.level.levelgen.structure.BoundingBox;
|
||||
|
||||
@@ -32,7 +31,6 @@ public class LevelTicks<T> implements LevelTickAccess<T> {
|
||||
return ScheduledTick.INTRA_TICK_DRAIN_ORDER.compare(a.peek(), b.peek());
|
||||
};
|
||||
public class LevelTicks<T> implements LevelTickAccess<T> {
|
||||
private static final Comparator<LevelChunkTicks<?>> CONTAINER_DRAIN_ORDER = (a, b) -> ScheduledTick.INTRA_TICK_DRAIN_ORDER.compare(a.peek(), b.peek());
|
||||
private final LongPredicate tickCheck;
|
||||
- private final Supplier<ProfilerFiller> profiler;
|
||||
private final Long2ObjectMap<LevelChunkTicks<T>> allContainers = new Long2ObjectOpenHashMap<>();
|
||||
private final Long2LongMap nextTickForContainer = Util.make(new Long2LongOpenHashMap(), (map) -> {
|
||||
map.defaultReturnValue(Long.MAX_VALUE);
|
||||
@@ -48,9 +46,8 @@ public class LevelTicks<T> implements LevelTickAccess<T> {
|
||||
|
||||
private final Long2LongMap nextTickForContainer = Util.make(new Long2LongOpenHashMap(), map -> map.defaultReturnValue(Long.MAX_VALUE));
|
||||
private final Queue<LevelChunkTicks<T>> containersToTick = new PriorityQueue<>(CONTAINER_DRAIN_ORDER);
|
||||
@@ -44,9 +42,8 @@ public class LevelTicks<T> implements LevelTickAccess<T> {
|
||||
}
|
||||
};
|
||||
|
||||
- public LevelTicks(LongPredicate tickingFutureReadyPredicate, Supplier<ProfilerFiller> profilerGetter) {
|
||||
@@ -1992,7 +2010,7 @@ index 1d7c663fa0e550bd0cfb9a4b83ccd7e2968666f0..cf685940e09251bef1a3d06f1e2468ce
|
||||
}
|
||||
|
||||
public void addContainer(ChunkPos pos, LevelChunkTicks<T> scheduler) {
|
||||
@@ -86,20 +83,13 @@ public class LevelTicks<T> implements LevelTickAccess<T> {
|
||||
@@ -81,20 +78,13 @@ public class LevelTicks<T> implements LevelTickAccess<T> {
|
||||
}
|
||||
|
||||
public void tick(long time, int maxTicks, BiConsumer<BlockPos, T> ticker) {
|
||||
|
||||
@@ -133,10 +133,10 @@ index e028353e0261310afc42ca0454b723d9f1ffc131..4ca8f36bb88fbd45720ea12fe524d671
|
||||
|
||||
public static long getBlockKey(final int x, final int y, final int z) {
|
||||
diff --git a/src/main/java/net/minecraft/util/Mth.java b/src/main/java/net/minecraft/util/Mth.java
|
||||
index 03854a2d26a3cfc1817acfdc28cbf151ba59e05b..d9e0224dc108a99c194d4947d18f2d855a341534 100644
|
||||
index 28653d149bcbfa7bc37b8a09ae58229b908374f7..66192e92f18062f6bec377a43d6cfc5b277705a1 100644
|
||||
--- a/src/main/java/net/minecraft/util/Mth.java
|
||||
+++ b/src/main/java/net/minecraft/util/Mth.java
|
||||
@@ -56,13 +56,11 @@ public class Mth {
|
||||
@@ -57,13 +57,11 @@ public class Mth {
|
||||
}
|
||||
|
||||
public static int floor(float value) {
|
||||
@@ -152,7 +152,7 @@ index 03854a2d26a3cfc1817acfdc28cbf151ba59e05b..d9e0224dc108a99c194d4947d18f2d85
|
||||
}
|
||||
|
||||
public static long lfloor(double value) {
|
||||
@@ -79,13 +77,11 @@ public class Mth {
|
||||
@@ -80,13 +78,11 @@ public class Mth {
|
||||
}
|
||||
|
||||
public static int ceil(float value) {
|
||||
@@ -168,15 +168,15 @@ index 03854a2d26a3cfc1817acfdc28cbf151ba59e05b..d9e0224dc108a99c194d4947d18f2d85
|
||||
}
|
||||
|
||||
public static int clamp(int value, int min, int max) {
|
||||
@@ -121,15 +117,7 @@ public class Mth {
|
||||
@@ -122,15 +118,7 @@ public class Mth {
|
||||
}
|
||||
|
||||
public static double absMax(double a, double b) {
|
||||
- if (a < 0.0D) {
|
||||
- if (a < 0.0) {
|
||||
- a = -a;
|
||||
- }
|
||||
-
|
||||
- if (b < 0.0D) {
|
||||
- if (b < 0.0) {
|
||||
- b = -b;
|
||||
- }
|
||||
-
|
||||
|
||||
@@ -7,10 +7,10 @@ License: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html)
|
||||
Gale - https://galemc.org
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/util/Mth.java b/src/main/java/net/minecraft/util/Mth.java
|
||||
index d9e0224dc108a99c194d4947d18f2d855a341534..79419f6e1ba900c1686fa9b43866fc43649123a1 100644
|
||||
index 66192e92f18062f6bec377a43d6cfc5b277705a1..c29f12b2da4d0f65673eecc0151e74ff7e9bc26b 100644
|
||||
--- a/src/main/java/net/minecraft/util/Mth.java
|
||||
+++ b/src/main/java/net/minecraft/util/Mth.java
|
||||
@@ -148,14 +148,26 @@ public class Mth {
|
||||
@@ -149,14 +149,26 @@ public class Mth {
|
||||
return Math.floorMod(dividend, divisor);
|
||||
}
|
||||
|
||||
@@ -40,15 +40,15 @@ index d9e0224dc108a99c194d4947d18f2d855a341534..79419f6e1ba900c1686fa9b43866fc43
|
||||
return a % b == 0;
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/level/levelgen/blending/Blender.java b/src/main/java/net/minecraft/world/level/levelgen/blending/Blender.java
|
||||
index a6434f2c2d1ddb33e7c51d0a099fd127d8a785e6..a7972d196c354ff175728f2b8e99590181c65451 100644
|
||||
index ef73772bd3f9484efbcd521a86a34c6ec3fd0d14..45f6f74bcae3e3f27809d2ff3973b98edb169f0f 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/levelgen/blending/Blender.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/levelgen/blending/Blender.java
|
||||
@@ -141,7 +141,7 @@ public class Blender {
|
||||
@@ -148,7 +148,7 @@ public class Blender {
|
||||
private static double heightToOffset(double height) {
|
||||
double d = 1.0D;
|
||||
double e = height + 0.5D;
|
||||
- double f = Mth.positiveModulo(e, 8.0D);
|
||||
+ double f = Mth.positiveModuloForPositiveIntegerDivisor(e, 8.0D); // Gale - faster floating-point positive modulo
|
||||
return 1.0D * (32.0D * (e - 128.0D) - 3.0D * (e - 120.0D) * f + 3.0D * f * f) / (128.0D * (32.0D - 3.0D * f));
|
||||
double d = 1.0;
|
||||
double e = height + 0.5;
|
||||
- double f = Mth.positiveModulo(e, 8.0);
|
||||
+ double f = Mth.positiveModuloForPositiveIntegerDivisor(e, 8.0); // Gale - faster floating-point positive modulo
|
||||
return 1.0 * (32.0 * (e - 128.0) - 3.0 * (e - 120.0) * f + 3.0 * f * f) / (128.0 * (32.0 - 3.0 * f));
|
||||
}
|
||||
|
||||
|
||||
@@ -31,7 +31,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/world/entity/ai/behavior/AcquirePoi.java b/src/main/java/net/minecraft/world/entity/ai/behavior/AcquirePoi.java
|
||||
index abcc3ef59475ac170fd10b4dd4a4f3371faf17e0..aed7e9affaae1e0d1e3324a41e5818435f76fd0f 100644
|
||||
index e1b6fe9ecda25f86431baf414f1bfd3a26a8b2bd..b5242f2d450f863a3eb774d8a14bb00cbe699a16 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/ai/behavior/AcquirePoi.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/ai/behavior/AcquirePoi.java
|
||||
@@ -13,6 +13,7 @@ import net.minecraft.core.BlockPos;
|
||||
@@ -53,24 +53,24 @@ index abcc3ef59475ac170fd10b4dd4a4f3371faf17e0..aed7e9affaae1e0d1e3324a41e581843
|
||||
+ }
|
||||
+ // Gale end - Airplane - reduce acquire POI for stuck entities
|
||||
+
|
||||
public static BehaviorControl<PathfinderMob> create(Predicate<Holder<PoiType>> poiPredicate, MemoryModuleType<GlobalPos> poiPosModule, boolean onlyRunIfChild, Optional<Byte> entityStatus) {
|
||||
return create(poiPredicate, poiPosModule, poiPosModule, onlyRunIfChild, entityStatus);
|
||||
}
|
||||
@@ -42,12 +50,13 @@ public class AcquirePoi {
|
||||
return false;
|
||||
} else if (mutableLong.getValue() == 0L) {
|
||||
mutableLong.setValue(world.getGameTime() + (long)world.random.nextInt(20));
|
||||
+ addAdditionalTimeToMutableLongIfEntityIsStuck(mutableLong, world, entity); // Gale - Airplane - reduce acquire POI for stuck entities
|
||||
return false;
|
||||
} else if (world.getGameTime() < mutableLong.getValue()) {
|
||||
return false;
|
||||
} else {
|
||||
mutableLong.setValue(time + 20L + (long)world.getRandom().nextInt(20));
|
||||
- if (entity.getNavigation().isStuck()) mutableLong.add(200); // Paper - Perf: Wait an additional 10s to check again if they're stuck
|
||||
+ addAdditionalTimeToMutableLongIfEntityIsStuck(mutableLong, world, entity); // Gale - Airplane - reduce acquire POI for stuck entities
|
||||
PoiManager poiManager = world.getPoiManager();
|
||||
long2ObjectMap.long2ObjectEntrySet().removeIf((entry) -> {
|
||||
return !entry.getValue().isStillValid(time);
|
||||
public static BehaviorControl<PathfinderMob> create(
|
||||
Predicate<Holder<PoiType>> poiPredicate, MemoryModuleType<GlobalPos> poiPosModule, boolean onlyRunIfChild, Optional<Byte> entityStatus
|
||||
) {
|
||||
@@ -52,12 +60,13 @@ public class AcquirePoi {
|
||||
return false;
|
||||
} else if (mutableLong.getValue() == 0L) {
|
||||
mutableLong.setValue(world.getGameTime() + (long)world.random.nextInt(20));
|
||||
+ addAdditionalTimeToMutableLongIfEntityIsStuck(mutableLong, world, entity); // Gale - Airplane - reduce acquire POI for stuck entities
|
||||
return false;
|
||||
} else if (world.getGameTime() < mutableLong.getValue()) {
|
||||
return false;
|
||||
} else {
|
||||
mutableLong.setValue(time + 20L + (long)world.getRandom().nextInt(20));
|
||||
- if (entity.getNavigation().isStuck()) mutableLong.add(200); // Paper - Perf: Wait an additional 10s to check again if they're stuck
|
||||
+ addAdditionalTimeToMutableLongIfEntityIsStuck(mutableLong, world, entity); // Paper - Perf: Wait an additional 10s to check again if they're stuck // Gale - Airplane - reduce acquire POI for stuck entities
|
||||
PoiManager poiManager = world.getPoiManager();
|
||||
long2ObjectMap.long2ObjectEntrySet().removeIf(entry -> !entry.getValue().isStillValid(time));
|
||||
Predicate<BlockPos> predicate2 = pos -> {
|
||||
diff --git a/src/main/java/org/galemc/gale/configuration/GaleWorldConfiguration.java b/src/main/java/org/galemc/gale/configuration/GaleWorldConfiguration.java
|
||||
index eabe9e6a7f99a7ad1f2a9f210f8a7489a89dc4cc..8a0416775d00148bf3478b51d92b00d9d485c667 100644
|
||||
--- a/src/main/java/org/galemc/gale/configuration/GaleWorldConfiguration.java
|
||||
|
||||
@@ -31,15 +31,15 @@ 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/world/entity/ai/targeting/TargetingConditions.java b/src/main/java/net/minecraft/world/entity/ai/targeting/TargetingConditions.java
|
||||
index c8a80c1b2fedff22e8a877d466062375ffb2f0d7..29963fbccdd9adadcf46970473ff1fccc68572f0 100644
|
||||
index d2f0c3b26d4beedb49d86e0242d843590d469d02..68bc8699a9389d118411ea7134ea0e0588adf8dc 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/ai/targeting/TargetingConditions.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/ai/targeting/TargetingConditions.java
|
||||
@@ -75,9 +75,18 @@ public class TargetingConditions {
|
||||
@@ -76,9 +76,18 @@ public class TargetingConditions {
|
||||
}
|
||||
|
||||
if (this.range > 0.0D) {
|
||||
- double d = this.testInvisible ? targetEntity.getVisibilityPercent(baseEntity) : 1.0D;
|
||||
- double e = Math.max((this.useFollowRange ? this.getFollowRange(baseEntity) : this.range) * d, 2.0D); // Paper - Fix MC-145656
|
||||
if (this.range > 0.0) {
|
||||
- double d = this.testInvisible ? targetEntity.getVisibilityPercent(baseEntity) : 1.0;
|
||||
- double e = Math.max((this.useFollowRange ? this.getFollowRange(baseEntity) : this.range) * d, 2.0); // Paper - Fix MC-145656
|
||||
+ // Gale start - Airplane - check targeting range before getting visibility
|
||||
+ // d = invisibility percent, e = follow range adjusted for invisibility, f = distance
|
||||
double f = baseEntity.distanceToSqr(targetEntity.getX(), targetEntity.getY(), targetEntity.getZ());
|
||||
@@ -50,7 +50,7 @@ index c8a80c1b2fedff22e8a877d466062375ffb2f0d7..29963fbccdd9adadcf46970473ff1fcc
|
||||
+ }
|
||||
+
|
||||
+ double d = this.testInvisible ? targetEntity.getVisibilityPercent(baseEntity) : 1.0D;
|
||||
+ double e = Math.max((followRangeRaw) * d, 2.0D); // Paper
|
||||
+ double e = Math.max((followRangeRaw) * d, 2.0D); // Paper - Fix MC-145656
|
||||
+ // Gale end - Airplane - check targeting range before getting visibility
|
||||
if (f > e * e) {
|
||||
return false;
|
||||
|
||||
@@ -31,7 +31,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/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
index 8e375654bf60e1b4f82718e23968c3ab1f799c34..b62041ee8d550bdeb654f9fac386135d8258182d 100644
|
||||
index c49b788af3f66edaef4aa153e6cb323283e552f8..d30b0eefaeb2bc07a7b6871ff8a827ec48bd5f44 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -143,7 +143,6 @@ import org.bukkit.event.entity.EntityTeleportEvent;
|
||||
@@ -64,10 +64,10 @@ index 8e375654bf60e1b4f82718e23968c3ab1f799c34..b62041ee8d550bdeb654f9fac386135d
|
||||
if (this.isSpectator()) {
|
||||
return false;
|
||||
diff --git a/src/main/java/org/spigotmc/ActivationRange.java b/src/main/java/org/spigotmc/ActivationRange.java
|
||||
index c39894e824334f1dc52e0466cf9d84f7e219be70..b32f8960d707b1567db059b14456623658ebf159 100644
|
||||
index 3283ed99c35ffed6805567705e0518d9f84feedc..6bd07ab4bd46bc6ffd4b20132e05fccb1adf1329 100644
|
||||
--- a/src/main/java/org/spigotmc/ActivationRange.java
|
||||
+++ b/src/main/java/org/spigotmc/ActivationRange.java
|
||||
@@ -296,7 +296,7 @@ public class ActivationRange
|
||||
@@ -298,7 +298,7 @@ public class ActivationRange
|
||||
if ( entity instanceof LivingEntity )
|
||||
{
|
||||
LivingEntity living = (LivingEntity) entity;
|
||||
|
||||
@@ -40,10 +40,10 @@ 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/world/phys/shapes/EntityCollisionContext.java b/src/main/java/net/minecraft/world/phys/shapes/EntityCollisionContext.java
|
||||
index ebe65474a4a05ff1637d7f37ebcfe690af59def5..1bf730336e23eef97d22de7613c63bb9ea0c427c 100644
|
||||
index 88a4a72bb390947dc17e5da09a99b2d1b3ac4621..9343195e5e7444a1926db656707df961a5b8ea55 100644
|
||||
--- a/src/main/java/net/minecraft/world/phys/shapes/EntityCollisionContext.java
|
||||
+++ b/src/main/java/net/minecraft/world/phys/shapes/EntityCollisionContext.java
|
||||
@@ -19,47 +19,72 @@ public class EntityCollisionContext implements CollisionContext {
|
||||
@@ -17,23 +17,33 @@ public class EntityCollisionContext implements CollisionContext {
|
||||
return defaultValue;
|
||||
}
|
||||
};
|
||||
@@ -70,17 +70,20 @@ index ebe65474a4a05ff1637d7f37ebcfe690af59def5..1bf730336e23eef97d22de7613c63bb9
|
||||
this.entity = entity;
|
||||
}
|
||||
|
||||
/** @deprecated */
|
||||
@Deprecated
|
||||
protected EntityCollisionContext(Entity entity) {
|
||||
+ // Gale start - Airplane - make EntityCollisionContext a live representation - remove unneeded things
|
||||
+ /*
|
||||
this(entity.isDescending(), entity.getY(), entity instanceof LivingEntity ? ((LivingEntity)entity).getMainHandItem() : ItemStack.EMPTY, entity instanceof LivingEntity ? ((LivingEntity)entity)::canStandOnFluid : (fluidState) -> {
|
||||
return false;
|
||||
}, entity);
|
||||
+ */
|
||||
+ // Gale end - Airplane - make EntityCollisionContext a live representation - remove unneeded things
|
||||
this(
|
||||
entity.isDescending(),
|
||||
entity.getY(),
|
||||
@@ -41,26 +51,41 @@ public class EntityCollisionContext implements CollisionContext {
|
||||
entity instanceof LivingEntity ? ((LivingEntity)entity)::canStandOnFluid : fluidState -> false,
|
||||
entity
|
||||
);
|
||||
+ */
|
||||
+ this.entity = entity;
|
||||
+ // Gale end - Airplane - make EntityCollisionContext a live representation - remove unneeded things
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -115,8 +118,8 @@ index ebe65474a4a05ff1637d7f37ebcfe690af59def5..1bf730336e23eef97d22de7613c63bb9
|
||||
|
||||
@Override
|
||||
public boolean isAbove(VoxelShape shape, BlockPos pos, boolean defaultValue) {
|
||||
- return this.entityBottom > (double)pos.getY() + shape.max(Direction.Axis.Y) - (double)1.0E-5F;
|
||||
+ return (this.entity == null ? -Double.MAX_VALUE : entity.getY()) > (double)pos.getY() + shape.max(Direction.Axis.Y) - (double)1.0E-5F; // Gale - Airplane - make EntityCollisionContext a live representation
|
||||
- return this.entityBottom > (double)pos.getY() + shape.max(Direction.Axis.Y) - 1.0E-5F;
|
||||
+ return (this.entity == null ? -Double.MAX_VALUE : entity.getY()) > (double) pos.getY() + shape.max(Direction.Axis.Y) - (double) 1.0E-5F; // Gale - Airplane - make EntityCollisionContext a live representation
|
||||
}
|
||||
|
||||
@Nullable
|
||||
|
||||
@@ -493,12 +493,12 @@ index cdb739df2a285032d25d84f4464f202a7a3fa578..a2e314549f4b4182a817ecd477235f56
|
||||
|
||||
public static void entityInside(Level world, BlockPos pos, BlockState state, Entity entity, HopperBlockEntity blockEntity) {
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/entity/RandomizableContainerBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/RandomizableContainerBlockEntity.java
|
||||
index f52ccd4f3e062af3c7cc6eaea5b074a3bbd21690..fd9b9cb82a1e5ac030bbe6a4ac14c21dd074470d 100644
|
||||
index dfd1246b735fe64c5beae83567a013861eb00822..c547a53433a0e8e74403aa6bd36c4dd177350a11 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/entity/RandomizableContainerBlockEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/entity/RandomizableContainerBlockEntity.java
|
||||
@@ -94,12 +94,7 @@ public abstract class RandomizableContainerBlockEntity extends BaseContainerBloc
|
||||
public boolean isEmpty() {
|
||||
this.unpackLootTable((Player)null);
|
||||
this.unpackLootTable(null);
|
||||
// Paper start - Perf: Optimize Hoppers
|
||||
- for (final ItemStack itemStack : this.getItems()) {
|
||||
- if (!itemStack.isEmpty()) {
|
||||
|
||||
@@ -158,17 +158,16 @@ index 0000000000000000000000000000000000000000..f3835d6934f4d82980eb068c0b8c238f
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/net/minecraft/world/level/biome/Biome.java b/src/main/java/net/minecraft/world/level/biome/Biome.java
|
||||
index 65012a12e1430956ef55ced56773e6354ac26444..e79404cfb0a04912a61583539aba51dc778bc729 100644
|
||||
index 64076a452a315090d299a7a58a43fd3b5c1b4e0a..455a037174d66fd2fa1a136207ff7495486fd918 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/biome/Biome.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/biome/Biome.java
|
||||
@@ -66,14 +66,20 @@ public final class Biome {
|
||||
@@ -63,13 +63,18 @@ public final class Biome {
|
||||
private final BiomeGenerationSettings generationSettings;
|
||||
private final MobSpawnSettings mobSettings;
|
||||
private final BiomeSpecialEffects specialEffects;
|
||||
- private final ThreadLocal<Long2FloatLinkedOpenHashMap> temperatureCache = ThreadLocal.withInitial(() -> {
|
||||
- private final ThreadLocal<Long2FloatLinkedOpenHashMap> temperatureCache = ThreadLocal.withInitial(() -> Util.make(() -> {
|
||||
+ // Gale start - Airplane - use aging cache for biome temperatures - use our cache
|
||||
+ private final ThreadLocal<gg.airplane.structs.Long2FloatAgingCache> temperatureCache = ThreadLocal.withInitial(() -> {
|
||||
return Util.make(() -> {
|
||||
+ private final ThreadLocal<gg.airplane.structs.Long2FloatAgingCache> temperatureCache = ThreadLocal.withInitial(() -> Util.make(() -> {
|
||||
+ /*
|
||||
Long2FloatLinkedOpenHashMap long2FloatLinkedOpenHashMap = new Long2FloatLinkedOpenHashMap(1024, 0.25F) {
|
||||
protected void rehash(int i) {
|
||||
@@ -176,14 +175,13 @@ index 65012a12e1430956ef55ced56773e6354ac26444..e79404cfb0a04912a61583539aba51dc
|
||||
};
|
||||
long2FloatLinkedOpenHashMap.defaultReturnValue(Float.NaN);
|
||||
return long2FloatLinkedOpenHashMap;
|
||||
+
|
||||
+ */
|
||||
+ */
|
||||
+ return new gg.airplane.structs.Long2FloatAgingCache(TEMPERATURE_CACHE_SIZE);
|
||||
+ // Gale end - Airplane - use aging cache for biome temperatures - use our cache
|
||||
});
|
||||
});
|
||||
}));
|
||||
|
||||
@@ -118,17 +124,15 @@ public final class Biome {
|
||||
Biome(Biome.ClimateSettings weather, BiomeSpecialEffects effects, BiomeGenerationSettings generationSettings, MobSpawnSettings spawnSettings) {
|
||||
@@ -112,17 +117,15 @@ public final class Biome {
|
||||
@Deprecated
|
||||
public float getTemperature(BlockPos blockPos) {
|
||||
long l = blockPos.asLong();
|
||||
|
||||
@@ -31,12 +31,12 @@ 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/world/entity/ai/goal/MoveToBlockGoal.java b/src/main/java/net/minecraft/world/entity/ai/goal/MoveToBlockGoal.java
|
||||
index 07519c817cc6de04a98198c43a0c2b02ba3141eb..13a8d345a8876810dc1efafc55c98243fbbbf873 100644
|
||||
index aee0147649d458b87d92496eda0c1723ebe570d2..7e9243f76f77df2f2c5744d2dd17187c215d6e08 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/ai/goal/MoveToBlockGoal.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/ai/goal/MoveToBlockGoal.java
|
||||
@@ -120,6 +120,7 @@ public abstract class MoveToBlockGoal extends Goal {
|
||||
for(int m = 0; m <= l; m = m > 0 ? -m : 1 - m) {
|
||||
for(int n = m < l && m > -l ? l : 0; n <= l; n = n > 0 ? -n : 1 - n) {
|
||||
@@ -121,6 +121,7 @@ public abstract class MoveToBlockGoal extends Goal {
|
||||
for (int m = 0; m <= l; m = m > 0 ? -m : 1 - m) {
|
||||
for (int n = m < l && m > -l ? l : 0; n <= l; n = n > 0 ? -n : 1 - n) {
|
||||
mutableBlockPos.setWithOffset(blockPos, m, k - 1, n);
|
||||
+ if (!this.mob.level().hasChunkAt(mutableBlockPos)) continue; // Gale - Airplane - block goal does not load chunks - if this block isn't loaded, continue
|
||||
if (this.mob.isWithinRestriction(mutableBlockPos) && this.isValidTarget(this.mob.level(), mutableBlockPos)) {
|
||||
|
||||
@@ -31,7 +31,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/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 7b1a9b21b7f72964f9157bf02e8dbcd57785cbfb..fbb453420aa6f4688aa6b2bd07b099aa5e8b912e 100644
|
||||
index d7da3bb9e6c7900a211ddd35471799d9a3d63f17..34be1098c1c1bf1e5de7034afe02579d9680fd23 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -502,6 +502,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
@@ -43,7 +43,7 @@ index 7b1a9b21b7f72964f9157bf02e8dbcd57785cbfb..fbb453420aa6f4688aa6b2bd07b099aa
|
||||
return this.yRot;
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/ai/attributes/AttributeMap.java b/src/main/java/net/minecraft/world/entity/ai/attributes/AttributeMap.java
|
||||
index 897d7632ecfea40890433474870dd7a5e534d8ab..58b82ac5b861ccb489f5586452ae020050be5ec8 100644
|
||||
index b99a080ab27e24d8131fda931ca70d6d271bb01c..5d34e5bd3ff2954b009f7a99954c0f1cc0d5755e 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/ai/attributes/AttributeMap.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/ai/attributes/AttributeMap.java
|
||||
@@ -23,9 +23,11 @@ public class AttributeMap {
|
||||
@@ -58,16 +58,11 @@ index 897d7632ecfea40890433474870dd7a5e534d8ab..58b82ac5b861ccb489f5586452ae0200
|
||||
}
|
||||
|
||||
private void onAttributeModified(AttributeInstance instance) {
|
||||
@@ -45,11 +47,10 @@ public class AttributeMap {
|
||||
}).collect(Collectors.toList());
|
||||
}
|
||||
@@ -44,7 +46,7 @@ public class AttributeMap {
|
||||
|
||||
+
|
||||
@Nullable
|
||||
public AttributeInstance getInstance(Attribute attribute) {
|
||||
- return this.attributes.computeIfAbsent(attribute, (attributex) -> {
|
||||
- return this.supplier.createInstance(this::onAttributeModified, attributex);
|
||||
- });
|
||||
- return this.attributes.computeIfAbsent(attribute, attributex -> this.supplier.createInstance(this::onAttributeModified, attributex));
|
||||
+ return this.attributes.computeIfAbsent(attribute, this.createInstance); // Gale - Airplane - reduce entity allocations - cache lambda, as for some reason java allocates it anyways
|
||||
}
|
||||
|
||||
|
||||
@@ -13,10 +13,10 @@ As part of: Pufferfish (https://github.com/pufferfish-gg/Pufferfish)
|
||||
Licensed under: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html)
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/network/chat/SignedMessageChain.java b/src/main/java/net/minecraft/network/chat/SignedMessageChain.java
|
||||
index ba12919c3f9aec34a9e64993b143ae92be5eb172..42970db49c74f645591904ebeac3426e36f0b4ba 100644
|
||||
index 0af9ed92824ccf30814eceb6a2c2e5c12661c991..cb5502ef7a9f4c5dcbbb794371daffb92c456b00 100644
|
||||
--- a/src/main/java/net/minecraft/network/chat/SignedMessageChain.java
|
||||
+++ b/src/main/java/net/minecraft/network/chat/SignedMessageChain.java
|
||||
@@ -9,6 +9,7 @@ import net.minecraft.util.SignatureUpdater;
|
||||
@@ -8,6 +8,7 @@ import javax.annotation.Nullable;
|
||||
import net.minecraft.util.SignatureValidator;
|
||||
import net.minecraft.util.Signer;
|
||||
import net.minecraft.world.entity.player.ProfilePublicKey;
|
||||
@@ -24,7 +24,7 @@ index ba12919c3f9aec34a9e64993b143ae92be5eb172..42970db49c74f645591904ebeac3426e
|
||||
import org.slf4j.Logger;
|
||||
|
||||
public class SignedMessageChain {
|
||||
@@ -38,7 +39,7 @@ public class SignedMessageChain {
|
||||
@@ -37,7 +38,7 @@ public class SignedMessageChain {
|
||||
throw new SignedMessageChain.DecodeException(Component.translatable("chat.disabled.chain_broken"), false); // Paper - diff on change (if disconnects, need a new kick event cause)
|
||||
} else if (playerPublicKey.data().hasExpired()) {
|
||||
throw new SignedMessageChain.DecodeException(Component.translatable("chat.disabled.expiredProfileKey"), false, org.bukkit.event.player.PlayerKickEvent.Cause.EXPIRED_PROFILE_PUBLIC_KEY); // Paper - kick event causes
|
||||
|
||||
@@ -17,7 +17,7 @@ Licensed under: MIT (https://opensource.org/licenses/MIT)
|
||||
Only do an item "suck in" action once per second
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
|
||||
index c7f06c3cfb737bd17a706798bf9cf0e1af5f0cc0..3b803ac2041b9f6bb6f016e58d95c0bf58fd9a8d 100644
|
||||
index 29ce703a79f7893ac990ad80e0f1c1cf63546e6c..293bc6e40fec09a8ec5cac901d52cc3f7e9b9ea3 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
|
||||
@@ -14,11 +14,13 @@ import net.minecraft.world.entity.Entity;
|
||||
@@ -81,7 +81,7 @@ index c7f06c3cfb737bd17a706798bf9cf0e1af5f0cc0..3b803ac2041b9f6bb6f016e58d95c0bf
|
||||
// Spigot end
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/vehicle/MinecartHopper.java b/src/main/java/net/minecraft/world/entity/vehicle/MinecartHopper.java
|
||||
index fc35cfc9d045f3e5b6a50af1d0ba83b6e322091f..41e23b4e0df3f3561925dad87624f4e445831a52 100644
|
||||
index 761142374f793a1cd4228936b21a68d7a0458894..06a697757aaa10ded293ee26117153b66702e77b 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/vehicle/MinecartHopper.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/vehicle/MinecartHopper.java
|
||||
@@ -17,6 +17,7 @@ import net.minecraft.world.level.block.state.BlockState;
|
||||
@@ -92,7 +92,7 @@ index fc35cfc9d045f3e5b6a50af1d0ba83b6e322091f..41e23b4e0df3f3561925dad87624f4e4
|
||||
|
||||
public MinecartHopper(EntityType<? extends MinecartHopper> type, Level world) {
|
||||
super(type, world);
|
||||
@@ -132,4 +133,12 @@ public class MinecartHopper extends AbstractMinecartContainer implements Hopper
|
||||
@@ -131,4 +132,12 @@ public class MinecartHopper extends AbstractMinecartContainer implements Hopper
|
||||
}
|
||||
// Paper end
|
||||
|
||||
@@ -106,7 +106,7 @@ index fc35cfc9d045f3e5b6a50af1d0ba83b6e322091f..41e23b4e0df3f3561925dad87624f4e4
|
||||
+
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/entity/Hopper.java b/src/main/java/net/minecraft/world/level/block/entity/Hopper.java
|
||||
index a05acf709735b40ca86f978508c63a86065fd405..3752b4ba7fb0d680d4b4a61bf44d54d5ab11815c 100644
|
||||
index 25cae6cb4127083cb47966ed7bb58a9a61e4310f..3cd850744b4b35c2abe2fde7ddc6ce227cbf45c0 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/entity/Hopper.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/entity/Hopper.java
|
||||
@@ -14,6 +14,8 @@ public interface Hopper extends Container {
|
||||
@@ -119,7 +119,7 @@ index a05acf709735b40ca86f978508c63a86065fd405..3752b4ba7fb0d680d4b4a61bf44d54d5
|
||||
|
||||
double getLevelY();
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/entity/HopperBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/HopperBlockEntity.java
|
||||
index fc3fd4ac0f833b606757e9334b41311fe6eb8d92..e336f33946c6362629c8a20e20763cfc79a67d37 100644
|
||||
index a2e314549f4b4182a817ecd477235f56fb95c5f5..7ecf0ff4dc106999d1f3a419482f9bf1510335e6 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/entity/HopperBlockEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/entity/HopperBlockEntity.java
|
||||
@@ -11,6 +11,7 @@ import net.minecraft.core.Direction;
|
||||
|
||||
@@ -7,15 +7,15 @@ License: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html)
|
||||
Gale - https://galemc.org
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/network/chat/SignedMessageChain.java b/src/main/java/net/minecraft/network/chat/SignedMessageChain.java
|
||||
index 992617212932a38f5586cd3d0e1fbebb3a8d4f14..a61b904b59651b2b9d4dfab7126677ec08a376ac 100644
|
||||
index cb5502ef7a9f4c5dcbbb794371daffb92c456b00..20a369086c0c13735d1a39a2faf23408a96f25f4 100644
|
||||
--- a/src/main/java/net/minecraft/network/chat/SignedMessageChain.java
|
||||
+++ b/src/main/java/net/minecraft/network/chat/SignedMessageChain.java
|
||||
@@ -48,7 +48,7 @@ public class SignedMessageChain {
|
||||
@@ -47,7 +47,7 @@ public class SignedMessageChain {
|
||||
throw new SignedMessageChain.DecodeException(Component.translatable("multiplayer.disconnect.unsigned_chat"), true, org.bukkit.event.player.PlayerKickEvent.Cause.UNSIGNED_CHAT); // Paper - kick event causes
|
||||
} else {
|
||||
if (playerChatMessage.hasExpiredServer(Instant.now())) {
|
||||
- LOGGER.warn("Received expired chat: '{}'. Is the client/server system time unsynchronized?", (Object)body.content());
|
||||
+ if (GaleGlobalConfiguration.get().logToConsole.chat.expiredMessageWarning) LOGGER.warn("Received expired chat: '{}'. Is the client/server system time unsynchronized?", (Object)body.content()); // Gale - do not log expired message warnings
|
||||
- LOGGER.warn("Received expired chat: '{}'. Is the client/server system time unsynchronized?", body.content());
|
||||
+ if (GaleGlobalConfiguration.get().logToConsole.chat.expiredMessageWarning) LOGGER.warn("Received expired chat: '{}'. Is the client/server system time unsynchronized?", body.content()); // Gale - do not log expired message warnings
|
||||
}
|
||||
|
||||
return playerChatMessage;
|
||||
|
||||
@@ -13,7 +13,7 @@ As part of: EmpireCraft (https://github.com/starlis/empirecraft)
|
||||
Licensed under: MIT (https://opensource.org/licenses/MIT)
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/levelgen/structure/PoolElementStructurePiece.java b/src/main/java/net/minecraft/world/level/levelgen/structure/PoolElementStructurePiece.java
|
||||
index d2b4654a9095a678bbc9e004af969cf54da0fcab..d797bac97ec1adec7a25a26c8e052e70e8db1c28 100644
|
||||
index 92fd8e437b57c9df06c0287006604b85a1b7c048..3bd9d7105d2e0a6cdcbf81d8a5f4a51975257b67 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/levelgen/structure/PoolElementStructurePiece.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/levelgen/structure/PoolElementStructurePiece.java
|
||||
@@ -23,10 +23,11 @@ import net.minecraft.world.level.levelgen.structure.pieces.StructurePieceType;
|
||||
@@ -29,15 +29,15 @@ index d2b4654a9095a678bbc9e004af969cf54da0fcab..d797bac97ec1adec7a25a26c8e052e70
|
||||
protected final StructurePoolElement element;
|
||||
protected BlockPos position;
|
||||
private final int groundLevelDelta;
|
||||
@@ -49,7 +50,7 @@ public class PoolElementStructurePiece extends StructurePiece {
|
||||
this.position = new BlockPos(nbt.getInt("PosX"), nbt.getInt("PosY"), nbt.getInt("PosZ"));
|
||||
this.groundLevelDelta = nbt.getInt("ground_level_delta");
|
||||
@@ -58,7 +59,7 @@ public class PoolElementStructurePiece extends StructurePiece {
|
||||
DynamicOps<Tag> dynamicOps = RegistryOps.create(NbtOps.INSTANCE, context.registryAccess());
|
||||
- this.element = StructurePoolElement.CODEC.parse(dynamicOps, nbt.getCompound("pool_element")).resultOrPartial(LOGGER::error).orElseThrow(() -> {
|
||||
+ this.element = StructurePoolElement.CODEC.parse(dynamicOps, nbt.getCompound("pool_element")).resultOrPartial(GaleGlobalConfiguration.get().logToConsole.invalidPoolElementErrorStringConsumer).orElseThrow(() -> { // Gale - EMC - softly log invalid pool element errors
|
||||
return new IllegalStateException("Invalid pool element found");
|
||||
});
|
||||
this.element = StructurePoolElement.CODEC
|
||||
.parse(dynamicOps, nbt.getCompound("pool_element"))
|
||||
- .resultOrPartial(LOGGER::error)
|
||||
+ .resultOrPartial(GaleGlobalConfiguration.get().logToConsole.invalidPoolElementErrorStringConsumer) // Gale - EMC - softly log invalid pool element errors
|
||||
.orElseThrow(() -> new IllegalStateException("Invalid pool element found"));
|
||||
this.rotation = Rotation.valueOf(nbt.getString("rotation"));
|
||||
this.boundingBox = this.element.getBoundingBox(this.structureTemplateManager, this.position, this.rotation);
|
||||
diff --git a/src/main/java/org/galemc/gale/configuration/GaleGlobalConfiguration.java b/src/main/java/org/galemc/gale/configuration/GaleGlobalConfiguration.java
|
||||
index d95141f43ebbad984db96416623957bd47f3ac1b..ea7f6a826763af8aa10d79e82b9ba99198e31e06 100644
|
||||
--- a/src/main/java/org/galemc/gale/configuration/GaleGlobalConfiguration.java
|
||||
|
||||
@@ -37,10 +37,10 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/animal/WaterAnimal.java b/src/main/java/net/minecraft/world/entity/animal/WaterAnimal.java
|
||||
index 9b897cf53f4bb5d366e6ac88dbed93c59d8fe541..53e3a40246da0a4d30ad8a7286d1a43dc7db3b0b 100644
|
||||
index 75884a9e69a28404752c1a2cf854335bb78cac01..2bef8de96eeba9a1cd674f3195fe0055eb56fa33 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/animal/WaterAnimal.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/animal/WaterAnimal.java
|
||||
@@ -77,6 +77,6 @@ public abstract class WaterAnimal extends PathfinderMob {
|
||||
@@ -78,6 +78,6 @@ public abstract class WaterAnimal extends PathfinderMob {
|
||||
i = world.getMinecraftWorld().paperConfig().entities.spawning.wateranimalSpawnHeight.maximum.or(i);
|
||||
j = world.getMinecraftWorld().paperConfig().entities.spawning.wateranimalSpawnHeight.minimum.or(j);
|
||||
// Paper end - Make water animal spawn height configurable
|
||||
|
||||
@@ -37,10 +37,10 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/ai/goal/RangedBowAttackGoal.java b/src/main/java/net/minecraft/world/entity/ai/goal/RangedBowAttackGoal.java
|
||||
index 87fb10096fc9dade33c663234b1cecc34d3d77bb..cb2c6dcdd2be476d0434e7f771bbb25150b8bdac 100644
|
||||
index 515c1f671cb2c3a7cc23053aedf404bbbe77af3e..df002c7277a718dc156d2d5271fa4768b97f8d86 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/ai/goal/RangedBowAttackGoal.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/ai/goal/RangedBowAttackGoal.java
|
||||
@@ -104,7 +104,10 @@ public class RangedBowAttackGoal<T extends Monster & RangedAttackMob> extends Go
|
||||
@@ -103,7 +103,10 @@ public class RangedBowAttackGoal<T extends Monster & RangedAttackMob> extends Go
|
||||
this.strafingTime = 0;
|
||||
}
|
||||
|
||||
@@ -52,7 +52,7 @@ index 87fb10096fc9dade33c663234b1cecc34d3d77bb..cb2c6dcdd2be476d0434e7f771bbb251
|
||||
if (d > (double)(this.attackRadiusSqr * 0.75F)) {
|
||||
this.strafingBackwards = false;
|
||||
} else if (d < (double)(this.attackRadiusSqr * 0.25F)) {
|
||||
@@ -119,7 +122,10 @@ public class RangedBowAttackGoal<T extends Monster & RangedAttackMob> extends Go
|
||||
@@ -116,7 +119,10 @@ public class RangedBowAttackGoal<T extends Monster & RangedAttackMob> extends Go
|
||||
}
|
||||
|
||||
this.mob.lookAt(livingEntity, 30.0F, 30.0F);
|
||||
|
||||
@@ -181,7 +181,7 @@ index 06648f9751fd8a322d0809ffebf6a544596ee1a4..b4c2fbdd56ba278560fc1c0d7e086dce
|
||||
|
||||
@Override
|
||||
diff --git a/src/main/java/net/minecraft/nbt/CompoundTag.java b/src/main/java/net/minecraft/nbt/CompoundTag.java
|
||||
index eea9866aecb7189455319d83561fcef35a777d7a..81976797e7c384ddd629d28c76837d9d83fd5b13 100644
|
||||
index 23916b011ed0645ab284fb080c9555921290d875..367d7ada0f45a4de675cdc8cb087a30cca9dd530 100644
|
||||
--- a/src/main/java/net/minecraft/nbt/CompoundTag.java
|
||||
+++ b/src/main/java/net/minecraft/nbt/CompoundTag.java
|
||||
@@ -1,6 +1,5 @@
|
||||
@@ -191,16 +191,16 @@ index eea9866aecb7189455319d83561fcef35a777d7a..81976797e7c384ddd629d28c76837d9d
|
||||
import com.mojang.serialization.Codec;
|
||||
import com.mojang.serialization.DataResult;
|
||||
import com.mojang.serialization.Dynamic;
|
||||
@@ -14,6 +13,8 @@ import java.util.Objects;
|
||||
import java.util.Set;
|
||||
@@ -15,6 +14,8 @@ import java.util.Set;
|
||||
import java.util.UUID;
|
||||
import java.util.Map.Entry;
|
||||
import javax.annotation.Nullable;
|
||||
+
|
||||
+import me.titaniumtown.ArrayConstants;
|
||||
import net.minecraft.CrashReport;
|
||||
import net.minecraft.CrashReportCategory;
|
||||
import net.minecraft.ReportedException;
|
||||
@@ -420,7 +421,7 @@ public class CompoundTag implements Tag {
|
||||
@@ -409,7 +410,7 @@ public class CompoundTag implements Tag {
|
||||
throw new ReportedException(this.createReport(key, ByteArrayTag.TYPE, var3));
|
||||
}
|
||||
|
||||
@@ -209,7 +209,7 @@ index eea9866aecb7189455319d83561fcef35a777d7a..81976797e7c384ddd629d28c76837d9d
|
||||
}
|
||||
|
||||
public int[] getIntArray(String key) {
|
||||
@@ -432,7 +433,7 @@ public class CompoundTag implements Tag {
|
||||
@@ -421,7 +422,7 @@ public class CompoundTag implements Tag {
|
||||
throw new ReportedException(this.createReport(key, IntArrayTag.TYPE, var3));
|
||||
}
|
||||
|
||||
@@ -218,7 +218,7 @@ index eea9866aecb7189455319d83561fcef35a777d7a..81976797e7c384ddd629d28c76837d9d
|
||||
}
|
||||
|
||||
public long[] getLongArray(String key) {
|
||||
@@ -444,7 +445,7 @@ public class CompoundTag implements Tag {
|
||||
@@ -433,7 +434,7 @@ public class CompoundTag implements Tag {
|
||||
throw new ReportedException(this.createReport(key, LongArrayTag.TYPE, var3));
|
||||
}
|
||||
|
||||
@@ -281,7 +281,7 @@ index 24ad8d22b5180cd7d7f793e3074e438f9192448f..33ea5ee8d79708e11613ce162f97f300
|
||||
|
||||
public double getDouble(int index) {
|
||||
diff --git a/src/main/java/net/minecraft/nbt/LongArrayTag.java b/src/main/java/net/minecraft/nbt/LongArrayTag.java
|
||||
index 3604e22f593275140d706c296355ee06ca8ec888..d28507d1e0b076f109c3c85b92ec0682062686c2 100644
|
||||
index 2e5c34ebb94a1536cf09d71bdf052a49ecb9159d..6df94b70f9d69ce61ef7947f39a97a54e4d7181c 100644
|
||||
--- a/src/main/java/net/minecraft/nbt/LongArrayTag.java
|
||||
+++ b/src/main/java/net/minecraft/nbt/LongArrayTag.java
|
||||
@@ -6,6 +6,8 @@ import java.io.DataOutput;
|
||||
@@ -293,7 +293,7 @@ index 3604e22f593275140d706c296355ee06ca8ec888..d28507d1e0b076f109c3c85b92ec0682
|
||||
import org.apache.commons.lang3.ArrayUtils;
|
||||
|
||||
public class LongArrayTag extends CollectionTag<LongTag> {
|
||||
@@ -190,7 +192,7 @@ public class LongArrayTag extends CollectionTag<LongTag> {
|
||||
@@ -185,7 +187,7 @@ public class LongArrayTag extends CollectionTag<LongTag> {
|
||||
|
||||
@Override
|
||||
public void clear() {
|
||||
@@ -325,7 +325,7 @@ index a2920b8a9eff77d9c5d1d7f70ad3abdacba8f0fa..43f402d9032e4570a81a80e412215598
|
||||
protected CipherBase(Cipher cipher) {
|
||||
this.cipher = cipher;
|
||||
diff --git a/src/main/java/net/minecraft/network/Connection.java b/src/main/java/net/minecraft/network/Connection.java
|
||||
index 4716f8bd8a64d4f20f0d5957c1e7fabf63020f43..9e37578ac79a63bb72cc04aae7ba4f6f927a2ce4 100644
|
||||
index a536ebcf29d8ef0ed32863bd8d5e70f7a0636e8d..63b303a68edd7d39f85c8cb56760b2bf46dcb67a 100644
|
||||
--- a/src/main/java/net/minecraft/network/Connection.java
|
||||
+++ b/src/main/java/net/minecraft/network/Connection.java
|
||||
@@ -23,7 +23,6 @@ import io.netty.channel.epoll.EpollSocketChannel;
|
||||
@@ -345,7 +345,7 @@ index 4716f8bd8a64d4f20f0d5957c1e7fabf63020f43..9e37578ac79a63bb72cc04aae7ba4f6f
|
||||
import net.minecraft.Util;
|
||||
import net.minecraft.network.chat.Component;
|
||||
import net.minecraft.network.chat.MutableComponent;
|
||||
@@ -321,7 +322,7 @@ public class Connection extends SimpleChannelInboundHandler<Packet<?>> {
|
||||
@@ -322,7 +323,7 @@ public class Connection extends SimpleChannelInboundHandler<Packet<?>> {
|
||||
}
|
||||
|
||||
public void setListener(PacketListener packetListener) {
|
||||
@@ -355,10 +355,10 @@ index 4716f8bd8a64d4f20f0d5957c1e7fabf63020f43..9e37578ac79a63bb72cc04aae7ba4f6f
|
||||
|
||||
if (enumprotocoldirection != this.receiving) {
|
||||
diff --git a/src/main/java/net/minecraft/network/chat/contents/TranslatableContents.java b/src/main/java/net/minecraft/network/chat/contents/TranslatableContents.java
|
||||
index 981d34dd4cfbc0932b147688751b98552c8beea8..53d80d46a857297987145fd956c8136b46185446 100644
|
||||
index 18e53db59082bae94922edc4baa812aa6f089576..54da741b4fa22c6a01aacc6598de0a9d44fc545b 100644
|
||||
--- a/src/main/java/net/minecraft/network/chat/contents/TranslatableContents.java
|
||||
+++ b/src/main/java/net/minecraft/network/chat/contents/TranslatableContents.java
|
||||
@@ -15,6 +15,8 @@ import java.util.function.Consumer;
|
||||
@@ -16,6 +16,8 @@ import java.util.function.Consumer;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
import javax.annotation.Nullable;
|
||||
@@ -367,15 +367,15 @@ index 981d34dd4cfbc0932b147688751b98552c8beea8..53d80d46a857297987145fd956c8136b
|
||||
import net.minecraft.commands.CommandSourceStack;
|
||||
import net.minecraft.locale.Language;
|
||||
import net.minecraft.network.chat.Component;
|
||||
@@ -28,7 +30,7 @@ import net.minecraft.util.ExtraCodecs;
|
||||
@@ -29,7 +31,7 @@ import net.minecraft.util.ExtraCodecs;
|
||||
import net.minecraft.world.entity.Entity;
|
||||
|
||||
public class TranslatableContents implements ComponentContents {
|
||||
- public static final Object[] NO_ARGS = new Object[0];
|
||||
+ public static final Object[] NO_ARGS = ArrayConstants.emptyObjectArray; // Gale - JettPack - reduce array allocations
|
||||
private static final Codec<Object> PRIMITIVE_ARG_CODEC = ExtraCodecs.validate(ExtraCodecs.JAVA, TranslatableContents::filterAllowedArguments);
|
||||
private static final Codec<Object> ARG_CODEC = Codec.either(PRIMITIVE_ARG_CODEC, ComponentSerialization.CODEC).xmap((either) -> {
|
||||
return either.map((object) -> {
|
||||
private static final Codec<Object> ARG_CODEC = Codec.either(PRIMITIVE_ARG_CODEC, ComponentSerialization.CODEC)
|
||||
.xmap(
|
||||
diff --git a/src/main/java/net/minecraft/server/Main.java b/src/main/java/net/minecraft/server/Main.java
|
||||
index bc391d27399d8c22e78735ca39aa8ab45efb6413..465a7787f15c934b2cef1a58e4b18f1ae9b4cae7 100644
|
||||
--- a/src/main/java/net/minecraft/server/Main.java
|
||||
@@ -403,7 +403,7 @@ index 733ff850468c8a6474a15a455e89bf1195dd7e65..04249a147f2c0a41499d1149a1f97496
|
||||
|
||||
for (int j = 0; j < i; ++j) {
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index 86a2f955dc981dd95091b70d6600ff94ce4dc714..8f5b90dc2af62336116fae24ed3248bfcf975883 100644
|
||||
index d5e9c65d8664f509bec419fddc7b85042473268e..9805ee5989d813f45b5b0829d73ebce3909b5f07 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -38,6 +38,8 @@ import java.util.stream.Collectors;
|
||||
@@ -573,7 +573,7 @@ index 0ee04fe6ff6a4d09754f326526ae04fe7226bab2..a4f7fee3ea112c8f7b0b94949f9eb899
|
||||
}
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/util/ZeroBitStorage.java b/src/main/java/net/minecraft/util/ZeroBitStorage.java
|
||||
index f8de91393564b3691c17339ac9196cc0fc1cf748..d06b49a47c2dcb4b235e5353f347640ee34f1da3 100644
|
||||
index 01f5b946fabbe34f31110e75973dab9f39897346..f1b8e746fea603ebadcef7aff1b83677fea32137 100644
|
||||
--- a/src/main/java/net/minecraft/util/ZeroBitStorage.java
|
||||
+++ b/src/main/java/net/minecraft/util/ZeroBitStorage.java
|
||||
@@ -2,10 +2,11 @@ package net.minecraft.util;
|
||||
@@ -591,7 +591,7 @@ index f8de91393564b3691c17339ac9196cc0fc1cf748..d06b49a47c2dcb4b235e5353f347640e
|
||||
|
||||
public ZeroBitStorage(int size) {
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/EquipmentSlot.java b/src/main/java/net/minecraft/world/entity/EquipmentSlot.java
|
||||
index 2e324276ea4cd9e528c6a3f9a9ba394b378fe075..8e91714e3167ab0ad16df681bc0807721a19ad71 100644
|
||||
index 8b4dd6ff53d2d61c71f04c37389ac645766305c4..49a643015c4bd67baf250b27db7cb6ffb57921de 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/EquipmentSlot.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/EquipmentSlot.java
|
||||
@@ -15,6 +15,7 @@ public enum EquipmentSlot implements StringRepresentable {
|
||||
@@ -603,7 +603,7 @@ index 2e324276ea4cd9e528c6a3f9a9ba394b378fe075..8e91714e3167ab0ad16df681bc080772
|
||||
private EquipmentSlot(EquipmentSlot.Type type, int entityId, int armorStandId, String name) {
|
||||
this.type = type;
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
index 1798862ef457dddfa907ec5d903bd5461a044858..da8cbae05465cd36b87598507f2cd16ca1d82a38 100644
|
||||
index 9c85df84d820ff664b446cfbcb6cf322dde7289b..4489bd7c6b29ea6db432e62bb113fdc930c8a480 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -3161,7 +3161,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
@@ -682,7 +682,7 @@ index 1ad126d992d95062a3db08374db7a927f23a0cac..93ddff72b43b8cfd83a4b07d63679564
|
||||
k = aenumitemslot.length;
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/item/crafting/ShapedRecipePattern.java b/src/main/java/net/minecraft/world/item/crafting/ShapedRecipePattern.java
|
||||
index 27dc0e4ce21ccf641ea16fd6d2dc1c28fcf62df8..81c9ba1d3455d1eb6619cb04d4e52a7226b2518f 100644
|
||||
index d8fe760bb74c8ea0d6fb8321d2c8a49d838c5362..4fd03bc94ebcbc42fbb55564515ea1f57fe6d214 100644
|
||||
--- a/src/main/java/net/minecraft/world/item/crafting/ShapedRecipePattern.java
|
||||
+++ b/src/main/java/net/minecraft/world/item/crafting/ShapedRecipePattern.java
|
||||
@@ -11,6 +11,8 @@ import java.util.List;
|
||||
@@ -694,7 +694,7 @@ index 27dc0e4ce21ccf641ea16fd6d2dc1c28fcf62df8..81c9ba1d3455d1eb6619cb04d4e52a72
|
||||
import net.minecraft.Util;
|
||||
import net.minecraft.core.NonNullList;
|
||||
import net.minecraft.network.FriendlyByteBuf;
|
||||
@@ -89,7 +91,7 @@ public record ShapedRecipePattern(int width, int height, NonNullList<Ingredient>
|
||||
@@ -85,7 +87,7 @@ public record ShapedRecipePattern(int width, int height, NonNullList<Ingredient>
|
||||
}
|
||||
|
||||
if (pattern.size() == l) {
|
||||
@@ -704,24 +704,25 @@ index 27dc0e4ce21ccf641ea16fd6d2dc1c28fcf62df8..81c9ba1d3455d1eb6619cb04d4e52a72
|
||||
String[] strings = new String[pattern.size() - l - k];
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/item/enchantment/Enchantments.java b/src/main/java/net/minecraft/world/item/enchantment/Enchantments.java
|
||||
index 6c2e8049c2197ddc912c1a0fc99c87beae81e25b..a13822a22ab524a0fb9fd998c4ada06b6e10e182 100644
|
||||
index 8343e175a7221f7b0e83c39cd5350683a0649f8d..e023a1c77ab1e2ca757d82f027246259d122b81f 100644
|
||||
--- a/src/main/java/net/minecraft/world/item/enchantment/Enchantments.java
|
||||
+++ b/src/main/java/net/minecraft/world/item/enchantment/Enchantments.java
|
||||
@@ -43,8 +43,10 @@ public class Enchantments {
|
||||
@@ -63,10 +63,11 @@ public class Enchantments {
|
||||
public static final Enchantment MULTISHOT = register("multishot", new MultiShotEnchantment(Enchantment.Rarity.RARE, EquipmentSlot.MAINHAND));
|
||||
public static final Enchantment QUICK_CHARGE = register("quick_charge", new QuickChargeEnchantment(Enchantment.Rarity.UNCOMMON, EquipmentSlot.MAINHAND));
|
||||
public static final Enchantment PIERCING = register("piercing", new ArrowPiercingEnchantment(Enchantment.Rarity.COMMON, EquipmentSlot.MAINHAND));
|
||||
- public static final Enchantment MENDING = register("mending", new MendingEnchantment(Enchantment.Rarity.RARE, EquipmentSlot.values()));
|
||||
- public static final Enchantment VANISHING_CURSE = register("vanishing_curse", new VanishingCurseEnchantment(Enchantment.Rarity.VERY_RARE, EquipmentSlot.values()));
|
||||
+ // Gale start - JettPack - reduce array allocations
|
||||
+ public static final Enchantment MENDING = register("mending", new MendingEnchantment(Enchantment.Rarity.RARE, EquipmentSlot.VALUES));
|
||||
+ public static final Enchantment VANISHING_CURSE = register("vanishing_curse", new VanishingCurseEnchantment(Enchantment.Rarity.VERY_RARE, EquipmentSlot.VALUES));
|
||||
public static final Enchantment VANISHING_CURSE = register(
|
||||
- "vanishing_curse", new VanishingCurseEnchantment(Enchantment.Rarity.VERY_RARE, EquipmentSlot.values())
|
||||
+ "vanishing_curse", new VanishingCurseEnchantment(Enchantment.Rarity.VERY_RARE, EquipmentSlot.VALUES)
|
||||
);
|
||||
+ // Gale end - JettPack - reduce array allocations
|
||||
|
||||
private static Enchantment register(String name, Enchantment enchantment) {
|
||||
return Registry.register(BuiltInRegistries.ENCHANTMENT, name, enchantment);
|
||||
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
|
||||
index 9440dd58325df07521ef52373089e6989105ba4b..33cbba9f92cfbb6508dd8e2c5e35c63a49cdd85c 100644
|
||||
index e4d633411c53d867636a23451d5ff9ffd962d5b4..f239b14fd9c884dc7905a9e0456c2198bf1205e6 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/Level.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/Level.java
|
||||
@@ -10,6 +10,8 @@ import java.util.function.Consumer;
|
||||
@@ -834,7 +835,7 @@ index 63e187c65cb855031f286aad0d25ac4694f7a331..083849817786e08d23b05f8cc6c2469c
|
||||
|
||||
for (int i = 0; i < astring.length; ++i) {
|
||||
diff --git a/src/main/java/net/minecraft/world/scores/Team.java b/src/main/java/net/minecraft/world/scores/Team.java
|
||||
index 16d2aa4556bc9f32a2def7f9ca282aa3fa23fb87..ad9a78f56aeb93895d1caefd6f59326dbf33d18f 100644
|
||||
index f00791b89fdb1bb0fb358eff2af2e687bda15e85..9dbd771cb0a37928c403d8758b78684f73888775 100644
|
||||
--- a/src/main/java/net/minecraft/world/scores/Team.java
|
||||
+++ b/src/main/java/net/minecraft/world/scores/Team.java
|
||||
@@ -5,6 +5,8 @@ import java.util.Collection;
|
||||
@@ -846,7 +847,7 @@ index 16d2aa4556bc9f32a2def7f9ca282aa3fa23fb87..ad9a78f56aeb93895d1caefd6f59326d
|
||||
import net.minecraft.ChatFormatting;
|
||||
import net.minecraft.network.chat.Component;
|
||||
import net.minecraft.network.chat.MutableComponent;
|
||||
@@ -80,7 +82,7 @@ public abstract class Team {
|
||||
@@ -70,7 +72,7 @@ public abstract class Team {
|
||||
public final int id;
|
||||
|
||||
public static String[] getAllNames() {
|
||||
|
||||
@@ -14,16 +14,15 @@ As part of: Lithium (https://github.com/CaffeineMC/lithium-fabric)
|
||||
Licensed under: LGPL-3.0 (https://www.gnu.org/licenses/lgpl-3.0.html)
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/EntityBasedExplosionDamageCalculator.java b/src/main/java/net/minecraft/world/level/EntityBasedExplosionDamageCalculator.java
|
||||
index 2f9f15d99f8b31e9f13f7f32378b2a9e09bcb5e5..4e4dfb72d5a0b46917999b709c655ccfdae27183 100644
|
||||
index 3527f1621ef9b4f3f8d8bbb93379f13ff141c3be..4e4dfb72d5a0b46917999b709c655ccfdae27183 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/EntityBasedExplosionDamageCalculator.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/EntityBasedExplosionDamageCalculator.java
|
||||
@@ -15,9 +15,17 @@ public class EntityBasedExplosionDamageCalculator extends ExplosionDamageCalcula
|
||||
@@ -15,8 +15,17 @@ public class EntityBasedExplosionDamageCalculator extends ExplosionDamageCalcula
|
||||
|
||||
@Override
|
||||
public Optional<Float> getBlockExplosionResistance(Explosion explosion, BlockGetter world, BlockPos pos, BlockState blockState, FluidState fluidState) {
|
||||
- return super.getBlockExplosionResistance(explosion, world, pos, blockState, fluidState).map((max) -> {
|
||||
- return this.source.getBlockExplosionResistance(explosion, world, pos, blockState, fluidState, max);
|
||||
- });
|
||||
- return super.getBlockExplosionResistance(explosion, world, pos, blockState, fluidState)
|
||||
- .map(max -> this.source.getBlockExplosionResistance(explosion, world, pos, blockState, fluidState, max));
|
||||
+ // Gale start - Lithium - reduce lambda and Optional allocation in EntityBasedExplosionDamageCalculator
|
||||
+ Optional<Float> optionalBlastResistance = super.getBlockExplosionResistance(explosion, world, pos, blockState, fluidState);
|
||||
+ if (optionalBlastResistance.isPresent()) {
|
||||
|
||||
@@ -13,10 +13,10 @@ As part of: Lithium (https://github.com/CaffeineMC/lithium-fabric)
|
||||
Licensed under: LGPL-3.0 (https://www.gnu.org/licenses/lgpl-3.0.html)
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/ai/goal/GoalSelector.java b/src/main/java/net/minecraft/world/entity/ai/goal/GoalSelector.java
|
||||
index fda42ae6579819aa140766829d852633415e8d76..5e7b978a3019bc31ef94c1c666a3abdf380ced5c 100644
|
||||
index 91d1088dbf1c0cfb3694d37b4e491e601507421c..fc16161d352221be549760dcdd8c62dfba6a6798 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/ai/goal/GoalSelector.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/ai/goal/GoalSelector.java
|
||||
@@ -11,6 +11,8 @@ import java.util.Set;
|
||||
@@ -12,6 +12,8 @@ import java.util.Map.Entry;
|
||||
import java.util.function.Predicate;
|
||||
import java.util.function.Supplier;
|
||||
import java.util.stream.Stream;
|
||||
@@ -25,7 +25,7 @@ index fda42ae6579819aa140766829d852633415e8d76..5e7b978a3019bc31ef94c1c666a3abdf
|
||||
import org.slf4j.Logger;
|
||||
|
||||
public class GoalSelector {
|
||||
@@ -27,7 +29,7 @@ public class GoalSelector {
|
||||
@@ -28,7 +30,7 @@ public class GoalSelector {
|
||||
}
|
||||
};
|
||||
private final Map<Goal.Flag, WrappedGoal> lockedFlags = new EnumMap<>(Goal.Flag.class);
|
||||
|
||||
@@ -13,7 +13,7 @@ As part of: Lithium (https://github.com/CaffeineMC/lithium-fabric)
|
||||
Licensed under: LGPL-3.0 (https://www.gnu.org/licenses/lgpl-3.0.html)
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/util/ClassInstanceMultiMap.java b/src/main/java/net/minecraft/util/ClassInstanceMultiMap.java
|
||||
index 19779298b2b2ecbe30f9308dad1d80379220387a..f9a7617f4c6c19c798d7fe40491690c8f5de14a9 100644
|
||||
index ebad17e6ec90a7f385cd38c5ec6c2772798d4562..df04721911a89c998d7b9d1e9228628e037de45e 100644
|
||||
--- a/src/main/java/net/minecraft/util/ClassInstanceMultiMap.java
|
||||
+++ b/src/main/java/net/minecraft/util/ClassInstanceMultiMap.java
|
||||
@@ -4,6 +4,8 @@ import com.google.common.collect.ImmutableList;
|
||||
@@ -25,7 +25,7 @@ index 19779298b2b2ecbe30f9308dad1d80379220387a..f9a7617f4c6c19c798d7fe40491690c8
|
||||
import java.util.AbstractCollection;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
@@ -13,7 +15,7 @@ import java.util.Map;
|
||||
@@ -14,7 +16,7 @@ import java.util.Map.Entry;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
public class ClassInstanceMultiMap<T> extends AbstractCollection<T> {
|
||||
|
||||
@@ -13,20 +13,19 @@ As part of: Lithium (https://github.com/CaffeineMC/lithium-fabric)
|
||||
Licensed under: LGPL-3.0 (https://www.gnu.org/licenses/lgpl-3.0.html)
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/util/ClassInstanceMultiMap.java b/src/main/java/net/minecraft/util/ClassInstanceMultiMap.java
|
||||
index f9a7617f4c6c19c798d7fe40491690c8f5de14a9..d5c8fc37ae53835290c8fa731fef974734182ebe 100644
|
||||
index df04721911a89c998d7b9d1e9228628e037de45e..0d24957d6efba8aae172c5772f10cb8785c5d9db 100644
|
||||
--- a/src/main/java/net/minecraft/util/ClassInstanceMultiMap.java
|
||||
+++ b/src/main/java/net/minecraft/util/ClassInstanceMultiMap.java
|
||||
@@ -57,14 +57,33 @@ public class ClassInstanceMultiMap<T> extends AbstractCollection<T> {
|
||||
@@ -58,13 +58,33 @@ public class ClassInstanceMultiMap<T> extends AbstractCollection<T> {
|
||||
}
|
||||
|
||||
public <S> Collection<S> find(Class<S> type) {
|
||||
- if (!this.baseClass.isAssignableFrom(type)) {
|
||||
- throw new IllegalArgumentException("Don't know how to search for " + type);
|
||||
- } else {
|
||||
- List list = this.byClass.computeIfAbsent(type, (typeClass) -> { // Gale - dev import deobfuscation fixes
|
||||
- return this.allInstances.stream().filter(typeClass::isInstance).collect(Collectors.toList());
|
||||
- });
|
||||
- return Collections.unmodifiableCollection(list);
|
||||
- List<? extends T> list = this.byClass
|
||||
- .computeIfAbsent(type, typeClass -> this.allInstances.stream().filter(typeClass::isInstance).collect(Collectors.toList()));
|
||||
- return (Collection<S>)Collections.unmodifiableCollection(list);
|
||||
+ // Gale start - Lithium - avoid Class#isAssignableFrom call in ClassInstanceMultiMap
|
||||
+ /*
|
||||
+ Only perform the slow Class#isAssignableFrom(Class) if a list doesn't exist for the type, otherwise
|
||||
|
||||
@@ -233,7 +233,7 @@ index 8bafd5fd7499ba4a04bf706cfd1e156073716e21..b7df9eac4ee23fa489368af82ec9c07d
|
||||
+ <T> void compact(Palette<T> srcPalette, Palette<T> dstPalette, short[] out); // Gale - Lithium - faster chunk serialization
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/util/SimpleBitStorage.java b/src/main/java/net/minecraft/util/SimpleBitStorage.java
|
||||
index 453c1d7e01970fd817d27f59c3b00ffc70e8ca0c..0bb4312f559a2e76dd8dab478085f114c9c5ca3f 100644
|
||||
index 8d7d763bf51cac556057645e6169c9447993189b..7846273b7e3519ad276373d8a2066856473b9e69 100644
|
||||
--- a/src/main/java/net/minecraft/util/SimpleBitStorage.java
|
||||
+++ b/src/main/java/net/minecraft/util/SimpleBitStorage.java
|
||||
@@ -2,6 +2,7 @@ package net.minecraft.util;
|
||||
@@ -244,7 +244,7 @@ index 453c1d7e01970fd817d27f59c3b00ffc70e8ca0c..0bb4312f559a2e76dd8dab478085f114
|
||||
import org.apache.commons.lang3.Validate;
|
||||
|
||||
public class SimpleBitStorage implements BitStorage {
|
||||
@@ -201,4 +202,45 @@ public class SimpleBitStorage implements BitStorage {
|
||||
@@ -389,4 +390,45 @@ public class SimpleBitStorage implements BitStorage {
|
||||
super(message);
|
||||
}
|
||||
}
|
||||
@@ -291,7 +291,7 @@ index 453c1d7e01970fd817d27f59c3b00ffc70e8ca0c..0bb4312f559a2e76dd8dab478085f114
|
||||
+
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/util/ZeroBitStorage.java b/src/main/java/net/minecraft/util/ZeroBitStorage.java
|
||||
index d06b49a47c2dcb4b235e5353f347640ee34f1da3..4f4d086a0c10526d115853ad7c9792a552f46d5a 100644
|
||||
index f1b8e746fea603ebadcef7aff1b83677fea32137..5ca2190235bbc13448f716f33e294503fbce1ebe 100644
|
||||
--- a/src/main/java/net/minecraft/util/ZeroBitStorage.java
|
||||
+++ b/src/main/java/net/minecraft/util/ZeroBitStorage.java
|
||||
@@ -2,6 +2,7 @@ package net.minecraft.util;
|
||||
@@ -302,7 +302,7 @@ index d06b49a47c2dcb4b235e5353f347640ee34f1da3..4f4d086a0c10526d115853ad7c9792a5
|
||||
|
||||
import me.titaniumtown.ArrayConstants;
|
||||
|
||||
@@ -73,4 +74,6 @@ public class ZeroBitStorage implements BitStorage {
|
||||
@@ -72,4 +73,6 @@ public class ZeroBitStorage implements BitStorage {
|
||||
public BitStorage copy() {
|
||||
return this;
|
||||
}
|
||||
@@ -321,7 +321,7 @@ index acae3eb30e0689048937f479dc3070f0688abdad..4b79f0474a9013dd4fdb68c6363ca194
|
||||
int onResize(int newBits, T object);
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/level/chunk/PalettedContainer.java b/src/main/java/net/minecraft/world/level/chunk/PalettedContainer.java
|
||||
index 983799520ce052d98c9231f4f7925492d4f7d5c9..a8cbb6fbeb169637c36a658ec5d086c911b175ba 100644
|
||||
index adfbdca12fbdee2602feb0158674166d5256e49e..6a9f0daa5644beebc3f7482e25b6c253201bf9e4 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/chunk/PalettedContainer.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/chunk/PalettedContainer.java
|
||||
@@ -23,8 +23,25 @@ import net.minecraft.util.Mth;
|
||||
@@ -348,9 +348,9 @@ index 983799520ce052d98c9231f4f7925492d4f7d5c9..a8cbb6fbeb169637c36a658ec5d086c9
|
||||
+ // Gale end - Lithium - faster chunk serialization
|
||||
+
|
||||
private static final int MIN_PALETTE_BITS = 0;
|
||||
private final PaletteResize<T> dummyPaletteResize = (newSize, added) -> {
|
||||
return 0;
|
||||
@@ -302,30 +319,54 @@ public class PalettedContainer<T> implements PaletteResize<T>, PalettedContainer
|
||||
private final PaletteResize<T> dummyPaletteResize = (newSize, added) -> 0;
|
||||
public final IdMap<T> registry;
|
||||
@@ -304,28 +321,54 @@ public class PalettedContainer<T> implements PaletteResize<T>, PalettedContainer
|
||||
public synchronized PalettedContainerRO.PackedData<T> pack(IdMap<T> idList, PalettedContainer.Strategy paletteProvider) { // Paper - synchronize
|
||||
this.acquire();
|
||||
|
||||
@@ -363,9 +363,7 @@ index 983799520ce052d98c9231f4f7925492d4f7d5c9..a8cbb6fbeb169637c36a658ec5d086c9
|
||||
- int i = paletteProvider.size();
|
||||
- int[] is = new int[i];
|
||||
- this.data.storage.unpack(is);
|
||||
- swapPalette(is, (id) -> {
|
||||
- return hashMapPalette.idFor(this.data.palette.valueFor(id));
|
||||
- });
|
||||
- swapPalette(is, id -> hashMapPalette.idFor(this.data.palette.valueFor(id)));
|
||||
- int j = paletteProvider.calculateBitsForSerialization(idList, hashMapPalette.getSize());
|
||||
- Optional<LongStream> optional;
|
||||
- if (j != 0) {
|
||||
@@ -422,7 +420,7 @@ index 983799520ce052d98c9231f4f7925492d4f7d5c9..a8cbb6fbeb169637c36a658ec5d086c9
|
||||
}
|
||||
|
||||
private static <T> void swapPalette(int[] is, IntUnaryOperator applier) {
|
||||
@@ -365,17 +406,37 @@ public class PalettedContainer<T> implements PaletteResize<T>, PalettedContainer
|
||||
@@ -364,13 +407,35 @@ public class PalettedContainer<T> implements PaletteResize<T>, PalettedContainer
|
||||
|
||||
@Override
|
||||
public void count(PalettedContainer.CountConsumer<T> counter) {
|
||||
@@ -430,12 +428,8 @@ index 983799520ce052d98c9231f4f7925492d4f7d5c9..a8cbb6fbeb169637c36a658ec5d086c9
|
||||
- counter.accept(this.data.palette.valueFor(0), this.data.storage.getSize());
|
||||
- } else {
|
||||
- Int2IntOpenHashMap int2IntOpenHashMap = new Int2IntOpenHashMap();
|
||||
- this.data.storage.getAll((key) -> {
|
||||
- int2IntOpenHashMap.addTo(key, 1);
|
||||
- });
|
||||
- int2IntOpenHashMap.int2IntEntrySet().forEach((entry) -> {
|
||||
- counter.accept(this.data.palette.valueFor(entry.getIntKey()), entry.getIntValue());
|
||||
- });
|
||||
- this.data.storage.getAll(key -> int2IntOpenHashMap.addTo(key, 1));
|
||||
- int2IntOpenHashMap.int2IntEntrySet().forEach(entry -> counter.accept(this.data.palette.valueFor(entry.getIntKey()), entry.getIntValue()));
|
||||
+ // Gale start - Lithium - faster chunk serialization
|
||||
+ int len = this.data.palette().getSize();
|
||||
+
|
||||
@@ -449,9 +443,7 @@ index 983799520ce052d98c9231f4f7925492d4f7d5c9..a8cbb6fbeb169637c36a658ec5d086c9
|
||||
+ this.data.storage.getAll((key) -> {
|
||||
+ int2IntOpenHashMap.addTo(key, 1);
|
||||
+ });
|
||||
+ int2IntOpenHashMap.int2IntEntrySet().forEach((entry) -> {
|
||||
+ counter.accept(this.data.palette.valueFor(entry.getIntKey()), entry.getIntValue());
|
||||
+ });
|
||||
+ int2IntOpenHashMap.int2IntEntrySet().forEach((entry) -> counter.accept(this.data.palette.valueFor(entry.getIntKey()), entry.getIntValue()));
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
|
||||
@@ -13,18 +13,18 @@ As part of: Lithium (https://github.com/CaffeineMC/lithium-fabric)
|
||||
Licensed under: LGPL-3.0 (https://www.gnu.org/licenses/lgpl-3.0.html)
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/advancements/critereon/EntityEquipmentPredicate.java b/src/main/java/net/minecraft/advancements/critereon/EntityEquipmentPredicate.java
|
||||
index f4e5ada556a7fc7adac9b8d3e75ace483f753782..14b0fb4a1d7bc752fc041dbc850ad457a24c939a 100644
|
||||
index 96f5ccfa0369ca5dd7a327126dbe9b3cfe86ec1b..e4f1c486639d3488b40fe22ac6c4764ca5f043bd 100644
|
||||
--- a/src/main/java/net/minecraft/advancements/critereon/EntityEquipmentPredicate.java
|
||||
+++ b/src/main/java/net/minecraft/advancements/critereon/EntityEquipmentPredicate.java
|
||||
@@ -15,7 +15,7 @@ public record EntityEquipmentPredicate(Optional<ItemPredicate> head, Optional<It
|
||||
public static final Codec<EntityEquipmentPredicate> CODEC = RecordCodecBuilder.create((instance) -> {
|
||||
return instance.group(ExtraCodecs.strictOptionalField(ItemPredicate.CODEC, "head").forGetter(EntityEquipmentPredicate::head), ExtraCodecs.strictOptionalField(ItemPredicate.CODEC, "chest").forGetter(EntityEquipmentPredicate::chest), ExtraCodecs.strictOptionalField(ItemPredicate.CODEC, "legs").forGetter(EntityEquipmentPredicate::legs), ExtraCodecs.strictOptionalField(ItemPredicate.CODEC, "feet").forGetter(EntityEquipmentPredicate::feet), ExtraCodecs.strictOptionalField(ItemPredicate.CODEC, "mainhand").forGetter(EntityEquipmentPredicate::mainhand), ExtraCodecs.strictOptionalField(ItemPredicate.CODEC, "offhand").forGetter(EntityEquipmentPredicate::offhand)).apply(instance, EntityEquipmentPredicate::new);
|
||||
});
|
||||
- public static final EntityEquipmentPredicate CAPTAIN = EntityEquipmentPredicate.Builder.equipment().head(ItemPredicate.Builder.item().of(Items.WHITE_BANNER).hasNbt(Raid.getLeaderBannerInstance().getTag())).build();
|
||||
+ public static final EntityEquipmentPredicate CAPTAIN = EntityEquipmentPredicate.Builder.equipment().head(ItemPredicate.Builder.item().of(Items.WHITE_BANNER).hasNbt(Raid.LEADER_BANNER.getTag())).build(); // Gale - Lithium - cache ominous banner item
|
||||
@@ -31,7 +31,7 @@ public record EntityEquipmentPredicate(
|
||||
.apply(instance, EntityEquipmentPredicate::new)
|
||||
);
|
||||
public static final EntityEquipmentPredicate CAPTAIN = EntityEquipmentPredicate.Builder.equipment()
|
||||
- .head(ItemPredicate.Builder.item().of(Items.WHITE_BANNER).hasNbt(Raid.getLeaderBannerInstance().getTag()))
|
||||
+ .head(ItemPredicate.Builder.item().of(Items.WHITE_BANNER).hasNbt(Raid.LEADER_BANNER.getTag())) // Gale - Lithium - cache ominous banner item
|
||||
.build();
|
||||
|
||||
public boolean matches(@Nullable Entity entity) {
|
||||
if (entity instanceof LivingEntity livingEntity) {
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/raid/Raid.java b/src/main/java/net/minecraft/world/entity/raid/Raid.java
|
||||
index 5a0a6de4c6f0d554b9efbb8b3dcf4e0c5bee7baf..ea0df00966cf9900a8a0153099bbb04e5b47116d 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/raid/Raid.java
|
||||
|
||||
@@ -32,7 +32,7 @@ index adbc0a9caf5daad2655658f06e42d75270b574b0..965f2bb79a09ee9a0040a8a157a3b8c6
|
||||
for (int i = 0; i < this.getContainerSize(); ++i) {
|
||||
ItemStack itemstack = this.getItem(i);
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/ai/behavior/TradeWithVillager.java b/src/main/java/net/minecraft/world/entity/ai/behavior/TradeWithVillager.java
|
||||
index 3af715e2f3f3949af614a8fcebbc4a835d48ca49..94fb9bcf601832ee934331c0376de8707b5043c5 100644
|
||||
index e215491ebaebfc51445adc01452ce768fff3e2dc..a866e254b7faf50e2e64829a7e40db62d4d26424 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/ai/behavior/TradeWithVillager.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/ai/behavior/TradeWithVillager.java
|
||||
@@ -1,9 +1,8 @@
|
||||
@@ -64,8 +64,8 @@ index 3af715e2f3f3949af614a8fcebbc4a835d48ca49..94fb9bcf601832ee934331c0376de870
|
||||
+ // Gale end - optimize villager data storage
|
||||
|
||||
public TradeWithVillager() {
|
||||
super(ImmutableMap.of(MemoryModuleType.INTERACTION_TARGET, MemoryStatus.VALUE_PRESENT, MemoryModuleType.NEAREST_VISIBLE_LIVING_ENTITIES, MemoryStatus.VALUE_PRESENT));
|
||||
@@ -49,15 +53,17 @@ public class TradeWithVillager extends Behavior<Villager> {
|
||||
super(
|
||||
@@ -53,16 +57,18 @@ public class TradeWithVillager extends Behavior<Villager> {
|
||||
BehaviorUtils.lockGazeAndWalkToEachOther(entity, villager, 0.5F);
|
||||
entity.gossip(world, villager, time);
|
||||
if (entity.hasExcessFood() && (entity.getVillagerData().getProfession() == VillagerProfession.FARMER || villager.wantsMoreFood())) {
|
||||
@@ -73,9 +73,10 @@ index 3af715e2f3f3949af614a8fcebbc4a835d48ca49..94fb9bcf601832ee934331c0376de870
|
||||
+ throwHalfStack(entity, Villager.FOOD_POINTS_KEY_ARRAY, villager); // Gale - optimize villager data storage
|
||||
}
|
||||
|
||||
if (villager.getVillagerData().getProfession() == VillagerProfession.FARMER && entity.getInventory().countItem(Items.WHEAT) > Items.WHEAT.getMaxStackSize() / 2) {
|
||||
if (villager.getVillagerData().getProfession() == VillagerProfession.FARMER
|
||||
&& entity.getInventory().countItem(Items.WHEAT) > Items.WHEAT.getMaxStackSize() / 2) {
|
||||
- throwHalfStack(entity, ImmutableSet.of(Items.WHEAT), villager);
|
||||
+ throwHalfStack(entity, WHEAT_SINGLETON_ARRAY, villager); // Gale - optimize villager data storage
|
||||
+ throwHalfStack(entity, Villager.FOOD_POINTS_KEY_ARRAY, villager); // Gale - optimize villager data storage
|
||||
}
|
||||
|
||||
- if (!this.trades.isEmpty() && entity.getInventory().hasAnyOf(this.trades)) {
|
||||
@@ -84,18 +85,16 @@ index 3af715e2f3f3949af614a8fcebbc4a835d48ca49..94fb9bcf601832ee934331c0376de870
|
||||
throwHalfStack(entity, this.trades, villager);
|
||||
+ // Gale end - optimize villager data storage
|
||||
}
|
||||
|
||||
}
|
||||
@@ -68,15 +74,35 @@ public class TradeWithVillager extends Behavior<Villager> {
|
||||
}
|
||||
@@ -72,13 +78,36 @@ public class TradeWithVillager extends Behavior<Villager> {
|
||||
villager.getBrain().eraseMemory(MemoryModuleType.INTERACTION_TARGET);
|
||||
}
|
||||
|
||||
- private static Set<Item> figureOutWhatIAmWillingToTrade(Villager entity, Villager target) {
|
||||
- ImmutableSet<Item> immutableSet = target.getVillagerData().getProfession().requestedItems();
|
||||
- ImmutableSet<Item> immutableSet2 = entity.getVillagerData().getProfession().requestedItems();
|
||||
- return immutableSet.stream().filter((item) -> {
|
||||
- return !immutableSet2.contains(item);
|
||||
- }).collect(Collectors.toSet());
|
||||
- return immutableSet.stream().filter(item -> !immutableSet2.contains(item)).collect(Collectors.toSet());
|
||||
+ // Gale start - optimize villager data storage
|
||||
+ private static @NotNull Item @Nullable [] figureOutWhatIAmWillingToTrade(Villager entity, Villager target) {
|
||||
+ @NotNull Item @Nullable [] immutableSet = target.getVillagerData().getProfession().requestedItems();
|
||||
@@ -111,7 +110,8 @@ index 3af715e2f3f3949af614a8fcebbc4a835d48ca49..94fb9bcf601832ee934331c0376de870
|
||||
+ }
|
||||
+ Item[] willingToTrade = new Item[immutableSet.length];
|
||||
+ int willingToTradeSize = 0;
|
||||
+ forImmutableSet: for (Item item : immutableSet) {
|
||||
+ forImmutableSet:
|
||||
+ for (Item item : immutableSet) {
|
||||
+ for (Item item2 : immutableSet2) {
|
||||
+ if (item == item2) {
|
||||
+ continue forImmutableSet;
|
||||
@@ -129,7 +129,7 @@ index 3af715e2f3f3949af614a8fcebbc4a835d48ca49..94fb9bcf601832ee934331c0376de870
|
||||
SimpleContainer simpleContainer = villager.getInventory();
|
||||
ItemStack itemStack = ItemStack.EMPTY;
|
||||
int i = 0;
|
||||
@@ -89,7 +115,16 @@ public class TradeWithVillager extends Behavior<Villager> {
|
||||
@@ -91,7 +120,16 @@ public class TradeWithVillager extends Behavior<Villager> {
|
||||
itemStack2 = simpleContainer.getItem(i);
|
||||
if (!itemStack2.isEmpty()) {
|
||||
item = itemStack2.getItem();
|
||||
@@ -148,7 +148,7 @@ index 3af715e2f3f3949af614a8fcebbc4a835d48ca49..94fb9bcf601832ee934331c0376de870
|
||||
j = itemStack2.getCount() / 2;
|
||||
break label28;
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/ai/sensing/SecondaryPoiSensor.java b/src/main/java/net/minecraft/world/entity/ai/sensing/SecondaryPoiSensor.java
|
||||
index 75dc06a3041bfdfb08c914eb50cfa282ae9eb2fe..53b0519bbc5d52490040eaf0fe449648f021d0c2 100644
|
||||
index 1595568f3140a62b0f2236644ac2da11db12af05..ce8851c2cacfd3145b1e2c11443140a0759a1b07 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/ai/sensing/SecondaryPoiSensor.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/ai/sensing/SecondaryPoiSensor.java
|
||||
@@ -2,7 +2,8 @@ package net.minecraft.world.entity.ai.sensing;
|
||||
@@ -185,9 +185,9 @@ index 75dc06a3041bfdfb08c914eb50cfa282ae9eb2fe..53b0519bbc5d52490040eaf0fe449648
|
||||
+ @Nullable ArrayList<GlobalPos> list = null; // Gale - optimize villager data storage
|
||||
int i = 4;
|
||||
|
||||
for(int j = -4; j <= 4; ++j) {
|
||||
for(int k = -2; k <= 2; ++k) {
|
||||
for(int l = -4; l <= 4; ++l) {
|
||||
for (int j = -4; j <= 4; j++) {
|
||||
for (int k = -2; k <= 2; k++) {
|
||||
for (int l = -4; l <= 4; l++) {
|
||||
BlockPos blockPos2 = blockPos.offset(j, k, l);
|
||||
- if (entity.getVillagerData().getProfession().secondaryPoi().contains(world.getBlockState(blockPos2).getBlock())) {
|
||||
+ // Gale start - optimize villager data storage
|
||||
@@ -265,7 +265,7 @@ index 5fb3a32991b32132b0db56933671d2f999df667d..d88cebe9a348ec99bff05c650d101c80
|
||||
|
||||
public boolean hasExcessFood() {
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/npc/VillagerProfession.java b/src/main/java/net/minecraft/world/entity/npc/VillagerProfession.java
|
||||
index ac70c2c03241e73943bd517a8c69dd05e0873634..95197b601d93c30a7645d67c89c7608fc00a8de6 100644
|
||||
index 1316f4475802e17039800cc6128e1b065328beb7..3821c02187ad04b20cdf1e719a0deeabbf91007d 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/npc/VillagerProfession.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/npc/VillagerProfession.java
|
||||
@@ -1,8 +1,6 @@
|
||||
@@ -277,50 +277,76 @@ index ac70c2c03241e73943bd517a8c69dd05e0873634..95197b601d93c30a7645d67c89c7608f
|
||||
import net.minecraft.core.Holder;
|
||||
import net.minecraft.core.Registry;
|
||||
import net.minecraft.core.registries.BuiltInRegistries;
|
||||
@@ -17,8 +15,10 @@ import net.minecraft.world.item.Item;
|
||||
@@ -17,13 +15,15 @@ import net.minecraft.world.item.Item;
|
||||
import net.minecraft.world.item.Items;
|
||||
import net.minecraft.world.level.block.Block;
|
||||
import net.minecraft.world.level.block.Blocks;
|
||||
+import org.jetbrains.annotations.NotNull;
|
||||
+import org.jetbrains.annotations.Nullable;
|
||||
|
||||
-public record VillagerProfession(String name, Predicate<Holder<PoiType>> heldJobSite, Predicate<Holder<PoiType>> acquirableJobSite, ImmutableSet<Item> requestedItems, ImmutableSet<Block> secondaryPoi, @Nullable SoundEvent workSound) {
|
||||
+public record VillagerProfession(String name, Predicate<Holder<PoiType>> heldJobSite, Predicate<Holder<PoiType>> acquirableJobSite, @NotNull Item @Nullable [] requestedItems, @Nullable Block secondaryPoi, @Nullable SoundEvent workSound) { // Gale - optimize villager data storage
|
||||
public static final Predicate<Holder<PoiType>> ALL_ACQUIRABLE_JOBS = (poiType) -> {
|
||||
return poiType.is(PoiTypeTags.ACQUIRABLE_JOB_SITE);
|
||||
};
|
||||
@@ -27,7 +27,7 @@ public record VillagerProfession(String name, Predicate<Holder<PoiType>> heldJob
|
||||
public static final VillagerProfession BUTCHER = register("butcher", PoiTypes.BUTCHER, SoundEvents.VILLAGER_WORK_BUTCHER);
|
||||
public static final VillagerProfession CARTOGRAPHER = register("cartographer", PoiTypes.CARTOGRAPHER, SoundEvents.VILLAGER_WORK_CARTOGRAPHER);
|
||||
public static final VillagerProfession CLERIC = register("cleric", PoiTypes.CLERIC, SoundEvents.VILLAGER_WORK_CLERIC);
|
||||
- public static final VillagerProfession FARMER = register("farmer", PoiTypes.FARMER, ImmutableSet.of(Items.WHEAT, Items.WHEAT_SEEDS, Items.BEETROOT_SEEDS, Items.BONE_MEAL), ImmutableSet.of(Blocks.FARMLAND), SoundEvents.VILLAGER_WORK_FARMER);
|
||||
+ public static final VillagerProfession FARMER = register("farmer", PoiTypes.FARMER, new Item[] {Items.WHEAT, Items.WHEAT_SEEDS, Items.BEETROOT_SEEDS, Items.BONE_MEAL}, Blocks.FARMLAND, SoundEvents.VILLAGER_WORK_FARMER); // Gale - optimize villager data storage
|
||||
public record VillagerProfession(
|
||||
String name,
|
||||
Predicate<Holder<PoiType>> heldJobSite,
|
||||
Predicate<Holder<PoiType>> acquirableJobSite,
|
||||
- ImmutableSet<Item> requestedItems,
|
||||
- ImmutableSet<Block> secondaryPoi,
|
||||
+ @NotNull Item @Nullable [] requestedItems, // Gale - optimize villager data storage
|
||||
+ @Nullable Block secondaryPoi, // Gale - optimize villager data storage
|
||||
@Nullable SoundEvent workSound
|
||||
) {
|
||||
public static final Predicate<Holder<PoiType>> ALL_ACQUIRABLE_JOBS = poiType -> poiType.is(PoiTypeTags.ACQUIRABLE_JOB_SITE);
|
||||
@@ -35,8 +35,8 @@ public record VillagerProfession(
|
||||
public static final VillagerProfession FARMER = register(
|
||||
"farmer",
|
||||
PoiTypes.FARMER,
|
||||
- ImmutableSet.of(Items.WHEAT, Items.WHEAT_SEEDS, Items.BEETROOT_SEEDS, Items.BONE_MEAL),
|
||||
- ImmutableSet.of(Blocks.FARMLAND),
|
||||
+ new Item[] {Items.WHEAT, Items.WHEAT_SEEDS, Items.BEETROOT_SEEDS, Items.BONE_MEAL}, // Gale - optimize villager data storage
|
||||
+ Blocks.FARMLAND, // Gale - optimize villager data storage
|
||||
SoundEvents.VILLAGER_WORK_FARMER
|
||||
);
|
||||
public static final VillagerProfession FISHERMAN = register("fisherman", PoiTypes.FISHERMAN, SoundEvents.VILLAGER_WORK_FISHERMAN);
|
||||
public static final VillagerProfession FLETCHER = register("fletcher", PoiTypes.FLETCHER, SoundEvents.VILLAGER_WORK_FLETCHER);
|
||||
public static final VillagerProfession LEATHERWORKER = register("leatherworker", PoiTypes.LEATHERWORKER, SoundEvents.VILLAGER_WORK_LEATHERWORKER);
|
||||
@@ -52,18 +52,20 @@ public record VillagerProfession(String name, Predicate<Holder<PoiType>> heldJob
|
||||
@@ -58,34 +58,36 @@ public record VillagerProfession(
|
||||
return register(id, entry -> entry.is(heldWorkstation), entry -> entry.is(heldWorkstation), workSound);
|
||||
}
|
||||
|
||||
private static VillagerProfession register(String id, Predicate<Holder<PoiType>> heldWorkstation, Predicate<Holder<PoiType>> acquirableWorkstation, @Nullable SoundEvent workSound) {
|
||||
- return register(id, heldWorkstation, acquirableWorkstation, ImmutableSet.of(), ImmutableSet.of(), workSound);
|
||||
+ return register(id, heldWorkstation, acquirableWorkstation, null, null, workSound); // Gale - optimize villager data storage
|
||||
}
|
||||
|
||||
- private static VillagerProfession register(String id, ResourceKey<PoiType> heldWorkstation, ImmutableSet<Item> gatherableItems, ImmutableSet<Block> secondaryJobSites, @Nullable SoundEvent workSound) {
|
||||
+ private static VillagerProfession register(String id, ResourceKey<PoiType> heldWorkstation, @NotNull Item @Nullable [] gatherableItems, @Nullable Block secondaryJobSite, @Nullable SoundEvent workSound) { // Gale - optimize villager data storage
|
||||
return register(id, (entry) -> {
|
||||
return entry.is(heldWorkstation);
|
||||
}, (entry) -> {
|
||||
return entry.is(heldWorkstation);
|
||||
- }, gatherableItems, secondaryJobSites, workSound);
|
||||
+ }, gatherableItems, secondaryJobSite, workSound); // Gale - optimize villager data storage
|
||||
}
|
||||
|
||||
- private static VillagerProfession register(String id, Predicate<Holder<PoiType>> heldWorkstation, Predicate<Holder<PoiType>> acquirableWorkstation, ImmutableSet<Item> gatherableItems, ImmutableSet<Block> secondaryJobSites, @Nullable SoundEvent workSound) {
|
||||
- return Registry.register(BuiltInRegistries.VILLAGER_PROFESSION, new ResourceLocation(id), new VillagerProfession(id, heldWorkstation, acquirableWorkstation, gatherableItems, secondaryJobSites, workSound));
|
||||
+ // Gale start - optimize villager data storage
|
||||
+ private static VillagerProfession register(String id, Predicate<Holder<PoiType>> heldWorkstation, Predicate<Holder<PoiType>> acquirableWorkstation, @NotNull Item @Nullable [] gatherableItems, @Nullable Block secondaryJobSite, @Nullable SoundEvent workSound) {
|
||||
+ return Registry.register(BuiltInRegistries.VILLAGER_PROFESSION, new ResourceLocation(id), new VillagerProfession(id, heldWorkstation, acquirableWorkstation, gatherableItems != null && gatherableItems.length == 0 ? null : gatherableItems, secondaryJobSite, workSound));
|
||||
private static VillagerProfession register(
|
||||
String id, Predicate<Holder<PoiType>> heldWorkstation, Predicate<Holder<PoiType>> acquirableWorkstation, @Nullable SoundEvent workSound
|
||||
) {
|
||||
- return register(id, heldWorkstation, acquirableWorkstation, ImmutableSet.of(), ImmutableSet.of(), workSound);
|
||||
+ return register(id, heldWorkstation, acquirableWorkstation, null, null, workSound);
|
||||
}
|
||||
|
||||
private static VillagerProfession register(
|
||||
String id,
|
||||
ResourceKey<PoiType> heldWorkstation,
|
||||
- ImmutableSet<Item> gatherableItems,
|
||||
- ImmutableSet<Block> secondaryJobSites,
|
||||
+ @NotNull Item @Nullable [] gatherableItems,
|
||||
+ @Nullable Block secondaryJobSite,
|
||||
@Nullable SoundEvent workSound
|
||||
) {
|
||||
- return register(id, entry -> entry.is(heldWorkstation), entry -> entry.is(heldWorkstation), gatherableItems, secondaryJobSites, workSound);
|
||||
+ return register(id, entry -> entry.is(heldWorkstation), entry -> entry.is(heldWorkstation), gatherableItems, secondaryJobSite, workSound);
|
||||
}
|
||||
|
||||
private static VillagerProfession register(
|
||||
String id,
|
||||
Predicate<Holder<PoiType>> heldWorkstation,
|
||||
Predicate<Holder<PoiType>> acquirableWorkstation,
|
||||
- ImmutableSet<Item> gatherableItems,
|
||||
- ImmutableSet<Block> secondaryJobSites,
|
||||
+ @NotNull Item @Nullable [] gatherableItems,
|
||||
+ @Nullable Block secondaryJobSite,
|
||||
@Nullable SoundEvent workSound
|
||||
) {
|
||||
return Registry.register(
|
||||
BuiltInRegistries.VILLAGER_PROFESSION,
|
||||
new ResourceLocation(id),
|
||||
- new VillagerProfession(id, heldWorkstation, acquirableWorkstation, gatherableItems, secondaryJobSites, workSound)
|
||||
+ new VillagerProfession(id, heldWorkstation, acquirableWorkstation, gatherableItems != null && gatherableItems.length == 0 ? null : gatherableItems, secondaryJobSite, workSound)
|
||||
);
|
||||
+ // Gale end - optimize villager data storage
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,10 +13,10 @@ As part of: VMP (https://github.com/RelativityMC/VMP-fabric)
|
||||
Licensed under: MIT (https://opensource.org/licenses/MIT)
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/LocalMobCapCalculator.java b/src/main/java/net/minecraft/world/level/LocalMobCapCalculator.java
|
||||
index 84c766e09898cfc07d6e07e80f4b9aa318050a62..8357b1e16b2fb1b84c7d14da577e95d91450b53e 100644
|
||||
index 09199c574169057ae6e52ee7df277c03fa6ba5c2..3f0c84cf120e71259adc726579b2a23b3c56abbe 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/LocalMobCapCalculator.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/LocalMobCapCalculator.java
|
||||
@@ -47,16 +47,14 @@ public class LocalMobCapCalculator {
|
||||
@@ -42,14 +42,14 @@ public class LocalMobCapCalculator {
|
||||
}
|
||||
|
||||
static class MobCounts {
|
||||
@@ -24,9 +24,7 @@ index 84c766e09898cfc07d6e07e80f4b9aa318050a62..8357b1e16b2fb1b84c7d14da577e95d9
|
||||
+ public final int[] counts = new int[MobCategory.values().length]; // Gale - VMP - store mob counts in an array
|
||||
|
||||
public void add(MobCategory spawnGroup) {
|
||||
- this.counts.computeInt(spawnGroup, (group, density) -> {
|
||||
- return density == null ? 1 : density + 1;
|
||||
- });
|
||||
- this.counts.computeInt(spawnGroup, (group, density) -> density == null ? 1 : density + 1);
|
||||
+ this.counts[spawnGroup.ordinal()]++; // Gale - VMP - store mob counts in an array
|
||||
}
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ As part of: C2ME (https://github.com/RelativityMC/C2ME-fabric)
|
||||
Licensed under: MIT (https://opensource.org/licenses/MIT)
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/levelgen/synth/ImprovedNoise.java b/src/main/java/net/minecraft/world/level/levelgen/synth/ImprovedNoise.java
|
||||
index fb84d703b4461343d50510d7c9be32fc1f09ed22..93a11c95f96f975fafe03e77a2caace57675d130 100644
|
||||
index 9a97e5cd23d839183ac4d243d28df92af3119fe7..0da2d816f0497eae0c055f3929b8194a3473a221 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/levelgen/synth/ImprovedNoise.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/levelgen/synth/ImprovedNoise.java
|
||||
@@ -11,6 +11,27 @@ public final class ImprovedNoise {
|
||||
@@ -43,9 +43,9 @@ index fb84d703b4461343d50510d7c9be32fc1f09ed22..93a11c95f96f975fafe03e77a2caace5
|
||||
+ // Gale end - C2ME - optimize noise generation
|
||||
+
|
||||
public ImprovedNoise(RandomSource random) {
|
||||
this.xo = random.nextDouble() * 256.0D;
|
||||
this.yo = random.nextDouble() * 256.0D;
|
||||
@@ -40,12 +61,14 @@ public final class ImprovedNoise {
|
||||
this.xo = random.nextDouble() * 256.0;
|
||||
this.yo = random.nextDouble() * 256.0;
|
||||
@@ -38,12 +59,14 @@ public final class ImprovedNoise {
|
||||
double d = x + this.xo;
|
||||
double e = y + this.yo;
|
||||
double f = z + this.zo;
|
||||
@@ -64,16 +64,16 @@ index fb84d703b4461343d50510d7c9be32fc1f09ed22..93a11c95f96f975fafe03e77a2caace5
|
||||
+ double l = f - k;
|
||||
+ // Gale end - C2ME - optimize noise generation - optimize: remove frequent type conversions
|
||||
double o;
|
||||
if (yScale != 0.0D) {
|
||||
if (yScale != 0.0) {
|
||||
double m;
|
||||
@@ -55,25 +78,27 @@ public final class ImprovedNoise {
|
||||
@@ -53,25 +76,27 @@ public final class ImprovedNoise {
|
||||
m = h;
|
||||
}
|
||||
|
||||
- o = (double)Mth.floor(m / yScale + (double)1.0E-7F) * yScale;
|
||||
- o = (double)Mth.floor(m / yScale + 1.0E-7F) * yScale;
|
||||
+ o = Math.floor(m / yScale + (double)1.0E-7F) * yScale; // Gale - C2ME - optimize noise generation - optimize: remove frequent type conversions
|
||||
} else {
|
||||
o = 0.0D;
|
||||
o = 0.0;
|
||||
}
|
||||
|
||||
- return this.sampleAndLerp(i, j, k, g, h - o, l, h);
|
||||
@@ -103,7 +103,7 @@ index fb84d703b4461343d50510d7c9be32fc1f09ed22..93a11c95f96f975fafe03e77a2caace5
|
||||
}
|
||||
|
||||
private static double gradDot(int hash, double x, double y, double z) {
|
||||
@@ -85,24 +110,69 @@ public final class ImprovedNoise {
|
||||
@@ -83,24 +108,69 @@ public final class ImprovedNoise {
|
||||
}
|
||||
|
||||
private double sampleAndLerp(int sectionX, int sectionY, int sectionZ, double localX, double localY, double localZ, double fadeLocalY) {
|
||||
@@ -114,13 +114,13 @@ index fb84d703b4461343d50510d7c9be32fc1f09ed22..93a11c95f96f975fafe03e77a2caace5
|
||||
- int m = this.p(j + sectionY);
|
||||
- int n = this.p(j + sectionY + 1);
|
||||
- double d = gradDot(this.p(k + sectionZ), localX, localY, localZ);
|
||||
- double e = gradDot(this.p(m + sectionZ), localX - 1.0D, localY, localZ);
|
||||
- double f = gradDot(this.p(l + sectionZ), localX, localY - 1.0D, localZ);
|
||||
- double g = gradDot(this.p(n + sectionZ), localX - 1.0D, localY - 1.0D, localZ);
|
||||
- double h = gradDot(this.p(k + sectionZ + 1), localX, localY, localZ - 1.0D);
|
||||
- double o = gradDot(this.p(m + sectionZ + 1), localX - 1.0D, localY, localZ - 1.0D);
|
||||
- double p = gradDot(this.p(l + sectionZ + 1), localX, localY - 1.0D, localZ - 1.0D);
|
||||
- double q = gradDot(this.p(n + sectionZ + 1), localX - 1.0D, localY - 1.0D, localZ - 1.0D);
|
||||
- double e = gradDot(this.p(m + sectionZ), localX - 1.0, localY, localZ);
|
||||
- double f = gradDot(this.p(l + sectionZ), localX, localY - 1.0, localZ);
|
||||
- double g = gradDot(this.p(n + sectionZ), localX - 1.0, localY - 1.0, localZ);
|
||||
- double h = gradDot(this.p(k + sectionZ + 1), localX, localY, localZ - 1.0);
|
||||
- double o = gradDot(this.p(m + sectionZ + 1), localX - 1.0, localY, localZ - 1.0);
|
||||
- double p = gradDot(this.p(l + sectionZ + 1), localX, localY - 1.0, localZ - 1.0);
|
||||
- double q = gradDot(this.p(n + sectionZ + 1), localX - 1.0, localY - 1.0, localZ - 1.0);
|
||||
- double r = Mth.smoothstep(localX);
|
||||
- double s = Mth.smoothstep(fadeLocalY);
|
||||
- double t = Mth.smoothstep(localZ);
|
||||
@@ -192,7 +192,7 @@ index fb84d703b4461343d50510d7c9be32fc1f09ed22..93a11c95f96f975fafe03e77a2caace5
|
||||
|
||||
private double sampleWithDerivative(int sectionX, int sectionY, int sectionZ, double localX, double localY, double localZ, double[] ds) {
|
||||
diff --git a/src/main/java/net/minecraft/world/level/levelgen/synth/PerlinNoise.java b/src/main/java/net/minecraft/world/level/levelgen/synth/PerlinNoise.java
|
||||
index 97ef7288ea935f3d17c5b7a9eba642143c786c2b..6d084145f8529fa8b0439123f9a9812940cc62da 100644
|
||||
index 35820670837376bcad8891241724d5b946fbd31f..022dda9dded1bd96dcaf377b1d1a9711ea9c49e7 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/levelgen/synth/PerlinNoise.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/levelgen/synth/PerlinNoise.java
|
||||
@@ -26,6 +26,10 @@ public class PerlinNoise {
|
||||
@@ -204,12 +204,12 @@ index 97ef7288ea935f3d17c5b7a9eba642143c786c2b..6d084145f8529fa8b0439123f9a98129
|
||||
+ private final double [] amplitudesArray;
|
||||
+ // Gale end - C2ME - optimize noise generation
|
||||
|
||||
/** @deprecated */
|
||||
@Deprecated
|
||||
@@ -131,6 +135,10 @@ public class PerlinNoise {
|
||||
this.lowestFreqInputFactor = Math.pow(2.0D, (double)(-j));
|
||||
this.lowestFreqValueFactor = Math.pow(2.0D, (double)(i - 1)) / (Math.pow(2.0D, (double)i) - 1.0D);
|
||||
this.maxValue = this.edgeValue(2.0D);
|
||||
public static PerlinNoise createLegacyForBlendedNoise(RandomSource random, IntStream octaves) {
|
||||
@@ -127,6 +131,10 @@ public class PerlinNoise {
|
||||
this.lowestFreqInputFactor = Math.pow(2.0, (double)(-j));
|
||||
this.lowestFreqValueFactor = Math.pow(2.0, (double)(i - 1)) / (Math.pow(2.0, (double)i) - 1.0);
|
||||
this.maxValue = this.edgeValue(2.0);
|
||||
+ // Gale start - C2ME - optimize noise generation
|
||||
+ this.octaveSamplersCount = this.noiseLevels.length;
|
||||
+ this.amplitudesArray = this.amplitudes.toDoubleArray();
|
||||
@@ -217,22 +217,22 @@ index 97ef7288ea935f3d17c5b7a9eba642143c786c2b..6d084145f8529fa8b0439123f9a98129
|
||||
}
|
||||
|
||||
protected double maxValue() {
|
||||
@@ -142,7 +150,27 @@ public class PerlinNoise {
|
||||
@@ -138,7 +146,27 @@ public class PerlinNoise {
|
||||
}
|
||||
|
||||
public double getValue(double x, double y, double z) {
|
||||
- return this.getValue(x, y, z, 0.0D, 0.0D, false);
|
||||
- return this.getValue(x, y, z, 0.0, 0.0, false);
|
||||
+ // Gale start - C2ME - optimize noise generation - optimize for common cases
|
||||
+ double d = 0.0;
|
||||
+ double e = this.lowestFreqInputFactor;
|
||||
+ double f = this.lowestFreqValueFactor;
|
||||
+
|
||||
+ for(int i = 0; i < this.octaveSamplersCount; ++i) {
|
||||
+ for (int i = 0; i < this.octaveSamplersCount; ++i) {
|
||||
+ ImprovedNoise perlinNoiseSampler = this.noiseLevels[i];
|
||||
+ if (perlinNoiseSampler != null) {
|
||||
+ @SuppressWarnings("deprecation")
|
||||
+ double g = perlinNoiseSampler.noise(
|
||||
+ wrap(x * e), wrap(y * e), wrap(z * e), 0.0, 0.0
|
||||
+ wrap(x * e), wrap(y * e), wrap(z * e), 0.0, 0.0
|
||||
+ );
|
||||
+ d += this.amplitudesArray[i] * g * f;
|
||||
+ }
|
||||
@@ -245,4 +245,4 @@ index 97ef7288ea935f3d17c5b7a9eba642143c786c2b..6d084145f8529fa8b0439123f9a98129
|
||||
+ // Gale end - C2ME - optimize noise generation - optimize for common cases
|
||||
}
|
||||
|
||||
/** @deprecated */
|
||||
@Deprecated
|
||||
|
||||
@@ -13,13 +13,13 @@ As part of: Mirai (https://github.com/etil2jz/Mirai)
|
||||
Licensed under: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html)
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/advancements/Advancement.java b/src/main/java/net/minecraft/advancements/Advancement.java
|
||||
index a053d30f171c0c022888f098313b50f73c434180..afe6dc0e814ecbe57f92b541947d2edadcd5b370 100644
|
||||
index 366ce8120b0cc7136d2756070d710ec65ae7f44d..98c5da21177665d9d3b0e6a4136ae6a21d0154af 100644
|
||||
--- a/src/main/java/net/minecraft/advancements/Advancement.java
|
||||
+++ b/src/main/java/net/minecraft/advancements/Advancement.java
|
||||
@@ -40,7 +40,7 @@ public record Advancement(Optional<ResourceLocation> parent, Optional<DisplayInf
|
||||
}), Advancement::validate);
|
||||
|
||||
public Advancement(Optional<ResourceLocation> parent, Optional<DisplayInfo> display, AdvancementRewards rewards, Map<String, Criterion<?>> criteria, AdvancementRequirements requirements, boolean sendsTelemetryEvent) {
|
||||
@@ -62,7 +62,7 @@ public record Advancement(
|
||||
AdvancementRequirements requirements,
|
||||
boolean sendsTelemetryEvent
|
||||
) {
|
||||
- this(parent, display, rewards, Map.copyOf(criteria), requirements, sendsTelemetryEvent, display.map(Advancement::decorateName));
|
||||
+ this(parent, display, rewards, criteria, requirements, sendsTelemetryEvent, display.map(Advancement::decorateName)); // Gale - Mirai - skip cloning advancement criteria
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@ As part of: SportPaper (https://github.com/Electroid/SportPaper)
|
||||
Licensed under: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html)
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index 8f5b90dc2af62336116fae24ed3248bfcf975883..8d517617e38edf7b6cd49f32f404f2f80c014f66 100644
|
||||
index 9805ee5989d813f45b5b0829d73ebce3909b5f07..ab0ac738f3e3d231d8fbc663230892d3a5f07660 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -1737,7 +1737,17 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -35,7 +35,7 @@ index 8f5b90dc2af62336116fae24ed3248bfcf975883..8d517617e38edf7b6cd49f32f404f2f8
|
||||
|
||||
// CraftBukkit start
|
||||
Player entityhuman = null;
|
||||
@@ -1760,7 +1770,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -1771,7 +1781,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
// CraftBukkit end
|
||||
|
||||
if (d0 * d0 + d1 * d1 + d2 * d2 < 1024.0D) {
|
||||
|
||||
@@ -65,7 +65,7 @@ index ec0cf74e977d3ba4cbd43572af8f7fd4a496462f..9025505e7c8ac81d97a553e0ebbeb572
|
||||
private void performInteraction(InteractionHand enumhand, ServerGamePacketListenerImpl.EntityInteraction playerconnection_a, PlayerInteractEntityEvent event) { // CraftBukkit
|
||||
ItemStack itemstack = ServerGamePacketListenerImpl.this.player.getItemInHand(enumhand);
|
||||
diff --git a/src/main/java/net/minecraft/world/item/BrushItem.java b/src/main/java/net/minecraft/world/item/BrushItem.java
|
||||
index f46c16dd6ff9cd09ea579eecf99ce78c7eb39d49..430b8a2bb1639eeb7338e0f7b1030248d66ef31e 100644
|
||||
index 9caf067fcfbf74bbf260bf9149122f7ff8f317e4..a0bd0093bd232070c5826eb7271e490d9138db58 100644
|
||||
--- a/src/main/java/net/minecraft/world/item/BrushItem.java
|
||||
+++ b/src/main/java/net/minecraft/world/item/BrushItem.java
|
||||
@@ -4,6 +4,7 @@ import net.minecraft.core.BlockPos;
|
||||
@@ -76,15 +76,15 @@ index f46c16dd6ff9cd09ea579eecf99ce78c7eb39d49..430b8a2bb1639eeb7338e0f7b1030248
|
||||
import net.minecraft.sounds.SoundEvent;
|
||||
import net.minecraft.sounds.SoundEvents;
|
||||
import net.minecraft.sounds.SoundSource;
|
||||
@@ -110,7 +111,7 @@ public class BrushItem extends Item {
|
||||
@@ -97,7 +98,7 @@ public class BrushItem extends Item {
|
||||
|
||||
private HitResult calculateHitResult(Player user) {
|
||||
return ProjectileUtil.getHitResultOnViewVector(user, (entity) -> {
|
||||
return !entity.isSpectator() && entity.isPickable();
|
||||
- }, (double)Player.getPickRange(user.isCreative()));
|
||||
+ }, Math.sqrt(ServerGamePacketListenerImpl.getMaxInteractionDistanceSquared(user.level())) - 1.0D); // Gale - make max interaction distance configurable
|
||||
return ProjectileUtil.getHitResultOnViewVector(
|
||||
- user, entity -> !entity.isSpectator() && entity.isPickable(), (double)Player.getPickRange(user.isCreative())
|
||||
+ user, entity -> !entity.isSpectator() && entity.isPickable(), Math.sqrt(ServerGamePacketListenerImpl.getMaxInteractionDistanceSquared(user.level())) - 1.0D // Gale - make max interaction distance configurable
|
||||
);
|
||||
}
|
||||
|
||||
private void spawnDustParticles(Level world, BlockHitResult hitResult, BlockState state, Vec3 userRotation, HumanoidArm arm) {
|
||||
diff --git a/src/main/java/org/galemc/gale/configuration/GaleWorldConfiguration.java b/src/main/java/org/galemc/gale/configuration/GaleWorldConfiguration.java
|
||||
index 5d499e77800466210473e36b2355873807b9f86a..c5b23bafb7909130a8a294e3b5bf94daa313ee11 100644
|
||||
--- a/src/main/java/org/galemc/gale/configuration/GaleWorldConfiguration.java
|
||||
|
||||
@@ -23,10 +23,10 @@ The above copyright notice and this permission notice shall be included in all c
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/Eula.java b/src/main/java/net/minecraft/server/Eula.java
|
||||
index 4996694ec43a894cbbb363e48bfdff6b6ae17b5f..b9403a3eafc1b30b33ac654f253d0849cacadd03 100644
|
||||
index 6538f4771c825ca23e449eba7a42d90a72d31c19..dbb424d63485f3e88b5606a92f1c12c9ff948cf9 100644
|
||||
--- a/src/main/java/net/minecraft/server/Eula.java
|
||||
+++ b/src/main/java/net/minecraft/server/Eula.java
|
||||
@@ -16,17 +16,40 @@ public class Eula {
|
||||
@@ -16,13 +16,30 @@ public class Eula {
|
||||
|
||||
public Eula(Path eulaFile) {
|
||||
this.file = eulaFile;
|
||||
@@ -35,10 +35,6 @@ index 4996694ec43a894cbbb363e48bfdff6b6ae17b5f..b9403a3eafc1b30b33ac654f253d0849
|
||||
}
|
||||
|
||||
private boolean readFile() {
|
||||
- try (InputStream inputStream = Files.newInputStream(this.file)) {
|
||||
- Properties properties = new Properties();
|
||||
- properties.load(inputStream);
|
||||
- return Boolean.parseBoolean(properties.getProperty("eula", "false"));
|
||||
+ // Gale start - YAPFA - global EULA file
|
||||
+ return readFile(this.file);
|
||||
+ }
|
||||
@@ -49,24 +45,26 @@ index 4996694ec43a894cbbb363e48bfdff6b6ae17b5f..b9403a3eafc1b30b33ac654f253d0849
|
||||
+ if (globalFile.toFile().exists()) {
|
||||
+ return readFile(globalFile);
|
||||
+ }
|
||||
+ } catch (Throwable ignored) {}
|
||||
+ } catch (Throwable ignored) {
|
||||
+ }
|
||||
+ return false;
|
||||
+ }
|
||||
+
|
||||
+ private boolean readFile(Path file) {
|
||||
+ // Gale end - YAPFA - global EULA file
|
||||
+ try {
|
||||
+ boolean var3;
|
||||
try {
|
||||
boolean var3;
|
||||
- try (InputStream inputStream = Files.newInputStream(this.file)) {
|
||||
+ try (InputStream inputStream = Files.newInputStream(file)) { // Gale - YAPFA - global EULA file
|
||||
+ Properties properties = new Properties();
|
||||
+ properties.load(inputStream);
|
||||
+ var3 = Boolean.parseBoolean(properties.getProperty("eula", "false"));
|
||||
+ }
|
||||
+
|
||||
+ return var3;
|
||||
Properties properties = new Properties();
|
||||
properties.load(inputStream);
|
||||
var3 = Boolean.parseBoolean(properties.getProperty("eula", "false"));
|
||||
@@ -30,8 +47,10 @@ public class Eula {
|
||||
|
||||
return var3;
|
||||
} catch (Exception var6) {
|
||||
+ if (file == this.file) { // Gale - YAPFA - global EULA file
|
||||
LOGGER.warn("Failed to load {}", (Object)this.file);
|
||||
LOGGER.warn("Failed to load {}", this.file);
|
||||
this.saveDefaults();
|
||||
+ } // Gale - YAPFA - global EULA file
|
||||
return false;
|
||||
|
||||
@@ -21,7 +21,7 @@ Given that we do a lot of varint writing as well, this should provide a small pe
|
||||
This includes a test to ensure that the behavior is as expected and fixes the initialization loop so that the correct results will be given. Much thanks to @octylFractal for acting as my duck while trying to figure this out.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/network/VarLong.java b/src/main/java/net/minecraft/network/VarLong.java
|
||||
index 3ea9f42b7ad50c0dc4466849e3432ebddcfe2f7b..4c1fbf3e2e6cfaf5f5db199b232d007ec6a9d226 100644
|
||||
index c4fd722f4203e3f4de7b41de9d6ef47b5cfaed10..b73a50fa8465ea4d392a65146eb2775a50917290 100644
|
||||
--- a/src/main/java/net/minecraft/network/VarLong.java
|
||||
+++ b/src/main/java/net/minecraft/network/VarLong.java
|
||||
@@ -8,7 +8,22 @@ public class VarLong {
|
||||
@@ -44,7 +44,7 @@ index 3ea9f42b7ad50c0dc4466849e3432ebddcfe2f7b..4c1fbf3e2e6cfaf5f5db199b232d007e
|
||||
+
|
||||
+ static int getByteSizeOriginal(long l) { // public -> package-private
|
||||
+ // Gale end - Velocity - pre-compute VarInt and VarLong sizes
|
||||
for(int i = 1; i < 10; ++i) {
|
||||
for (int i = 1; i < 10; i++) {
|
||||
if ((l & -1L << i * 7) == 0L) {
|
||||
return i;
|
||||
diff --git a/src/test/java/net/minecraft/network/VarIntLongTest.java b/src/test/java/net/minecraft/network/VarIntLongTest.java
|
||||
|
||||
@@ -21,7 +21,7 @@ Given that we do a lot of varint writing as well, this should provide a small pe
|
||||
This includes a test to ensure that the behavior is as expected and fixes the initialization loop so that the correct results will be given. Much thanks to @octylFractal for acting as my duck while trying to figure this out.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/network/VarLong.java b/src/main/java/net/minecraft/network/VarLong.java
|
||||
index 4c1fbf3e2e6cfaf5f5db199b232d007ec6a9d226..10546fb8b47b54989f5f98ddf37f202699abfb6d 100644
|
||||
index b73a50fa8465ea4d392a65146eb2775a50917290..a584a44680a034be4f9848cbfea4af4c87d8de7d 100644
|
||||
--- a/src/main/java/net/minecraft/network/VarLong.java
|
||||
+++ b/src/main/java/net/minecraft/network/VarLong.java
|
||||
@@ -54,6 +54,127 @@ public class VarLong {
|
||||
@@ -149,7 +149,7 @@ index 4c1fbf3e2e6cfaf5f5db199b232d007ec6a9d226..10546fb8b47b54989f5f98ddf37f2026
|
||||
+
|
||||
+ static ByteBuf writeOriginal(ByteBuf buf, long l) { // public -> package-private
|
||||
+ // Gale end - Velocity - optimized VarLong#write
|
||||
while((l & -128L) != 0L) {
|
||||
while ((l & -128L) != 0L) {
|
||||
buf.writeByte((int)(l & 127L) | 128);
|
||||
l >>>= 7;
|
||||
diff --git a/src/test/java/net/minecraft/network/VarIntLongTest.java b/src/test/java/net/minecraft/network/VarIntLongTest.java
|
||||
|
||||
@@ -26,7 +26,7 @@ index b47a8a082170bcb630c4354be7c77a4cac71d105..b49e3f2cdc1fa5ff3723fae452404664
|
||||
double d1 = (double) (center.y - maxRange);
|
||||
double d2 = (double) (center.x + maxRange);
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
index 8d7cda352d1be1bd7638561d4727df9c51799803..f80b2d4e9a46d84fdaa0f674c562736a1e5c1635 100644
|
||||
index 2b5821db0766d6212723ea210928eccf1f992ad1..172315c2a965b82773dff797d4667d2f80ec8c7a 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
@@ -453,7 +453,7 @@ public class ServerPlayer extends Player {
|
||||
@@ -48,10 +48,10 @@ index 8d7cda352d1be1bd7638561d4727df9c51799803..f80b2d4e9a46d84fdaa0f674c562736a
|
||||
for (int l1 = 0; l1 < i1; ++l1) {
|
||||
int i2 = (k1 + j1 * l1) % i1;
|
||||
diff --git a/src/main/java/net/minecraft/server/rcon/thread/QueryThreadGs4.java b/src/main/java/net/minecraft/server/rcon/thread/QueryThreadGs4.java
|
||||
index 1ef089dbf83de35d875c00efdf468c397be56978..b9f5dc95f859acb8f8fd4739537485af7187ae3b 100644
|
||||
index 0e0867d7add9a024bbe9471f8ff92bbb25996a3d..94ffa65fa99c4c713936f7004d9f46ac94a9fe7a 100644
|
||||
--- a/src/main/java/net/minecraft/server/rcon/thread/QueryThreadGs4.java
|
||||
+++ b/src/main/java/net/minecraft/server/rcon/thread/QueryThreadGs4.java
|
||||
@@ -349,7 +349,7 @@ public class QueryThreadGs4 extends GenericThread {
|
||||
@@ -341,7 +341,7 @@ public class QueryThreadGs4 extends GenericThread {
|
||||
this.identBytes[2] = bs[5];
|
||||
this.identBytes[3] = bs[6];
|
||||
this.ident = new String(this.identBytes, StandardCharsets.UTF_8);
|
||||
|
||||
@@ -62,10 +62,10 @@ index 6cf83502a954cce9c562ec036bfeddb477d38b73..21070516fc936109f537494e38e24098
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
index bfb178c69026e9759e9afaebb9da141b62d1f144..c9d276124bd14aafcd1a29991081b7668fe636b6 100644
|
||||
index 01797d9791f19dfda4b168218eadeaae97f11eab..4a11314df1a6d068c5abf12677b9bfd11ea7c66c 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
@@ -243,7 +243,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||
@@ -244,7 +244,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||
}
|
||||
// Paper end
|
||||
|
||||
@@ -543,7 +543,7 @@ index 0000000000000000000000000000000000000000..60dc2c1deb0749168d03c5d94136e613
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/org/spigotmc/ActivationRange.java b/src/main/java/org/spigotmc/ActivationRange.java
|
||||
index 54c68978e19a5fb871f7b31f74c6c77376693cd9..1cff8378c4939af4bbe300e5d6428539e75218ae 100644
|
||||
index 0a32b68ae0172fa637a37fcf82557ba799e3aee6..5e24b70b102cbf4dce2dec748dab1949a77b0d4d 100644
|
||||
--- a/src/main/java/org/spigotmc/ActivationRange.java
|
||||
+++ b/src/main/java/org/spigotmc/ActivationRange.java
|
||||
@@ -38,6 +38,7 @@ import co.aikar.timings.MinecraftTimings;
|
||||
|
||||
Reference in New Issue
Block a user