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
|
|
|
|
index 3c654db72bf0a8b56dafd73df8a59f76d27360ae..0273d800eb75ba83edb36dff9e76f4d34031d600 100644
|
|
|
|
--- a/src/main/java/dev/tr7zw/yatopia/YatopiaConfig.java
|
|
|
|
+++ b/src/main/java/dev/tr7zw/yatopia/YatopiaConfig.java
|
|
|
|
@@ -215,4 +215,9 @@ public class YatopiaConfig {
|
|
|
|
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
|
|
|
+ }
|
|
|
|
}
|
|
|
|
\ No newline at end of file
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/EntityItem.java b/src/main/java/net/minecraft/server/EntityItem.java
|
2020-08-03 21:25:54 +02:00
|
|
|
index ca9c12151b193c05e42bbb99733f6e3ed2bae221..6869b688810cc72da01f164db1f0853d59752597 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
|
|
|
|
@@ -81,7 +81,7 @@ public class EntityItem extends Entity {
|
|
|
|
|
|
|
|
if (this.world.isClientSide) {
|
|
|
|
this.noclip = false;
|
|
|
|
- } else {
|
2020-08-03 18:48:42 +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) {
|
|
|
|
this.k(this.locX(), (this.getBoundingBox().minY + this.getBoundingBox().maxY) / 2.0D, this.locZ());
|