Created
November 26, 2016 21:53
-
-
Save artillect/fa5483f4874ac669514428abe902dd40 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.artillect.voltaics.item; | |
import net.minecraft.entity.player.EntityPlayer; | |
import net.minecraft.util.EnumFacing; | |
import net.minecraft.util.EnumHand; | |
import net.minecraft.util.math.BlockPos; | |
import net.minecraft.util.text.TextComponentString; | |
import net.minecraft.world.World; | |
public class ItemVoltimeter extends ItemBase { | |
public ItemVoltimeter() { | |
super("voltimeter", true); | |
this.setMaxStackSize(1); | |
} | |
public boolean onItemUse(EntityPlayer player, World worldIn, BlockPos pos, EnumHand hand, EnumFacing facing, float hitX, float hitY, float hitZ) { | |
if (worldIn.isRemote) { | |
player.addChatMessage(new TextComponentString(" X: "+ pos.getX() + " Y: " + pos.getY() + " Z: " + pos.getZ())); | |
} | |
return true; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment