mirror of
https://github.com/BX-Team/DivineMC.git
synced 2025-12-19 14:59:25 +00:00
[ci-skip] compilation fixes №1
This commit is contained in:
@@ -32,16 +32,18 @@
|
||||
|
||||
// Deprecate bungeecord-chat in favor of adventure
|
||||
api("net.md-5:bungeecord-chat:$bungeeCordChatVersion") {
|
||||
@@ -68,9 +_,9 @@
|
||||
@@ -68,9 +_,11 @@
|
||||
apiAndDocs("$adventureGroup:adventure-text-serializer-plain")
|
||||
apiAndDocs("$adventureGroup:adventure-text-logger-slf4j")
|
||||
|
||||
- api("org.apache.maven:maven-resolver-provider:3.9.6") // make API dependency for Paper Plugins
|
||||
- compileOnly("org.apache.maven.resolver:maven-resolver-connector-basic:1.9.18")
|
||||
- compileOnly("org.apache.maven.resolver:maven-resolver-transport-http:1.9.18")
|
||||
+ api("org.apache.maven:maven-resolver-provider:3.9.9") // make API dependency for Paper Plugins // DivineMC - Bump dependencies
|
||||
+ compileOnly("org.apache.maven.resolver:maven-resolver-connector-basic:1.9.22") // DivineMC - Bump dependencies
|
||||
+ compileOnly("org.apache.maven.resolver:maven-resolver-transport-http:1.9.22") // DivineMC - Bump dependencies
|
||||
+ // DivineMC start - Bump dependencies
|
||||
+ api("org.apache.maven:maven-resolver-provider:3.9.9") // make API dependency for Paper Plugins
|
||||
+ compileOnly("org.apache.maven.resolver:maven-resolver-connector-basic:1.9.22")
|
||||
+ compileOnly("org.apache.maven.resolver:maven-resolver-transport-http:1.9.22")
|
||||
+ // DivineMC end - Bump dependencies
|
||||
|
||||
// Annotations - Slowly migrate to jspecify
|
||||
val annotations = "org.jetbrains:annotations:$annotationsVersion"
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
}
|
||||
}
|
||||
val log4jPlugins = sourceSets.create("log4jPlugins") {
|
||||
@@ -156,10 +_,22 @@
|
||||
@@ -156,10 +_,23 @@
|
||||
}
|
||||
|
||||
dependencies {
|
||||
@@ -62,6 +62,7 @@
|
||||
+ }
|
||||
+ implementation("net.objecthunter:exp4j:0.4.8")
|
||||
+ implementation("org.agrona:agrona:2.0.1")
|
||||
+ implementation("net.openhft:zero-allocation-hashing:0.16")
|
||||
+ implementation("com.github.luben:zstd-jni:1.5.6-9")
|
||||
+ implementation("org.lz4:lz4-java:1.8.0")
|
||||
+ // DivineMC end - Dependencies
|
||||
|
||||
@@ -5,7 +5,7 @@ Subject: [PATCH] Optimize explosions
|
||||
|
||||
|
||||
diff --git a/net/minecraft/world/level/ServerExplosion.java b/net/minecraft/world/level/ServerExplosion.java
|
||||
index a772f2bd7be00172ad41353c6ad42d9239b9ec88..4fcbf5181e9e8053302ae9b75a6d76aa6698a21b 100644
|
||||
index a772f2bd7be00172ad41353c6ad42d9239b9ec88..fb6df8b2d96727b3febfe404be0eb2d77b2edf13 100644
|
||||
--- a/net/minecraft/world/level/ServerExplosion.java
|
||||
+++ b/net/minecraft/world/level/ServerExplosion.java
|
||||
@@ -372,6 +372,11 @@ public class ServerExplosion implements Explosion {
|
||||
@@ -170,7 +170,7 @@ index a772f2bd7be00172ad41353c6ad42d9239b9ec88..4fcbf5181e9e8053302ae9b75a6d76aa
|
||||
+ }
|
||||
+
|
||||
+ private Optional<Float> noBlockCalcsWithNoBLockDamage(final ExplosionDamageCalculator instance, final Explosion explosion, final BlockGetter blockGetter, final BlockPos blockPos, final BlockState blockState, final FluidState fluidState) {
|
||||
+ if (org.bxteam.divinemc.DivineConfig.explosionNoBlockDamage) return Optional.of(Blocks.BEDROCK.getExplosionResistance());
|
||||
+ if (org.bxteam.divinemc.DivineConfig.explosionNoBlockDamage) return Optional.of(net.minecraft.world.level.block.Blocks.BEDROCK.getExplosionResistance());
|
||||
+ return instance.getBlockExplosionResistance(explosion, blockGetter, blockPos, blockState, fluidState);
|
||||
+ }
|
||||
+ // DivineMC end - Optimize explosions
|
||||
|
||||
@@ -54,7 +54,7 @@ index 51c126735ace8fdde89ad97b5cab62f244212db0..8713d00d767c9225a0823d2fdbb0b479
|
||||
+ public void moonrise$write(final org.bxteam.divinemc.region.IRegionFile regionFile) throws IOException; // DivineMC - Linear region file format
|
||||
}
|
||||
diff --git a/net/minecraft/server/MinecraftServer.java b/net/minecraft/server/MinecraftServer.java
|
||||
index 3fe3e36439a750c2614fc94df4bbbe7375c37614..0270e0045a76927e156f7bf54fed7ca406a113f8 100644
|
||||
index b2e90749bcaf3b9132681713ab0afae95b3197ee..7de51e99507dfca76ec5848483fecc9e8df1b86f 100644
|
||||
--- a/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/net/minecraft/server/MinecraftServer.java
|
||||
@@ -926,10 +926,10 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -142,7 +142,7 @@ index ae0a893498d0bfe90c14508f15b431d4885e06ff..6fba4d36377359dbcf8c804b194c4aef
|
||||
}
|
||||
// Paper end - rewrite chunk system
|
||||
diff --git a/net/minecraft/world/level/chunk/storage/RegionFileStorage.java b/net/minecraft/world/level/chunk/storage/RegionFileStorage.java
|
||||
index c98cb390bda4b536f97445f228e06aaebcd84609..3b07e9e355032b9f797935df16435a45b68866c7 100644
|
||||
index c98cb390bda4b536f97445f228e06aaebcd84609..db2a7a2ddb6e3f8e5c0291426407f708585db4ee 100644
|
||||
--- a/net/minecraft/world/level/chunk/storage/RegionFileStorage.java
|
||||
+++ b/net/minecraft/world/level/chunk/storage/RegionFileStorage.java
|
||||
@@ -18,7 +18,7 @@ public class RegionFileStorage implements AutoCloseable, ca.spottedleaf.moonrise
|
||||
@@ -236,6 +236,15 @@ index c98cb390bda4b536f97445f228e06aaebcd84609..3b07e9e355032b9f797935df16435a45
|
||||
|
||||
final DataInputStream input = regionFile == null ? null : regionFile.getChunkDataInputStream(new ChunkPos(chunkX, chunkZ));
|
||||
|
||||
@@ -238,7 +244,7 @@ public class RegionFileStorage implements AutoCloseable, ca.spottedleaf.moonrise
|
||||
|
||||
final ChunkPos pos = new ChunkPos(chunkX, chunkZ);
|
||||
final ChunkPos headerChunkPos = SerializableChunkData.getChunkCoordinate(ret);
|
||||
- final RegionFile regionFile = this.getRegionFile(pos);
|
||||
+ final org.bxteam.divinemc.region.IRegionFile regionFile = this.getRegionFile(pos); // DivineMC - Linear region file format
|
||||
|
||||
if (regionFile.getRecalculateCount() != readData.recalculateCount()) {
|
||||
return null;
|
||||
@@ -262,7 +268,7 @@ public class RegionFileStorage implements AutoCloseable, ca.spottedleaf.moonrise
|
||||
}
|
||||
// Paper end - rewrite chunk system
|
||||
|
||||
@@ -5,7 +5,7 @@ Subject: [PATCH] Dynamic Activation of Brain
|
||||
|
||||
|
||||
diff --git a/io/papermc/paper/entity/activation/ActivationRange.java b/io/papermc/paper/entity/activation/ActivationRange.java
|
||||
index 265f20fd771df850a0bb0029e699d3146d883837..e9269a5ecf1eb95f1b41a090820d898bde86c3ec 100644
|
||||
index 265f20fd771df850a0bb0029e699d3146d883837..a9326f1acc6ffe7fbacc34bf13f56d87e212027a 100644
|
||||
--- a/io/papermc/paper/entity/activation/ActivationRange.java
|
||||
+++ b/io/papermc/paper/entity/activation/ActivationRange.java
|
||||
@@ -161,6 +161,21 @@ public final class ActivationRange {
|
||||
@@ -14,7 +14,7 @@ index 265f20fd771df850a0bb0029e699d3146d883837..e9269a5ecf1eb95f1b41a090820d898b
|
||||
ActivationRange.activateEntity(entity);
|
||||
+
|
||||
+ // DivineMC start - Dynamic Activation of Brain
|
||||
+ if (org.bxteam.divinemc.DivineConfig.dabEnabled && entity.getType().dabEnabled && (!org.bxteam.divinemc.DivineConfig.dabDontEnableIfInWater || entity.getType().is(net.minecraft.tags.EntityTypeTags.CAN_BREATHE_UNDER_WATER) || !entity.isInWaterOrBubble())) {
|
||||
+ if (org.bxteam.divinemc.DivineConfig.dabEnabled && entity.getType().dabEnabled && (!org.bxteam.divinemc.DivineConfig.dabDontEnableIfInWater || entity.getType().is(net.minecraft.tags.EntityTypeTags.CAN_BREATHE_UNDER_WATER) || !entity.isInWaterOrRain())) {
|
||||
+ if (!entity.activatedPriorityReset) {
|
||||
+ entity.activatedPriorityReset = true;
|
||||
+ entity.activatedPriority = org.bxteam.divinemc.DivineConfig.dabMaximumActivationFrequency;
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
@Override
|
||||
protected void doTick(ServerLevel level, Villager entity) {
|
||||
+ // DivineMC start - skip useless secondary poi sensor
|
||||
+ if (org.bxteam.divinemc.DivineConfig.skipUselessSecondaryPoiSensor && entity.getVillagerData().getProfession().secondaryPoi().isEmpty()) {
|
||||
+ if (org.bxteam.divinemc.DivineConfig.skipUselessSecondaryPoiSensor && entity.getVillagerData().profession().value().secondaryPoi().isEmpty()) {
|
||||
+ entity.getBrain().eraseMemory(MemoryModuleType.SECONDARY_JOB_SITE);
|
||||
+ return;
|
||||
+ }
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package org.bxteam.divinemc.entity.pathfinding;
|
||||
|
||||
import net.minecraft.world.level.pathfinder.NodeEvaluator;
|
||||
import org.apache.commons.lang.Validate;
|
||||
import org.apache.commons.lang3.Validate;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
@@ -17,6 +17,7 @@ public interface IRegionFile extends AutoCloseable, ChunkSystemRegionFile {
|
||||
|
||||
void clear(ChunkPos pos) throws IOException;
|
||||
|
||||
@Override
|
||||
void close() throws IOException;
|
||||
|
||||
void setOversized(int x, int z, boolean b) throws IOException;
|
||||
@@ -31,6 +32,8 @@ public interface IRegionFile extends AutoCloseable, ChunkSystemRegionFile {
|
||||
|
||||
boolean recalculateHeader() throws IOException;
|
||||
|
||||
int getRecalculateCount();
|
||||
|
||||
DataOutputStream getChunkDataOutputStream(ChunkPos pos) throws IOException;
|
||||
|
||||
DataInputStream getChunkDataInputStream(ChunkPos pos) throws IOException;
|
||||
|
||||
@@ -592,6 +592,11 @@ public class LinearRegionFile implements IRegionFile {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getRecalculateCount() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setOversized(int x, int z, boolean something) {
|
||||
// stub
|
||||
|
||||
Reference in New Issue
Block a user