use of com.tom.storagemod.gui.ContainerCraftingTerminal in project Polymorph by TheIllusiveC4.
the class TomsStorageModule method clientSetup.
@Override
public void clientSetup() {
IPolymorphClient clientApi = PolymorphApi.client();
clientApi.registerWidget(containerScreen -> {
if (containerScreen.getMenu() instanceof ContainerCraftingTerminal) {
return clientApi.findCraftingResultSlot(containerScreen).map(slot -> new CraftingTerminalRecipesWidget(containerScreen, slot)).orElse(null);
}
return null;
});
}
use of com.tom.storagemod.gui.ContainerCraftingTerminal 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