Przeglądaj źródła

add entity generation to world generator

Kolja Strohm 7 miesięcy temu
rodzic
commit
ddae1e5187

+ 23 - 0
FactoryCraft/Animal.cpp

@@ -186,3 +186,26 @@ Framework::Text AnimalEntityTypeFactory::getTypeToken() const
 {
     return "animal";
 }
+
+JSONObjectValidationBuilder* AnimalEntityTypeFactory::addToValidator(
+    JSONObjectValidationBuilder* builder) const
+{
+    return builder
+        ->withRequiredAttribute("spawns",
+            Framework::JSON::Validator::JSONValidator::buildForArray()
+                ->addAcceptedObjectInArray()
+                ->withRequiredString("itemType")
+                ->finishString()
+                ->withRequiredNumber("chance")
+                ->finishNumber()
+                ->withRequiredNumber("min")
+                ->finishNumber()
+                ->withRequiredNumber("max")
+                ->finishNumber()
+                ->finishObject()
+                ->finishArray())
+        ->withRequiredString("typeName")
+        ->finishString()
+        ->withRequiredAttribute("model",
+            Game::INSTANCE->zTypeRegistry()->getValidator<ModelInfo>());
+}

+ 2 - 0
FactoryCraft/Animal.h

@@ -64,4 +64,6 @@ public:
     void toJson(AnimalEntityType* zObject,
         Framework::JSON::JSONObject* zResult) const override;
     Framework::Text getTypeToken() const override;
+    JSONObjectValidationBuilder* addToValidator(
+        JSONObjectValidationBuilder* builder) const override;
 };

+ 1 - 1
FactoryCraft/AnimalAI.h

@@ -27,4 +27,4 @@ public:
     virtual void onEntityEntersView(Entity* zEntity);
     virtual void onEntityLeavesView(Entity* zEntity);
     virtual int desideAction() = 0;
-};
+};

+ 38 - 0
FactoryCraft/BiomGenerator.cpp

@@ -1,5 +1,6 @@
 #include "BiomGenerator.h"
 
+#include "AddEntityUpdate.h"
 #include "Constants.h"
 #include "Game.h"
 #include "JNoise.h"
@@ -20,6 +21,10 @@ void BiomGenerator::initialize(JExpressionMemory* zMemory)
     {
         rule->initialize(zMemory);
     }
+    for (EntityGenerator* entity : entityGenerators)
+    {
+        entity->initialize(zMemory);
+    }
     for (StructureTemplateCollection* collection : templates)
     {
         collection->initialize(zMemory);
@@ -79,6 +84,22 @@ void BiomGenerator::generateStructures(int x,
     }
 }
 
+void BiomGenerator::generateEntities(
+    int x, int y, int z, int dimensionId, JExpressionMemory* zMemory)
+{
+    for (EntityGenerator* entityGen : entityGenerators)
+    {
+        if (entityGen->isGenerated(x, y, z, dimensionId, zMemory))
+        {
+            Entity* entity = entityGen->generate(
+                Framework::Vec3<float>((float)x, (float)y, (float)z),
+                dimensionId);
+            Game::INSTANCE->requestWorldUpdate(
+                new AddEntityUpdate(entity, dimensionId));
+        }
+    }
+}
+
 const Framework::RCArray<StructureTemplateCollection>&
 BiomGenerator::getTemplates() const
 {
@@ -186,6 +207,12 @@ void BiomGeneratorFactory::fromJson(
         zResult->addGeneratorRule(
             Game::INSTANCE->zTypeRegistry()->fromJson<GeneratorRule>(value));
     }
+    for (Framework::JSON::JSONValue* value :
+        *zJson->asObject()->zValue("entities")->asArray())
+    {
+        zResult->addEntityGenerator(
+            Game::INSTANCE->zTypeRegistry()->fromJson<EntityGenerator>(value));
+    }
 }
 
 void BiomGeneratorFactory::toJson(
@@ -211,6 +238,13 @@ void BiomGeneratorFactory::toJson(
             Game::INSTANCE->zTypeRegistry()->toJson<GeneratorRule>(rule));
     }
     zResult->addValue("blocks", rules);
+    Framework::JSON::JSONArray* entities = new Framework::JSON::JSONArray();
+    for (EntityGenerator* entity : zObject->getEntityGenerators())
+    {
+        entities->addValue(
+            Game::INSTANCE->zTypeRegistry()->toJson<EntityGenerator>(entity));
+    }
+    zResult->addValue("entities", entities);
 }
 
 JSONObjectValidationBuilder* BiomGeneratorFactory::addToValidator(
@@ -228,5 +262,9 @@ JSONObjectValidationBuilder* BiomGeneratorFactory::addToValidator(
         ->withRequiredArray("blocks")
         ->addAcceptedTypeInArray(
             Game::INSTANCE->zTypeRegistry()->getValidator<GeneratorRule>())
+        ->finishArray()
+        ->withRequiredArray("entities")
+        ->addAcceptedTypeInArray(
+            Game::INSTANCE->zTypeRegistry()->getValidator<EntityGenerator>())
         ->finishArray();
 }

+ 6 - 0
FactoryCraft/BiomGenerator.h

@@ -4,6 +4,7 @@
 #include <JSON.h>
 #include <ReferenceCounter.h>
 
+#include "EntityGenerator.h"
 #include "GeneratorRule.h"
 #include "JNoise.h"
 #include "JsonExpression.h"
@@ -21,6 +22,7 @@ private:
     JBoolExpression* condition;
     Framework::Vec3<int> minStructureOffset;
     Framework::Vec3<int> maxStructureOffset;
+    Framework::RCArray<EntityGenerator> entityGenerators;
 
 protected:
     int seed;
@@ -45,6 +47,8 @@ public:
         Framework::Vec3<int> minPos,
         Framework::Vec3<int> maxPos,
         Framework::RCArray<GeneratedStructure>* zResult);
+    void generateEntities(
+        int x, int y, int z, int dimensionId, JExpressionMemory* zMemory);
 
     const Framework::RCArray<StructureTemplateCollection>& getTemplates() const;
     Framework::Vec3<int> getMinStructureOffset() const;
@@ -58,6 +62,8 @@ public:
     const Framework::RCArray<StructureTemplateCollection>& getTemplates();
     void addGeneratorRule(GeneratorRule* rule);
     const Framework::RCArray<GeneratorRule>& getGeneratorRules() const;
+    void addEntityGenerator(EntityGenerator* generator);
+    const Framework::RCArray<EntityGenerator>& getEntityGenerators() const;
 };
 
 class BiomGeneratorFactory : public TypeFactory<BiomGenerator>

+ 1 - 1
FactoryCraft/Constants.h

@@ -19,5 +19,5 @@
 #define MAX_TICKS_PER_SECOND  20
 
 #ifndef OUT
-#    define OUT
+#    define OUT00
 #endif

+ 32 - 0
FactoryCraft/DimensionGenerator.cpp

@@ -402,6 +402,38 @@ Chunk* BiomedCavedDimensionGenerator::generateChunk(int centerX, int centerY)
     return chunk;
 }
 
+void BiomedCavedDimensionGenerator::generateEntities(Chunk* zChunk)
+{
+    zMemory()->lock();
+    zMemory()->setCurrentChunk(dynamic_cast<Chunk*>(zChunk->getThis()));
+
+    zMemory()->setFloatVariable("x", (float)zChunk->getCenter().x);
+    zMemory()->setFloatVariable("y", (float)zChunk->getCenter().y);
+
+    calculateHeightLayers();
+    BiomGenerator* biom = zBiomGenerator();
+    for (int x = -CHUNK_SIZE / 2; x < CHUNK_SIZE / 2; x++)
+    {
+        for (int y = -CHUNK_SIZE / 2; y < CHUNK_SIZE / 2; y++)
+        {
+            for (int z = 0; z < WORLD_HEIGHT; z++)
+            {
+                if (zChunk->getBlockTypeAt(Framework::Vec3<int>(x, y, z))
+                    == BlockTypeEnum::AIR)
+                {
+                    zMemory()->setFloatVariable("x", (float)z);
+                    zMemory()->setFloatVariable("y", (float)z);
+                    zMemory()->setFloatVariable("z", (float)z);
+                    biom->generateEntities(
+                        x, y, z, getDimensionId(), zMemory());
+                }
+            }
+        }
+    }
+
+    zMemory()->unlock();
+}
+
 Framework::Either<Block*, int> BiomedCavedDimensionGenerator::generateBlock(
     Framework::Vec3<int> location)
 {

+ 4 - 2
FactoryCraft/DimensionGenerator.h

@@ -67,7 +67,7 @@ protected:
     void calculateHeightLayers();
 
 public:
-    Dimension *createDimension();
+    Dimension* createDimension();
     virtual void initialize(int worldSeed);
     virtual Chunk* generateChunk(int centerX, int centerY) = 0;
     virtual Framework::Either<Block*, int> generateBlock(
@@ -76,6 +76,7 @@ public:
     virtual bool spawnStructure(Framework::Vec3<int> location,
         std::function<bool(GeneratorTemplate* tmpl)> filter)
         = 0;
+    virtual void generateEntities(Chunk* zChunk) = 0;
     int getDimensionId() const;
     void addHeightLayer(WorldHeightLayer* layer);
     const Framework::RCArray<WorldHeightLayer>& getHeightLayers() const;
@@ -177,6 +178,7 @@ public:
     virtual void initialize(int worldSeed) override;
 
     Chunk* generateChunk(int centerX, int centerY);
+    void generateEntities(Chunk* zChunk);
     Framework::Either<Block*, int> generateBlock(Framework::Vec3<int> location);
     bool spawnStructure(Framework::Vec3<int> location,
         std::function<bool(GeneratorTemplate* tmpl)> filter);
@@ -193,7 +195,7 @@ class BiomedCavedDimensionGeneratorFactory
 public:
     BiomedCavedDimensionGeneratorFactory();
     BiomedCavedDimensionGenerator* createValue(
-		Framework::JSON::JSONObject* zJson) const override;
+        Framework::JSON::JSONObject* zJson) const override;
     void fromJson(BiomedCavedDimensionGenerator* zResult,
         Framework::JSON::JSONObject* zJson) const override;
     void toJson(BiomedCavedDimensionGenerator* zObject,

+ 131 - 0
FactoryCraft/EntityGenerator.cpp

@@ -0,0 +1,131 @@
+#include "EntityGenerator.h"
+
+#include "EntityType.h"
+#include "Game.h"
+#include "JNoise.h"
+#include "JsonExpression.h"
+
+EntityGenerator::EntityGenerator()
+    : ReferenceCounter(),
+      noise(0),
+      noiseConfig(0),
+      threshold(0.0),
+      zType(0),
+      condition(0)
+{}
+
+EntityGenerator::~EntityGenerator()
+{
+    if (condition)
+    {
+        condition->release();
+    }
+    if (noise)
+    {
+        noise->release();
+    }
+    if (noiseConfig)
+    {
+        noiseConfig->release();
+    }
+}
+
+void EntityGenerator::initialize(JExpressionMemory* zMemory)
+{
+    if (noiseConfig)
+    {
+        if (noise) noise->release();
+        noise = JNoise::parseNoise(noiseConfig, zMemory);
+    }
+}
+
+bool EntityGenerator::isGenerated(
+    int x, int y, int z, int dimensionId, JExpressionMemory* zMemory)
+{
+    return (!noise
+               || noise->getNoise((double)x, (double)y, (double)z) <= threshold)
+        && condition->getValue(zMemory);
+}
+
+Entity* EntityGenerator::generate(Framework::Vec3<float> pos, int dimesnionId)
+{
+    return zType->createEntityAt(pos, dimesnionId);
+}
+
+EntityGeneratorFactory::EntityGeneratorFactory()
+    : TypeFactory()
+{}
+
+EntityGenerator* EntityGeneratorFactory::createValue(
+    Framework::JSON::JSONObject* zJson) const
+{
+    return new EntityGenerator();
+}
+
+void EntityGeneratorFactory::fromJson(
+    EntityGenerator* zResult, Framework::JSON::JSONObject* zJson) const
+{
+    if (zJson->hasValue("noise"))
+    {
+        zResult->noiseConfig = zJson->getValue("noise")->asObject();
+    }
+    if (zJson->hasValue("threshold"))
+    {
+        zResult->threshold
+            = zJson->zValue("threshold")->asNumber()->getNumber();
+    }
+    if (zJson->hasValue("type"))
+    {
+        zResult->zType
+            = Game::INSTANCE->zEntityType(Game::INSTANCE->getEntityTypeId(
+                zJson->zValue("type")->asString()->getString()));
+    }
+    if (zJson->hasValue("condition"))
+    {
+        zResult->condition
+            = Game::INSTANCE->zTypeRegistry()->fromJson<JBoolExpression>(
+                zJson->zValue("condition"));
+    }
+}
+
+void EntityGeneratorFactory::toJson(
+    EntityGenerator* zObject, Framework::JSON::JSONObject* zResult) const
+{
+    if (zObject->noiseConfig)
+    {
+        zResult->addValue("noise",
+            dynamic_cast<Framework::JSON::JSONValue*>(
+                zObject->noiseConfig->getThis()));
+    }
+    zResult->addValue(
+        "threshold", new Framework::JSON::JSONNumber(zObject->threshold));
+    zResult->addValue(
+        "type", new Framework::JSON::JSONString(zObject->zType->getName()));
+    zResult->addValue("condition",
+        Game::INSTANCE->zTypeRegistry()->toJson(zObject->condition));
+}
+
+JSONObjectValidationBuilder* EntityGeneratorFactory::addToValidator(
+    JSONObjectValidationBuilder* builder) const
+{
+    Framework::RCArray<Framework::Text> entityTypeNames;
+    for (int i = 0; i < Game::INSTANCE->getEntityTypeCount(); i++)
+    {
+        if (Game::INSTANCE->zEntityType(i))
+        {
+            entityTypeNames.add(
+                new Framework::Text(Game::INSTANCE->zEntityType(i)->getName()));
+        }
+    }
+    return builder->withRequiredAttribute("noise", JNoise::getValidator(true))
+        ->withRequiredNumber("threshold")
+        ->whichIsOptional()
+        ->whichIsGreaterOrEqual(0.0)
+        ->whichIsLessOrEqual(1.0)
+        ->finishNumber()
+        ->withRequiredString("type")
+        ->whichIsOneOf(entityTypeNames)
+        ->finishString()
+        ->withRequiredAttribute("condition",
+            Game::INSTANCE->zTypeRegistry()->getValidator<JBoolExpression>());
+}

+ 47 - 0
FactoryCraft/EntityGenerator.h

@@ -0,0 +1,47 @@
+#pragma once
+
+#include <Vec3.h>
+
+#include "TypeRegistry.h"
+
+class EntityType;
+class Entity;
+class JBoolExpression;
+class JExpressionMemory;
+class Noise;
+
+class EntityGeneratorFactory;
+
+class EntityGenerator : public Framework::ReferenceCounter
+{
+private:
+    Noise* noise;
+    Framework::JSON::JSONObject* noiseConfig;
+    double threshold;
+    const EntityType* zType;
+    JBoolExpression* condition;
+
+public:
+    EntityGenerator();
+    ~EntityGenerator();
+    void initialize(JExpressionMemory* zMemory);
+    bool isGenerated(
+        int x, int y, int z, int dimensionId, JExpressionMemory* zMemory);
+    Entity* generate(Framework::Vec3<float> pos, int dimesnionId);
+
+    friend EntityGeneratorFactory;
+};
+
+class EntityGeneratorFactory : public TypeFactory<EntityGenerator>
+{
+public:
+    EntityGeneratorFactory();
+    EntityGenerator* createValue(
+        Framework::JSON::JSONObject* zJson) const override;
+    void fromJson(EntityGenerator* zResult,
+        Framework::JSON::JSONObject* zJson) const override;
+    void toJson(EntityGenerator* zObject,
+        Framework::JSON::JSONObject* zResult) const override;
+    JSONObjectValidationBuilder* addToValidator(
+        JSONObjectValidationBuilder* builder) const override;
+};

+ 5 - 1
FactoryCraft/FactoryCraft.vcxproj

@@ -97,11 +97,12 @@
   </PropertyGroup>
   <ItemGroup>
     <ClInclude Include="Animal.h" />
-    <ClInclude Include="AnimalyAI.h" />
+    <ClInclude Include="AnimalAI.h" />
     <ClInclude Include="ArrayUtils.h" />
     <ClInclude Include="BlockFilter.h" />
     <ClInclude Include="BlockInfoCommand.h" />
     <ClInclude Include="BlockInstanceGeneratorRule.h" />
+    <ClInclude Include="EntityGenerator.h" />
     <ClInclude Include="FactorizeNoise.h" />
     <ClInclude Include="FlattenNoise.h" />
     <ClInclude Include="FluidContainer.h" />
@@ -162,6 +163,7 @@
     <ClInclude Include="MultiplyNoise.h" />
     <ClInclude Include="NegateNoise.h" />
     <ClInclude Include="NetworkMessage.h" />
+    <ClInclude Include="NeutralAnimalAI.h" />
     <ClInclude Include="Noise.h" />
     <ClInclude Include="NoBlock.h" />
     <ClInclude Include="NoiseInterpolator.h" />
@@ -231,6 +233,7 @@
     <ClCompile Include="DimensionMap.cpp" />
     <ClCompile Include="DoLaterHandler.cpp" />
     <ClCompile Include="Entity.cpp" />
+    <ClCompile Include="EntityGenerator.cpp" />
     <ClCompile Include="EntityRemovedUpdate.cpp" />
     <ClCompile Include="EntityType.cpp" />
     <ClCompile Include="FactorizeNoise.cpp" />
@@ -264,6 +267,7 @@
     <ClCompile Include="MultiplyNoise.cpp" />
     <ClCompile Include="NegateNoise.cpp" />
     <ClCompile Include="NetworkMessage.cpp" />
+    <ClCompile Include="NeutralAnimalAI.cpp" />
     <ClCompile Include="NoBlock.cpp" />
     <ClCompile Include="Noise.cpp" />
     <ClCompile Include="NoiseInterpolator.cpp" />

+ 18 - 3
FactoryCraft/FactoryCraft.vcxproj.filters

@@ -106,6 +106,9 @@
     <Filter Include="entities\animals">
       <UniqueIdentifier>{8c0ab651-350d-42ad-92e8-45899c87420a}</UniqueIdentifier>
     </Filter>
+    <Filter Include="world\generator\biom\entityGenerator">
+      <UniqueIdentifier>{1c0b5b43-9fe2-496d-bcfc-b51005126d2a}</UniqueIdentifier>
+    </Filter>
   </ItemGroup>
   <ItemGroup>
     <ClInclude Include="Chunk.h">
@@ -411,12 +414,18 @@
     <ClInclude Include="Animal.h">
       <Filter>entities\animals</Filter>
     </ClInclude>
-    <ClInclude Include="AnimalyAI.h">
-      <Filter>entities\animals</Filter>
-    </ClInclude>
     <ClInclude Include="TickSourceType.h">
       <Filter>world\ticking</Filter>
     </ClInclude>
+    <ClInclude Include="AnimalAI.h">
+      <Filter>entities\animals</Filter>
+    </ClInclude>
+    <ClInclude Include="EntityGenerator.h">
+      <Filter>world\generator\biom\entityGenerator</Filter>
+    </ClInclude>
+    <ClInclude Include="NeutralAnimalAI.h">
+      <Filter>entities\animals</Filter>
+    </ClInclude>
   </ItemGroup>
   <ItemGroup>
     <ClCompile Include="Server.cpp">
@@ -713,5 +722,11 @@
     <ClCompile Include="Animal.cpp">
       <Filter>entities\animals</Filter>
     </ClCompile>
+    <ClCompile Include="EntityGenerator.cpp">
+      <Filter>world\generator\biom\entityGenerator</Filter>
+    </ClCompile>
+    <ClCompile Include="NeutralAnimalAI.cpp">
+      <Filter>entities\animals</Filter>
+    </ClCompile>
   </ItemGroup>
 </Project>

+ 15 - 0
FactoryCraft/Game.cpp

@@ -1406,6 +1406,21 @@ const EntityType* Game::zEntityType(int id) const
     return entityTypes[id];
 }
 
+int Game::getEntityTypeId(const char* name) const
+{
+    for (int i = 0; i < entityTypeCount; i++)
+    {
+        if (entityTypes[i]
+            && Framework::Text(entityTypes[i]->getName()).istGleich(name))
+        {
+            return i;
+        }
+    }
+    Framework::Logging::warning()
+        << "no entity type with name '" << name << "' found.";
+    return -1;
+}
+
 int Game::getBlockTypeId(const char* name) const
 {
     for (int i = 0; i < blockTypeCount; i++)

+ 1 - 0
FactoryCraft/Game.h

@@ -185,6 +185,7 @@ public:
     const BlockType* zBlockType(int id) const;
     const ItemType* zItemType(int id) const;
     const EntityType* zEntityType(int id) const;
+    int getEntityTypeId(const char* name) const;
     int getBlockTypeId(const char* name) const;
     int getItemTypeId(const char* name) const;
     int getBlockTypeCount() const;

+ 0 - 0
FactoryCraft/NeutralAnimalAI.cpp


+ 6 - 0
FactoryCraft/NeutralAnimalAI.h

@@ -0,0 +1,6 @@
+#pragma once
+
+#include "Animal.h"
+
+class NeutralAnimalAI : public AnimalAI
+{};

+ 5 - 3
FactoryCraft/TypeRegistry.cpp

@@ -2,6 +2,7 @@
 
 #include <Datei.h>
 
+#include "Animal.h"
 #include "BasicBlocks.h"
 #include "BasicItems.h"
 #include "BasicTool.h"
@@ -28,9 +29,6 @@
 TypeRegistry::TypeRegistry()
     : ReferenceCounter()
 {
-    // register templates
-    registerSubType(new TreeTemplateFactory());
-
     // register quest datastructures
     registerType(new QuestRequirementStorageType());
     registerType(new QuestStorageType());
@@ -121,6 +119,10 @@ TypeRegistry::TypeRegistry()
     registerType(new BiomGeneratorFactory());
     registerType(new StructureTemplateCollectionFactory());
     registerSubType(new TreeTemplateFactory());
+    registerType(new EntityGeneratorFactory());
+
+    // entities
+    registerSubType(new AnimalEntityTypeFactory());
 }
 
 void TypeRegistry::writeSyntaxInfo(Framework::Text folderPath) const

+ 4 - 0
FactoryCraft/WorldGenerator.cpp

@@ -133,7 +133,11 @@ void WorldGenerator::thread()
                         dim = new Dimension(next.dimensionId);
                         Game::INSTANCE->addDimension(dim);
                     }
+                    generatedChunk->getThis();
                     dim->setChunk(generatedChunk, Punkt(x, y));
+                    zGenerator(next.dimensionId)
+                        ->generateEntities(generatedChunk);
+                    generatedChunk->release();
                     zm.messungEnde();
                     Framework::Logging::trace()
                         << "adding chunk to map: " << zm.getSekunden();

+ 4 - 0
Windows Version/Windows Version.vcxproj

@@ -187,6 +187,7 @@ copy ..\..\..\..\..\Allgemein\Framework\x64\release\Framework.dll Framework.dll<
     <ClCompile Include="..\FactoryCraft\DimensionMap.cpp" />
     <ClCompile Include="..\FactoryCraft\DoLaterHandler.cpp" />
     <ClCompile Include="..\FactoryCraft\Entity.cpp" />
+    <ClCompile Include="..\FactoryCraft\EntityGenerator.cpp" />
     <ClCompile Include="..\FactoryCraft\EntityRemovedUpdate.cpp" />
     <ClCompile Include="..\FactoryCraft\EntityType.cpp" />
     <ClCompile Include="..\FactoryCraft\FactorizeNoise.cpp" />
@@ -220,6 +221,7 @@ copy ..\..\..\..\..\Allgemein\Framework\x64\release\Framework.dll Framework.dll<
     <ClCompile Include="..\FactoryCraft\MultiplyNoise.cpp" />
     <ClCompile Include="..\FactoryCraft\NegateNoise.cpp" />
     <ClCompile Include="..\FactoryCraft\NetworkMessage.cpp" />
+    <ClCompile Include="..\FactoryCraft\NeutralAnimalAI.cpp" />
     <ClCompile Include="..\FactoryCraft\NoBlock.cpp" />
     <ClCompile Include="..\FactoryCraft\Noise.cpp" />
     <ClCompile Include="..\FactoryCraft\NoiseInterpolator.cpp" />
@@ -263,6 +265,7 @@ copy ..\..\..\..\..\Allgemein\Framework\x64\release\Framework.dll Framework.dll<
     <ClInclude Include="..\FactoryCraft\BlockFilter.h" />
     <ClInclude Include="..\FactoryCraft\BlockInfoCommand.h" />
     <ClInclude Include="..\FactoryCraft\BlockInstanceGeneratorRule.h" />
+    <ClInclude Include="..\FactoryCraft\EntityGenerator.h" />
     <ClInclude Include="..\FactoryCraft\FactorizeNoise.h" />
     <ClInclude Include="..\FactoryCraft\FlattenNoise.h" />
     <ClInclude Include="..\FactoryCraft\FluidContainer.h" />
@@ -323,6 +326,7 @@ copy ..\..\..\..\..\Allgemein\Framework\x64\release\Framework.dll Framework.dll<
     <ClInclude Include="..\FactoryCraft\MultiplyNoise.h" />
     <ClInclude Include="..\FactoryCraft\NegateNoise.h" />
     <ClInclude Include="..\FactoryCraft\NetworkMessage.h" />
+    <ClInclude Include="..\FactoryCraft\NeutralAnimalAI.h" />
     <ClInclude Include="..\FactoryCraft\Noise.h" />
     <ClInclude Include="..\FactoryCraft\NoBlock.h" />
     <ClInclude Include="..\FactoryCraft\NoiseInterpolator.h" />

+ 15 - 0
Windows Version/Windows Version.vcxproj.filters

@@ -106,6 +106,9 @@
     <Filter Include="entities\animals">
       <UniqueIdentifier>{1c04d738-2f59-40e4-9660-14aaf6bf68aa}</UniqueIdentifier>
     </Filter>
+    <Filter Include="world\generator\biom\entityGenerator">
+      <UniqueIdentifier>{87911234-37d0-41ac-975c-329d2963ca52}</UniqueIdentifier>
+    </Filter>
   </ItemGroup>
   <ItemGroup>
     <ClCompile Include="..\FactoryCraft\Server.cpp">
@@ -402,6 +405,12 @@
     <ClCompile Include="..\FactoryCraft\Animal.cpp">
       <Filter>entities\animals</Filter>
     </ClCompile>
+    <ClCompile Include="..\FactoryCraft\EntityGenerator.cpp">
+      <Filter>world\generator\biom\entityGenerator</Filter>
+    </ClCompile>
+    <ClCompile Include="..\FactoryCraft\NeutralAnimalAI.cpp">
+      <Filter>entities\animals</Filter>
+    </ClCompile>
   </ItemGroup>
   <ItemGroup>
     <ClInclude Include="..\FactoryCraft\Chunk.h">
@@ -713,5 +722,11 @@
     <ClInclude Include="..\FactoryCraft\TickSourceType.h">
       <Filter>world\ticking</Filter>
     </ClInclude>
+    <ClInclude Include="..\FactoryCraft\EntityGenerator.h">
+      <Filter>world\generator\biom\entityGenerator</Filter>
+    </ClInclude>
+    <ClInclude Include="..\FactoryCraft\NeutralAnimalAI.h">
+      <Filter>entities\animals</Filter>
+    </ClInclude>
   </ItemGroup>
 </Project>