Skip to content

Commit

Permalink
add tooltip line about bucket behavior
Browse files Browse the repository at this point in the history
  • Loading branch information
ghzdude committed Feb 1, 2025
1 parent 8a9fc00 commit 9c90ea6
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import net.minecraft.block.BlockLiquid;
import net.minecraft.block.material.Material;
import net.minecraft.block.state.IBlockState;
import net.minecraft.client.resources.I18n;
import net.minecraft.entity.item.EntityItem;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
Expand All @@ -31,6 +32,8 @@
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

import java.util.List;

public class ItemFluidContainer implements IItemContainerItemProvider, IItemBehaviour {

private final boolean isBucket;
Expand All @@ -55,6 +58,13 @@ public ItemStack getContainerItem(ItemStack itemStack) {
return itemStack;
}

@Override
public void addInformation(ItemStack itemStack, List<String> lines) {
if (isBucket) {
lines.add(I18n.format("behaviour.cell_bucket.tooltip"));
}
}

@Override
public ActionResult<ItemStack> onItemRightClick(World world, EntityPlayer player, EnumHand hand) {
ItemStack stack = player.getHeldItem(hand);
Expand Down
1 change: 1 addition & 0 deletions src/main/resources/assets/gregtech/lang/en_us.lang
Original file line number Diff line number Diff line change
Expand Up @@ -4748,6 +4748,7 @@ behaviour.softhammer=Activates and Deactivates Machines
behaviour.hammer=Turns on and off Muffling for Machines (by hitting them)
behaviour.wrench=Rotates Blocks on Rightclick
behaviour.boor.by=by %s
behaviour.cell_bucket.tooltip=Can pickup or place fluids
behaviour.paintspray.solvent.tooltip=Can remove color from things
behaviour.paintspray.white.tooltip=Can paint things in White
behaviour.paintspray.orange.tooltip=Can paint things in Orange
Expand Down

0 comments on commit 9c90ea6

Please sign in to comment.