Skip to content

Commit a78fbfc

Browse files
committed
use better method
1 parent a9a9789 commit a78fbfc

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/main/java/gregtech/api/items/metaitem/stats/ItemFluidContainer.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
import net.minecraft.entity.player.EntityPlayer;
99
import net.minecraft.item.ItemStack;
1010
import net.minecraft.util.ActionResult;
11-
import net.minecraft.util.EnumFacing;
1211
import net.minecraft.util.EnumHand;
1312
import net.minecraft.util.SoundCategory;
1413
import net.minecraft.util.SoundEvent;
@@ -52,13 +51,14 @@ public ItemStack getContainerItem(ItemStack itemStack) {
5251
}
5352

5453
@Override
55-
public ActionResult<ItemStack> onItemUse(EntityPlayer player, World world, BlockPos pos, EnumHand hand,
56-
EnumFacing facing, float hitX, float hitY, float hitZ) {
54+
public ActionResult<ItemStack> onItemRightClick(World world, EntityPlayer player, EnumHand hand) {
5755
ItemStack stack = player.getHeldItem(hand);
5856
if (!isBucket) return pass(stack);
5957

6058
var result = rayTrace(world, player);
6159
if (result == null) return pass(stack);
60+
var pos = result.getBlockPos();
61+
var facing = result.sideHit;
6262

6363
ItemStack cellStack = GTUtility.copy(1, stack);
6464
var cellHandler = FluidUtil.getFluidHandler(cellStack);

0 commit comments

Comments
 (0)