mirror of
https://github.com/YatopiaMC/Yatopia.git
synced 2025-02-02 13:31:27 +01:00
Remove Origami's hopper optimizations
See issue #176 This fixes the "it gets more serious". However, the problem is still being present. it looks like it is purely random which hopper is going to suck in the item. whatever weirdness is still present with hoppers and sorting systems, if its not mojang then its paper's optimizations, which we're not removing.
This commit is contained in:
parent
e304b7fad9
commit
67f9aea916
@ -63,7 +63,6 @@ # Patches
|
||||
| server | Global Eula file | tr7zw | |
|
||||
| server | Heavily optimize furnance fuel and recipe lookups | tr7zw | |
|
||||
| server | Highly optimize VillagePlace filtering | Ivan Pekov | |
|
||||
| server | Hopper Optimizations | Phoenix616 | |
|
||||
| server | Illusioners AI settings | William Blake Galbreath | |
|
||||
| server | Implement bed explosion options | William Blake Galbreath | |
|
||||
| server | Implement respawn anchor explosion options | William Blake Galbreath | |
|
||||
|
@ -1 +1 @@
|
||||
Origami-Server-Config&Optimize-inventory-API-item-handling&Don-t-load-chunk-with-seed-based-feature-search&Remove-some-streams-and-object-allocations&Hopper-Optimizations&Add-option-to-disable-observer-clocks&Add-timings-for-Behavior&Don-t-wake-up-entities-when-damage-event-is-cancelle&Fix-exp-drop-of-zombie-pigmen-MC-56653
|
||||
Origami-Server-Config&Optimize-inventory-API-item-handling&Don-t-load-chunk-with-seed-based-feature-search&Remove-some-streams-and-object-allocations&Add-option-to-disable-observer-clocks&Add-timings-for-Behavior&Don-t-wake-up-entities-when-damage-event-is-cancelle&Fix-exp-drop-of-zombie-pigmen-MC-56653
|
@ -106,7 +106,7 @@ index e0af5eb280dfd2ef6c9a80385e1705f7231a5338..f6623032e5d4034c104aa1fc6ff42651
|
||||
brandName = getString("brand-name", brandName);
|
||||
}
|
||||
diff --git a/src/main/java/de/minebench/origami/OrigamiConfig.java b/src/main/java/de/minebench/origami/OrigamiConfig.java
|
||||
index fe7330fabe386966c2d203a190a00a785ea21be0..cb344a424bf4c657bb1bbca286a1136c9b21b489 100644
|
||||
index fe7330fabe386966c2d203a190a00a785ea21be0..8b2fdef3abd4eb50e72d75828fbd975e9bda15e0 100644
|
||||
--- a/src/main/java/de/minebench/origami/OrigamiConfig.java
|
||||
+++ b/src/main/java/de/minebench/origami/OrigamiConfig.java
|
||||
@@ -16,7 +16,7 @@ public final class OrigamiConfig {
|
||||
@ -118,23 +118,11 @@ index fe7330fabe386966c2d203a190a00a785ea21be0..cb344a424bf4c657bb1bbca286a1136c
|
||||
private static int configVersion;
|
||||
|
||||
public static void init(final File file) {
|
||||
@@ -112,6 +112,28 @@ public final class OrigamiConfig {
|
||||
@@ -112,6 +112,16 @@ public final class OrigamiConfig {
|
||||
config.addDefault("worlds.default." + path, Double.valueOf(dfl));
|
||||
return config.getDouble("worlds." + worldName + "." + path, config.getDouble("worlds.default." + path, dfl));
|
||||
}
|
||||
+
|
||||
+ public boolean tickEmptyHoppers = true;
|
||||
+ public int fullHopperCooldown = 128;
|
||||
+ private void hopperOptimizations() {
|
||||
+ tickEmptyHoppers = getBoolean("tick-empty-hoppers", tickEmptyHoppers);
|
||||
+ fullHopperCooldown = getInt("ticks-per.full-hopper-cooldown", fullHopperCooldown);
|
||||
+ }
|
||||
+
|
||||
+ public boolean fastFeatureSearchDontLoad = false;
|
||||
+ private void fastFeatureSearchDontLoad() {
|
||||
+ fastFeatureSearchDontLoad = getBoolean("fast-feature-search-dont-load", false);
|
||||
+ }
|
||||
+
|
||||
+ public boolean pigmenDontTargetUnlessHit = false;
|
||||
+ private void pigmenDontTargetUnlessHit() {
|
||||
+ pigmenDontTargetUnlessHit = getBoolean("pigmen.dont-target-unless-hit", pigmenDontTargetUnlessHit);
|
||||
@ -2370,33 +2358,6 @@ index 2ae4a20ca763c60c9661661d2ae558bd5b6f79a1..00000000000000000000000000000000
|
||||
- // Origami start - option to only find generated features to not generate new chunks
|
||||
- IChunkAccess ichunkaccess = iworldreader.getChunkAt(chunkcoordintpair.x, chunkcoordintpair.z, ChunkStatus.STRUCTURE_STARTS, !(iworldreader instanceof World) || !((World) iworldreader).origamiConfig.onlyFindGeneratedFeatures);
|
||||
- if (ichunkaccess == null) {
|
||||
diff --git a/src/main/java/net/minecraft/server/TileEntityHopper.java b/src/main/java/net/minecraft/server/TileEntityHopper.java
|
||||
index c310444d6d952eab69250c43b30348dce6393f90..1042923536120e59ecbc015293744da2b7909018 100644
|
||||
--- a/src/main/java/net/minecraft/server/TileEntityHopper.java
|
||||
+++ b/src/main/java/net/minecraft/server/TileEntityHopper.java
|
||||
@@ -514,6 +514,7 @@ public class TileEntityHopper extends TileEntityLootable implements IHopper, ITi
|
||||
entityitem = (EntityItem) iterator.next();
|
||||
} while (!a((IInventory) ihopper, entityitem));
|
||||
|
||||
+ if (ihopper instanceof TileEntityHopper) ((TileEntityHopper) ihopper).shouldTick = true; // Origami - don't tick empty hoppers
|
||||
return true;
|
||||
}
|
||||
return false; // EMC
|
||||
diff --git a/src/main/java/net/minecraft/server/TileEntityHopper.java.rej b/src/main/java/net/minecraft/server/TileEntityHopper.java.rej
|
||||
deleted file mode 100644
|
||||
index cc8866ec1ccbc131e8491c50eda4f85590bb667b..0000000000000000000000000000000000000000
|
||||
--- a/src/main/java/net/minecraft/server/TileEntityHopper.java.rej
|
||||
+++ /dev/null
|
||||
@@ -1,9 +0,0 @@
|
||||
-diff a/src/main/java/net/minecraft/server/TileEntityHopper.java b/src/main/java/net/minecraft/server/TileEntityHopper.java (rejected hunks)
|
||||
-@@ -466,6 +497,7 @@ public class TileEntityHopper extends TileEntityLootable implements IHopper, ITi
|
||||
- entityitem = (EntityItem) iterator.next();
|
||||
- } while (!a((IInventory) ihopper, entityitem));
|
||||
-
|
||||
-+ if (ihopper instanceof TileEntityHopper) ((TileEntityHopper) ihopper).shouldTick = true; // Origami - don't tick empty hoppers
|
||||
- return true;
|
||||
- }
|
||||
- }
|
||||
diff --git a/src/main/java/net/minecraft/server/TileEntityShulkerBox.java.rej b/src/main/java/net/minecraft/server/TileEntityShulkerBox.java.rej
|
||||
deleted file mode 100644
|
||||
index bada470cba41cce9beb9eb04227b42c1d489d731..0000000000000000000000000000000000000000
|
||||
|
@ -14,10 +14,10 @@ The whole code is based around 1 class, the EntityFilter class. Whole filtering
|
||||
Co-authored-by: tr7zw <tr7zw@live.de>
|
||||
|
||||
diff --git a/src/main/java/de/minebench/origami/OrigamiConfig.java b/src/main/java/de/minebench/origami/OrigamiConfig.java
|
||||
index cb344a424bf4c657bb1bbca286a1136c9b21b489..82fc63dbfc0d48267e0c1972a312b7143f62e6f0 100644
|
||||
index 8b2fdef3abd4eb50e72d75828fbd975e9bda15e0..a8f9733893a3f1bc9ae579c20f2e33ac59225e50 100644
|
||||
--- a/src/main/java/de/minebench/origami/OrigamiConfig.java
|
||||
+++ b/src/main/java/de/minebench/origami/OrigamiConfig.java
|
||||
@@ -134,6 +134,39 @@ public final class OrigamiConfig {
|
||||
@@ -122,6 +122,39 @@ public final class OrigamiConfig {
|
||||
private void observerClock() {
|
||||
disableObserverClocks = getBoolean("disable-observer-clocks", disableObserverClocks);
|
||||
}
|
||||
|
@ -5,7 +5,7 @@ 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
|
||||
index 9110491fb4cf4424d737b47602a85abaa7f30bea..13a712f1c75a1d6d3a5cedb4a11b276818b38df0 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 {
|
||||
|
@ -32,7 +32,7 @@ index f6623032e5d4034c104aa1fc6ff4265169e462ba..4bc94e4598cff801d08e457ebbf184fb
|
||||
|
||||
protected static void logError(String s) {
|
||||
diff --git a/src/main/java/de/minebench/origami/OrigamiConfig.java b/src/main/java/de/minebench/origami/OrigamiConfig.java
|
||||
index 82fc63dbfc0d48267e0c1972a312b7143f62e6f0..7fc45446218ee6a31abca2e16d192efff5e4aaf9 100644
|
||||
index a8f9733893a3f1bc9ae579c20f2e33ac59225e50..58bc509119847f42d96470285c9f5ffd69246771 100644
|
||||
--- a/src/main/java/de/minebench/origami/OrigamiConfig.java
|
||||
+++ b/src/main/java/de/minebench/origami/OrigamiConfig.java
|
||||
@@ -1,5 +1,6 @@
|
||||
|
@ -12,10 +12,10 @@ This changes it so that the portal list is filtered to only include portals with
|
||||
Ported to Yatopia and added per world config option by MrIvanPlays <ivan@mrivanplays.com>
|
||||
|
||||
diff --git a/src/main/java/de/minebench/origami/OrigamiConfig.java b/src/main/java/de/minebench/origami/OrigamiConfig.java
|
||||
index 7fc45446218ee6a31abca2e16d192efff5e4aaf9..39b9372eee675b4d9ec0f41d72f149aa160cbb04 100644
|
||||
index 58bc509119847f42d96470285c9f5ffd69246771..5b834624f1bdd2d4096179d48d09e813e91de5ae 100644
|
||||
--- a/src/main/java/de/minebench/origami/OrigamiConfig.java
|
||||
+++ b/src/main/java/de/minebench/origami/OrigamiConfig.java
|
||||
@@ -172,6 +172,11 @@ public final class OrigamiConfig {
|
||||
@@ -160,6 +160,11 @@ public final class OrigamiConfig {
|
||||
&& pillagerCollisions && ironGolemCollisions && miscCollisions && itemCollisions
|
||||
&& waterCreatureCollisions && waterAmbientCollisions;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user