mirror of
https://github.com/YatopiaMC/Yatopia.git
synced 2024-08-24 23:03:00 +02:00
42 lines
1.7 KiB
Diff
42 lines
1.7 KiB
Diff
From 761cd4bb0e92ea750f6c669842688573d567148b Mon Sep 17 00:00:00 2001
|
|
From: tr7zw <tr7zw@live.de>
|
|
Date: Tue, 16 Jun 2020 17:29:20 +0200
|
|
Subject: [PATCH] Item stuck sleep config
|
|
|
|
---
|
|
src/main/java/de/tr7zw/yapfa/YapfaConfig.java | 5 +++++
|
|
src/main/java/net/minecraft/server/EntityItem.java | 2 +-
|
|
2 files changed, 6 insertions(+), 1 deletion(-)
|
|
|
|
diff --git a/src/main/java/de/tr7zw/yapfa/YapfaConfig.java b/src/main/java/de/tr7zw/yapfa/YapfaConfig.java
|
|
index 29587589c..78d21c2ea 100644
|
|
--- a/src/main/java/de/tr7zw/yapfa/YapfaConfig.java
|
|
+++ b/src/main/java/de/tr7zw/yapfa/YapfaConfig.java
|
|
@@ -226,4 +226,9 @@ public class YapfaConfig {
|
|
pistonPushLimit = getInt("settings.pistonPushLimit", 12);
|
|
}
|
|
|
|
+ public static int itemStuckSleepTicks = 1;
|
|
+ private static void itemStuckSleepTicks() {
|
|
+ itemStuckSleepTicks = getInt("settings.itemStuckSleepTicks", 1);
|
|
+ }
|
|
+
|
|
}
|
|
\ 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
|
|
index 2926fbb95..42884fba1 100644
|
|
--- a/src/main/java/net/minecraft/server/EntityItem.java
|
|
+++ b/src/main/java/net/minecraft/server/EntityItem.java
|
|
@@ -79,7 +79,7 @@ public class EntityItem extends Entity {
|
|
|
|
if (this.world.isClientSide) {
|
|
this.noclip = false;
|
|
- } else {
|
|
+ } else if(!this.onGround || this.noclip || this.ticksLived % de.tr7zw.yapfa.YapfaConfig.itemStuckSleepTicks == 0) { // YAPFA
|
|
this.noclip = !this.world.getCubes(this);
|
|
if (this.noclip) {
|
|
this.k(this.locX(), (this.getBoundingBox().minY + this.getBoundingBox().maxY) / 2.0D, this.locZ());
|
|
--
|
|
2.25.1.windows.1
|
|
|