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
|
|
|
|
|
|
|
|
|
2020-08-03 18:48:42 +02:00
|
|
|
diff --git a/src/main/java/dev/tr7zw/yatopia/YatopiaConfig.java b/src/main/java/dev/tr7zw/yatopia/YatopiaConfig.java
|
2020-08-22 21:11:04 +02:00
|
|
|
index fd33954eb91339a8568610f515ee164527d7406b..d70b6af62f7e9a0b49c38fae1170f0eb0584c781 100644
|
2020-08-03 18:48:42 +02:00
|
|
|
--- a/src/main/java/dev/tr7zw/yatopia/YatopiaConfig.java
|
|
|
|
+++ b/src/main/java/dev/tr7zw/yatopia/YatopiaConfig.java
|
2020-08-22 21:11:04 +02:00
|
|
|
@@ -214,4 +214,9 @@ public class YatopiaConfig {
|
2020-08-03 18:48:42 +02:00
|
|
|
private static void pistonPushLimit() {
|
|
|
|
pistonPushLimit = getInt("settings.pistonPushLimit", 12);
|
2020-06-27 20:02:39 +02:00
|
|
|
}
|
2020-08-03 18:48:42 +02:00
|
|
|
+
|
2020-06-27 20:02:39 +02:00
|
|
|
+ public static int itemStuckSleepTicks = 1;
|
|
|
|
+ private static void itemStuckSleepTicks() {
|
2020-08-03 18:48:42 +02:00
|
|
|
+ itemStuckSleepTicks = getInt("settings.itemStuckSleepTicks", 1);
|
2020-06-27 20:02:39 +02:00
|
|
|
+ }
|
2020-08-15 18:18:36 +02:00
|
|
|
}
|
2020-06-27 20:02:39 +02:00
|
|
|
diff --git a/src/main/java/net/minecraft/server/EntityItem.java b/src/main/java/net/minecraft/server/EntityItem.java
|
2020-08-31 11:24:45 +02:00
|
|
|
index 77ff666b5d380c665fd22f5c08f61f8cc6d79141..16bce81823cd06f70c267c964546ad9b2625695d 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-08-13 17:53:32 +02:00
|
|
|
+ } else if (!this.onGround || this.noclip || this.ticksLived % dev.tr7zw.yatopia.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());
|