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-15 18:18:36 +02:00
|
|
|
index f23c13d14649e92e747b45d93a06bd5726bab00b..4d718370eb544fb4eb6a1d051512f63414df8c7e 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-15 11:43:24 +02:00
|
|
|
@@ -216,4 +216,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-13 17:53:32 +02:00
|
|
|
index 732f09319a309b92d74e6536e29d30be917be455..4ba28ab7f96dd83edc552a9c81d79b3c0061dc2c 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());
|