Beispiel #1
0
 @Override
 public List<String> getWailaBody(
     ItemStack itemStack,
     List<String> currenttip,
     IWailaDataAccessor accessor,
     IWailaConfigHandler config) {
   if (itemStack != null) {
     SignInfo info = ItemMoarSign.getInfo(itemStack.getTagCompound());
     if (info != null) {
       String modName =
           info.activateTag.equals(SignRegistry.ALWAYS_ACTIVE_TAG)
               ? "Minecraft"
               : info.activateTag;
       if (config.getConfig("showOrigin"))
         currenttip.add(
             Localization.ITEM.SIGN.MATERIAL_ORIGIN.translate(
                 Colors.WHITE + Utils.getModName(modName)));
       if (config.getConfig("showMaterial"))
         currenttip.add(
             Localization.ITEM.SIGN.MATERIAL.translate(Colors.WHITE + info.material.materialName));
     } else {
       currenttip.add(Colors.RED + Localization.ITEM.SIGN.ERROR.translate());
     }
   }
   return currenttip;
 }
 @Override
 public List<String> getWailaBody(
     ItemStack itemStack,
     List<String> currenttip,
     IWailaDataAccessor accessor,
     IWailaConfigHandler config) {
   if (accessor.getTileEntity() instanceof CastingTableLogic
       && config.getConfig("tcon.table", true)) {
     CastingTableLogic te = (CastingTableLogic) accessor.getTileEntity();
     if (te.getStackInSlot(1) != null) {
       currenttip.add("Contains: " + te.getStackInSlot(1).getDisplayName());
     }
     if (te.getFluid() != null) {
       currenttip.add("Fluid: " + WailaRegistrar.fluidNameHelper(te.getFluid()));
       currenttip.add("Amount: " + te.getFluidAmount() + "/" + te.getCapacity());
     }
   }
   return currenttip;
 }