diff --git a/src/main/java/techreborn/blockentity/machine/tier3/IndustrialCentrifugeBlockEntity.java b/src/main/java/techreborn/blockentity/machine/tier3/IndustrialCentrifugeBlockEntity.java index 6ef363965..e0baaffb4 100644 --- a/src/main/java/techreborn/blockentity/machine/tier3/IndustrialCentrifugeBlockEntity.java +++ b/src/main/java/techreborn/blockentity/machine/tier3/IndustrialCentrifugeBlockEntity.java @@ -25,16 +25,12 @@ package techreborn.blockentity.machine.tier3; import net.minecraft.block.BlockState; -import net.minecraft.client.gui.screen.Screen; import net.minecraft.entity.player.PlayerEntity; -import net.minecraft.text.LiteralText; -import net.minecraft.text.Text; import net.minecraft.util.math.BlockPos; -import reborncore.api.IListInfoProvider; -import reborncore.common.screen.BuiltScreenHandlerProvider; -import reborncore.common.screen.BuiltScreenHandler; import reborncore.client.screen.builder.ScreenHandlerBuilder; import reborncore.common.recipes.RecipeCrafter; +import reborncore.common.screen.BuiltScreenHandler; +import reborncore.common.screen.BuiltScreenHandlerProvider; import reborncore.common.util.ItemUtils; import reborncore.common.util.RebornInventory; import techreborn.blockentity.machine.GenericMachineBlockEntity; @@ -44,10 +40,7 @@ import techreborn.init.TRBlockEntities; import techreborn.init.TRContent; import techreborn.items.DynamicCellItem; -import java.util.List; - -public class IndustrialCentrifugeBlockEntity extends GenericMachineBlockEntity implements BuiltScreenHandlerProvider, IListInfoProvider { - +public class IndustrialCentrifugeBlockEntity extends GenericMachineBlockEntity implements BuiltScreenHandlerProvider { public IndustrialCentrifugeBlockEntity(BlockPos pos, BlockState state) { super(TRBlockEntities.INDUSTRIAL_CENTRIFUGE, pos, state, "IndustrialCentrifuge", TechRebornConfig.industrialCentrifugeMaxInput, TechRebornConfig.industrialCentrifugeMaxEnergy, TRContent.Machine.INDUSTRIAL_CENTRIFUGE.block, 6); final int[] inputs = new int[]{0, 1}; @@ -67,13 +60,4 @@ public class IndustrialCentrifugeBlockEntity extends GenericMachineBlockEntity i .outputSlot(4, 120, 44).outputSlot(5, 101, 63).energySlot(6, 8, 72).syncEnergyValue() .syncCrafterValue().addInventory().create(this, syncID); } - - // IListInfoProvider - @Override - public void addInfo(final List info, final boolean isReal, boolean hasData) { - super.addInfo(info, isReal, hasData); - if (Screen.hasControlDown()) { - info.add(new LiteralText("Round and round it goes")); - } - } } \ No newline at end of file diff --git a/src/main/java/techreborn/blocks/generator/BlockFusionCoil.java b/src/main/java/techreborn/blocks/generator/BlockFusionCoil.java index c80549a94..1cb94793f 100644 --- a/src/main/java/techreborn/blocks/generator/BlockFusionCoil.java +++ b/src/main/java/techreborn/blocks/generator/BlockFusionCoil.java @@ -24,8 +24,6 @@ package techreborn.blocks.generator; -import net.fabricmc.api.EnvType; -import net.fabricmc.api.Environment; import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings; import net.minecraft.block.Block; import net.minecraft.block.BlockState; @@ -81,7 +79,6 @@ public class BlockFusionCoil extends Block { return ActionResult.PASS; } - @Environment(EnvType.CLIENT) @Override public void appendTooltip(ItemStack stack, @Nullable BlockView worldIn, List tooltip, TooltipContext flagIn) { super.appendTooltip(stack, worldIn, tooltip, flagIn); diff --git a/src/main/java/techreborn/blocks/machine/tier0/IronAlloyFurnaceBlock.java b/src/main/java/techreborn/blocks/machine/tier0/IronAlloyFurnaceBlock.java index 96b5adfae..20bd59a65 100644 --- a/src/main/java/techreborn/blocks/machine/tier0/IronAlloyFurnaceBlock.java +++ b/src/main/java/techreborn/blocks/machine/tier0/IronAlloyFurnaceBlock.java @@ -24,8 +24,6 @@ package techreborn.blocks.machine.tier0; -import net.fabricmc.api.EnvType; -import net.fabricmc.api.Environment; import net.minecraft.block.BlockState; import net.minecraft.particle.ParticleTypes; import net.minecraft.sound.SoundCategory; @@ -33,9 +31,9 @@ import net.minecraft.sound.SoundEvents; import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.Direction; import net.minecraft.world.World; +import techreborn.blockentity.GuiType; import techreborn.blockentity.machine.iron.IronAlloyFurnaceBlockEntity; import techreborn.blocks.GenericMachineBlock; -import techreborn.blockentity.GuiType; import java.util.Random; @@ -46,7 +44,6 @@ public class IronAlloyFurnaceBlock extends GenericMachineBlock { } // Block - @Environment(EnvType.CLIENT) public void randomDisplayTick(BlockState stateIn, World worldIn, BlockPos pos, Random rand) { if (!isActive(stateIn)) { return; diff --git a/src/main/java/techreborn/blocks/machine/tier0/IronFurnaceBlock.java b/src/main/java/techreborn/blocks/machine/tier0/IronFurnaceBlock.java index a325e5ddf..5fd838273 100644 --- a/src/main/java/techreborn/blocks/machine/tier0/IronFurnaceBlock.java +++ b/src/main/java/techreborn/blocks/machine/tier0/IronFurnaceBlock.java @@ -24,8 +24,6 @@ package techreborn.blocks.machine.tier0; -import net.fabricmc.api.EnvType; -import net.fabricmc.api.Environment; import net.minecraft.block.BlockState; import net.minecraft.particle.ParticleTypes; import net.minecraft.sound.SoundCategory; @@ -33,9 +31,9 @@ import net.minecraft.sound.SoundEvents; import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.Direction; import net.minecraft.world.World; +import techreborn.blockentity.GuiType; import techreborn.blockentity.machine.iron.IronFurnaceBlockEntity; import techreborn.blocks.GenericMachineBlock; -import techreborn.blockentity.GuiType; import java.util.Random; @@ -46,7 +44,6 @@ public class IronFurnaceBlock extends GenericMachineBlock { } // Block - @Environment(EnvType.CLIENT) public void randomDisplayTick(BlockState stateIn, World worldIn, BlockPos pos, Random rand) { if (!isActive(stateIn)) { return; diff --git a/src/main/java/techreborn/client/events/StackToolTipHandler.java b/src/main/java/techreborn/client/events/StackToolTipHandler.java index 7f3f56b5d..074bd986c 100644 --- a/src/main/java/techreborn/client/events/StackToolTipHandler.java +++ b/src/main/java/techreborn/client/events/StackToolTipHandler.java @@ -33,6 +33,7 @@ import net.minecraft.block.Block; import net.minecraft.client.MinecraftClient; import net.minecraft.client.gui.screen.Screen; import net.minecraft.client.item.TooltipContext; +import net.minecraft.client.resource.language.I18n; import net.minecraft.fluid.FlowableFluid; import net.minecraft.fluid.Fluid; import net.minecraft.fluid.Fluids; @@ -103,6 +104,18 @@ public class StackToolTipHandler implements ItemTooltipCallback { ToolTipAssistUtils.addInfo("unplaceable_fluid", tooltipLines, false); } + if (item == TRContent.Upgrades.SUPERCONDUCTOR.item && Screen.hasControlDown()) { + tooltipLines.add(new LiteralText(Formatting.GOLD + "Blame obstinate_3 for this")); + } + + if (item == TRContent.OMNI_TOOL) { + tooltipLines.add(new LiteralText(Formatting.YELLOW + I18n.translate("techreborn.tooltip.omnitool_motto"))); + } + + if (block == TRContent.Machine.INDUSTRIAL_CENTRIFUGE.block && Screen.hasControlDown()) { + tooltipLines.add(new LiteralText("Round and round it goes")); + } + if (UNOBTAINABLE_ORES.contains(block)) { tooltipLines.add(new TranslatableText("techreborn.tooltip.unobtainable").formatted(Formatting.AQUA)); } else if (OreDepthSyncHandler.getOreDepthMap().containsKey(block)) { diff --git a/src/main/java/techreborn/items/BatteryItem.java b/src/main/java/techreborn/items/BatteryItem.java index c2f40120c..81bb82d17 100644 --- a/src/main/java/techreborn/items/BatteryItem.java +++ b/src/main/java/techreborn/items/BatteryItem.java @@ -24,8 +24,6 @@ package techreborn.items; -import net.fabricmc.api.EnvType; -import net.fabricmc.api.Environment; import net.minecraft.client.item.TooltipContext; import net.minecraft.entity.Entity; import net.minecraft.entity.player.PlayerEntity; @@ -39,7 +37,6 @@ import net.minecraft.util.TypedActionResult; import net.minecraft.util.collection.DefaultedList; import net.minecraft.world.World; import org.jetbrains.annotations.Nullable; -import reborncore.common.powerSystem.PowerSystem; import reborncore.common.powerSystem.RcEnergyItem; import reborncore.common.powerSystem.RcEnergyTier; import reborncore.common.util.ItemUtils; @@ -85,7 +82,6 @@ public class BatteryItem extends Item implements RcEnergyItem { } } - @Environment(EnvType.CLIENT) @Override public void appendTooltip(ItemStack stack, @Nullable World worldIn, List tooltip, TooltipContext flagIn) { ItemUtils.buildActiveTooltip(stack, tooltip); diff --git a/src/main/java/techreborn/items/FrequencyTransmitterItem.java b/src/main/java/techreborn/items/FrequencyTransmitterItem.java index 8a13e5f07..1c74b67d6 100644 --- a/src/main/java/techreborn/items/FrequencyTransmitterItem.java +++ b/src/main/java/techreborn/items/FrequencyTransmitterItem.java @@ -24,8 +24,6 @@ package techreborn.items; -import net.fabricmc.api.EnvType; -import net.fabricmc.api.Environment; import net.minecraft.client.item.TooltipContext; import net.minecraft.entity.player.PlayerEntity; import net.minecraft.item.Item; @@ -114,7 +112,6 @@ public class FrequencyTransmitterItem extends Item { return new TypedActionResult<>(ActionResult.SUCCESS, stack); } - @Environment(EnvType.CLIENT) @Override public void appendTooltip(ItemStack stack, @Nullable World worldIn, List tooltip, TooltipContext flagIn) { getPos(stack) diff --git a/src/main/java/techreborn/items/UpgradeItem.java b/src/main/java/techreborn/items/UpgradeItem.java index dd977238b..93b94d61c 100644 --- a/src/main/java/techreborn/items/UpgradeItem.java +++ b/src/main/java/techreborn/items/UpgradeItem.java @@ -24,25 +24,14 @@ package techreborn.items; -import net.fabricmc.api.EnvType; -import net.fabricmc.api.Environment; -import net.minecraft.client.gui.screen.Screen; -import net.minecraft.client.item.TooltipContext; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; -import net.minecraft.text.LiteralText; -import net.minecraft.text.Text; -import net.minecraft.util.Formatting; -import net.minecraft.world.World; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; import reborncore.api.blockentity.IUpgrade; import reborncore.common.blockentity.MachineBaseBlockEntity; import reborncore.common.recipes.IUpgradeHandler; import techreborn.TechReborn; -import techreborn.init.TRContent; - -import java.util.List; public class UpgradeItem extends Item implements IUpgrade { @@ -64,14 +53,4 @@ public class UpgradeItem extends Item implements IUpgrade { ItemStack stack) { behavior.process(blockEntity, handler, stack); } - - @Environment(EnvType.CLIENT) - @Override - public void appendTooltip(ItemStack stack, @Nullable World world, List tooltip, TooltipContext context) { - if (stack.getItem() == TRContent.Upgrades.SUPERCONDUCTOR.item) { - if (Screen.hasControlDown()) { - tooltip.add(new LiteralText(Formatting.GOLD + "Blame obstinate_3 for this")); - } - } - } } \ No newline at end of file diff --git a/src/main/java/techreborn/items/armor/BatpackItem.java b/src/main/java/techreborn/items/armor/BatpackItem.java index 60bbaf1b4..fc3db1992 100644 --- a/src/main/java/techreborn/items/armor/BatpackItem.java +++ b/src/main/java/techreborn/items/armor/BatpackItem.java @@ -24,8 +24,6 @@ package techreborn.items.armor; -import net.fabricmc.api.EnvType; -import net.fabricmc.api.Environment; import net.minecraft.entity.Entity; import net.minecraft.entity.EquipmentSlot; import net.minecraft.entity.player.PlayerEntity; @@ -35,7 +33,6 @@ import net.minecraft.item.ItemGroup; import net.minecraft.item.ItemStack; import net.minecraft.util.collection.DefaultedList; import net.minecraft.world.World; -import reborncore.common.powerSystem.PowerSystem; import reborncore.common.powerSystem.RcEnergyItem; import reborncore.common.powerSystem.RcEnergyTier; import reborncore.common.util.ItemUtils; @@ -74,7 +71,6 @@ public class BatpackItem extends ArmorItem implements RcEnergyItem { return true; } - @Environment(EnvType.CLIENT) @Override public void appendStacks(ItemGroup group, DefaultedList itemList) { if (!isIn(group)) { diff --git a/src/main/java/techreborn/items/armor/CloakingDeviceItem.java b/src/main/java/techreborn/items/armor/CloakingDeviceItem.java index 8777d18c8..afa6f7997 100644 --- a/src/main/java/techreborn/items/armor/CloakingDeviceItem.java +++ b/src/main/java/techreborn/items/armor/CloakingDeviceItem.java @@ -24,8 +24,6 @@ package techreborn.items.armor; -import net.fabricmc.api.EnvType; -import net.fabricmc.api.Environment; import net.minecraft.entity.EquipmentSlot; import net.minecraft.entity.player.PlayerEntity; import net.minecraft.item.Item; @@ -35,8 +33,8 @@ import net.minecraft.util.collection.DefaultedList; import reborncore.api.items.ArmorBlockEntityTicker; import reborncore.api.items.ArmorRemoveHandler; import reborncore.common.powerSystem.RcEnergyItem; -import reborncore.common.util.ItemUtils; import reborncore.common.powerSystem.RcEnergyTier; +import reborncore.common.util.ItemUtils; import techreborn.TechReborn; import techreborn.config.TechRebornConfig; import techreborn.init.TRArmorMaterials; @@ -80,7 +78,6 @@ public class CloakingDeviceItem extends TRArmourItem implements RcEnergyItem, Ar } // Item - @Environment(EnvType.CLIENT) @Override public void appendStacks(ItemGroup group, DefaultedList itemList) { if (!isIn(group)) { diff --git a/src/main/java/techreborn/items/armor/QuantumSuitItem.java b/src/main/java/techreborn/items/armor/QuantumSuitItem.java index f5fa93fbf..407c082cb 100644 --- a/src/main/java/techreborn/items/armor/QuantumSuitItem.java +++ b/src/main/java/techreborn/items/armor/QuantumSuitItem.java @@ -26,8 +26,6 @@ package techreborn.items.armor; import com.google.common.collect.HashMultimap; import com.google.common.collect.Multimap; -import net.fabricmc.api.EnvType; -import net.fabricmc.api.Environment; import net.minecraft.entity.EquipmentSlot; import net.minecraft.entity.attribute.EntityAttribute; import net.minecraft.entity.attribute.EntityAttributeModifier; @@ -43,7 +41,6 @@ import net.minecraft.util.collection.DefaultedList; import reborncore.api.items.ArmorBlockEntityTicker; import reborncore.api.items.ArmorRemoveHandler; import reborncore.api.items.ItemStackModifiers; -import reborncore.common.powerSystem.PowerSystem; import reborncore.common.powerSystem.RcEnergyItem; import reborncore.common.powerSystem.RcEnergyTier; import reborncore.common.util.ItemUtils; @@ -177,7 +174,6 @@ public class QuantumSuitItem extends TRArmourItem implements ItemStackModifiers, return RcEnergyTier.EXTREME; } - @Environment(EnvType.CLIENT) @Override public void appendStacks(ItemGroup group, DefaultedList itemList) { if (!isIn(group)) { diff --git a/src/main/java/techreborn/items/tool/PaintingToolItem.java b/src/main/java/techreborn/items/tool/PaintingToolItem.java index 644715457..9bd226cd3 100644 --- a/src/main/java/techreborn/items/tool/PaintingToolItem.java +++ b/src/main/java/techreborn/items/tool/PaintingToolItem.java @@ -24,8 +24,6 @@ package techreborn.items.tool; -import net.fabricmc.api.EnvType; -import net.fabricmc.api.Environment; import net.minecraft.block.BlockState; import net.minecraft.block.entity.BlockEntity; import net.minecraft.client.item.TooltipContext; @@ -96,7 +94,6 @@ public class PaintingToolItem extends Item { return null; } - @Environment(EnvType.CLIENT) public void appendTooltip(ItemStack stack, @Nullable World world, List tooltip, TooltipContext context) { BlockState blockState = getCover(stack); if (blockState != null) { diff --git a/src/main/java/techreborn/items/tool/advanced/AdvancedJackhammerItem.java b/src/main/java/techreborn/items/tool/advanced/AdvancedJackhammerItem.java index c2a905e4d..0fbab73be 100644 --- a/src/main/java/techreborn/items/tool/advanced/AdvancedJackhammerItem.java +++ b/src/main/java/techreborn/items/tool/advanced/AdvancedJackhammerItem.java @@ -101,7 +101,6 @@ public class AdvancedJackhammerItem extends JackhammerItem implements MultiBlock ItemUtils.checkActive(stack, cost, MessageIDs.poweredToolID, entity); } - @Environment(EnvType.CLIENT) @Override public void appendTooltip(ItemStack stack, @Nullable World worldIn, List tooltip, TooltipContext flagIn) { ItemUtils.buildActiveTooltip(stack, tooltip); diff --git a/src/main/java/techreborn/items/tool/basic/ElectricTreetapItem.java b/src/main/java/techreborn/items/tool/basic/ElectricTreetapItem.java index 793a0fcfb..2bd7d65b6 100644 --- a/src/main/java/techreborn/items/tool/basic/ElectricTreetapItem.java +++ b/src/main/java/techreborn/items/tool/basic/ElectricTreetapItem.java @@ -24,13 +24,10 @@ package techreborn.items.tool.basic; -import net.fabricmc.api.EnvType; -import net.fabricmc.api.Environment; import net.minecraft.item.Item; import net.minecraft.item.ItemGroup; import net.minecraft.item.ItemStack; import net.minecraft.util.collection.DefaultedList; -import reborncore.common.powerSystem.PowerSystem; import reborncore.common.powerSystem.RcEnergyItem; import reborncore.common.powerSystem.RcEnergyTier; import reborncore.common.util.ItemUtils; @@ -57,7 +54,6 @@ public class ElectricTreetapItem extends Item implements RcEnergyItem { return false; } - @Environment(EnvType.CLIENT) @Override public void appendStacks(ItemGroup group, DefaultedList stacks) { if (!isIn(group)) { diff --git a/src/main/java/techreborn/items/tool/basic/RockCutterItem.java b/src/main/java/techreborn/items/tool/basic/RockCutterItem.java index adb176043..9c0cd9389 100644 --- a/src/main/java/techreborn/items/tool/basic/RockCutterItem.java +++ b/src/main/java/techreborn/items/tool/basic/RockCutterItem.java @@ -24,8 +24,6 @@ package techreborn.items.tool.basic; -import net.fabricmc.api.EnvType; -import net.fabricmc.api.Environment; import net.minecraft.block.BlockState; import net.minecraft.enchantment.EnchantmentHelper; import net.minecraft.enchantment.Enchantments; @@ -36,8 +34,8 @@ import net.minecraft.util.collection.DefaultedList; import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; import reborncore.common.powerSystem.RcEnergyItem; -import reborncore.common.util.ItemUtils; import reborncore.common.powerSystem.RcEnergyTier; +import reborncore.common.util.ItemUtils; import techreborn.TechReborn; import techreborn.config.TechRebornConfig; import techreborn.init.TRContent; @@ -110,7 +108,6 @@ public class RockCutterItem extends PickaxeItem implements RcEnergyItem { return true; } - @Environment(EnvType.CLIENT) @Override public void appendStacks(ItemGroup group, DefaultedList stacks) { if (!isIn(group)) { diff --git a/src/main/java/techreborn/items/tool/industrial/IndustrialChainsawItem.java b/src/main/java/techreborn/items/tool/industrial/IndustrialChainsawItem.java index a39522f51..c87f35468 100644 --- a/src/main/java/techreborn/items/tool/industrial/IndustrialChainsawItem.java +++ b/src/main/java/techreborn/items/tool/industrial/IndustrialChainsawItem.java @@ -24,8 +24,6 @@ package techreborn.items.tool.industrial; -import net.fabricmc.api.EnvType; -import net.fabricmc.api.Environment; import net.minecraft.block.BlockState; import net.minecraft.client.item.TooltipContext; import net.minecraft.entity.LivingEntity; @@ -41,8 +39,8 @@ import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.Direction; import net.minecraft.world.World; import org.jetbrains.annotations.Nullable; -import reborncore.common.util.ItemUtils; import reborncore.common.powerSystem.RcEnergyTier; +import reborncore.common.util.ItemUtils; import techreborn.config.TechRebornConfig; import techreborn.init.TRToolMaterials; import techreborn.items.tool.ChainsawItem; @@ -119,7 +117,6 @@ public class IndustrialChainsawItem extends ChainsawItem { ItemUtils.checkActive(stack, cost, MessageIDs.poweredToolID, entity); } - @Environment(EnvType.CLIENT) @Override public void appendTooltip(ItemStack stack, @Nullable World worldIn, List tooltip, TooltipContext flagIn) { ItemUtils.buildActiveTooltip(stack, tooltip); diff --git a/src/main/java/techreborn/items/tool/industrial/IndustrialDrillItem.java b/src/main/java/techreborn/items/tool/industrial/IndustrialDrillItem.java index 8aa6e73ab..c6bd0ccb0 100644 --- a/src/main/java/techreborn/items/tool/industrial/IndustrialDrillItem.java +++ b/src/main/java/techreborn/items/tool/industrial/IndustrialDrillItem.java @@ -24,8 +24,6 @@ package techreborn.items.tool.industrial; -import net.fabricmc.api.EnvType; -import net.fabricmc.api.Environment; import net.minecraft.block.BlockState; import net.minecraft.block.Material; import net.minecraft.client.item.TooltipContext; @@ -33,7 +31,6 @@ import net.minecraft.entity.LivingEntity; import net.minecraft.entity.player.PlayerEntity; import net.minecraft.item.ItemGroup; import net.minecraft.item.ItemStack; -import net.minecraft.item.ToolMaterials; import net.minecraft.text.Text; import net.minecraft.util.ActionResult; import net.minecraft.util.Hand; @@ -42,8 +39,8 @@ import net.minecraft.util.collection.DefaultedList; import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; import org.jetbrains.annotations.Nullable; -import reborncore.common.util.ItemUtils; import reborncore.common.powerSystem.RcEnergyTier; +import reborncore.common.util.ItemUtils; import techreborn.config.TechRebornConfig; import techreborn.init.TRContent; import techreborn.init.TRToolMaterials; @@ -114,13 +111,11 @@ public class IndustrialDrillItem extends DrillItem { ItemUtils.checkActive(stack, cost, MessageIDs.poweredToolID, entity); } - @Environment(EnvType.CLIENT) @Override public void appendTooltip(ItemStack stack, @Nullable World worldIn, List tooltip, TooltipContext flagIn) { ItemUtils.buildActiveTooltip(stack, tooltip); } - @Environment(EnvType.CLIENT) @Override public void appendStacks(ItemGroup par2ItemGroup, DefaultedList itemList) { if (!isIn(par2ItemGroup)) { diff --git a/src/main/java/techreborn/items/tool/industrial/IndustrialJackhammerItem.java b/src/main/java/techreborn/items/tool/industrial/IndustrialJackhammerItem.java index a3af1c5d8..b3dc54ff3 100644 --- a/src/main/java/techreborn/items/tool/industrial/IndustrialJackhammerItem.java +++ b/src/main/java/techreborn/items/tool/industrial/IndustrialJackhammerItem.java @@ -24,8 +24,6 @@ package techreborn.items.tool.industrial; -import net.fabricmc.api.EnvType; -import net.fabricmc.api.Environment; import net.minecraft.block.BlockState; import net.minecraft.client.item.TooltipContext; import net.minecraft.entity.Entity; @@ -44,9 +42,9 @@ import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; import org.jetbrains.annotations.Nullable; import reborncore.common.misc.MultiBlockBreakingTool; +import reborncore.common.powerSystem.RcEnergyTier; import reborncore.common.util.ChatUtils; import reborncore.common.util.ItemUtils; -import reborncore.common.powerSystem.RcEnergyTier; import techreborn.config.TechRebornConfig; import techreborn.init.TRToolMaterials; import techreborn.items.tool.JackhammerItem; @@ -146,7 +144,6 @@ public class IndustrialJackhammerItem extends JackhammerItem implements MultiBlo ItemUtils.checkActive(stack, cost, MessageIDs.poweredToolID, entity); } - @Environment(EnvType.CLIENT) @Override public void appendTooltip(ItemStack stack, @Nullable World worldIn, List tooltip, TooltipContext flagIn) { ItemUtils.buildActiveTooltip(stack, tooltip); diff --git a/src/main/java/techreborn/items/tool/industrial/NanosaberItem.java b/src/main/java/techreborn/items/tool/industrial/NanosaberItem.java index c69bfd4f9..d25de391b 100644 --- a/src/main/java/techreborn/items/tool/industrial/NanosaberItem.java +++ b/src/main/java/techreborn/items/tool/industrial/NanosaberItem.java @@ -35,7 +35,10 @@ import net.minecraft.entity.attribute.EntityAttribute; import net.minecraft.entity.attribute.EntityAttributeModifier; import net.minecraft.entity.attribute.EntityAttributes; import net.minecraft.entity.player.PlayerEntity; -import net.minecraft.item.*; +import net.minecraft.item.Item; +import net.minecraft.item.ItemGroup; +import net.minecraft.item.ItemStack; +import net.minecraft.item.SwordItem; import net.minecraft.nbt.NbtCompound; import net.minecraft.text.Text; import net.minecraft.util.ActionResult; @@ -45,10 +48,9 @@ import net.minecraft.util.collection.DefaultedList; import net.minecraft.world.World; import org.jetbrains.annotations.Nullable; import reborncore.api.items.ItemStackModifiers; -import reborncore.common.powerSystem.PowerSystem; import reborncore.common.powerSystem.RcEnergyItem; -import reborncore.common.util.ItemUtils; import reborncore.common.powerSystem.RcEnergyTier; +import reborncore.common.util.ItemUtils; import techreborn.TechReborn; import techreborn.config.TechRebornConfig; import techreborn.init.TRContent; @@ -104,7 +106,6 @@ public class NanosaberItem extends SwordItem implements RcEnergyItem, ItemStackM return true; } - @Environment(EnvType.CLIENT) @Override public void appendStacks( ItemGroup par2ItemGroup, DefaultedList itemList) { diff --git a/src/main/java/techreborn/items/tool/industrial/OmniToolItem.java b/src/main/java/techreborn/items/tool/industrial/OmniToolItem.java index cb5523273..75bf5a288 100644 --- a/src/main/java/techreborn/items/tool/industrial/OmniToolItem.java +++ b/src/main/java/techreborn/items/tool/industrial/OmniToolItem.java @@ -24,27 +24,19 @@ package techreborn.items.tool.industrial; -import net.fabricmc.api.EnvType; -import net.fabricmc.api.Environment; import net.minecraft.block.Block; import net.minecraft.block.BlockState; -import net.minecraft.client.item.TooltipContext; -import net.minecraft.client.resource.language.I18n; import net.minecraft.entity.LivingEntity; import net.minecraft.entity.damage.DamageSource; import net.minecraft.entity.player.PlayerEntity; import net.minecraft.item.*; import net.minecraft.tag.TagKey; -import net.minecraft.text.LiteralText; -import net.minecraft.text.Text; import net.minecraft.util.ActionResult; -import net.minecraft.util.Formatting; import net.minecraft.util.Identifier; import net.minecraft.util.collection.DefaultedList; import net.minecraft.util.math.BlockPos; import net.minecraft.util.registry.Registry; import net.minecraft.world.World; -import org.jetbrains.annotations.Nullable; import reborncore.common.powerSystem.RcEnergyItem; import reborncore.common.powerSystem.RcEnergyTier; import reborncore.common.util.ItemUtils; @@ -56,8 +48,6 @@ import techreborn.init.TRToolMaterials; import techreborn.items.tool.MiningLevel; import techreborn.utils.InitUtils; -import java.util.List; - public class OmniToolItem extends MiningToolItem implements RcEnergyItem { public static final TagKey OMNI_TOOL_MINEABLE = TagKey.of(Registry.BLOCK_KEY, new Identifier(TechReborn.MOD_ID, "mineable/omni_tool")); @@ -125,7 +115,6 @@ public class OmniToolItem extends MiningToolItem implements RcEnergyItem { return true; } - @Environment(EnvType.CLIENT) @Override public void appendStacks(ItemGroup par2ItemGroup, DefaultedList itemList) { if (!isIn(par2ItemGroup)) { @@ -134,12 +123,6 @@ public class OmniToolItem extends MiningToolItem implements RcEnergyItem { InitUtils.initPoweredItems(TRContent.OMNI_TOOL, itemList); } - @Environment(EnvType.CLIENT) - @Override - public void appendTooltip(ItemStack stack, @Nullable World worldIn, List tooltip, TooltipContext flagIn) { - tooltip.add(new LiteralText(Formatting.YELLOW + I18n.translate("techreborn.tooltip.omnitool_motto"))); - } - @Override public int getItemBarStep(ItemStack stack) { return ItemUtils.getPowerForDurabilityBar(stack);