mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-12 02:37:27 +00:00
Npc API:
-Added natural spawn controller support
This commit is contained in:
1 parent
700fff3faf
commit
7d0b124422
6 files changed
+161
-6
No files matched your search
@@ -30,6 +30,7 @@ import net.minecraft.util.EntityDamageSource;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.WorldServer;
|
||||
import net.minecraft.world.biome.BiomeGenBase;
|
||||
import noppes.npcs.CustomNpcs;
|
||||
import noppes.npcs.NoppesUtilServer;
|
||||
import noppes.npcs.controllers.*;
|
||||
@@ -94,10 +95,24 @@ public class NpcAPI extends AbstractNpcAPI {
|
||||
return ServerCloneController.Instance;
|
||||
}
|
||||
|
||||
public INaturalSpawnsHandler getNaturalSpawns() { return SpawnController.instance; }
|
||||
|
||||
public ITransportHandler getLocations() {
|
||||
return TransportController.getInstance();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String[] getAllBiomeNames() {
|
||||
List<String> biomes = new ArrayList<String>();
|
||||
for (BiomeGenBase base : BiomeGenBase.getBiomeGenArray()) {
|
||||
if (base != null && base.biomeName != null) {
|
||||
biomes.add(base.biomeName);
|
||||
}
|
||||
}
|
||||
|
||||
return biomes.toArray(new String[]{});
|
||||
}
|
||||
|
||||
public IEntity getIEntity(Entity entity) {
|
||||
if(entity == null)
|
||||
return null;
|
||||
|
||||
Reference in new issue
Block a user