Furnace Engine API
AlemSnyder opened this issue ยท 3 comments
This line of code makes it impossible for anther mod (create additions) to add a create compatible furnace that runs at anything other then the base speed.
That line like could be replaced by something like:
float modifier = 0;
if (state.getBlock() == Blocks.FURNACE || state.getBlock() == Blocks.SMOKER) {modifier = 1;}
if (state.getBlock() == Blocks.BLAST_FURNACE) {modifier = 2;}
if (state has a getModifier() method){modifier = state.getModifier();}
Alternatively an interface.
I'm totally not saying this to get a cheaper blast furnace, I want to uuh uuum, ues the... Crude Burner, yes that one.
This issue has been marked as stale because it has been inactive for 3 weeks. It will be closed if it remains inactive for another 3 weeks.
Just use an interface with the needed methods.
ICreateFurnaceBlock.java:
public interface ICreateFurnaceBlock {
int getModifier();
}
FurnaceEngineTileEntity.java:
float modifier;
block furnaceBlock = state.getBlock();
if (furnaceBlock instanceof ICreateFurnaceBlock) {
modifier = furnaceBlock.getModifier();
else if (furnaceBlock == Blocks.BLAST_FURNACE) {
modifier = 2;
} else {
modifier = 1;
}