Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8bb0b20868 | ||
|
|
a97ffba61f | ||
|
|
a5026805b7 | ||
|
|
907c10a1a2 |
15
.github/workflows/build.yml
vendored
15
.github/workflows/build.yml
vendored
@@ -43,9 +43,7 @@ jobs:
|
|||||||
cache: 'gradle'
|
cache: 'gradle'
|
||||||
|
|
||||||
- name: Configure Git
|
- name: Configure Git
|
||||||
run: |
|
run: git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com" && git config --global user.name "github-actions[bot]"
|
||||||
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com" && git config --global user.name "github-actions[bot]"
|
|
||||||
echo "release_num=$(git ls-remote --tags origin | grep "release" | wc -l)" >> $GITHUB_ENV
|
|
||||||
|
|
||||||
- name: Apply Patches
|
- name: Apply Patches
|
||||||
run: ./gradlew applyPatches --stacktrace
|
run: ./gradlew applyPatches --stacktrace
|
||||||
@@ -66,7 +64,7 @@ jobs:
|
|||||||
(cd Plazma-API/build/docs/javadoc && tar c .) | (cd javadoc && tar xf -)
|
(cd Plazma-API/build/docs/javadoc && tar c .) | (cd javadoc && tar xf -)
|
||||||
cd javadoc
|
cd javadoc
|
||||||
git add . && git commit -m "Update Javadocs"
|
git add . && git commit -m "Update Javadocs"
|
||||||
git push -f
|
git push https://${{ secrets.GH_PAT }}@github.com/PlazmaMC/Plazma.git -f
|
||||||
|
|
||||||
- name: Publish Packages
|
- name: Publish Packages
|
||||||
if: github.ref_name == env.MAIN_BRANCH
|
if: github.ref_name == env.MAIN_BRANCH
|
||||||
@@ -84,12 +82,15 @@ jobs:
|
|||||||
build/libs
|
build/libs
|
||||||
Plazma-API/build/docs/javadoc
|
Plazma-API/build/docs/javadoc
|
||||||
|
|
||||||
|
- name: Get Release Number
|
||||||
|
run: echo "RELEASE=$(git ls-remote --tags origin | grep "release" | wc -l)" >> $GITHUB_ENV
|
||||||
|
|
||||||
- name: Release Artifacts
|
- name: Release Artifacts
|
||||||
if: startsWith(github.ref_name, 'ver/')
|
if: startsWith(github.ref_name, 'ver/')
|
||||||
uses: marvinpinto/action-automatic-releases@latest
|
uses: marvinpinto/action-automatic-releases@latest
|
||||||
with:
|
with:
|
||||||
title: "Release #${{ env.release_num }}"
|
title: "Release #${{ env.RELEASE }}"
|
||||||
automatic_release_tag: release-${{ env.release_num }}
|
automatic_release_tag: release-${{ env.RELEASE }}
|
||||||
repo_token: "${{ secrets.GH_PAT }}"
|
repo_token: "${{ secrets.GH_PAT }}"
|
||||||
files: build/libs/*.jar
|
files: build/libs/*.jar
|
||||||
prerelease: false
|
prerelease: false
|
||||||
@@ -98,7 +99,7 @@ jobs:
|
|||||||
if: startsWith(github.ref_name, 'ver/')
|
if: startsWith(github.ref_name, 'ver/')
|
||||||
uses: marvinpinto/action-automatic-releases@latest
|
uses: marvinpinto/action-automatic-releases@latest
|
||||||
with:
|
with:
|
||||||
title: "Release #${{ env.release_num }}"
|
title: "Release #${{ env.RELEASE }}"
|
||||||
automatic_release_tag: latest-${{ env.MC_VERSION }}
|
automatic_release_tag: latest-${{ env.MC_VERSION }}
|
||||||
repo_token: "${{ secrets.GH_PAT }}"
|
repo_token: "${{ secrets.GH_PAT }}"
|
||||||
files: build/libs/*.jar
|
files: build/libs/*.jar
|
||||||
|
|||||||
@@ -533,10 +533,10 @@ index 0000000000000000000000000000000000000000..32f2f9c933069c32c321f71ec2c57e22
|
|||||||
+}
|
+}
|
||||||
diff --git a/src/main/java/org/plazmamc/plazma/commands/subcommands/ReloadCommand.java b/src/main/java/org/plazmamc/plazma/commands/subcommands/ReloadCommand.java
|
diff --git a/src/main/java/org/plazmamc/plazma/commands/subcommands/ReloadCommand.java b/src/main/java/org/plazmamc/plazma/commands/subcommands/ReloadCommand.java
|
||||||
new file mode 100644
|
new file mode 100644
|
||||||
index 0000000000000000000000000000000000000000..0b7ca5562c78758c30780f919e9c54b33ba0d305
|
index 0000000000000000000000000000000000000000..9b1964bf2c05e71cac633fd75f887a5e516623df
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/src/main/java/org/plazmamc/plazma/commands/subcommands/ReloadCommand.java
|
+++ b/src/main/java/org/plazmamc/plazma/commands/subcommands/ReloadCommand.java
|
||||||
@@ -0,0 +1,28 @@
|
@@ -0,0 +1,29 @@
|
||||||
+package org.plazmamc.plazma.commands.subcommands;
|
+package org.plazmamc.plazma.commands.subcommands;
|
||||||
+
|
+
|
||||||
+import net.kyori.adventure.text.format.NamedTextColor;
|
+import net.kyori.adventure.text.format.NamedTextColor;
|
||||||
@@ -551,6 +551,7 @@ index 0000000000000000000000000000000000000000..0b7ca5562c78758c30780f919e9c54b3
|
|||||||
+
|
+
|
||||||
+ @Override
|
+ @Override
|
||||||
+ public boolean execute(CommandSender sender, String subCommand, String[] args) {
|
+ public boolean execute(CommandSender sender, String subCommand, String[] args) {
|
||||||
|
+ this.doReload(sender);
|
||||||
+ return true;
|
+ return true;
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||||
From: IPECTER <ipectert@gmail.com>
|
From: IPECTER <ipectert@gmail.com>
|
||||||
Date: Thu, 23 Mar 2023 14:25:09 +0900
|
Date: Thu, 23 Mar 2023 14:25:09 +0900
|
||||||
Subject: [PATCH] Implement ChunkSending - Configuration
|
Subject: [PATCH] ChunkSending Configuration
|
||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/org/plazmamc/plazma/configurations/LevelConfigurations.java b/src/main/java/org/plazmamc/plazma/configurations/LevelConfigurations.java
|
diff --git a/src/main/java/org/plazmamc/plazma/configurations/LevelConfigurations.java b/src/main/java/org/plazmamc/plazma/configurations/LevelConfigurations.java
|
||||||
23
patches/server/0026-No-Chat-Reports-Configuration.patch
Normal file
23
patches/server/0026-No-Chat-Reports-Configuration.patch
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||||
|
From: AlphaKR93 <dev@alpha93.kr>
|
||||||
|
Date: Sun, 26 Mar 2023 13:43:01 +0900
|
||||||
|
Subject: [PATCH] No Chat Reports Configuration
|
||||||
|
|
||||||
|
|
||||||
|
diff --git a/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java b/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java
|
||||||
|
index 989b6d20818dec0a527a170ad2b19d456ca023d9..b6348572f4a90acbcf6ec234beac84e8a019ee50 100644
|
||||||
|
--- a/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java
|
||||||
|
+++ b/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java
|
||||||
|
@@ -44,5 +44,12 @@ public class GlobalConfiguration extends ConfigurationPart {
|
||||||
|
public boolean doNotTriggerLootTableRefreshForNonPlayerInteraction = DO_OPTIMIZE;
|
||||||
|
public boolean doNotSendUselessEntityPackets = DO_OPTIMIZE;
|
||||||
|
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ public NoChatReports noChatReports;
|
||||||
|
+ public class NoChatReports extends ConfigurationPart {
|
||||||
|
+
|
||||||
|
+
|
||||||
|
+
|
||||||
|
}
|
||||||
|
}
|
||||||
132
patches/server/0027-Implement-No-Chat-Reports.patch
Normal file
132
patches/server/0027-Implement-No-Chat-Reports.patch
Normal file
@@ -0,0 +1,132 @@
|
|||||||
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||||
|
From: AlphaKR93 <dev@alpha93.kr>
|
||||||
|
Date: Sun, 26 Mar 2023 13:48:48 +0900
|
||||||
|
Subject: [PATCH] Implement No Chat Reports
|
||||||
|
|
||||||
|
|
||||||
|
diff --git a/src/main/java/net/minecraft/network/FriendlyByteBuf.java b/src/main/java/net/minecraft/network/FriendlyByteBuf.java
|
||||||
|
index 1f4b64a5f812376c499c98cb4be62469bd0b7dbe..59d3b33d523dea21e7a3f0747734b20226fd1dae 100644
|
||||||
|
--- a/src/main/java/net/minecraft/network/FriendlyByteBuf.java
|
||||||
|
+++ b/src/main/java/net/minecraft/network/FriendlyByteBuf.java
|
||||||
|
@@ -156,9 +156,14 @@ public class FriendlyByteBuf extends ByteBuf {
|
||||||
|
public <T> void writeJsonWithCodec(Codec<T> codec, T value) {
|
||||||
|
DataResult<JsonElement> dataresult = codec.encodeStart(JsonOps.INSTANCE, value);
|
||||||
|
|
||||||
|
- this.writeUtf(FriendlyByteBuf.GSON.toJson((JsonElement) Util.getOrThrow(dataresult, (s) -> {
|
||||||
|
- return new EncoderException("Failed to encode: " + s + " " + value);
|
||||||
|
- })));
|
||||||
|
+ // Plazma start - NCR
|
||||||
|
+ JsonElement element = Util.getOrThrow(dataresult, (s) -> new EncoderException("Failed to encode: " + s + " " + value));
|
||||||
|
+
|
||||||
|
+ if (codec == net.minecraft.network.protocol.status.ServerStatus.CODEC && org.plazmamc.plazma.configurations.GlobalConfiguration.get().noChatReports.addQueryData())
|
||||||
|
+ element.getAsJsonObject().addProperty("preventsChatReports", true);
|
||||||
|
+
|
||||||
|
+ this.writeUtf(FriendlyByteBuf.GSON.toJson(element));
|
||||||
|
+ // Plazma end
|
||||||
|
}
|
||||||
|
|
||||||
|
public <T> void writeId(IdMap<T> registry, T value) {
|
||||||
|
diff --git a/src/main/java/net/minecraft/network/protocol/game/ServerboundChatCommandPacket.java b/src/main/java/net/minecraft/network/protocol/game/ServerboundChatCommandPacket.java
|
||||||
|
index b8c1f3b9afddc87d56541c8af63cffecfcdd2653..c74c17f058b7a6587e3dcab35878d469e0599240 100644
|
||||||
|
--- a/src/main/java/net/minecraft/network/protocol/game/ServerboundChatCommandPacket.java
|
||||||
|
+++ b/src/main/java/net/minecraft/network/protocol/game/ServerboundChatCommandPacket.java
|
||||||
|
@@ -24,4 +24,10 @@ public record ServerboundChatCommandPacket(String command, Instant timeStamp, lo
|
||||||
|
public void handle(ServerGamePacketListener listener) {
|
||||||
|
listener.handleChatCommand(this);
|
||||||
|
}
|
||||||
|
+
|
||||||
|
+ // Plazma start - NCR
|
||||||
|
+ public ArgumentSignatures argumentSignatures() {
|
||||||
|
+ return org.plazmamc.plazma.configurations.GlobalConfiguration.get().noChatReports.enabled ? ArgumentSignatures.EMPTY : this.argumentSignatures;
|
||||||
|
+ }
|
||||||
|
+ // Plazma end
|
||||||
|
}
|
||||||
|
diff --git a/src/main/java/net/minecraft/network/protocol/game/ServerboundChatPacket.java b/src/main/java/net/minecraft/network/protocol/game/ServerboundChatPacket.java
|
||||||
|
index d1d2fc0c57523c1abf1e8bfec913c78927c3dafc..f93372070b3babc76d43b18df9a0f91a2125e37e 100644
|
||||||
|
--- a/src/main/java/net/minecraft/network/protocol/game/ServerboundChatPacket.java
|
||||||
|
+++ b/src/main/java/net/minecraft/network/protocol/game/ServerboundChatPacket.java
|
||||||
|
@@ -25,4 +25,11 @@ public record ServerboundChatPacket(String message, Instant timeStamp, long salt
|
||||||
|
public void handle(ServerGamePacketListener listener) {
|
||||||
|
listener.handleChat(this);
|
||||||
|
}
|
||||||
|
+
|
||||||
|
+ // Plazma start - NCR
|
||||||
|
+ @Nullable
|
||||||
|
+ public MessageSignature signature() {
|
||||||
|
+ return org.plazmamc.plazma.configurations.GlobalConfiguration.get().noChatReports.enabled ? null : this.signature;
|
||||||
|
+ }
|
||||||
|
+ // Plazma end
|
||||||
|
}
|
||||||
|
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||||
|
index efcee39cd7154493de04ca903edbd32b5901b191..a398b71c52817bd68a05613ec037ed6d7ae6fb27 100644
|
||||||
|
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||||
|
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||||
|
@@ -683,7 +683,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean enforceSecureProfile() {
|
||||||
|
- return this.getProperties().enforceSecureProfile && this.getProperties().onlineMode;
|
||||||
|
+ return !org.plazmamc.plazma.configurations.GlobalConfiguration.get().noChatReports.enabled && this.getProperties().enforceSecureProfile && this.getProperties().onlineMode; // Plazma - NCR
|
||||||
|
}
|
||||||
|
|
||||||
|
protected boolean convertOldUsers() {
|
||||||
|
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||||
|
index dee076d1e6e30f108a79565546182b4751737baa..c18f953950fd2c00a3880fa20c9904a940191666 100644
|
||||||
|
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||||
|
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||||
|
@@ -2224,10 +2224,19 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void send(Packet<?> packet) {
|
||||||
|
- this.send(packet, (PacketSendListener) null);
|
||||||
|
+ // Plazma start - NCR
|
||||||
|
+ if (org.plazmamc.plazma.configurations.GlobalConfiguration.get().noChatReports.convertToGameMessage() && packet instanceof ClientboundPlayerChatPacket p)
|
||||||
|
+ packet = new ClientboundSystemChatPacket(null, Component.Serializer.toJson(p.chatType().resolve(this.player.level.registryAccess()).get().decorate(p.unsignedContent() != null ? p.unsignedContent() : Component.literal(p.body().content()))), false);
|
||||||
|
+ this.send(packet, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void send(Packet<?> packet, @Nullable PacketSendListener callbacks) {
|
||||||
|
+ if (org.plazmamc.plazma.configurations.GlobalConfiguration.get().noChatReports.convertToGameMessage() && packet instanceof ClientboundPlayerChatPacket p && callbacks != null) {
|
||||||
|
+ this.send(p);
|
||||||
|
+ return;
|
||||||
|
+ }
|
||||||
|
+ // Plazma end
|
||||||
|
+
|
||||||
|
// CraftBukkit start
|
||||||
|
if (packet == null || this.processedDisconnect) { // Spigot
|
||||||
|
return;
|
||||||
|
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||||
|
index 0615c92894f42ccc320a5a6f5e6c5289a2dee5f9..e9728c2b14462e7a8ce196bc59d8829d42177ef0 100644
|
||||||
|
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||||
|
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||||
|
@@ -1457,7 +1457,7 @@ public abstract class PlayerList {
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean verifyChatTrusted(PlayerChatMessage message) { // Paper - private -> public
|
||||||
|
- return message.hasSignature() && !message.hasExpiredServer(Instant.now());
|
||||||
|
+ return org.plazmamc.plazma.configurations.GlobalConfiguration.get().noChatReports.enabled || message.hasSignature() && !message.hasExpiredServer(Instant.now()); // Plazma - NCR
|
||||||
|
}
|
||||||
|
|
||||||
|
// CraftBukkit start
|
||||||
|
diff --git a/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java b/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java
|
||||||
|
index b6348572f4a90acbcf6ec234beac84e8a019ee50..7a585540c72c1c18ddcb45ec1caa350f1f9ce544 100644
|
||||||
|
--- a/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java
|
||||||
|
+++ b/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java
|
||||||
|
@@ -49,7 +49,17 @@ public class GlobalConfiguration extends ConfigurationPart {
|
||||||
|
public NoChatReports noChatReports;
|
||||||
|
public class NoChatReports extends ConfigurationPart {
|
||||||
|
|
||||||
|
+ public boolean enabled = false;
|
||||||
|
+ boolean addQueryData = true;
|
||||||
|
+ boolean convertToGameMessage = true;
|
||||||
|
|
||||||
|
+ public boolean addQueryData() {
|
||||||
|
+ return enabled && addQueryData;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ public boolean convertToGameMessage() {
|
||||||
|
+ return enabled && convertToGameMessage;
|
||||||
|
+ }
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
23
patches/server/0028-FixMySpawnR-Configuration.patch
Normal file
23
patches/server/0028-FixMySpawnR-Configuration.patch
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||||
|
From: IPECTER <ipectert@gmail.com>
|
||||||
|
Date: Sun, 26 Mar 2023 16:20:13 +0900
|
||||||
|
Subject: [PATCH] FixMySpawnR Configuration
|
||||||
|
|
||||||
|
|
||||||
|
diff --git a/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java b/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java
|
||||||
|
index 7a585540c72c1c18ddcb45ec1caa350f1f9ce544..088670ec016514b4a7fae402d7119a6aaa491c5d 100644
|
||||||
|
--- a/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java
|
||||||
|
+++ b/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java
|
||||||
|
@@ -62,4 +62,12 @@ public class GlobalConfiguration extends ConfigurationPart {
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
+
|
||||||
|
+ public FixMySpawnR fixMySpawnR;
|
||||||
|
+ public class FixMySpawnR extends ConfigurationPart {
|
||||||
|
+
|
||||||
|
+ public boolean enabled = DO_OPTIMIZE;
|
||||||
|
+ public int timerTimeOut = 0;
|
||||||
|
+
|
||||||
|
+ }
|
||||||
|
}
|
||||||
67
patches/server/0029-Implement-FixMySpawnR.patch
Normal file
67
patches/server/0029-Implement-FixMySpawnR.patch
Normal file
@@ -0,0 +1,67 @@
|
|||||||
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||||
|
From: IPECTER <ipectert@gmail.com>
|
||||||
|
Date: Sun, 26 Mar 2023 13:17:24 +0900
|
||||||
|
Subject: [PATCH] Implement FixMySpawnR
|
||||||
|
|
||||||
|
Original: AbsolemJackdaw/FixMySpawnR
|
||||||
|
Copyright (C) 2023 AbsolemJackdaw
|
||||||
|
|
||||||
|
diff --git a/src/main/java/net/minecraft/world/level/BaseSpawner.java b/src/main/java/net/minecraft/world/level/BaseSpawner.java
|
||||||
|
index feb65fc9ee04141fe6f77400660442ed207547a1..9c759e71ef1d119d7807886f9e56b7230a334475 100644
|
||||||
|
--- a/src/main/java/net/minecraft/world/level/BaseSpawner.java
|
||||||
|
+++ b/src/main/java/net/minecraft/world/level/BaseSpawner.java
|
||||||
|
@@ -46,6 +46,8 @@ public abstract class BaseSpawner {
|
||||||
|
public int requiredPlayerRange = 16;
|
||||||
|
public int spawnRange = 4;
|
||||||
|
private int tickDelay = 0; // Paper
|
||||||
|
+ private int blockExistsTick = 0; // Plazma
|
||||||
|
+ private boolean blockLockedByTime = false; // Plazma
|
||||||
|
|
||||||
|
public BaseSpawner() {}
|
||||||
|
|
||||||
|
@@ -81,6 +83,18 @@ public abstract class BaseSpawner {
|
||||||
|
}
|
||||||
|
|
||||||
|
public void serverTick(ServerLevel world, BlockPos pos) {
|
||||||
|
+ // Plazma start - FixMySpawnR
|
||||||
|
+ if (org.plazmamc.plazma.configurations.GlobalConfiguration.get().fixMySpawnR.enabled) {
|
||||||
|
+ if (!blockLockedByTime) {
|
||||||
|
+ if (blockExistsTick > org.plazmamc.plazma.configurations.GlobalConfiguration.get().fixMySpawnR.timerTimeOut) {
|
||||||
|
+ blockLockedByTime = true;
|
||||||
|
+ } else {
|
||||||
|
+ blockExistsTick++;
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+ if (blockLockedByTime && world.getBestNeighborSignal(pos) > 0) return;
|
||||||
|
+ // Plazma end
|
||||||
|
if (spawnCount <= 0 || maxNearbyEntities <= 0) return; // Paper - Ignore impossible spawn tick
|
||||||
|
// Paper start - Configurable mob spawner tick rate
|
||||||
|
if (spawnDelay > 0 && --tickDelay > 0) return;
|
||||||
|
@@ -292,6 +306,13 @@ public abstract class BaseSpawner {
|
||||||
|
this.spawnRange = nbt.getShort("SpawnRange");
|
||||||
|
}
|
||||||
|
|
||||||
|
+ // Plazma start - FixMySpawnR
|
||||||
|
+ if (org.plazmamc.plazma.configurations.GlobalConfiguration.get().fixMySpawnR.enabled && nbt.contains("SpawnRange", 99)) {
|
||||||
|
+ this.blockExistsTick = nbt.getInt("fixmyspawnrTicks");
|
||||||
|
+ this.blockLockedByTime = nbt.getBoolean("fixMySpawnerLocked");
|
||||||
|
+ }
|
||||||
|
+ // Plazma end
|
||||||
|
+
|
||||||
|
this.displayEntity = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -321,6 +342,12 @@ public abstract class BaseSpawner {
|
||||||
|
}
|
||||||
|
|
||||||
|
nbt.put("SpawnPotentials", (Tag) SpawnData.LIST_CODEC.encodeStart(NbtOps.INSTANCE, this.spawnPotentials).result().orElseThrow());
|
||||||
|
+ // Plazma start - FixMySpawnR
|
||||||
|
+ if (org.plazmamc.plazma.configurations.GlobalConfiguration.get().fixMySpawnR.enabled) {
|
||||||
|
+ nbt.putInt("fixmyspawnrTicks", blockExistsTick);
|
||||||
|
+ nbt.putBoolean("fixMySpawnerLocked", blockLockedByTime);
|
||||||
|
+ }
|
||||||
|
+ // Plazma end
|
||||||
|
return nbt;
|
||||||
|
}
|
||||||
|
|
||||||
Reference in New Issue
Block a user