mirror of
https://github.com/songoda/UltimateStacker.git
synced 2024-11-08 03:21:32 +01:00
Version
This commit is contained in:
parent
fb24a3abad
commit
80d3c8f7b9
@ -4,7 +4,7 @@ stages:
|
|||||||
variables:
|
variables:
|
||||||
name: "UltimateStacker"
|
name: "UltimateStacker"
|
||||||
path: "/builds/$CI_PROJECT_PATH"
|
path: "/builds/$CI_PROJECT_PATH"
|
||||||
version: "1.8.12"
|
version: "1.8.13"
|
||||||
|
|
||||||
build:
|
build:
|
||||||
stage: build
|
stage: build
|
||||||
|
@ -18,6 +18,7 @@ public class EntityUtils {
|
|||||||
private boolean stackFlyingDown = Setting.ONLY_STACK_FLYING_DOWN.getBoolean();
|
private boolean stackFlyingDown = Setting.ONLY_STACK_FLYING_DOWN.getBoolean();
|
||||||
private boolean keepFire = Setting.KEEP_FIRE.getBoolean();
|
private boolean keepFire = Setting.KEEP_FIRE.getBoolean();
|
||||||
private boolean keepPotion = Setting.KEEP_POTION.getBoolean();
|
private boolean keepPotion = Setting.KEEP_POTION.getBoolean();
|
||||||
|
private boolean stackWholeChunk = Setting.STACK_WHOLE_CHUNK.getBoolean();
|
||||||
private int searchRadius = Setting.SEARCH_RADIUS.getInt();
|
private int searchRadius = Setting.SEARCH_RADIUS.getInt();
|
||||||
|
|
||||||
private final Map<CachedChunk, Entity[]> cachedChunks = new HashMap<>();
|
private final Map<CachedChunk, Entity[]> cachedChunks = new HashMap<>();
|
||||||
@ -34,6 +35,9 @@ public class EntityUtils {
|
|||||||
|
|
||||||
Chunk firstChunk = location.getChunk();
|
Chunk firstChunk = location.getChunk();
|
||||||
chunks.add(new CachedChunk(firstChunk));
|
chunks.add(new CachedChunk(firstChunk));
|
||||||
|
|
||||||
|
if (stackWholeChunk) return chunks;
|
||||||
|
|
||||||
int minX = (int) Math.floor(((location.getX() - radius) - 2.0D) / 16.0D);
|
int minX = (int) Math.floor(((location.getX() - radius) - 2.0D) / 16.0D);
|
||||||
int maxX = (int) Math.floor(((location.getX() + radius) + 2.0D) / 16.0D);
|
int maxX = (int) Math.floor(((location.getX() + radius) + 2.0D) / 16.0D);
|
||||||
int minZ = (int) Math.floor(((location.getZ() - radius) - 2.0D) / 16.0D);
|
int minZ = (int) Math.floor(((location.getZ() - radius) - 2.0D) / 16.0D);
|
||||||
@ -61,7 +65,7 @@ public class EntityUtils {
|
|||||||
for (Entity e : entityArray) {
|
for (Entity e : entityArray) {
|
||||||
if (e.getWorld() != location.getWorld()
|
if (e.getWorld() != location.getWorld()
|
||||||
|| !(e instanceof LivingEntity)
|
|| !(e instanceof LivingEntity)
|
||||||
|| location.distanceSquared(e.getLocation()) >= radius * radius) continue;
|
|| (!stackWholeChunk && location.distanceSquared(e.getLocation()) >= radius * radius)) continue;
|
||||||
entities.add((LivingEntity) e);
|
entities.add((LivingEntity) e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -14,7 +14,7 @@ public enum Category {
|
|||||||
|
|
||||||
SPAWNERS("Stacked Spawner Settings."),
|
SPAWNERS("Stacked Spawner Settings."),
|
||||||
|
|
||||||
DATABASE("Settings regarding the Database."),
|
MySQL("Settings regarding the Database."),
|
||||||
|
|
||||||
SYSTEM("System related settings.");
|
SYSTEM("System related settings.");
|
||||||
|
|
||||||
|
@ -34,6 +34,10 @@ public enum Setting {
|
|||||||
"The minimum amount required before a stack can be formed.",
|
"The minimum amount required before a stack can be formed.",
|
||||||
"Do not set this to lower than 2."),
|
"Do not set this to lower than 2."),
|
||||||
|
|
||||||
|
STACK_WHOLE_CHUNK("Entities.Stack Whole Chunk", false,
|
||||||
|
"Should all qualifying entities in each chunk be stacked?",
|
||||||
|
"This will override the stacking radius."),
|
||||||
|
|
||||||
ENTITY_HOLOGRAMS("Entities.Holograms Enabled", true,
|
ENTITY_HOLOGRAMS("Entities.Holograms Enabled", true,
|
||||||
"Should holograms be displayed above stacked entities?"),
|
"Should holograms be displayed above stacked entities?"),
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user