-Added natural spawn controller support
This commit is contained in:
Luis C.M committed 2022-06-29 00:06:38 -05:00
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;