honey recipes, bugfixes and recipe cleanups #7
4 changed files with 115 additions and 29 deletions
23
src/kubejs/server/remove_by_output.txt
Normal file
23
src/kubejs/server/remove_by_output.txt
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
angelring:itemring
|
||||||
|
angelring:itemdiamondring
|
||||||
|
alchemistry:chemical_combiner
|
||||||
|
alchemistry:chemical_dissolver
|
||||||
|
compactmachines:wall
|
||||||
|
compactmachines:machine_tiny
|
||||||
|
compactmachines:machine_small
|
||||||
|
compactmachines:machine_normal
|
||||||
|
compactmachines:machine_large
|
||||||
|
compactmachines:machine_giant
|
||||||
|
compactmachines:machine_large
|
||||||
|
compactmachines:machine_maximum
|
||||||
|
compactmachines:personal_shrinking_device
|
||||||
|
ring_of_teleport:ring_of_teleport
|
||||||
|
ring_of_enderchest:ring_of_enderchest
|
||||||
|
ring_of_repair:ring_of_repair
|
||||||
|
ring_of_blink:ring_of_blink
|
||||||
|
crossroads:gear_facade_glass
|
||||||
|
assemblylinemachines:simple_grinder
|
||||||
|
assemblylinemachines:steel_blade_piece
|
||||||
|
assemblylinemachines:steel_fluid_tank
|
||||||
|
enderrift:rift
|
||||||
|
enderrift:rift_or
|
|
@ -12,8 +12,8 @@ class Main {
|
||||||
Settings.logSkippedRecipes = false;
|
Settings.logSkippedRecipes = false;
|
||||||
Settings.logErroringRecipes = true;
|
Settings.logErroringRecipes = true;
|
||||||
|
|
||||||
Events.onEvent(EventType.RecipesEventType, Recipes.onEvent);
|
|
||||||
Events.onEvent(EventType.ItemTagsEventType, Tags.onItemTagsEvent);
|
Events.onEvent(EventType.ItemTagsEventType, Tags.onItemTagsEvent);
|
||||||
Events.onEvent(EventType.BlockTagsEventType, Tags.onBlockTagsEvent);
|
Events.onEvent(EventType.BlockTagsEventType, Tags.onBlockTagsEvent);
|
||||||
|
Events.onEvent(EventType.RecipesEventType, Recipes.onEvent);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,44 +4,29 @@ import kubejs.events.server.RecipesEvent;
|
||||||
import kubejs.Item;
|
import kubejs.Item;
|
||||||
|
|
||||||
class Recipes {
|
class Recipes {
|
||||||
|
static final removeByOutput = Util.getFile("remove_by_output.txt");
|
||||||
|
|
||||||
// @formatter:off
|
// @formatter:off
|
||||||
static final removeByOutput = [
|
static final honeyLiquids = [
|
||||||
"angelring:itemring",
|
"resourcefulbees:honey",
|
||||||
"angelring:itemdiamondring",
|
"productivebees:honey",
|
||||||
"alchemistry:chemical_combiner",
|
"create:honey"
|
||||||
"alchemistry:chemical_dissolver",
|
|
||||||
"compactmachines:wall",
|
|
||||||
"compactmachines:machine_tiny",
|
|
||||||
"compactmachines:machine_small",
|
|
||||||
"compactmachines:machine_normal",
|
|
||||||
"compactmachines:machine_large",
|
|
||||||
"compactmachines:machine_giant",
|
|
||||||
"compactmachines:machine_large",
|
|
||||||
"compactmachines:machine_maximum",
|
|
||||||
"compactmachines:personal_shrinking_device",
|
|
||||||
"ring_of_teleport:ring_of_teleport",
|
|
||||||
"ring_of_enderchest:ring_of_enderchest",
|
|
||||||
"ring_of_repair:ring_of_repair",
|
|
||||||
"ring_of_blink:ring_of_blink",
|
|
||||||
"crossroads:gear_facade_glass",
|
|
||||||
"assemblylinemachines:simple_grinder",
|
|
||||||
"assemblylinemachines:steel_blade_piece",
|
|
||||||
"assemblylinemachines:steel_fluid_tank",
|
|
||||||
"enderrift:rift",
|
|
||||||
"enderrift:rift_orb"
|
|
||||||
];
|
];
|
||||||
// @formatter:on
|
// @formatter:on
|
||||||
public static function onEvent(event:RecipesEvent) {
|
public static function onEvent(event:RecipesEvent) {
|
||||||
for (i in removeByOutput) {
|
removeRecipes(event);
|
||||||
event.remove({output: i});
|
|
||||||
}
|
|
||||||
|
|
||||||
shapedRecipes(event);
|
shapedRecipes(event);
|
||||||
shapelessRecipes(event);
|
shapelessRecipes(event);
|
||||||
customRecipes(event);
|
customRecipes(event);
|
||||||
replaceInputs(event);
|
replaceInputs(event);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static function removeRecipes(event:RecipesEvent) {
|
||||||
|
for (i in removeByOutput) {
|
||||||
|
event.remove({output: i});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
static function shapedRecipes(event:RecipesEvent) {
|
static function shapedRecipes(event:RecipesEvent) {
|
||||||
event.shaped("alchemistry:chemical_combiner", ["SSS", "ACA", "SSS"], {
|
event.shaped("alchemistry:chemical_combiner", ["SSS", "ACA", "SSS"], {
|
||||||
S: "#forge:ingots/steel",
|
S: "#forge:ingots/steel",
|
||||||
|
@ -194,6 +179,64 @@ class Recipes {
|
||||||
]
|
]
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// Resourceful bees honey to bottle in fluid encapsulator
|
||||||
|
event.custom(untyped {
|
||||||
|
type: "thermal:bottler",
|
||||||
|
ingredient: [
|
||||||
|
{
|
||||||
|
item: "minecraft:glass_bottle"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
fluid: "resourcefulbees:honey",
|
||||||
|
amount: 250
|
||||||
|
}
|
||||||
|
],
|
||||||
|
result: [
|
||||||
|
{
|
||||||
|
item: "minecraft:honey_bottle"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
});
|
||||||
|
|
||||||
|
// Honey to sugar
|
||||||
|
for (honey in honeyLiquids) {
|
||||||
|
event.custom({
|
||||||
|
type: "silents_mechanisms:solidifying",
|
||||||
|
ingredient: {
|
||||||
|
fluid: honey,
|
||||||
|
amount: 250
|
||||||
|
},
|
||||||
|
process_time: 100,
|
||||||
|
result: {
|
||||||
|
item: "minecraft:sugar",
|
||||||
|
count: 3
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// Overwrite glitchy ice and obsidian recipies in solidifier
|
||||||
|
// @formatter:off
|
||||||
|
for (
|
||||||
|
inOutId in [
|
||||||
|
["minecraft:water", "minecraft:ice", "silents_mechanisms:solidifying/obsidian"],
|
||||||
|
["minecraft:lava", "minecraft:obsidian", "silents_mechanisms:solidifying/ice"]
|
||||||
|
]
|
||||||
|
)
|
||||||
|
// @formatter:on
|
||||||
|
{
|
||||||
|
event.custom({
|
||||||
|
type: "silents_mechanisms:solidifying",
|
||||||
|
process_time: 800,
|
||||||
|
ingredient: {
|
||||||
|
fluid: inOutId[0]
|
||||||
|
},
|
||||||
|
result: {
|
||||||
|
item: inOutId[1],
|
||||||
|
count: 1
|
||||||
|
}
|
||||||
|
}).id(inOutId[2]);
|
||||||
|
}
|
||||||
|
|
||||||
// Ore processing fixes
|
// Ore processing fixes
|
||||||
var enrichmentChamberOreRecipes = [
|
var enrichmentChamberOreRecipes = [
|
||||||
["forge:ores/nickel", "thermal:nickel_dust"],
|
["forge:ores/nickel", "thermal:nickel_dust"],
|
||||||
|
|
20
src/kubejs/server/src/Util.hx
Normal file
20
src/kubejs/server/src/Util.hx
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
package;
|
||||||
|
|
||||||
|
import haxe.macro.Expr.ExprOf;
|
||||||
|
|
||||||
|
class Util {
|
||||||
|
/**
|
||||||
|
* Reads a file into an array of lines at compile time
|
||||||
|
* Removes empty lines
|
||||||
|
**/
|
||||||
|
public static macro function getFile(path:String):ExprOf<Array<String>> {
|
||||||
|
// @formatter:off
|
||||||
|
return macro $a{
|
||||||
|
sys.io.File.getContent(path)
|
||||||
|
.split("\n")
|
||||||
|
.filter(line -> line.length >= 1)
|
||||||
|
.map(line -> macro $v{line})
|
||||||
|
};
|
||||||
|
// @formatter:on
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in a new issue