your current location:首页 > news>MBD's support for CRT (add formula) [CRT] CRAFTTWEAKER MINECRAFT Game

MBD's support for CRT (add formula) [CRT] CRAFTTWEAKER MINECRAFT Game

2024-12-09 18:31:55|Myriagame |source:minecraft skins

This tutorial is set by the author's setting without permission.

Recently developing a 1.12.2 magic reform integration package, so I checked MBD's CRT support part of the source code and generated this tutorial.

Written in the front: This series of tutorials will not be updated at one time, and I will update a little bit after studying.

The code source of this tutorial is integrated in the package, and some formats borrow the samples of the original author.

First declare that the script is MBD script

#loader multiblocked 

Import the following package in turn:

 Import Mods.multiblocked.mbdregship;

Import Mods.multiblocked.definition.controllerDefinition;

Import Mods.multiblocked.definition.comPonentDefinition;

Import Mods.multiblock.Rcipe.recipemap;

Then indicate the machine to change the formula:

 VAR DEFINITION As ComponentDefinition = mbdregship.getDefinition ("GTRB: Isomerization_platform");

var ebf = definition as Controllerdefinition;

Among them, the getdefinition method is filled in the registration name of the target machine.ControllerDefinition is the controller of the machine.

Then, you can use recipemap's Start () method to make a pleasant magic change.

 ebf.recipemap.start ()

.Duration (300)

.Inputfluids (*80)

.InputITEMS ())

.OutputITEMS ()

.Buildandregister ();

In the Start () method, a recipeMap Copy (a recipebuilder) is returned.The method that can be used is as follows:

 InputItems (itemsingRedient ... inputs)#object input

OutputITEMS (Itemstack ... Outputs)#object output

InputITEMS (Float CHANCE, ItemtingRedient ... Inputs)#Item input, but the probability is consumed.

OutputITEMS (Float CHANCE, Itemstack ... Outputs)#probability output

Inputfluids (FLUIDSTACK ... Inputs)#fluid input

Outputfluids (FluidStack ... Outputs)#fluid output

InputFLUIDS (Float CHANCE, FLUIDSTACK ... Inputs)#probability consumption input Outputfluids (Float CHANCE, FLUIDSTACK ... Outputs)#Probes output output

InputMana (INT Mana)#i i i Mana

OutputMana (Int Mana)#

InputMana (Float CHANCE, Int Mana)#probability, no longer repeated parts later

OutputMana (Float CHANCE, Int Mana)

Inputaspects (AspectStack ... Inputs)#mysterious element

Outputaspects (AspectStack ... Outputs)

Inputaspects (Float CHANCE, AspectStack ... Inputs)

Outputaspects (Float CHANCE, Aspectstack ... Outputs)

Inputheat (double heat) #Mek calories

Outputheat (double head)

InputHeat (Float Chance, Double Heat)

Outputheat (Float CHANCE, Double Heat)

Inputgas (Gasstack ... Inputs) #Mek gas

Outputgas (Gasstack ... Outputs)

Inputgas (Float Chat, Gasstack ... Inputs)

Outputgas (Float Chance, Gasstack ... Outputs)

InputPartICles (ParticleStack ... Inputs)#i

OutputparticleS (particlestack ... outputs)

InputParticleS (Float CHANCE, ParticleStack ... Inputs)

OutputparticleS (Float CHANCE, PARTICLESTACK ... Outputs)

Inputeu (int Eu) #Gteu

Outputeu (int EU)

Inputu (Float Chance, Long EU)

OUTPUTEU (Float Chance, Long EU)

Input (double le)#i i

Outputle (double le)

Inputle (Float CHANCE, Double Le)

Outputle (Float Chance, Double Le)

INPUTHOTAIR (int HOTAIR)#i i i i i i i i

InputHotair (Float CHANCE, int HOTAIR)

Outputhotair (Foat CHANCE, int HOTAIR)

Inputaura (int Aura)#Natural aura

Outputaura (int aura)

Inputaura (Float CHANCE, Int Aura)

Outputaura (Float CHANCE, Int Aura)

InputGP (Float GP)#More GP of more practical device 2

OUTPUTGP (Float GP)

InputGP (Float Chance, Float GP)

OutputGP (Float Chat, Float GP)

Inputemc (Long EMC)#equivalent exchange EMC

Outputemc (long emc)

Outputemc (long emc)

UTPUTEMC (Float CHANCE, Long EMC)

INPUTLP (Int LP)#i i i i

Outputlp (int LP)

Inputlp (Float Chance, Int LP)

OUTPUTLP (Float Chance, Int LP)

Inputember (Double Ember)#烬 i energy

Outputember (double ember)

Inputember (Float CHANCE, Double Ember)

Outputember (Float CHANCE, Double Ember)

INPUTIMPETUS (INT Impetus)#mysterious and advanced metaphysical energy

OutputImpetus (int Impetus)

OutputImpetus (Float CHANCE, Long Impetus)

Inputfe (INT FORGEENERGY) #RF input

Outputfe (int forgenergy)

Inputfe (Float CHANCE, INT FORGEENERGY)

Outputfe (Float Chance, int FORGEENERGY)

Pertick (Boolean Pertick)#p p p p p p p p p

Data (String Key, Idata Object) Text (ITEXTCOMPONENT Text)

Finally, don't forget to add:

 Buildandregister (); 

Full code:

#loader multiblockd

Import Mods.multiblocked.mbdregship;

Import Mods.multiblocked.definition.controllerDefinition;

Import Mods.multiblocked.definition.comPonentDefinition;

Import Mods.multiblock.Rcipe.recipemap;

Import crafttweaker.text.itextComponent;

Var Definition as ComponentDefinition = mbdregistry.GetDefinition ("GTRB: Isomerization_platform");

var ebf = definition as Controllerdefinition;

eBF.RecipeMap.start ()

.Duration (300)

.Inputfluids (*80)

.InputITEMS ())

.OutputITEMS ()

.Buildandregister ();

Look at the effect:

End!

The reason for the success may be because there is no recipemap for the machine at the blueprint workbench.