-
Notifications
You must be signed in to change notification settings - Fork 40
JsonCrops
IC2C in 1.12.2 adds now Json based crops. That means you can write a json file in the config folder to make your own IC2C crop. This system is resource based so you can use your own resource packs with that.
How to install a custom crop: in the IC2Config Folder you just create a file called: customCrops.json and put the data into there. 1 File thats all.
Here is my example Scrip that I have used to test the system. (It uses dirt to make diamonds ofc)
{
"crops":
[
{
"name": "exampleCrop",
"owner": "testScript",
"id": "exampleCrop",
"discovered": "Speiger",
"dropchance": 1.0,
"optimalstage": 4,
"totalstages": 4,
"attributes": ["Flower", "Green", "Wheat"],
"props":
{
"tier": 1,
"chemistry": 1,
"consumable": 1,
"defensive": 1,
"colorful": 1,
"weed": 1
},
"display":
{
"name": "minecraft:diamond"
},
"defaultStage":
{
"points": 100,
"redstoneStrength": 0,
"lightLevel": 0
},
"stages":
[
{
"index": 1,
"parentIndex": -1,
"textures": ["minecraft:blocks/brick"]
},
{
"index": 2,
"textures": ["minecraft:blocks/stone"]
},
{
"index": 3,
"textures": ["minecraft:blocks/dirt"]
},
{
"index": 4,
"textures": ["minecraft:items/diamond"],
"drop":
{
"name": "minecraft:diamond",
"count": 10
}
}
]
}
],
"seeds":
[
{
"owner": "testScript",
"id": "exampleCrop",
"seed":
{
"name": "minecraft:dirt",
"count": 1
},
"growthStep": 1,
"statGrowth": 1,
"statGain": 1,
"statResistance": 1
}
]
}
Now lets describe all the parameters that exist, in ofcourse another example script.
{
"crops": //Array that will have all the crops stored. Has to be an array.
[
{
"name": "TestCrop", //The Unlocalized Crop Name for the Item or any display Option
"owner": "custompack", //Somewhat like a resourceLocation the "key"/"owner" of the object
"id": "CropID" //the Unique ID of the Crop related to the owner. (ResourceLocation like)
"discovered": "Speiger", //Who created the Crop. Just a way to a display thing.
"dropchance": 0.95, //A modifier to the existing drop chance, double number. Normal Drop Chance is 1.0 * 0.95 ^ cropTier.
"optimalstage": 4, //What the Optimal Harvest stage is for harvesters to know when to perfectly harvest.
"totalstages": 4, //How many crop stages the parser has to expect. If the result does not match what you provide then it throws errors.
"attributes": ["Flower", "Green", "Weed"], //The Attributes that are used for CropBreeding. Look into the IC2C wiki what that does. (Visible to player and keep it below 5)
"props": //The Properties of a Crop this is mostly for breeding. Read Crop Documentation what each these values mean.
{
"tier": 1,
"chemistry": 1,
"consumable": 1,
"defensive": 1,
"colorful": 1,
"weed": 1
},
"display": //The Display Item that is used for the SeedBags. [Optional]
{
"name": "minecraft:diamond", //Minecraft Item registry name of the item use.
"meta": 0, //Metadata of the Item
"nbt": '' //NBTData of the item. Same how commands would use the NBTData.
},
"defaultStage": //Default stage that you can create to dump values into that will be reused. Textures won't be loaded here. [Optiona]
{
"points": 2500, //How many points it takes to grow. This can be either a lot or very little because the amount of points per growth tick can be dynamic based on the crops state. [Optional, Default: 0]
"redstoneStrength": 0, //If the crop should emit a redstone signal and which level. [Optional, Default: 0]
"lightLevel": 0, //If the crop should emit light and which strenght [Optional, Default: 0]
"growthMods": [1.0, 1.0, 1.0], //Defines how much [Nutrients, Humidity, Air](in that order) of a effect should have at the growth speed. (Float Modifier Numbers) [Optional, Default: 1.0, 1.0, 1.0]
"resetStage": 1, //The Stage that the crop should default to when harvested. 1 is the first growth stage. Its between 1-maxGrowth stage. [Optional, Default: 1],
"drop"://The Drop of the crop at the stage. Like the "Display" but with the amount of items being controlled. [Optional]
{
"name": "minecraft:diamond",
"count": 10,
"meta": 0,
"nbt": ''
},
"seedDrop"://Option to enable Seed Mode on the crop and what the drop should be. [Optional]
{
"name": "minecraft:diamond",
"count": 10,
"meta": 0,
"nbt": ''
},
"requirements": //Requirements that the crop must fulfill before it can grow. [Optional]
{
"light": [15], //How the light level should be, 1 Number = exact value, 2 Numbers is: "lightLevel >= Number[0] && lightLevel <= Number[1]", Any bigger amounts are exact compares to a or check. [Optional]
"humidity": [15], //Like light level with the values but with the overall crop humidity. (Biome Humidity, Soil Humidity, Crop Hydration) [Optional],
"air": [15], // Like the light level with the values but with the overall air quality. (How many blocks are around and how high the crop is) [Optional],
"nutrient": [15], //Like light level with the values but with the overall nutrients. (Biome Nutrients, Soil Nutrients, Crop Fertilization) [Optional],
"block": //If the Block is below the crop, up to 3 blocks below [Optional]
[
{
"ore": false, //If it is a oredict entry
"name": "minecraft:id" //The BlockRegisry name or the Oredictionary entryname.
}
]
}
},
"stages": //The stages that the crop has.
[
{
"index": 1, //Index of the stage. Starts at 1 and ends at the number of "totalstages". so 1-4 in this case.
"parentIndex": -1, //Index of the parent definition to reduce text to write. Will only grab values that are not defined in this stage. Textures will be never grabbed, if stage is not present wont load anything. [Optional, Defaults to -1 (or DefaultStage)]
"texture": ["minecraft:dirt"], //Texture of the crop, you can add as many as you want. Each texture will be added as a seperate layer. Seethrough textures are supported, each texture goes more and more behind. Textures will be auto loaded.
"points": 2500 //Any variable that was described in the DefaultStage can be also put into here same conditions apply.
}
]
}
],
"seeds": //Items that can plant ic2c crops on IC2C crop sticks. Supports any existing IC2Crop.
[
{
"owner": "cropOwner", //The "owner" variable of the crop you want to place.
"id": "cropID", //The "id" of the crop you want to place.
"seed": //The Item that you want to use. Like display but no NBTSupport, but stacksize support.
[
"name": "minecraft:diamond",
"count": 10,
"meta": 0,
],
"growthStep": 2, //Which growth step the crop should be planted in. (Keep it in the range of the crop itself.
"statGrowth": 1, //The Growth stat the crop should have (Between 1-31)
"statGain": 1, //The Gain stat the crop should have (Between 1-31)
"statResistance": 1//The Resistance stat the crop should have (Between 1-31)
}
]
}
It is helpful to know how IC2Crops work to make perfect use of this feature.
Wiki text is available under CC BY-NC-SA 3.0 unless otherwise noted.
1.19.x ResourcePacks
1.19.x DataPacks
Generator
Geothermal Generator
Water Mill
Solar Panel
Wind Mill
Nuclear Reactor
Steam Reactor
Thermal Generator
Basic Steam Turbine
Solar Turbine
Liquid Fuel Generator
Slag Generator
Wave Generator
Ocean Generator
Fuel Boiler
Flux Generators
Storage Units
Transformers
Cables
Charge Pads
Luminators
Stone Macerator
Iron Furnace
Wood Gasificator
Industrial Worktable
Macerator
Electric Furnace
Compressor
Extractor
Canning Machine
Recycler
Sawmill
Miner
Magnetizer
Crop Analyzer
Crop-Matron
Electrolyzer
Pump
Sound Beacon
Electric Wood Gasificator
Rare Earth Extractor
Crop Library
Machine Buffer
Machine Tank
Rotary Macerator
Induction Furnace
Singularity Compressor
Centrifugal Extractor
Vacuum Canner
Compacting Recycler
Charged Electrolyzer
Reactor Planner
Crop Harvester
Ore Probe
Tesla Coil
Overclocked Pump
Ranged Pump
Electric Enchanter
Mass Fabricator
Teleporter
Terraformer
Uranium Enricher
Reactor Planner
Nuclear Reactor
Steam Reactor
Uranium Enricher
Reactor Components
Treetap
Bronze Tools
Wrench
Insulation Cutter
CF Sprayer
Dynamite Remote
Frequency Transmitter
EU Reader
Machine Tool
Thermometer
Tool Box
Cells
Painters
Scanners
TFBP
Batteries & Energy Packs
Mining Drill
Diamond Drill
Chainsaw
Electric Hoe
Electric Treetap
Electric Wrench
Precision Wrench
Nano Saber
Mining Laser
Mowing Tool
Electric CF Sprayer
Obscurator
Portable Teleporter
Debug Item (Admin)
Bronze Armor
Composite Armor
Hazmat Suit
CF Backpack
Solar Helmets
Static Boots
NightVision Goggles
Jetpacks
Nano Suit
Quantum Suit
Shields
Machine Upgrades
Inventory Upgrades
Chargepad Modules
Upgrade Kits
JsonCrops
Overgrowth Fertilizer
Cropnalyzer
Terrawart
Advanced Comparator
Scaffolds
Iron Fence
Rubber & Resign Sheet
Crafting Components
Construction Foam (CF)
Reinforced Blocks
Explosives
Boats
Coins
UU-Matter