Kaynağa Gözat

add cotton plant to world generation config

Kolja Strohm 1 ay önce
ebeveyn
işleme
ebfaba12be

+ 0 - 28
Windows Version/data/blocks/blockTypes.json

@@ -873,34 +873,6 @@
       "Wood"
     ]
   },
-  {
-    "type": "grass",
-    "name": "Grass",
-    "itemType": null,
-    "model": {
-      "modelPath": "grass",
-      "texturePaths": [
-        "blocks.ltdb/grass.png"
-      ],
-      "transparent": true
-    },
-    "damagableByHand": true,
-    "transparent": true,
-    "passable": true,
-    "speedModifier": 0.5,
-    "mapColor": "0x5076C011",
-    "drops": [
-      {
-        "type": "specificItem",
-        "condition": {
-          "type": "chance",
-          "chance": 0.1
-        },
-        "amount": 1,
-        "itemType": "Wheat Seeds"
-      }
-    ]
-  },
   {
     "type": "basicBlock",
     "name": "Farmland",

+ 36 - 2
Windows Version/data/blocks/plants.json

@@ -1,4 +1,32 @@
 [
+    {
+        "type": "grass",
+        "name": "Grass",
+        "itemType": null,
+        "model": {
+            "modelPath": "grass",
+            "texturePaths": [
+                "blocks.ltdb/grass.png"
+            ],
+            "transparent": true
+        },
+        "damagableByHand": true,
+        "transparent": true,
+        "passable": true,
+        "speedModifier": 0.5,
+        "mapColor": "0x5076C011",
+        "drops": [
+            {
+                "type": "specificItem",
+                "condition": {
+                    "type": "chance",
+                    "chance": 0.1
+                },
+                "amount": 1,
+                "itemType": "Wheat Seeds"
+            }
+        ]
+    },
     {
         "type": "growingPlant",
         "name": "WheatSeeds",
@@ -14,6 +42,7 @@
         "mapColor": "0x5076C011",
         "hardness": 0.1,
         "ticksNeeded": 18000,
+        "transparent": true,
         "states": [
             {
                 "percentage": 0.2,
@@ -65,9 +94,11 @@
             "modelPath": "grass",
             "texturePaths": [
                 "plants.ltdb/wheat.png"
-            ]
+            ],
+            "transparent": true
         },
         "mapColor": "0x90A8C011",
+        "transparent": true,
         "drops": [
             {
                 "type": "specificItem",
@@ -122,6 +153,7 @@
         "mapColor": "0x909090",
         "hardness": 0.1,
         "ticksNeeded": 18000,
+        "transparent": true,
         "states": [
             {
                 "percentage": 0,
@@ -151,9 +183,11 @@
             "modelPath": "plants.m3/cotton",
             "texturePaths": [
                 "plants.ltdb/cotton.png"
-            ]
+            ],
+            "transparent": true
         },
         "mapColor": "0xB0B0B0",
+        "transparent": true,
         "drops": [
             {
                 "type": "specificItem",

+ 51 - 0
Windows Version/data/generator/overworld.json

@@ -503,6 +503,57 @@
                                 ]
                             }
                         }
+                    },
+                    {
+                        "plantBlock": "Cotton Plant",
+                        "condition": {
+                            "blockType": "Dirt",
+                            "type": "blockType",
+                            "x": {
+                                "type": "variable",
+                                "name": "x"
+                            },
+                            "y": {
+                                "type": "variable",
+                                "name": "y"
+                            },
+                            "z": {
+                                "type": "operator",
+                                "operator": "-",
+                                "values": [
+                                    {
+                                        "type": "variable",
+                                        "name": "z"
+                                    },
+                                    {
+                                        "type": "constant",
+                                        "value": 1
+                                    }
+                                ]
+                            }
+                        },
+                        "locations": [
+                            "SURFACE"
+                        ],
+                        "plantHeight": 1,
+                        "threshold": 0.995,
+                        "noise": {
+                            "type": "random",
+                            "seed": {
+                                "type": "operator",
+                                "operator": "+",
+                                "values": [
+                                    {
+                                        "type": "variable",
+                                        "name": "dimensionSeed"
+                                    },
+                                    {
+                                        "type": "constant",
+                                        "value": 56
+                                    }
+                                ]
+                            }
+                        }
                     }
                 ]
             }