use of logisticspipes.renderer.LogisticsPipeItemRenderer in project LogisticsPipes by RS485.
the class LogisticsPipes method createPipe.
protected Item createPipe(Class<? extends CoreUnroutedPipe> clas, String descr, Side side) {
final ItemLogisticsPipe res = LogisticsBlockGenericPipe.registerPipe(clas);
res.setCreativeTab(LogisticsPipes.LPCreativeTab);
res.setUnlocalizedName(clas.getSimpleName());
final CoreUnroutedPipe pipe = LogisticsBlockGenericPipe.createPipe(res);
if (pipe instanceof CoreRoutedPipe) {
postInitRun.add(() -> res.setPipeIconIndex(((CoreRoutedPipe) pipe).getTextureType(ForgeDirection.UNKNOWN).normal, ((CoreRoutedPipe) pipe).getTextureType(ForgeDirection.UNKNOWN).newTexture));
}
if (side.isClient()) {
if (pipe instanceof PipeBlockRequestTable) {
MinecraftForgeClient.registerItemRenderer(res, new LogisticsPipeItemRenderer(true));
} else {
MinecraftForgeClient.registerItemRenderer(res, MainProxy.proxy.getPipeItemRenderer());
}
}
if (clas != PipeItemsBasicLogistics.class && CoreRoutedPipe.class.isAssignableFrom(clas)) {
if (clas != PipeFluidBasic.class && PipeFluidBasic.class.isAssignableFrom(clas)) {
registerShapelessResetRecipe(res, 0, LogisticsPipes.LogisticsFluidBasicPipe, 0);
} else {
registerShapelessResetRecipe(res, 0, LogisticsPipes.LogisticsBasicPipe, 0);
}
}
return res;
}
Aggregations