mirror of
https://github.com/craftaro/EpicSpawners.git
synced 2025-01-07 03:07:06 +08:00
[FIXED] Multiple SpawnOptions not working due to improper number casting.
[CHANGED] Using NMS implementations to set MOB AI instead of Core EntityUtils
This commit is contained in:
parent
da7ee8976f
commit
5efa573c04
@ -1,6 +1,9 @@
|
||||
package com.craftaro.epicspawners.spawners.spawner.option;
|
||||
|
||||
import com.craftaro.core.math.MathUtils;
|
||||
import com.craftaro.core.nms.Nms;
|
||||
import com.craftaro.core.nms.entity.NmsEntity;
|
||||
import com.craftaro.core.nms.v1_8_R1.entity.NmsEntityImpl;
|
||||
import com.craftaro.core.utils.EntityUtils;
|
||||
import com.craftaro.epicspawners.EpicSpawners;
|
||||
import com.craftaro.epicspawners.api.boosts.types.Boosted;
|
||||
@ -63,7 +66,8 @@ public class SpawnOptionEntity implements SpawnOption {
|
||||
equation = equation.replace("{RAND}", Integer.toString(randomAmt));
|
||||
equation = equation.replace("{STACK_SIZE}", Integer.toString(stack.getStackSize()));
|
||||
|
||||
spawnCount += MathUtils.eval(equation, "EpicSpawners (Mobs Spawned Per Single Spawn) Equation");
|
||||
spawnCount += (int) MathUtils.eval(equation, "EpicSpawners (Mobs Spawned Per Single Spawn) Equation");
|
||||
System.out.println(spawnCount);
|
||||
}
|
||||
|
||||
// Get the max entities allowed around a spawner.
|
||||
@ -108,7 +112,7 @@ public class SpawnOptionEntity implements SpawnOption {
|
||||
}
|
||||
|
||||
if (Settings.NO_AI.getBoolean()) {
|
||||
EntityUtils.setUnaware(entity);
|
||||
Nms.getImplementations().getEntity().setMobAware(entity,false);
|
||||
}
|
||||
|
||||
this.plugin.getSpawnManager().addUnnaturalSpawn(entity.getUniqueId());
|
||||
|
2
pom.xml
2
pom.xml
@ -19,7 +19,7 @@
|
||||
<url>https://craftaro.com/marketplace/product/13</url>
|
||||
|
||||
<properties>
|
||||
<craftaro.coreVersion>3.1.0-SNAPSHOT</craftaro.coreVersion>
|
||||
<craftaro.coreVersion>3.3.0-SNAPSHOT</craftaro.coreVersion>
|
||||
|
||||
<maven.compiler.release>8</maven.compiler.release>
|
||||
<maven.compiler.target>1.8</maven.compiler.target>
|
||||
|
Loading…
Reference in New Issue
Block a user