benbenlaw / caveopolis

0 stars 0 forks source link

Dragon infuser rf capacity to small to keep up with the rf drain of using it to infuse a item, even if you are generating sufficient power #26

Closed Snowgnome closed 1 year ago

RobertLSnead commented 2 years ago

setting the infuser script to .requireEnergy(amount) instead of .requireEnergyPerTick(amount) can help prevent this issue, I have changed mine for each item to 1M RF as this is what is required to make the item, also the machine can keep up with power just fine with no issues.

RobertLSnead commented 2 years ago

this is explained here: Custom Machines

RobertLSnead commented 2 years ago

cm_dragon_infuser.js

`// priority: 100

//Dragon Infuser

function dragonInfuser(time, itemIn, itemOut, power){

onEvent('recipes', e => {
   e.recipes.custommachinery.custom_machine("caveopolis:dragon_infuser", time)
        .requireItem(itemIn)
        .produceItem(itemOut)
        .requireEnergy(power)
        .requireStructure([["a   a","     ","  m  ","     ","a   a"],["a   a","     ","  b  ","     ","a   a"]], {"a":"minecraft:obsidian", "b":"minecraft:dragon_egg"})
        .requireEntities(4, 5, 'minecraft:end_crystal', true)
        .resetOnError()
    })
}

dragonInfuser(300, 'minecraft:wither_skeleton_skull', 'minecraft:dragon_head', 1000000)

function dragonInfuser2(time, itemIn, itemOut, power){

onEvent('recipes', e => {
   e.recipes.custommachinery.custom_machine("caveopolis:dragon_infuser", time)
        .requireItem(itemIn)
        .produceItem(itemOut)
        .requireEnergy(power)
        .requireStructure([["a   a","     ","  m  ","     ","a   a"],["a   a","     ","  b  ","     ","a   a"]], {"a":"minecraft:obsidian", "b":"minecraft:dragon_head"})
        .requireEntities(4, 5, 'minecraft:end_crystal', true)
        .resetOnError()
    })
}

dragonInfuser2(300, 'minecraft:glass_bottle', 'minecraft:dragon_breath', 1000000)

//Block Recipe

onEvent('recipes', e => { e.shaped(Item.of('custommachinery:custom_machine_item', '{machine:"caveopolis:dragon_infuser"}'), ['DOD','OSO', 'DOD'], {O: 'minecraft:shulker_shell', S: Item.of('custommachinery:custom_machine_item', '{machine:"caveopolis:bedrock_infuser"}'), D: 'minecraft:chorus_fruit'}).id('caveopolis:dragon_infuser') })

`

RobertLSnead commented 2 years ago

I also noticed that the machines are not able to receive power while processing which in turn prevents the machine from able to process more than one item per ... seconds, the fix above addresses this issue but you can also use a redstone timer for ... seconds to get it to work without the script can be annoying, could be a bug with the mod itself... or the power is consumed faster than any power input can provide in game, anyways hope this helps

RobertLSnead commented 2 years ago

did I mention that using the script fix also prevents the item from being consumed, as it will not process if there is not enough power :D

humanitea commented 1 year ago

Swapped Dragon Infuser and Everything Combiner over to Amount vs PerTick. Thanks for the very detailed report!