I'm trying to make a plugin that makes sure mobs spawn in the right biome.
Here's the code.
It don't works, wolves spawn everywhere.
I don't get any error in console
Here's the code.
Code:
function OnSpawningEntity(World, Entity)
if (Entity:GetClass() == "wolf" and World:GetBiomeAt(Entity:GetPosX(),Entity:GetPosZ()) ~= 4) then
Entity:Destroy()
end
end
I don't get any error in console