@EntitiesInRadius{r=100;ignore=players}
能设置多指定禁止选取的目标吗 比如
@EntitiesInRadius{r=100;ignore=players;ignore=pig}
在或者
@EntitiesInRadius{r=100;ignore=players+pig}
这种 用什么代码可以多选取
用逗号分隔试试 (pig,zombie)
用逗号分隔试试 (pig,zombie)
逗号就行
HK_SuperHotGuy 发表于 2023-8-13 20:34
用逗号分隔试试 (pig,zombie)
@EntitiesInRadius{r=100;ignore=players,Iron_Golem} 不行呢 还能选取
@EntitiesInRadius{r=100;ignore=players,Iron_Golem} 不行呢 还能选取
ignore:忽略
target:目标
过滤掉所有的玩家和动物:@EntitiesInRadius{r=10;ignore=players,animals}
只选择玩家:@EntitiesInRadius{r=10;target=players}
target:目标
过滤掉所有的玩家和动物:@EntitiesInRadius{r=10;ignore=players,animals}
只选择玩家:@EntitiesInRadius{r=10;target=players}
Hikari丿 发表于 2023-8-13 20:49
ignore:忽略
target:目标
过滤掉所有的玩家和动物:@EntitiesInRadius{r=10;ignore=players,animals}
如果是玩家和铁傀儡呢
1123714557 发表于 2023-8-13 20:50
如果是玩家和铁傀儡呢
@EntitiesInRadius{r=10;target=players,iron_golem}试试?
EntitiesInRadius并不能指定选取目标,但是你可以指定选取目标,你需要使用MOBSINRADIUS,写法如:MOBSINRADIUS{r=100,type=villager},即只选取村民。若你要黑名单选取,建议是自定义一个目标选择器。
1123714557 发表于 2023-8-13 20:50
如果是玩家和铁傀儡呢
如果这样不行的话可以试试
@EntitiesInRadius{r=10;ignore=animals,monsters}
Hikari丿 发表于 2023-8-13 20:53
@EntitiesInRadius{r=10;target=players,iron_golem}试试?
看我上面的回复 不行呢
cocosoys 发表于 2023-8-13 20:54
EntitiesInRadius并不能指定选取目标,但是你可以使用别的指定选取目标的目标选择器,如MOBSINRADIUS,写法 ...
那如果用 @EntitiesInRadius{r=10;ignore=players,中立生物} 是不是可以禁止铁傀儡和玩家了呢
1123714557 发表于 2023-8-13 20:56
那如果用 @EntitiesInRadius{r=10;ignore=players,中立生物} 是不是可以禁止铁傀儡和玩家了呢 ...
你如果想忽略玩家和铁傀儡可以只写target=monsters,animals
还有看我上面回复 我回复了俩
“如果这样不行的话可以试试
@EntitiesInRadius{r=10;ignore=animals,monsters}“
本帖最后由 cocosoys 于 2023-8-13 21:05 编辑
不不,你可能没理解我的意思,我是指你用EntitiesInRadius是没法进行任何目标的选取的,理由是代码中不存在该写法。所以你要么自己写一个目标选择器,使其能够进行黑名单与白名单的选择,或者使用MOBSINRADIUS复制代码
1123714557 发表于 2023-8-13 20:56
那如果用 @EntitiesInRadius{r=10;ignore=players,中立生物} 是不是可以禁止铁傀儡和玩家了呢 ...
不不,你可能没理解我的意思,我是指你用EntitiesInRadius是没法进行任何目标的选取的,理由是代码中不存在该写法。所以你要么自己写一个目标选择器,使其能够进行黑名单与白名单的选择,或者使用MOBSINRADIUS
- @MythicTargeter(author = "Ashijin", name = "livingInRadius", aliases = {"livingEntitiesInRadius", "entitiesInRadius", "allInRadius", "EIR"}, description = "Targets a point in front of the caster")
- public class LivingInRadiusTargeter extends IEntitySelector {
- private double radius;
-
- public LivingInRadiusTargeter(MythicLineConfig mlc) {
- super(mlc);
- this.radius = mlc.getDouble(new String[] { "radius", "r" }, 5.0D);
- }
-
- public HashSet<AbstractEntity> getEntities(SkillMetadata data) {
- SkillCaster am = data.getCaster();
- HashSet<AbstractEntity> targets = Sets.newHashSet();
- for (AbstractEntity p : getPlugin().getVolatileCodeHandler()
- .getWorldHandler()
- .getEntitiesNearLocation(am.getLocation(), this.radius, ae -> ae.isLiving())) {
- if (!p.getUniqueId().equals(am.getEntity().getUniqueId()) &&
- am.getEntity().getLocation().distanceSquared(p.getLocation()) < Math.pow(this.radius, 2.0D))
- targets.add(p);
- }
- return targets;
- }
- }
Hikari丿 发表于 2023-8-13 20:55
如果这样不行的话可以试试
@EntitiesInRadius{r=10;ignore=animals,monsters}
如果用target:目标 不就是只选取玩家和铁傀儡吗.. monsters 的意思是什么呢 大佬
cocosoys 发表于 2023-8-13 21:03
不不,你可能没理解我的意思,我是指你用EntitiesInRadius是没法进行任何目标的选取的,理由是代码中不存 ...
请问你发这个是修改 mm.jar吗 我写的@EntitiesInRadius{r=100;ignore=players} 是能用的
1123714557 发表于 2023-8-13 21:06
请问你发这个是修改 mm.jar吗 我写的@EntitiesInRadius{r=100;ignore=players} 是能用的 ...
请标明你使用的mm版本,我所截代码为mm4.11
cocosoys 发表于 2023-8-13 21:07
请标明你使用的mm版本,我所截代码为mm4.11
4.7.2 版本
cocosoys 发表于 2023-8-13 21:07
请标明你使用的mm版本,我所截代码为mm4.11
那4.7.2使用MOBSINRADIUS{r=100,type=monsters} 是不是等同于忽略了玩家和中立生物呢
@eno{r=5;ignore=players,armorstand}
这是我在用的配置,选取目标忽略玩家以及盔甲架,确保你的MM版本为最新版
这是我在用的配置,选取目标忽略玩家以及盔甲架,确保你的MM版本为最新版
LINKCHUM 发表于 2023-8-13 21:38
@eno{r=5;ignore=players,armorstand}
这是我在用的配置,选取目标忽略玩家以及盔甲架,确保你的MM版本为最 ...
4.7.2不能使用呢
Hikari丿 发表于 2023-8-13 20:49
ignore:忽略
target:目标
过滤掉所有的玩家和动物:@EntitiesInRadius{r=10;ignore=players,animals}
@EntitiesInRadius{r=10;ignore=players,animals} 解决了 把铁傀儡的实体用伪装改为动物就行了