Configurable tick limiter interval

This commit is contained in:
Jesse Boyd 2016-12-09 22:49:23 +11:00
parent 1e4397c8d1
commit 9bea95dd22
No known key found for this signature in database
GPG Key ID: 59F1DE6293AF6E1F
2 changed files with 6 additions and 51 deletions

View File

@ -39,7 +39,7 @@ public class ChunkListener implements Listener {
}
badChunks.clear();
}
}, 1);
}, Settings.TICK_LIMITER.INTERVAL);
}
}
@ -75,53 +75,6 @@ public class ChunkListener implements Listener {
}
public boolean isRedstone(int id) {
switch (id) {
// wire
case 55:
// comparator
case 149:
case 150:
// diode
case 93:
case 94:
// torch
case 75:
case 76:
// rail
case 27:
case 23: // dispensor
case 158: // dropper
case 25:
// piston
case 29:
case 33:
// tnt
case 44:
// door
case 96: // trapdoor
case 167:
case 107: // fence
case 183:
case 184:
case 185:
case 186:
case 187:
// lamp
case 123:
case 124:
// BUD
case 73: // ore
case 74:
case 8: // water
case 9:
case 34: // piston
return true;
default:
return false;
}
}
private int lastPhysY = 0;
@EventHandler(priority = EventPriority.LOWEST)

View File

@ -246,11 +246,13 @@ public class Settings extends Config {
public static class TICK_LIMITER {
@Comment("Enable the limiter")
public static boolean ENABLED = true;
@Comment("Max falling blocks per tick (per chunk)")
@Comment("The interval in ticks")
public static int INTERVAL = 1;
@Comment("Max falling blocks per interval (per chunk)")
public static int FALLING = 512;
@Comment("Max physics per tick (per chunk)")
@Comment("Max physics per interval (per chunk)")
public static int PHYSICS = 512;
@Comment("Max item spawns per tick (per chunk)")
@Comment("Max item spawns per interval (per chunk)")
public static int ITEMS = 48;
}