Created
November 26, 2016 21:20
-
-
Save artillect/84b8d5ec47b8e75727fd9c27f6e44b99 to your computer and use it in GitHub Desktop.
Voltimeter item class
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.item.ItemStack; | |
import net.minecraft.util.text.ITextComponent; | |
import net.minecraft.util.text.TextComponentString; | |
import net.minecraft.world.World; | |
public class ItemVoltimeter extends ItemBase { | |
public ItemVoltimeter() { | |
super("voltimeter", true); | |
this.setMaxStackSize(1); | |
} | |
@Override | |
public boolean onItemUse(ItemStack itemstack, EntityPlayer entityplayer, World world,int x,int y,int z,int par7) | |
{ | |
if (world.isRemote) { | |
entityplayer.addChatMessage(new TextComponentString(" X: "+ x + " Y: " + y + " Z: " + z)); | |
} | |
return true; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment