2020-07-17 18:05:50 +02:00
|
|
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
2020-06-27 20:02:39 +02:00
|
|
|
From: tr7zw <tr7zw@live.de>
|
2020-08-03 18:48:42 +02:00
|
|
|
Date: Fri, 31 Jul 2020 21:48:14 -0500
|
2020-06-27 20:02:39 +02:00
|
|
|
Subject: [PATCH] Item stuck sleep config
|
|
|
|
|
|
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/EntityItem.java b/src/main/java/net/minecraft/server/EntityItem.java
|
2020-12-02 07:35:11 +01:00
|
|
|
index f2af9cb9d7c88c51a1a2e004a0eeb47b3d407b44..4812adaadc7a28794590849d4773a4fa66a7f913 100644
|
2020-06-27 20:02:39 +02:00
|
|
|
--- a/src/main/java/net/minecraft/server/EntityItem.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/EntityItem.java
|
2020-08-13 17:53:32 +02:00
|
|
|
@@ -82,7 +82,7 @@ public class EntityItem extends Entity {
|
2020-06-27 20:02:39 +02:00
|
|
|
|
|
|
|
if (this.world.isClientSide) {
|
|
|
|
this.noclip = false;
|
|
|
|
- } else {
|
2020-12-02 07:35:11 +01:00
|
|
|
+ } else if (!this.onGround || this.noclip || this.ticksLived % org.yatopiamc.yatopia.server.YatopiaConfig.itemStuckSleepTicks == 0) { // Yatopia
|
2020-06-27 20:02:39 +02:00
|
|
|
this.noclip = !this.world.getCubes(this);
|
|
|
|
if (this.noclip) {
|
2020-08-13 17:53:32 +02:00
|
|
|
this.l(this.locX(), (this.getBoundingBox().minY + this.getBoundingBox().maxY) / 2.0D, this.locZ());
|
2020-12-02 07:35:11 +01:00
|
|
|
diff --git a/src/main/java/org/yatopiamc/yatopia/server/YatopiaConfig.java b/src/main/java/org/yatopiamc/yatopia/server/YatopiaConfig.java
|
|
|
|
index 415f7def834399ab94edc380b8201058b424fe45..a790e1e5161d956ccc1023b0d4bcac647627150a 100644
|
|
|
|
--- a/src/main/java/org/yatopiamc/yatopia/server/YatopiaConfig.java
|
|
|
|
+++ b/src/main/java/org/yatopiamc/yatopia/server/YatopiaConfig.java
|
|
|
|
@@ -194,4 +194,9 @@ public class YatopiaConfig {
|
2020-09-01 08:38:17 +02:00
|
|
|
private static void pistonPushLimit() {
|
|
|
|
pistonPushLimit = getInt("settings.pistonPushLimit", 12);
|
|
|
|
}
|
|
|
|
+
|
|
|
|
+ public static int itemStuckSleepTicks = 1;
|
|
|
|
+ private static void itemStuckSleepTicks() {
|
|
|
|
+ itemStuckSleepTicks = getInt("settings.itemStuckSleepTicks", 1);
|
|
|
|
+ }
|
|
|
|
}
|