use of com.tom.storagemod.tile.TileEntityCraftingTerminal in project Polymorph by TheIllusiveC4.
the class TomsStorageModule method selectRecipe.
@Override
public boolean selectRecipe(BlockEntity tileEntity, Recipe<?> recipe) {
if (recipe instanceof CraftingRecipe && tileEntity instanceof TileEntityCraftingTerminal) {
AccessorTileEntityCraftingTerminal te = (AccessorTileEntityCraftingTerminal) tileEntity;
te.setCurrentRecipe((CraftingRecipe) recipe);
te.callOnCraftingMatrixChanged();
return true;
}
return false;
}
use of com.tom.storagemod.tile.TileEntityCraftingTerminal in project Polymorph by TheIllusiveC4.
the class TomsStorageModule method setup.
@Override
public void setup() {
IPolymorphCommon commonApi = PolymorphApi.common();
commonApi.registerTileEntity2RecipeData(pTileEntity -> {
if (pTileEntity instanceof TileEntityCraftingTerminal) {
return new CraftingTerminalRecipeData((TileEntityCraftingTerminal) pTileEntity);
}
return null;
});
commonApi.registerContainer2TileEntity(pContainer -> {
if (pContainer instanceof ContainerCraftingTerminal) {
return ((AccessorContainerStorageTerminal) pContainer).getTe();
}
return null;
});
}
Aggregations