-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathcustom_map_example.zs
119 lines (110 loc) · 4.01 KB
/
custom_map_example.zs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
// No special #loader, just use the default crafttweaker one.
import mods.gregtech.multiblock.Builder;
import mods.gregtech.multiblock.FactoryBlockPattern;
import mods.gregtech.multiblock.RelativeDirection;
import mods.gregtech.multiblock.IBlockMatcher;
import mods.gregtech.multiblock.MultiblockAbility;
import mods.gregtech.multiblock.FactoryMultiblockShapeInfo;
import mods.gregtech.multiblock.IBlockInfo;
import mods.gregtech.MetaTileEntities;
import mods.gregtech.recipe.FactoryRecipeMap;
import crafttweaker.world.IFacing;
var loc = "magic_miner";
var meta = 2001; // Choose something that won't conflict. You'll get a warning in the crafttweaker logs if something goes wrong.
var magic_miner = Builder.start(loc, meta)
.withPattern(
FactoryBlockPattern.start(RelativeDirection.RIGHT, RelativeDirection.DOWN, RelativeDirection.FRONT)
.aisle(
"CCC",
"CCC",
"CSC")
.aisle(
"CCC",
"C C",
"CCC")
.aisle(
"CCC",
"CCC",
"CCC")
.whereOr("C",
<metastate:gregtech:metal_casing:3>,
IBlockMatcher.abilityPartPredicate(
MultiblockAbility.INPUT_ENERGY,
MultiblockAbility.IMPORT_ITEMS,
MultiblockAbility.IMPORT_FLUIDS,
MultiblockAbility.EXPORT_ITEMS
))
.where("S", IBlockMatcher.controller(loc))
.where(" ", IBlockMatcher.ANY)
.build())
.addDesign(
FactoryMultiblockShapeInfo.start()
.aisle(
"ICC",
"CCC",
"ECC")
.aisle(
"SCC",
"C C",
"CCC")
.aisle(
"OCC",
"CCC",
"FCC")
.where("C", <metastate:gregtech:metal_casing:3>)
.where("S", IBlockInfo.controller(loc))
.where("I", MetaTileEntities.ITEM_IMPORT_BUS[0], IFacing.west())
.where("F", MetaTileEntities.FLUID_IMPORT_HATCH[0], IFacing.west())
.where("O", MetaTileEntities.ITEM_EXPORT_BUS[0], IFacing.west())
.where("E", MetaTileEntities.ENERGY_INPUT_HATCH[2], IFacing.west())
.where(" ", IBlockInfo.EMPTY)
.build())
.clearTooltips(true)
.withRecipeMap(
FactoryRecipeMap.start(loc)
.minInputs(1)
.maxInputs(1)
.minOutputs(3)
.maxOutputs(27)
.maxFluidInputs(1)
.build())
.buildAndRegister();
// These are best specified in .lang files, since these may not work properly.
game.setLocalization(
"multiblocktweaker.machine.magic_miner.name",
"Magic Miner"
);
game.setLocalization(
"multiblocktweaker.multiblock.magic_miner.description",
"The Magic Miner is a multiblock that mines ores from nothing."
);
game.setLocalization(
"recipemap.magic_miner.name",
"Magic Miner"
);
// Don't forget to add a recipe!
recipes.addShaped(
<gregtech:machine:2001>,
[
[<gregtech:cable:71>, <gregtech:meta_item_2:32487>, <gregtech:cable:71>],
[<gregtech:meta_item_2:32487>, <gregtech:metal_casing:3>, <gregtech:meta_item_2:32487>],
[<gregtech:cable:71>, <gregtech:meta_item_2:32487>, <gregtech:cable:71>]
]
);
<multiblock:multiblocktweaker:magic_miner> // The Bracket Handler can also be used to refer to it
.recipeMap
.recipeBuilder()
.duration(500)
.EUt(500)
.inputs(<minecraft:chest>)
.fluidInputs(<liquid:water> * 8000)
.outputs(<gregtech:ore_cassiterite_0:3> * 64,
<gregtech:ore_redstone_0> * 64,
<gregtech:ore_nickel_0> * 64,
<gregtech:ore_rutile_0> * 64,
<gregtech:ore_rutile_0> * 64,
<gregtech:ore_uraninite_0:3> * 64,
<gregtech:ore_galena_0> * 64,
<gregtech:ore_galena_0> * 64,
<gregtech:ore_salt_0> * 64)
.buildAndRegister();