use of com.direwolf20.buildinggadgets.common.items.modes.ExchangingModes in project BuildingGadgets by Direwolf20-MC.
the class GadgetExchanger method appendHoverText.
@Override
public void appendHoverText(ItemStack stack, @Nullable Level world, List<Component> tooltip, TooltipFlag flag) {
super.appendHoverText(stack, world, tooltip, flag);
addEnergyInformation(tooltip, stack);
ExchangingModes mode = getToolMode(stack);
tooltip.add(TooltipTranslation.GADGET_MODE.componentTranslation((mode == ExchangingModes.SURFACE && getConnectedArea(stack) ? TooltipTranslation.GADGET_CONNECTED.format(new TranslatableComponent(mode.getTranslationKey()).getString()) : new TranslatableComponent(mode.getTranslationKey()))).setStyle(Styles.AQUA));
tooltip.add(TooltipTranslation.GADGET_BLOCK.componentTranslation(LangUtil.getFormattedBlockName(getToolBlock(stack).getState())).setStyle(Styles.DK_GREEN));
int range = getToolRange(stack);
tooltip.add(TooltipTranslation.GADGET_RANGE.componentTranslation(range, getRangeInBlocks(range, mode.getMode())).setStyle(Styles.LT_PURPLE));
tooltip.add(TooltipTranslation.GADGET_FUZZY.componentTranslation(String.valueOf(getFuzzy(stack))).setStyle(Styles.GOLD));
addInformationRayTraceFluid(tooltip, stack);
}
use of com.direwolf20.buildinggadgets.common.items.modes.ExchangingModes in project BuildingGadgets-Fabric by St-ructure-Mods.
the class GadgetExchanger method setMode.
public void setMode(ItemStack heldItem, int modeInt) {
// Called when we specify a mode with the radial menu
ExchangingModes mode = ExchangingModes.values()[modeInt];
setToolMode(heldItem, mode);
}
use of com.direwolf20.buildinggadgets.common.items.modes.ExchangingModes in project BuildingGadgets-Fabric by St-ructure-Mods.
the class GadgetExchanger method appendHoverText.
@Override
public void appendHoverText(ItemStack stack, @Nullable Level world, List<Component> tooltip, TooltipFlag flag) {
super.appendHoverText(stack, world, tooltip, flag);
addEnergyInformation(tooltip, stack);
ExchangingModes mode = getToolMode(stack);
tooltip.add(TooltipTranslation.GADGET_MODE.componentTranslation((mode == ExchangingModes.SURFACE && getConnectedArea(stack) ? TooltipTranslation.GADGET_CONNECTED.format(new TranslatableComponent(mode.getTranslationKey()).getString()) : new TranslatableComponent(mode.getTranslationKey()))).setStyle(Styles.AQUA));
tooltip.add(TooltipTranslation.GADGET_BLOCK.componentTranslation(LangUtil.getFormattedBlockName(getToolBlock(stack).getState())).setStyle(Styles.DK_GREEN));
int range = getToolRange(stack);
tooltip.add(TooltipTranslation.GADGET_RANGE.componentTranslation(range, getRangeInBlocks(range, mode.getMode())).setStyle(Styles.LT_PURPLE));
tooltip.add(TooltipTranslation.GADGET_FUZZY.componentTranslation(String.valueOf(getFuzzy(stack))).setStyle(Styles.GOLD));
addInformationRayTraceFluid(tooltip, stack);
}
use of com.direwolf20.buildinggadgets.common.items.modes.ExchangingModes in project BuildingGadgets by Direwolf20-MC.
the class GadgetExchanger method setMode.
public void setMode(ItemStack heldItem, int modeInt) {
// Called when we specify a mode with the radial menu
ExchangingModes mode = ExchangingModes.values()[modeInt];
setToolMode(heldItem, mode);
}
Aggregations