use of de.ellpeck.actuallyadditions.mod.tile.TileEntityCompost in project TUMAT by canitzp.
the class ActuallyAdditions method renderTileEntity.
@Override
public TooltipComponent renderTileEntity(WorldClient world, EntityPlayerSP player, TileEntity tileEntity, EnumFacing side, TooltipComponent component, boolean shouldCalculate) {
if (tileEntity instanceof TileEntityCompost) {
InfoUtil.syncTileEntity(tileEntity, shouldCalculate && InfoUtil.getItemStackInSlot(tileEntity, side, 0) != ItemStack.EMPTY, "ConversionTime");
int time = ((TileEntityCompost) tileEntity).conversionTime;
component.add(new TextComponent(TextFormatting.AQUA.toString() + time + "/3000 Ticks"), TooltipComponent.Priority.HIGH);
} else if (tileEntity instanceof TileEntityDisplayStand) {
ItemStack stack = InfoUtil.getItemStackInSlot(tileEntity, side, 0);
if (stack != ItemStack.EMPTY) {
component.add(new TextComponent(TextFormatting.AQUA.toString() + stack.getDisplayName()), TooltipComponent.Priority.HIGH);
}
} else if (tileEntity instanceof TileEntitySmileyCloud) {
if (!Objects.equals(((TileEntitySmileyCloud) tileEntity).name, ""))
component.add(new TextComponent(TextFormatting.AQUA.toString() + ((TileEntitySmileyCloud) tileEntity).name), TooltipComponent.Priority.HIGH);
}
return component;
}
Aggregations