mirror of
https://github.com/songoda/UltimateStacker.git
synced 2025-02-17 03:41:20 +01:00
Made search radius adjustable.
This commit is contained in:
parent
a89230f3c1
commit
5793e4f768
@ -115,8 +115,10 @@ public class Methods {
|
||||
|
||||
public static List<Entity> getSimilarEntitesAroundEntity(Entity initalEntity) {
|
||||
|
||||
int searcRadius = SettingsManager.Settings.SEARCH_RADIUS.getInt();
|
||||
|
||||
//Create a list of all entities around the initial entity of the same type.
|
||||
List<Entity> entityList = initalEntity.getNearbyEntities(5, 5, 5).stream()
|
||||
List<Entity> entityList = initalEntity.getNearbyEntities(searcRadius, searcRadius, searcRadius).stream()
|
||||
.filter(entity -> entity.getType() == initalEntity.getType() && entity != initalEntity)
|
||||
.collect(Collectors.toList());
|
||||
|
||||
|
@ -189,7 +189,8 @@ public class SettingsManager implements Listener {
|
||||
o52("Entity.Kill Whole Stack On Special Death Cause", true),
|
||||
SPECIAL_DEATH_CAUSE("Entity.Special Death Cause", Arrays.asList("FALL", "DROWNING", "LAVA", "VOID")),
|
||||
NAME_FORMAT_ENTITY("Entity.Name Format", "&f{TYPE} &6{AMT}x"),
|
||||
o6("Item.Max Stack Size", 120),
|
||||
SEARCH_RADIUS("Entity.Search Radius", 5),
|
||||
MAX_STACK_ITEMS("Item.Max Stack Size", 120),
|
||||
NAME_FORMAT_ITEM("Item.Name Format", "&f{TYPE} &6{AMT}x"),
|
||||
o7("Spawners.Holograms Enabled", true),
|
||||
o8("Spawners.Max Stack Size", 5),
|
||||
|
Loading…
Reference in New Issue
Block a user