Sfoglia il codice sorgente

add stripped wood blocks and allow stripping wood of bark and resin by hand

Kolja Strohm 2 giorni fa
parent
commit
892d6cb993

+ 30 - 6
FactoryCraft/Block.cpp

@@ -56,19 +56,43 @@ void Block::onDestroy(Entity* zActor, Item* zUsedItem, ItemSkill* zUsedSkill)
                 Game::INSTANCE->zDimension(dimensionId)->sendBlockInfo(pos);
             }
         }
+        getThis();
         if (zActor)
         {
             for (const DropConfig* config : zBlockType()->getDropConfigs())
             {
-                config->onObjectDestroyed(zActor, zUsedItem, zUsedSkill, this);
+                config->onObjectDestroyed(zActor,
+                    zUsedItem,
+                    zUsedSkill,
+                    this); // a nother block might replace this block during the
+                           // drops
             }
         }
+        Framework::Either<Block*, int> block
+            = Game::INSTANCE->zBlockAt(getPos(), dimensionId, 0);
         deadAndRemoved = 1;
-        for (MultiblockStructure* structure : structures)
-            structure->onBlockRemoved(zActor, zUsedItem, zUsedSkill, this);
-        Game::INSTANCE->zDimension(dimensionId)
-            ->placeBlock(
-                getPos(), BlockTypeEnum::AIR); // this will be deleted here
+        if (block.isA()
+            && block.getA() == this) // no other block has replaced this block
+        {
+            for (MultiblockStructure* structure : structures)
+                structure->onBlockRemoved(zActor, zUsedItem, zUsedSkill, this);
+            Game::INSTANCE->zDimension(dimensionId)
+                ->placeBlock(getPos(), BlockTypeEnum::AIR);
+        }
+        else
+        {
+            if (structures.getEintragAnzahl() > 0)
+            { // replace this block in the structures
+                Block* zReplacement = block.isA()
+                                        ? block.getA()
+                                        : Game::INSTANCE->zRealBlockInstance(
+                                              getPos(), dimensionId);
+                for (MultiblockStructure* structure : structures)
+                    structure->onBlockReplaced(
+                        zActor, zUsedItem, zUsedSkill, this, zReplacement);
+            }
+        }
+        release();
     }
 }
 

+ 67 - 0
FactoryCraft/BlockReplacementDrop.cpp

@@ -0,0 +1,67 @@
+#include "BlockReplacementDrop.h"
+
+#include "Block.h"
+#include "BlockType.h"
+#include "Dimension.h"
+
+BlockReplacementDrop::BlockReplacementDrop(Framework::Text blockTypeName)
+    : DropConfig(),
+      blockTypeName(blockTypeName),
+      zBlockType(0)
+{}
+
+void BlockReplacementDrop::initialize()
+{
+    int id = Game::INSTANCE->getBlockTypeId(blockTypeName);
+    zBlockType = Game::INSTANCE->zBlockType(id < 0 ? BlockTypeEnum::AIR : id);
+}
+
+Framework::Text BlockReplacementDrop::getBlockTypeName() const
+{
+    return blockTypeName;
+}
+
+void BlockReplacementDrop::doDrop(Entity* zActor,
+    Item* zItem,
+    ItemSkill* zUsedSkill,
+    Framework::Either<Block*, Entity*> zDestroyedObject) const
+{
+    if (zBlockType && zDestroyedObject.isA())
+    {
+        Game::INSTANCE->zDimension(zDestroyedObject.getA()->getDimensionId())
+            ->placeBlock(
+                zDestroyedObject.getA()->getPos(), zBlockType->getId());
+    }
+}
+
+BlockReplacementDropFactory::BlockReplacementDropFactory()
+    : DropConfigFactory<BlockReplacementDrop>()
+{}
+
+JSONObjectValidationBuilder* BlockReplacementDropFactory::addToValidator(
+    JSONObjectValidationBuilder* builder) const
+{
+    return DropConfigFactory::addToValidator(builder)->withRequiredAttribute(
+        "blockType",
+        Game::INSTANCE->zTypeRegistry()->getValidator<Framework::Text>(
+            BlockTypeNameFactory::TYPE_ID));
+}
+
+const char* BlockReplacementDropFactory::getTypeToken() const
+{
+    return "blockReplacement";
+}
+
+BlockReplacementDrop* BlockReplacementDropFactory::createInstance(
+    Framework::JSON::JSONObject* zJson) const
+{
+    return new BlockReplacementDrop(
+        zJson->zValue("blockType")->asString()->getString());
+}
+
+void BlockReplacementDropFactory::addToJson(
+    Framework::JSON::JSONObject* zJson, BlockReplacementDrop* zObject) const
+{
+    zJson->addValue("blockTypeName",
+        new Framework::JSON::JSONString(zObject->getBlockTypeName()));
+}

+ 35 - 0
FactoryCraft/BlockReplacementDrop.h

@@ -0,0 +1,35 @@
+#pragma once
+
+#include "DropConfig.h"
+
+class BlockType;
+
+class BlockReplacementDrop : public DropConfig
+{
+private:
+    const BlockType* zBlockType;
+    Framework::Text blockTypeName;
+
+public:
+    BlockReplacementDrop(Framework::Text blockTypeName);
+    void initialize() override;
+    Framework::Text getBlockTypeName() const;
+    void doDrop(Entity* zActor,
+        Item* zItem,
+        ItemSkill* zUsedSkill,
+        Framework::Either<Block*, Entity*> zDestroyedObject) const override;
+};
+
+class BlockReplacementDropFactory
+    : public DropConfigFactory<BlockReplacementDrop>
+{
+public:
+    BlockReplacementDropFactory();
+    JSONObjectValidationBuilder* addToValidator(
+        JSONObjectValidationBuilder* builder) const override;
+    const char* getTypeToken() const override;
+    BlockReplacementDrop* createInstance(
+        Framework::JSON::JSONObject* zJson) const override;
+    void addToJson(Framework::JSON::JSONObject* zJson,
+        BlockReplacementDrop* zObject) const override;
+};

+ 12 - 1
FactoryCraft/BlockType.cpp

@@ -21,7 +21,8 @@ BlockType::BlockType()
       initialMapColor(0),
       defaultBlock(0),
       groupNames(),
-      hardness(1.f)
+      hardness(1.f),
+      damagableByHand(0)
 {}
 
 BlockType::~BlockType()
@@ -310,6 +311,16 @@ float BlockType::getHardness() const
     return hardness;
 }
 
+void BlockType::setDamagableByHand(bool damagableByHand)
+{
+    this->damagableByHand = damagableByHand;
+}
+
+bool BlockType::isDamagableByHand() const
+{
+    return damagableByHand;
+}
+
 int BlockType::getTypeId(const char* name)
 {
     Text n = name;

+ 11 - 1
FactoryCraft/BlockType.h

@@ -35,6 +35,7 @@ private:
     Framework::RCArray<Framework::Text> groupNames;
     float hardness;
     Framework::RCArray<DropConfig> dropConfigs;
+    bool damagableByHand;
 
 protected:
     BlockType();
@@ -93,6 +94,8 @@ public:
     const Framework::RCArray<Framework::Text>& getGroupNames() const;
     void setHardness(float hardness);
     float getHardness() const;
+    void setDamagableByHand(bool damagableByHand);
+    bool isDamagableByHand() const;
 
     static int getTypeId(const char* name);
     static Framework::Text getTypeName(int id);
@@ -141,6 +144,8 @@ public:
                 Game::INSTANCE->zTypeRegistry()->fromJson<DropConfig>(
                     value->asObject()));
         }
+        zType->setDamagableByHand(
+            zJson->zValue("damagableByHand")->asBool()->getBool());
         return result;
     }
 
@@ -180,6 +185,8 @@ public:
         result->addValue("drops", drops);
         result->addValue(
             "hardness", new Framework::JSON::JSONNumber(zType->getHardness()));
+        result->addValue("damagableByHand",
+            new Framework::JSON::JSONBool(zType->isDamagableByHand()));
         return result;
     }
 
@@ -230,7 +237,10 @@ public:
                     ->addAcceptedTypeInArray(Game::INSTANCE->zTypeRegistry()
                             ->getValidator<DropConfig>())
                     ->withDefault(defaultDrops)
-                    ->finishArray());
+                    ->finishArray())
+            ->withRequiredBool("damagableByHand")
+            ->withDefault(false)
+            ->finishBool();
     }
 
 protected:

+ 2 - 0
FactoryCraft/FactoryCraft.vcxproj

@@ -102,6 +102,7 @@
     <ClInclude Include="BlockFilter.h" />
     <ClInclude Include="BlockInfoCommand.h" />
     <ClInclude Include="BlockInstanceGeneratorRule.h" />
+    <ClInclude Include="BlockReplacementDrop.h" />
     <ClInclude Include="BlockTypeNameFactory.h" />
     <ClInclude Include="DefaultBlockItemDrop.h" />
     <ClInclude Include="DefaultInventoryDrop.h" />
@@ -245,6 +246,7 @@
     <ClCompile Include="DropChanceCondition.cpp" />
     <ClCompile Include="DropConditionOperator.cpp" />
     <ClCompile Include="DropConfig.cpp" />
+    <ClCompile Include="BlockReplacementDrop.cpp" />
     <ClCompile Include="DropUsedItemCondition.cpp" />
     <ClCompile Include="Entity.cpp" />
     <ClCompile Include="EntityGenerator.cpp" />

+ 6 - 0
FactoryCraft/FactoryCraft.vcxproj.filters

@@ -456,6 +456,9 @@
     <ClInclude Include="MultiblockStructureManager.h">
       <Filter>world\structures</Filter>
     </ClInclude>
+    <ClInclude Include="BlockReplacementDrop.h">
+      <Filter>drops\implementations</Filter>
+    </ClInclude>
   </ItemGroup>
   <ItemGroup>
     <ClCompile Include="Server.cpp">
@@ -785,5 +788,8 @@
     <ClCompile Include="MultiblockStructureManager.cpp">
       <Filter>world\structures</Filter>
     </ClCompile>
+    <ClCompile Include="BlockReplacementDrop.cpp">
+      <Filter>drops\implementations</Filter>
+    </ClCompile>
   </ItemGroup>
 </Project>

+ 1 - 1
FactoryCraft/ItemType.h

@@ -33,7 +33,7 @@ protected:
 
 public:
     ItemType();
-    ~ItemType();
+    virtual ~ItemType();
 
 protected:
     virtual void loadSuperItem(

+ 9 - 0
FactoryCraft/MultiblockStructure.cpp

@@ -79,6 +79,15 @@ void MultiblockStructure::onBlockRemoved(
     }
 }
 
+void MultiblockStructure::onBlockReplaced(Entity* zActor,
+    Item* zUsedItem,
+    ItemSkill* zUsedSkill,
+    Block* zOldBlock,
+    Block* zNewBlock)
+{
+    // do nothing
+}
+
 bool MultiblockStructure::isEmpty() const
 {
     return memberBlockPositions.getEintragAnzahl() == 0 && !isLoading;

+ 5 - 0
FactoryCraft/MultiblockStructure.h

@@ -43,6 +43,11 @@ public:
     void addMemberPosition(Framework::Vec3<int> blockPos);
     virtual void onBlockRemoved(
         Entity* zActor, Item* zUsedItem, ItemSkill* zUsedSkill, Block* zBlock);
+    virtual void onBlockReplaced(Entity* zActor,
+        Item* zUsedItem,
+        ItemSkill* zUsedSkill,
+        Block* zOldBlock,
+        Block* zNewBlock);
 
     bool isEmpty() const;
     bool isFullyLoaded() const;

+ 1 - 1
FactoryCraft/PlayerHand.cpp

@@ -34,7 +34,7 @@ bool PlayerHandSkill::use(Entity* zActor, Item* zUsedItem, Block* zTarget)
 {
     if (zActor->getStamina() > 0.001f)
     {
-        if (zTarget && zTarget->getHardness() <= 1)
+        if (zTarget && zTarget->zBlockType()->isDamagableByHand())
         {
             zActor->setStamina(zActor->getStamina() - 0.001f);
             zTarget->setHP(zActor,

+ 2 - 0
FactoryCraft/TypeRegistry.cpp

@@ -8,6 +8,7 @@
 #include "BasicTool.h"
 #include "BlockFilter.h"
 #include "BlockInstanceGeneratorRule.h"
+#include "BlockReplacementDrop.h"
 #include "BlockTypeGeneratorRule.h"
 #include "Chest.h"
 #include "DefaultBlockItemDrop.h"
@@ -141,6 +142,7 @@ TypeRegistry::TypeRegistry()
     registerSubType(new DefaultBlockItemDropFactory());
     registerSubType(new DefaultInventoryItemDropFactory());
     registerSubType(new SpecificItemDropFactory());
+    registerSubType(new BlockReplacementDropFactory());
 }
 
 void TypeRegistry::writeSyntaxInfo(Framework::Text folderPath) const

+ 2 - 0
Windows Version/Windows Version.vcxproj

@@ -170,6 +170,7 @@ copy ..\..\..\..\..\Allgemein\Framework\x64\release\Framework.dll Framework.dll<
     <ClCompile Include="..\FactoryCraft\BlockFilter.cpp" />
     <ClCompile Include="..\FactoryCraft\BlockInfoCommand.cpp" />
     <ClCompile Include="..\FactoryCraft\BlockInstanceGeneratorRule.cpp" />
+    <ClCompile Include="..\FactoryCraft\BlockReplacementDrop.cpp" />
     <ClCompile Include="..\FactoryCraft\BlockType.cpp" />
     <ClCompile Include="..\FactoryCraft\BlockTypeGeneratorRule.cpp" />
     <ClCompile Include="..\FactoryCraft\BlockTypeNameFactory.cpp" />
@@ -274,6 +275,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\BlockReplacementDrop.h" />
     <ClInclude Include="..\FactoryCraft\BlockTypeNameFactory.h" />
     <ClInclude Include="..\FactoryCraft\DefaultBlockItemDrop.h" />
     <ClInclude Include="..\FactoryCraft\DefaultInventoryDrop.h" />

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

@@ -441,6 +441,9 @@
     <ClCompile Include="..\FactoryCraft\MultiblockStructureManager.cpp">
       <Filter>world\structures</Filter>
     </ClCompile>
+    <ClCompile Include="..\FactoryCraft\BlockReplacementDrop.cpp">
+      <Filter>drops\implementations</Filter>
+    </ClCompile>
   </ItemGroup>
   <ItemGroup>
     <ClInclude Include="..\FactoryCraft\Chunk.h">
@@ -785,5 +788,8 @@
     <ClInclude Include="..\FactoryCraft\MultiblockStructureManager.h">
       <Filter>world\structures</Filter>
     </ClInclude>
+    <ClInclude Include="..\FactoryCraft\BlockReplacementDrop.h">
+      <Filter>drops\implementations</Filter>
+    </ClInclude>
   </ItemGroup>
 </Project>

+ 357 - 8
Windows Version/data/blocks/blockTypes.json

@@ -69,14 +69,97 @@
         "blocks.ltdb/oak.png",
         "blocks.ltdb/oak.png",
         "blocks.ltdb/oak.png",
-        "blocks.ltdb/oak.png",
-        "blocks.ltdb/oak.png"
+        "blocks.ltdb/wood.png",
+        "blocks.ltdb/wood.png"
+      ]
+    },
+    "mapColor": "0xFF7F7A70",
+    "hardness": 1.5,
+    "groupNames": [
+      "Wood"
+    ],
+    "damagableByHand": true,
+    "drops": [
+      {
+        "type": "blockReplacement",
+        "condition": {
+          "type": "noItem"
+        },
+        "blockType": "Stripped Oak Wood"
+      },
+      {
+        "type": "specificItem",
+        "condition": {
+          "type": "operator",
+          "operator": "AND",
+          "conditions": [
+            {
+              "type": "noItem"
+            },
+            {
+              "type": "chance",
+              "chance": 0.75
+            }
+          ]
+        },
+        "itemType": "Tree bark"
+      },
+      {
+        "type": "specificItem",
+        "condition": {
+          "type": "operator",
+          "operator": "AND",
+          "conditions": [
+            {
+              "type": "noItem"
+            },
+            {
+              "type": "chance",
+              "chance": 0.75
+            }
+          ]
+        },
+        "itemType": "Tree bark"
+      },
+      {
+        "type": "blockItem",
+        "condition": {
+          "type": "not",
+          "condition": {
+            "type": "noItem"
+          }
+        }
+      }
+    ]
+  },
+  {
+    "type": "basicBlock",
+    "name": "Stripped Oak Wood",
+    "itemType": null,
+    "model": {
+      "modelPath": "cube",
+      "texturePaths": [
+        "blocks.ltdb/wood.png",
+        "blocks.ltdb/wood.png",
+        "blocks.ltdb/wood.png",
+        "blocks.ltdb/wood.png",
+        "blocks.ltdb/wood.png",
+        "blocks.ltdb/wood.png"
       ]
     },
     "mapColor": "0xFF7F7A70",
     "hardness": 1.5,
     "groupNames": [
       "Wood"
+    ],
+    "drops": [
+      {
+        "type": "specificItem",
+        "condition": {
+          "type": "allways"
+        },
+        "itemType": "Oak Wood"
+      }
     ]
   },
   {
@@ -178,14 +261,97 @@
         "blocks.ltdb/birch.png",
         "blocks.ltdb/birch.png",
         "blocks.ltdb/birch.png",
-        "blocks.ltdb/birch.png",
-        "blocks.ltdb/birch.png"
+        "blocks.ltdb/wood.png",
+        "blocks.ltdb/wood.png"
       ]
     },
     "mapColor": "0xFF99999D",
     "hardness": 1.5,
     "groupNames": [
       "Wood"
+    ],
+    "damagableByHand": true,
+    "drops": [
+      {
+        "type": "blockReplacement",
+        "condition": {
+          "type": "noItem"
+        },
+        "blockType": "Stripped Birch Wood"
+      },
+      {
+        "type": "specificItem",
+        "condition": {
+          "type": "operator",
+          "operator": "AND",
+          "conditions": [
+            {
+              "type": "noItem"
+            },
+            {
+              "type": "chance",
+              "chance": 0.75
+            }
+          ]
+        },
+        "itemType": "Tree bark"
+      },
+      {
+        "type": "specificItem",
+        "condition": {
+          "type": "operator",
+          "operator": "AND",
+          "conditions": [
+            {
+              "type": "noItem"
+            },
+            {
+              "type": "chance",
+              "chance": 0.75
+            }
+          ]
+        },
+        "itemType": "Tree bark"
+      },
+      {
+        "type": "blockItem",
+        "condition": {
+          "type": "not",
+          "condition": {
+            "type": "noItem"
+          }
+        }
+      }
+    ]
+  },
+  {
+    "type": "basicBlock",
+    "name": "Stripped Birch Wood",
+    "itemType": null,
+    "model": {
+      "modelPath": "cube",
+      "texturePaths": [
+        "blocks.ltdb/wood.png",
+        "blocks.ltdb/wood.png",
+        "blocks.ltdb/wood.png",
+        "blocks.ltdb/wood.png",
+        "blocks.ltdb/wood.png",
+        "blocks.ltdb/wood.png"
+      ]
+    },
+    "mapColor": "0xFF99999D",
+    "hardness": 1.5,
+    "groupNames": [
+      "Wood"
+    ],
+    "drops": [
+      {
+        "type": "specificItem",
+        "condition": {
+          "type": "allways"
+        },
+        "itemType": "Birch Wood"
+      }
     ]
   },
   {
@@ -231,14 +397,97 @@
         "blocks.ltdb/beech.png",
         "blocks.ltdb/beech.png",
         "blocks.ltdb/beech.png",
-        "blocks.ltdb/beech.png",
-        "blocks.ltdb/beech.png"
+        "blocks.ltdb/wood.png",
+        "blocks.ltdb/wood.png"
       ]
     },
     "mapColor": "0xFF778172",
     "hardness": 1.5,
     "groupNames": [
       "Wood"
+    ],
+    "damagableByHand": true,
+    "drops": [
+      {
+        "type": "blockReplacement",
+        "condition": {
+          "type": "noItem"
+        },
+        "blockType": "Stripped Beech Wood"
+      },
+      {
+        "type": "specificItem",
+        "condition": {
+          "type": "operator",
+          "operator": "AND",
+          "conditions": [
+            {
+              "type": "noItem"
+            },
+            {
+              "type": "chance",
+              "chance": 0.75
+            }
+          ]
+        },
+        "itemType": "Tree bark"
+      },
+      {
+        "type": "specificItem",
+        "condition": {
+          "type": "operator",
+          "operator": "AND",
+          "conditions": [
+            {
+              "type": "noItem"
+            },
+            {
+              "type": "chance",
+              "chance": 0.75
+            }
+          ]
+        },
+        "itemType": "Tree bark"
+      },
+      {
+        "type": "blockItem",
+        "condition": {
+          "type": "not",
+          "condition": {
+            "type": "noItem"
+          }
+        }
+      }
+    ]
+  },
+  {
+    "type": "basicBlock",
+    "name": "Stripped Beech Wood",
+    "itemType": null,
+    "model": {
+      "modelPath": "cube",
+      "texturePaths": [
+        "blocks.ltdb/wood.png",
+        "blocks.ltdb/wood.png",
+        "blocks.ltdb/wood.png",
+        "blocks.ltdb/wood.png",
+        "blocks.ltdb/wood.png",
+        "blocks.ltdb/wood.png"
+      ]
+    },
+    "mapColor": "0xFF778172",
+    "hardness": 1.5,
+    "groupNames": [
+      "Wood"
+    ],
+    "drops": [
+      {
+        "type": "specificItem",
+        "condition": {
+          "type": "allways"
+        },
+        "itemType": "Beech Wood"
+      }
     ]
   },
   {
@@ -302,14 +551,114 @@
         "blocks.ltdb/pine.png",
         "blocks.ltdb/pine.png",
         "blocks.ltdb/pine.png",
-        "blocks.ltdb/pine.png",
-        "blocks.ltdb/pine.png"
+        "blocks.ltdb/wood.png",
+        "blocks.ltdb/wood.png"
+      ]
+    },
+    "mapColor": "0xFF786C72",
+    "hardness": 1.4,
+    "groupNames": [
+      "Wood"
+    ],
+    "damagableByHand": true,
+    "drops": [
+      {
+        "type": "blockReplacement",
+        "condition": {
+          "type": "noItem"
+        },
+        "blockType": "Stripped Pine Wood"
+      },
+      {
+        "type": "specificItem",
+        "condition": {
+          "type": "operator",
+          "operator": "AND",
+          "conditions": [
+            {
+              "type": "noItem"
+            },
+            {
+              "type": "chance",
+              "chance": 0.75
+            }
+          ]
+        },
+        "itemType": "Tree bark"
+      },
+      {
+        "type": "specificItem",
+        "condition": {
+          "type": "operator",
+          "operator": "AND",
+          "conditions": [
+            {
+              "type": "noItem"
+            },
+            {
+              "type": "chance",
+              "chance": 0.75
+            }
+          ]
+        },
+        "itemType": "Tree bark"
+      },
+      {
+        "type": "specificItem",
+        "condition": {
+          "type": "operator",
+          "operator": "AND",
+          "conditions": [
+            {
+              "type": "noItem"
+            },
+            {
+              "type": "chance",
+              "chance": 0.25
+            }
+          ]
+        },
+        "itemType": "Resin"
+      },
+      {
+        "type": "blockItem",
+        "condition": {
+          "type": "not",
+          "condition": {
+            "type": "noItem"
+          }
+        }
+      }
+    ]
+  },
+  {
+    "type": "basicBlock",
+    "name": "Stripped Pine Wood",
+    "itemType": null,
+    "model": {
+      "modelPath": "cube",
+      "texturePaths": [
+        "blocks.ltdb/wood.png",
+        "blocks.ltdb/wood.png",
+        "blocks.ltdb/wood.png",
+        "blocks.ltdb/wood.png",
+        "blocks.ltdb/wood.png",
+        "blocks.ltdb/wood.png"
       ]
     },
     "mapColor": "0xFF786C72",
     "hardness": 1.4,
     "groupNames": [
       "Wood"
+    ],
+    "drops": [
+      {
+        "type": "specificItem",
+        "condition": {
+          "type": "allways"
+        },
+        "itemType": "Pine Wood"
+      }
     ]
   },
   {

+ 6 - 35
Windows Version/data/recipies/basicItems.json

@@ -275,7 +275,9 @@
         "input": {
           "filter": {
             "type": "groups",
-            "groupNames": [ "Wood" ]
+            "groupNames": [
+              "Wood"
+            ]
           }
         },
         "x": 0,
@@ -290,39 +292,6 @@
     "type": "shaped",
     "width": 1
   },
-  {
-    "group": "inventory",
-    "height": 2,
-    "inputs": [
-      {
-        "input": {
-          "filter": {
-            "type": "type",
-            "itemType": "Flint"
-          }
-        },
-        "x": 0,
-        "y": 0
-      },
-      {
-        "input": {
-          "filter": {
-            "type": "type",
-            "itemType": "Pine Wood"
-          }
-        },
-        "x": 0,
-        "y": 1
-      }
-    ],
-    "outputs": [
-      {
-        "itemType": "Resin"
-      }
-    ],
-    "type": "shaped",
-    "width": 1
-  },
   {
     "group": "inventory",
     "height": 2,
@@ -364,7 +333,9 @@
         "input": {
           "filter": {
             "type": "groups",
-            "groupNames": [ "Leaves" ]
+            "groupNames": [
+              "Leaves"
+            ]
           }
         },
         "x": 0,