Compare commits
9 Commits
1.20.6-e8a
...
ver/1.20.6
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4347dee5fa | ||
|
|
5734e51889 | ||
|
|
f17ba0d315 | ||
|
|
e6cd6d964a | ||
|
|
758414b5db | ||
|
|
037b270a71 | ||
|
|
a65a515b73 | ||
|
|
b1d297d09d | ||
|
|
a93e01d86d |
29
README.md
29
README.md
@@ -31,19 +31,34 @@
|
|||||||
使用 Gradle:
|
使用 Gradle:
|
||||||
|
|
||||||
```kotlin
|
```kotlin
|
||||||
|
repositories {
|
||||||
|
maven {
|
||||||
|
url = "http://maven.nostal.ink/repository/maven-snapshots/"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
compileOnly("me.earthme.luminol:luminol-api:1.20.6-R0.1-SNAPSHOT")
|
compileOnly("me.earthme.luminol:luminol-api:1.20.6-R0.1-20241001.135131-1")
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
使用 Maven
|
使用 Maven
|
||||||
|
|
||||||
```xml
|
```xml
|
||||||
<dependency>
|
<repositories>
|
||||||
<groupId>me.earthme.luminol</groupId>
|
<repository>
|
||||||
<artifactId>luminol-api</artifactId>
|
<id>nostal</id>
|
||||||
<version>1.20.6-R0.1-SNAPSHOT</version>
|
<url>http://maven.nostal.ink/repository/maven-snapshots/</url>
|
||||||
</dependency>
|
</repository>
|
||||||
|
</repositories>
|
||||||
|
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>me.earthme.luminol</groupId>
|
||||||
|
<artifactId>luminol-api</artifactId>
|
||||||
|
<version>1.20.6-R0.1-20241001.135131-1</version>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
```
|
```
|
||||||
|
|
||||||
## 联系方式
|
## 联系方式
|
||||||
@@ -70,4 +85,4 @@ dependencies {
|
|||||||
<source media="(prefers-color-scheme: light)" srcset="https://api.star-history.com/svg?repos=LuminolMC/Luminol%2CLuminolMC/LightingLuminol&type=Date" />
|
<source media="(prefers-color-scheme: light)" srcset="https://api.star-history.com/svg?repos=LuminolMC/Luminol%2CLuminolMC/LightingLuminol&type=Date" />
|
||||||
<img alt="Star历史表" src="https://api.star-history.com/svg?repos=LuminolMC/Luminol%2CLuminolMC/LightingLuminol&type=Date" />
|
<img alt="Star历史表" src="https://api.star-history.com/svg?repos=LuminolMC/Luminol%2CLuminolMC/LightingLuminol&type=Date" />
|
||||||
</picture>
|
</picture>
|
||||||
</a>
|
</a>
|
||||||
|
|||||||
27
README_EN.md
27
README_EN.md
@@ -32,19 +32,34 @@ To build a paperclip jar, you need to run the following command. You can find th
|
|||||||
For gradle:
|
For gradle:
|
||||||
|
|
||||||
```kotlin
|
```kotlin
|
||||||
|
repositories {
|
||||||
|
maven {
|
||||||
|
url = "https://maven.nostal.ink/repository/maven-snapshots/"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
compileOnly("me.earthme.luminol:luminol-api:1.20.6-R0.1-SNAPSHOT")
|
compileOnly("me.earthme.luminol:luminol-api:1.20.6-R0.1-20241001.135131-1")
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
For maven
|
For maven
|
||||||
|
|
||||||
```xml
|
```xml
|
||||||
<dependency>
|
<repositories>
|
||||||
<groupId>me.earthme.luminol</groupId>
|
<repository>
|
||||||
<artifactId>luminol-api</artifactId>
|
<id>nostal</id>
|
||||||
<version>1.20.6-R0.1-SNAPSHOT</version>
|
<url>http://maven.nostal.ink/repository/maven-snapshots/</url>
|
||||||
</dependency>
|
</repository>
|
||||||
|
</repositories>
|
||||||
|
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>me.earthme.luminol</groupId>
|
||||||
|
<artifactId>luminol-api</artifactId>
|
||||||
|
<version>1.20.6-R0.1-20241001.135131-1</version>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
```
|
```
|
||||||
|
|
||||||
## Contact
|
## Contact
|
||||||
|
|||||||
@@ -101,7 +101,7 @@ allprojects {
|
|||||||
repositories {
|
repositories {
|
||||||
maven {
|
maven {
|
||||||
name = "moliaMavenRepo"
|
name = "moliaMavenRepo"
|
||||||
url = uri("https://maven.moliatopia.icu/repository/maven-snapshots/")
|
url = uri("https://maven.nostal.ink/repository/maven-snapshots/")
|
||||||
|
|
||||||
credentials.username = System.getenv("MAVEN_REPO_USER")
|
credentials.username = System.getenv("MAVEN_REPO_USER")
|
||||||
credentials.password = System.getenv("MAVEN_REPO_PASSWORD")
|
credentials.password = System.getenv("MAVEN_REPO_PASSWORD")
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
group = me.earthme.luminol
|
group = me.earthme.luminol
|
||||||
version = 1.20.6-R0.1-SNAPSHOT
|
version = 1.20.6-R0.1-SNAPSHOT
|
||||||
|
|
||||||
foliaCommit = d79708296e75ee4f26e78c2925f6e7d4217d0575
|
foliaCommit = 9a19e4286c04bc01b9d7bc005cf66f8cc2dd49ff
|
||||||
|
|
||||||
org.gradle.caching = true
|
org.gradle.caching = true
|
||||||
org.gradle.parallel = true
|
org.gradle.parallel = true
|
||||||
|
|||||||
@@ -0,0 +1,45 @@
|
|||||||
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||||
|
From: MrHua269 <wangxyper@163.com>
|
||||||
|
Date: Sat, 31 Aug 2024 11:00:47 +0800
|
||||||
|
Subject: [PATCH] Add experiment config for command block command execution
|
||||||
|
|
||||||
|
|
||||||
|
diff --git a/src/main/java/me/earthme/luminol/config/modules/experiment/CommandBlockConfig.java b/src/main/java/me/earthme/luminol/config/modules/experiment/CommandBlockConfig.java
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000000000000000000000000000000000000..3eafc59cc015569d3da8b1d8c4bfd046af17e0be
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/src/main/java/me/earthme/luminol/config/modules/experiment/CommandBlockConfig.java
|
||||||
|
@@ -0,0 +1,20 @@
|
||||||
|
+package me.earthme.luminol.config.modules.experiment;
|
||||||
|
+
|
||||||
|
+import me.earthme.luminol.config.ConfigInfo;
|
||||||
|
+import me.earthme.luminol.config.EnumConfigCategory;
|
||||||
|
+import me.earthme.luminol.config.IConfigModule;
|
||||||
|
+
|
||||||
|
+public class CommandBlockConfig implements IConfigModule {
|
||||||
|
+ @ConfigInfo(baseName = "enable")
|
||||||
|
+ public static boolean enabled = false;
|
||||||
|
+
|
||||||
|
+ @Override
|
||||||
|
+ public EnumConfigCategory getCategory() {
|
||||||
|
+ return EnumConfigCategory.EXPERIMENT;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ @Override
|
||||||
|
+ public String getBaseName() {
|
||||||
|
+ return "force_enable_command_block_execution";
|
||||||
|
+ }
|
||||||
|
+}
|
||||||
|
diff --git a/src/main/java/net/minecraft/world/level/BaseCommandBlock.java b/src/main/java/net/minecraft/world/level/BaseCommandBlock.java
|
||||||
|
index b8a571fcc44f67ac8f6089e039a8620bf6c40603..c973535eba031f102c6cae8f9b75547ba3a95376 100644
|
||||||
|
--- a/src/main/java/net/minecraft/world/level/BaseCommandBlock.java
|
||||||
|
+++ b/src/main/java/net/minecraft/world/level/BaseCommandBlock.java
|
||||||
|
@@ -117,7 +117,7 @@ public abstract class BaseCommandBlock implements CommandSource {
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean performCommand(Level world) {
|
||||||
|
- if (true) return false; // Folia - region threading
|
||||||
|
+ if (!me.earthme.luminol.config.modules.experiment.CommandBlockConfig.enabled) return false; // Folia - region threading // Luminol
|
||||||
|
if (!world.isClientSide && world.getGameTime() != this.lastExecution) {
|
||||||
|
if ("Searge".equalsIgnoreCase(this.command)) {
|
||||||
|
this.lastOutput = Component.literal("#itzlipofutzli");
|
||||||
@@ -36,10 +36,10 @@ index 0000000000000000000000000000000000000000..01f8c6ff3662569be5a4ff998bcd4fbb
|
|||||||
+ }
|
+ }
|
||||||
+}
|
+}
|
||||||
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||||
index 92e9860b146b6e3e1dc593bfd5bfddab3318761d..bdcf43104a53f530453615b17bd690c7a5c0a78d 100644
|
index 92e9860b146b6e3e1dc593bfd5bfddab3318761d..cd411f0a178e3c4c20f1b5aecee2617a2ce6c8f3 100644
|
||||||
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||||
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||||
@@ -894,6 +894,11 @@ public class ServerPlayer extends Player {
|
@@ -894,9 +894,24 @@ public class ServerPlayer extends Player {
|
||||||
}
|
}
|
||||||
|
|
||||||
Entity entity = this.getCamera();
|
Entity entity = this.getCamera();
|
||||||
@@ -50,4 +50,18 @@ index 92e9860b146b6e3e1dc593bfd5bfddab3318761d..bdcf43104a53f530453615b17bd690c7
|
|||||||
+ //Luminol end
|
+ //Luminol end
|
||||||
|
|
||||||
if (entity != this) {
|
if (entity != this) {
|
||||||
if (entity.isAlive()) {
|
- if (entity.isAlive()) {
|
||||||
|
+ // Luminol start - Fix folia spector teleportation
|
||||||
|
+ var flag = false;
|
||||||
|
+ var cameraPos = entity.blockPosition();
|
||||||
|
+ var cameraLevel = entity.level();
|
||||||
|
+ if (!io.papermc.paper.util.TickThread.isTickThreadFor((ServerLevel) cameraLevel, cameraPos) && me.earthme.luminol.config.modules.fixes.FoliaSpectorTeleportationFixConfig.fixSpectorTeleportFolia){
|
||||||
|
+ this.setCamera(this);
|
||||||
|
+ flag = true;
|
||||||
|
+ }
|
||||||
|
+ // Luminol end
|
||||||
|
+
|
||||||
|
+ if (entity.isAlive() && !flag) { // Luminol - Fix folia spector teleportation
|
||||||
|
this.absMoveTo(entity.getX(), entity.getY(), entity.getZ(), entity.getYRot(), entity.getXRot());
|
||||||
|
this.serverLevel().getChunkSource().move(this);
|
||||||
|
if (this.wantsToStopRiding()) {
|
||||||
@@ -50,7 +50,7 @@ index bdcf43104a53f530453615b17bd690c7a5c0a78d..8ec763f933e79a1c8e7a7d3b3c0277ca
|
|||||||
super(world, world.getSharedSpawnPos(), world.getSharedSpawnAngle(), profile);
|
super(world, world.getSharedSpawnPos(), world.getSharedSpawnAngle(), profile);
|
||||||
this.chatVisibility = ChatVisiblity.FULL;
|
this.chatVisibility = ChatVisiblity.FULL;
|
||||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||||
index 2ae2527bbe5a08af98eb6405a8403c2199052f19..7ddb7d5aa1047eb8151aef01d5db694d2683cf51 100644
|
index e16d24bd83cddce7ead70a2a3847d09e988c715e..dcbfc99e0877f9e87d6329542ec11664d527e7e4 100644
|
||||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||||
@@ -695,7 +695,9 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
@@ -695,7 +695,9 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||||
@@ -63,7 +63,7 @@ index 2ae2527bbe5a08af98eb6405a8403c2199052f19..7ddb7d5aa1047eb8151aef01d5db694d
|
|||||||
|
|
||||||
// If the event is cancelled we move the player back to their old location.
|
// If the event is cancelled we move the player back to their old location.
|
||||||
if (event.isCancelled()) {
|
if (event.isCancelled()) {
|
||||||
@@ -1612,7 +1614,9 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
@@ -1610,7 +1612,9 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||||
|
|
||||||
Location oldTo = to.clone();
|
Location oldTo = to.clone();
|
||||||
PlayerMoveEvent event = new PlayerMoveEvent(player, from, to);
|
PlayerMoveEvent event = new PlayerMoveEvent(player, from, to);
|
||||||
@@ -284,7 +284,7 @@ index 9549eee0d92f322bd5232abd7e695213660c2e22..2cd8ac8840c2c0346fbf209c5ae3bb67
|
|||||||
}
|
}
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/level/block/entity/BaseContainerBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/BaseContainerBlockEntity.java
|
diff --git a/src/main/java/net/minecraft/world/level/block/entity/BaseContainerBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/BaseContainerBlockEntity.java
|
||||||
index 15fd1fe1b55b6421d2c09e8385c9f69fa0152e56..21c747f00892a8372c3ef239f63d59ccaa315295 100644
|
index 2ddf349fde5b310ec3f74baee1f3d33e09d5286c..b87a4781a4b567e939057ba7528a54868562ee33 100644
|
||||||
--- a/src/main/java/net/minecraft/world/level/block/entity/BaseContainerBlockEntity.java
|
--- a/src/main/java/net/minecraft/world/level/block/entity/BaseContainerBlockEntity.java
|
||||||
+++ b/src/main/java/net/minecraft/world/level/block/entity/BaseContainerBlockEntity.java
|
+++ b/src/main/java/net/minecraft/world/level/block/entity/BaseContainerBlockEntity.java
|
||||||
@@ -119,19 +119,7 @@ public abstract class BaseContainerBlockEntity extends BlockEntity implements Co
|
@@ -119,19 +119,7 @@ public abstract class BaseContainerBlockEntity extends BlockEntity implements Co
|
||||||
@@ -387,7 +387,7 @@ index b88aa184cd06a0485146f58a5b61a56a50911209..7b64c57795fe27d8397500bfa41f71f9
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
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
|
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 1280c358748bbb08f0361acd4ebc095bf6bc3496..957c217653a664bab26db476724d288b18d87102 100644
|
index 779ffcf390d1ebdf37653454063d3c7d1fc35875..e56034e6dd674637321382e23e05ce41f6ab1d05 100644
|
||||||
--- a/src/main/java/net/minecraft/world/level/block/entity/HopperBlockEntity.java
|
--- a/src/main/java/net/minecraft/world/level/block/entity/HopperBlockEntity.java
|
||||||
+++ b/src/main/java/net/minecraft/world/level/block/entity/HopperBlockEntity.java
|
+++ b/src/main/java/net/minecraft/world/level/block/entity/HopperBlockEntity.java
|
||||||
@@ -47,7 +47,10 @@ public class HopperBlockEntity extends RandomizableContainerBlockEntity implemen
|
@@ -47,7 +47,10 @@ public class HopperBlockEntity extends RandomizableContainerBlockEntity implemen
|
||||||
@@ -442,7 +442,7 @@ index 1280c358748bbb08f0361acd4ebc095bf6bc3496..957c217653a664bab26db476724d288b
|
|||||||
if (!this.tryLoadLootTable(nbt)) {
|
if (!this.tryLoadLootTable(nbt)) {
|
||||||
ContainerHelper.loadAllItems(nbt, this.items, registryLookup);
|
ContainerHelper.loadAllItems(nbt, this.items, registryLookup);
|
||||||
}
|
}
|
||||||
@@ -537,6 +563,7 @@ public class HopperBlockEntity extends RandomizableContainerBlockEntity implemen
|
@@ -542,6 +568,7 @@ public class HopperBlockEntity extends RandomizableContainerBlockEntity implemen
|
||||||
}
|
}
|
||||||
|
|
||||||
private static boolean isFullContainer(Container inventory, Direction direction) {
|
private static boolean isFullContainer(Container inventory, Direction direction) {
|
||||||
@@ -450,7 +450,7 @@ index 1280c358748bbb08f0361acd4ebc095bf6bc3496..957c217653a664bab26db476724d288b
|
|||||||
int[] aint = HopperBlockEntity.getSlots(inventory, direction);
|
int[] aint = HopperBlockEntity.getSlots(inventory, direction);
|
||||||
int[] aint1 = aint;
|
int[] aint1 = aint;
|
||||||
int i = aint.length;
|
int i = aint.length;
|
||||||
@@ -736,7 +763,7 @@ public class HopperBlockEntity extends RandomizableContainerBlockEntity implemen
|
@@ -745,7 +772,7 @@ public class HopperBlockEntity extends RandomizableContainerBlockEntity implemen
|
||||||
|
|
||||||
if (HopperBlockEntity.canPlaceItemInContainer(to, stack, slot, side)) {
|
if (HopperBlockEntity.canPlaceItemInContainer(to, stack, slot, side)) {
|
||||||
boolean flag = false;
|
boolean flag = false;
|
||||||
@@ -459,7 +459,7 @@ index 1280c358748bbb08f0361acd4ebc095bf6bc3496..957c217653a664bab26db476724d288b
|
|||||||
|
|
||||||
if (itemstack1.isEmpty()) {
|
if (itemstack1.isEmpty()) {
|
||||||
// Spigot start - SPIGOT-6693, InventorySubcontainer#setItem
|
// Spigot start - SPIGOT-6693, InventorySubcontainer#setItem
|
||||||
@@ -924,7 +951,10 @@ public class HopperBlockEntity extends RandomizableContainerBlockEntity implemen
|
@@ -933,7 +960,10 @@ public class HopperBlockEntity extends RandomizableContainerBlockEntity implemen
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void setItems(NonNullList<ItemStack> inventory) {
|
protected void setItems(NonNullList<ItemStack> inventory) {
|
||||||
@@ -248,7 +248,7 @@ index 12c46e7a3f6a8675921d95dee97ece4a83252282..573cca66b905c5decb0e59c58cfa861d
|
|||||||
} else {
|
} else {
|
||||||
passenger.stopRiding();
|
passenger.stopRiding();
|
||||||
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||||
index 8ec763f933e79a1c8e7a7d3b3c0277ca2fca4b74..5fe7fb97b431ae0004e25b872e372e13f92403a0 100644
|
index ea3cf67d65155d72a42e39bc45dd0546ae780670..0fa0f7dc32bae5c5c5d3426e28b8156b9305efb2 100644
|
||||||
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||||
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||||
@@ -352,6 +352,25 @@ public class ServerPlayer extends Player {
|
@@ -352,6 +352,25 @@ public class ServerPlayer extends Player {
|
||||||
@@ -277,7 +277,7 @@ index 8ec763f933e79a1c8e7a7d3b3c0277ca2fca4b74..5fe7fb97b431ae0004e25b872e372e13
|
|||||||
public ServerPlayer(MinecraftServer server, ServerLevel world, GameProfile profile, ClientInformation clientOptions) {
|
public ServerPlayer(MinecraftServer server, ServerLevel world, GameProfile profile, ClientInformation clientOptions) {
|
||||||
super(world, world.getSharedSpawnPos(), world.getSharedSpawnAngle(), profile);
|
super(world, world.getSharedSpawnPos(), world.getSharedSpawnAngle(), profile);
|
||||||
this.chatVisibility = ChatVisiblity.FULL;
|
this.chatVisibility = ChatVisiblity.FULL;
|
||||||
@@ -925,6 +944,12 @@ public class ServerPlayer extends Player {
|
@@ -935,6 +954,12 @@ public class ServerPlayer extends Player {
|
||||||
this.trackEnteredOrExitedLavaOnVehicle();
|
this.trackEnteredOrExitedLavaOnVehicle();
|
||||||
this.updatePlayerAttributes();
|
this.updatePlayerAttributes();
|
||||||
this.advancements.flushDirty(this);
|
this.advancements.flushDirty(this);
|
||||||
Reference in New Issue
Block a user