DaedalusGame / Modular-Diversity

A Modular Machinery Addon
MIT License
4 stars 14 forks source link

Laser Biometrics Update #21

Closed DJJBanx closed 6 years ago

DJJBanx commented 6 years ago

Added Biome Detector that takes a number or array of numbers that represents the biome id required to for the crafting to occur. It is simply a check to see if the biome id that the tileentity is existing in matches the biome id specified in the script. The value io-type can be either input or output but when a BiomeIngredient is created it is automatically overridden to be input. Example: { "type": "biome", "io-type": "input", "biome": [ 35, 1 ] } This script will make it so a specific recipe can only occur the biomes Savannah (35) and Plains (1). When the block is right clicked, it displays the name of the current biome that the block is in. (In the future I hope to make that display configurable).

Added Daylight Detector that takes an array of two values between 0 and 23999 that represents the time of day. This allows for recipes to specify a time of day that a crafting recipe to occur. Example: { "type": "daylight", "io-type": "input", "daylight": [ 12000, 0 ] } This script forces the player to only be allowed to craft the recipe between 6:00 pm (sun setting) and 6:00 am (sun rising), thus creating an instance where crafting can only take place at night. Similarly to the Biome Detector, this block will display the current time when right clicked by the player.

Added Weather Detector that takes a value between 0 and 2 that represents what weather is required for a crafting recipe to take place. 0 is clear, 1 is raining, and 2 is thundering. Something to note is that while the minecraft world transitions from clear (0) to thunder (2), it goes through a brief phase of raining (1). Example: { "type": "weather", "io-type": "input", "weather": 2 } This script only allows crafting recipes to take place during a thunderstorm. When this block is right clicked it displays current weather. Also this block's texture changes depending on the weather. (Something I hope to add to all blocks but is a low priority)

Added Mekanism Laser Acceptor. This block is an addon to the mekanism laser api and it accepts a certain amount of energy in joules that MUST be inputted via mekanism lasers. This value is represented by mlenergy (mekanism laser energy) and requires a double value (idk why you would ever use decimals) that specifies how much energy is needed. Example: { "type": "mlenergy", "io-type": "input", "mlenergy": 20000000 } This script specifies that a recipe requires 20 MJ from mekanism lasers to craft. This ingredient uses resource tokens and does not consume as it recieves energy. The tile entity has an internal buffer of 5 GJ and once it has enough energy, the energy is instantly consumed and the recipe processes. The block does not keep energy when broken. When right clicked, the blocks displays the amount of energy stored within it.

Also added: changes to the widget.png changes to the layout class of each JEI Component (foreground drawing is not a method that can be overriden) addition of textures JEI support for all recipes

Here are my test scripts: Biometric Generator is the machine, and the other files are the recipes machinery.zip

The wiki will be updated shortly with all the changes.