Update with latest TileEntity optimization changes

This commit is contained in:
Aikar
2014-08-11 21:43:04 -05:00
parent ef9c0fd1eb
commit eefd5936bb
3 changed files with 329 additions and 156 deletions

View File

@@ -174,4 +174,25 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ return this.world.getTileEntity(this.x, this.y, this.z) != this ? false : entityhuman.e((double) this.x + 0.5D, (double) this.y + 0.5D, (double) this.z + 0.5D) <= 64.0D;
+ }
+}
diff --git a/src/main/java/net/minecraft/server/TileEntityLightDetector.java b/src/main/java/net/minecraft/server/TileEntityLightDetector.java
new file mode 100644
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000
--- /dev/null
+++ b/src/main/java/net/minecraft/server/TileEntityLightDetector.java
@@ -0,0 +0,0 @@
+package net.minecraft.server;
+
+public class TileEntityLightDetector extends TileEntity {
+
+ public TileEntityLightDetector() {}
+
+ public void h() {
+ if (this.world != null && !this.world.isStatic && this.world.getTime() % 20L == 0L) {
+ this.h = this.q();
+ if (this.h instanceof BlockDaylightDetector) {
+ ((BlockDaylightDetector) this.h).e(this.world, this.x, this.y, this.z);
+ }
+ }
+ }
+}
--