create-the-brass-oncerto/kubejs/server_scripts/add/metallurgy/hydropress_has_bug.txt

481 lines
16 KiB
Plaintext
Raw Permalink Normal View History

2025-04-11 17:07:29 +08:00
ServerEvents.recipes(event => {
//
const HydropressStructure =
{
"type": "custommachinery:structure",
"pattern": [
[
"A A",
" ",
" ",
" ",
"A A",
" BBB ",
" BGB ",
" BBB "
],
[
"AAAAA",
"A A",
"A A",
"A A",
"AAAAA",
" CDC ",
" HIH ",
" "
],
[
" ",
" ",
" ",
" ",
" ",
" ",
" JmJ ",
" P "
],
[
" ",
" ",
" ",
" ",
" ",
" F ",
" L ",
" "
],
[
" ",
" ",
" ",
" ",
" ",
" F ",
" MIM ",
" M "
],
[
" ",
" ",
" ",
" ",
" ",
" F ",
" NIN ",
" N "
],
[
" ",
" ",
" ",
" ",
" ",
" F ",
" NIN ",
" N "
],
[
" ",
" ",
" ",
" ",
" ",
" ",
" HIH ",
" H "
],
[
" ",
" ",
" ",
" ",
" ",
" ",
" L ",
" "
],
[
" ",
" ",
" ",
" ",
" ",
" ",
" O ",
" "
]
],
"keys":
{
"G": "design_decor:brass_boiler_large",
"C": "design_decor:industrial_gear_large",
"M": "design_decor:diagonal_metal_support",
"N": "create:metal_girder",
"J": "create:mechanical_pump",
"I": "design_decor:industrial_iron_boiler",
"P": "#dut_create:brass_funnel",
"O": "design_decor:andesite_floodlight",
"D": "create:gearbox",
"F": "create:gantry_shaft",
"H": "design_decor:diagonal_girder",
"A": "create:copper_casing",
"B": "design_decor:brass_boiler_structure",
"L": "design_decor:brass_boiler",
"K": "kubejs:hydropress"
},
"jei": true
}
const HydropressCommon1 = {
"type": "custommachinery:block",
"mode": "input",
"action": "replace_destroy",
"amount": 1,
"pos": [0, 0, -1, 0, 0, -1],
"filter": ["create:gearshift"],
"whitelist":true,
"block": "create_connected:inverted_gearshift[axis=y]"
}
const HydropressCommon2 = {
"type": "custommachinery:block",
"mode": "output",
"action": "replace_destroy",
"amount": 1,
"filter": ["create_connected:inverted_gearshift"],
"whitelist":true,
"pos": [0, 0, -1, 0, 0, -1],
"block": "create:gearshift[axis=y]"
}
const HydropressCommon3 = {
"type": "custommachinery:fluid",
"mode": "input",
"tank": "fluid_tank",
"fluid": "kubejs:hydrofluid",
"amount": 500
}
const HydropressCommon0 = {
"type": "custommachinery:command",
"phase": "ending",
"command": "/playsound create:mechanical_press_activation block @a",
"log": false,
"permissionlevel": 5
}
function hydropressInput(block, mode) {
return ({
"type": "custommachinery:block",
"mode": mode,
"action": "replace_destroy",
"amount": 9,
"pos": [-1, -1, -3, 1, -1, -5],
"filter": block,
"whitelist": true,
"block": "minecraft:air"
})
}
function checkBlock(pos, block, amount, mode) {
return (
{
"type": "custommachinery:block",
"mode": mode,
"action": "check",
"amount": amount,
"pos": pos,
"filter": block,
"whitelist": true
}
)
}
function checkPiston(mode, posmodify) {
return (
checkBlock([-1, 3 - posmodify, -3, 1, 3 - posmodify, -5], ['create:railway_casing'], 9, mode),
checkBlock([0, 4 - posmodify, -3, 0, 5 - posmodify, -3], ["create:andisite_alloy_block"], 2, mode),
checkBlock([0, 4 - posmodify, -5, 0, 5 - posmodify, -5], ["create:andisite_alloy_block"], 2, mode),
checkBlock([1, 4 - posmodify, -4, 1, 5 - posmodify, -4], ["create:andisite_alloy_block"], 2, mode),
checkBlock([-1, 4 - posmodify, -4, -1, 5 - posmodify, -4], ["create:andisite_alloy_block"], 2, mode),
checkBlock([0, 4 - posmodify, -4, 0, 10 - posmodify, -4], ['design_decor:andesite_boiler'], 7, mode)
)
}
function PlatePress(input, output, count) {
event.custom({
"type": "custommachinery:custom_machine",
"machine": "dut:hydropress",
"time": 20,
"error": true,
"requirements": [
HydropressCommon0,
HydropressCommon1,
HydropressCommon3,
HydropressStructure,
hydropressInput([input], "input"),
{
"type": "custommachinery:block",
"mode": "input",
"action": "place",
"amount": 27,
"pos": [-1, 0, -3, 1, 2, -5],
"block": "minecraft:air"
},
{
"type": "custommachinery:item",
"mode": "output",
"item": output,
"amount": count
}
],
"jei": [
HydropressCommon1,
HydropressCommon3,
HydropressStructure,
hydropressInput([input], "input"),
{
"type": "custommachinery:item",
"mode": "input",
"item": input,
"amount": 9
},
{
"type": "custommachinery:item",
"mode": "output",
"item": output,
"amount": count
}
]
}).id("dut_create:hydropress/" + output.split(':')[1])
}
function FluidPress(input, output) {
event.custom({
"type": "custommachinery:custom_machine",
"machine": "dut:hydropress",
"time": 20,
"priority": 0,
"error": true,
"requirements": [
HydropressCommon0,
HydropressCommon1,
HydropressCommon3,
HydropressStructure,
hydropressInput([input+"[level=0]"], "input"),
{
"type": "custommachinery:block",
"mode": "input",
"action": "place",
"amount": 27,
"pos": [-1, 0, -3, 1, 2, -5],
"block": "minecraft:air"
},
{
"type": "custommachinery:item",
"mode": "output",
"item": output,
"amount": 100
}
],
"jei": [
HydropressCommon1,
HydropressCommon3,
HydropressStructure,
hydropressInput([input], "input"),
{
"type": "custommachinery:fluid",
"mode": "input",
"tank": "fluid_input",
"fluid": input,
"amount": 9000
},
{
"type": "custommachinery:item",
"mode": "output",
"item": output,
"amount": 100
}
]
}).id("dut_create:hydropress/" + output.split(':')[1])
}
event.custom({
"type": "custommachinery:custom_machine",
"machine": "dut:hydropress",
"time": 10,
"error": true,
"priority": 10,
"requirements": [
checkPiston("input", 0),
HydropressStructure,
{
"type": "custommachinery:fluid",
"mode": "input",
"fluid": "minecraft:water",
"amount": 1000
},
{
"type": "custommachinery:fluid",
"mode": "output",
"tank": "fluid_tank",
"fluid": "kubejs:hydrofluid",
"amount": 500
},
{
"type": "custommachinery:command",
"phase": "ending",
"command": "/playsound create:steam block @a ~ ~ ~ 0.5",
"log": false,
"permissionlevel": 5
},
{
"type": "custommachinery:fluid",
"mode": "output",
"tank": "sim_fluid",
"fluid": "kubejs:hydrofluid",
"amount": 500
}
],
"jei": [
checkPiston("input", 0),
HydropressStructure,
{
"type": "custommachinery:fluid",
"mode": "input",
"tank": "fluid_input",
"fluid": "minecraft:water",
"amount": 1000
},
{
"type": "custommachinery:fluid",
"mode": "output",
"tank": "sim_fluid",
"fluid": "kubejs:hydrofluid",
"amount": 500
}
]
}).id("dut_create:hydropress/get_fluid")
event.custom({
"type": "custommachinery:custom_machine",
"machine": "dut:hydropress",
"time": 5,
"error": true,
"priority": 10,
"hidden": true,
"requirements": [
HydropressStructure,
checkPiston("output", 3),
{
"type": "custommachinery:fluid",
"mode": "input",
"tank": "sim_fluid",
"fluid": "kubejs:hydrofluid",
"amount": 500
},
{
"type": "custommachinery:fluid",
"mode": "output",
"tank": "sim_fluid1",
"fluid": "kubejs:hydrofluid",
"amount": 500
}
]
}).id("dut_create:hydropress/reset")
event.custom({
"type": "custommachinery:custom_machine",
"machine": "dut:hydropress",
"time": 5,
"error": true,
"priority": 10,
"hidden": true,
"requirements": [
HydropressStructure,
HydropressCommon2,
{
"type": "custommachinery:fluid",
"mode": "input",
"tank": "sim_fluid1",
"fluid": "kubejs:hydrofluid",
"amount": 500
}
]
}).id("dut_create:hydropress/reset1")
FluidPress("kubejs:aluminum", "kubejs:aluminum_ingot")
PlatePress("create:industrial_iron_block", "kubejs:industrial_iron_sheet",81)
FluidPress("kubejs:industrial_iron", "kubejs:industrial_iron_ingot")
PlatePress("create:brass_block", "create:brass_sheet",81)
FluidPress("kubejs:brass", "create:brass_ingot")
PlatePress("create:zinc_block", "createaddition:zinc_sheet",81)
FluidPress("kubejs:zinc", "create:zinc_ingot")
PlatePress("minecraft:iron_block", "create:iron_sheet",81)
FluidPress("kubejs:iron", "minecraft:iron_ingot")
PlatePress("minecraft:gold_block", "create:golden_sheet",81)
FluidPress("kubejs:gold", "minecraft:gold_ingot")
PlatePress("minecraft:copper_block", "create:copper_sheet",81)
FluidPress("kubejs:copper", "minecraft:copper_ingot")
PlatePress("ad_astra:steel_block", "ad_astra:steel_plate",81)
FluidPress("createbigcannons:molten_steel", "ad_astra:steel_ingot")
FluidPress("createbigcannons:molten_cast_iron", "createbigcannons:cast_iron_ingot")
FluidPress("createbigcannons:molten_nethersteel", "createbigcannons:nethersteel_ingot")
PlatePress("ad_astra:desh_block", "ad_astra:desh_plate",81)
FluidPress("kubejs:desh", "ad_astra:desh_ingot")
PlatePress("kubejs:tin_block", "kubejs:tin_sheet",81)
FluidPress("kubejs:tin", "kubejs:tin_ingot")
PlatePress("minecraft:netherite_block", "vintageimprovements:netherite_sheet",81)
PlatePress("minecraft:coal_block", "minecraft:diamond",1)
})
BlueprintBuilderRecipe(
[
BlueprintBuilderBarrelIn(1),
BlueprintBuilderFliter("kubejs:hydropress"),
BlueprintBuilderDisk("kubejs:tin_hard_disk", 512),
BlueprintBuilderItemIn("create:andesite_alloy_block", 32),
BlueprintBuilderItemIn("create:brass_block", 12),
BlueprintBuilderItemIn("create:industrial_iron_block", 8),
BlueprintBuilderItemIn("minecraft:copper_block", 6),
BlueprintBuilderItemIn("kubejs:electric_gear", 8),
BlueprintBuilderItemIn("create:precision_mechanism", 1),
BlueprintBuilderBarrelOut('{BlockEntityTag:{Items:[{Count:8b,Slot:0b,id:"create:andesite_alloy_block"},{Count:1b,Slot:1b,id:"design_decor:andesite_floodlight"},{Count:1b,Slot:2b,id:"create:brass_funnel"},{Count:2b,Slot:3b,id:"design_decor:brass_boiler"},{Count:6b,Slot:4b,id:"create:metal_girder"},{Count:3b,Slot:5b,id:"design_decor:diagonal_metal_support"},{Count:1b,Slot:6b,id:"design_decor:brass_boiler_large"},{Count:1b,Slot:7b,id:"create:gearshift"},{Count:2b,Slot:8b,id:"create:mechanical_pump"},{Count:1b,Slot:9b,id:"create:gearbox"},{Count:5b,Slot:10b,id:"design_decor:diagonal_girder"},{Count:2b,Slot:11b,id:"design_decor:industrial_gear_large"},{Count:5b,Slot:12b,id:"design_decor:industrial_iron_boiler"},{Count:9b,Slot:13b,id:"create:railway_casing"},{Count:4b,Slot:14b,id:"create:gantry_shaft"},{Count:7b,Slot:15b,id:"design_decor:andesite_boiler"},{Count:1b,Slot:16b,id:"create:gantry_carriage"},{Count:20b,Slot:17b,id:"create:copper_casing"}],id:"minecraft:barrel"}}')
], "hydropress", 120)
//液压机核心
event.custom({
"type": "minecraft:crafting_shaped",
"category": "misc",
"key": {
"A": { "tag": "forge:plates/brass" },
"B": { "item": "create:steam_engine" },
"C": { "item": "kubejs:electric_gear" },
"D": { "item": "storagedrawers:compacting_drawers_3" },
"E": { "item": "create:precision_mechanism" }
},
"pattern": [
"AAA",
"CDC",
"EBE"
],
"result": { "item": "kubejs:hydropress" },
"show_notification": true
}).id("dut_create:hydropress")
//液压机转向器
event.custom({
"type": "minecraft:crafting_shaped",
"category": "misc",
"key": {
"A": { "tag": "forge:plates/copper" },
"B": { "item": "create:gearshift" },
"C": { "item": "kubejs:electric_gear" },
"E": { "item": "create:precision_mechanism" }
},
"pattern": [
"AAA",
"CBC",
"EBE"
],
"result": { "item": "kubejs:hydropress_turner" },
"show_notification": true
}).id("dut_create:hydropress_turner")