Pull creating and dumping products out into their own methods (#6047)

This commit is contained in:
Matthew Peng
2021-09-26 08:31:21 -04:00
committed by GitHub
parent d79ab3ec3e
commit 94d9ca4727
@@ -127,6 +127,13 @@ public class GenericCrafter extends Block{
} }
if(progress >= 1f){ if(progress >= 1f){
craft();
}
dumpOutputs();
}
public void craft(){
consume(); consume();
if(outputItems != null){ if(outputItems != null){
@@ -145,6 +152,7 @@ public class GenericCrafter extends Block{
progress %= 1f; progress %= 1f;
} }
public void dumpOutputs(){
if(outputItems != null && timer(timerDump, dumpTime / timeScale)){ if(outputItems != null && timer(timerDump, dumpTime / timeScale)){
for(ItemStack output : outputItems){ for(ItemStack output : outputItems){
dump(output.item); dump(output.item);