mirror of
https://github.com/YatopiaMC/Yatopia.git
synced 2024-11-23 11:06:51 +01:00
43f2b8b2ea
api refactor to that domain is coming in next major release
34 lines
1.7 KiB
Diff
34 lines
1.7 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: tr7zw <tr7zw@live.de>
|
|
Date: Fri, 31 Jul 2020 21:48:14 -0500
|
|
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
|
|
index 77ff666b5d380c665fd22f5c08f61f8cc6d79141..66bc667f028a075f591c0f9a9483ae14b974fdf0 100644
|
|
--- a/src/main/java/net/minecraft/server/EntityItem.java
|
|
+++ b/src/main/java/net/minecraft/server/EntityItem.java
|
|
@@ -82,7 +82,7 @@ public class EntityItem extends Entity {
|
|
|
|
if (this.world.isClientSide) {
|
|
this.noclip = false;
|
|
- } else {
|
|
+ } else if (!this.onGround || this.noclip || this.ticksLived % net.yatopia.server.YatopiaConfig.itemStuckSleepTicks == 0) { // Yatopia
|
|
this.noclip = !this.world.getCubes(this);
|
|
if (this.noclip) {
|
|
this.l(this.locX(), (this.getBoundingBox().minY + this.getBoundingBox().maxY) / 2.0D, this.locZ());
|
|
diff --git a/src/main/java/net/yatopia/server/YatopiaConfig.java b/src/main/java/net/yatopia/server/YatopiaConfig.java
|
|
index 5b0e2d01fbcc5d15e30a05d456f1c6533cd13412..bf8b625c12a37108e0a071ca628f0f67ba51754b 100644
|
|
--- a/src/main/java/net/yatopia/server/YatopiaConfig.java
|
|
+++ b/src/main/java/net/yatopia/server/YatopiaConfig.java
|
|
@@ -214,4 +214,9 @@ public class YatopiaConfig {
|
|
private static void pistonPushLimit() {
|
|
pistonPushLimit = getInt("settings.pistonPushLimit", 12);
|
|
}
|
|
+
|
|
+ public static int itemStuckSleepTicks = 1;
|
|
+ private static void itemStuckSleepTicks() {
|
|
+ itemStuckSleepTicks = getInt("settings.itemStuckSleepTicks", 1);
|
|
+ }
|
|
}
|