This repository has been archived by the owner on Apr 22, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 352
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
73 additions
and
4 deletions.
There are no files selected for viewing
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,38 @@ | ||
package com.pahimar.ee3.item; | ||
|
||
import com.pahimar.ee3.EquivalentExchange3; | ||
import com.pahimar.ee3.item.base.ItemEE; | ||
import com.pahimar.ee3.reference.GUIs; | ||
import com.pahimar.ee3.reference.Messages; | ||
import com.pahimar.ee3.util.ItemStackUtils; | ||
import net.minecraft.entity.player.EntityPlayer; | ||
import net.minecraft.item.ItemStack; | ||
import net.minecraft.util.ActionResult; | ||
import net.minecraft.util.EnumActionResult; | ||
import net.minecraft.util.EnumHand; | ||
import net.minecraft.util.text.TextComponentTranslation; | ||
import net.minecraft.world.World; | ||
|
||
public class ItemAlchenomicon extends ItemEE { | ||
|
||
public ItemAlchenomicon() { | ||
super("alchenomicon"); | ||
} | ||
|
||
@Override | ||
public ActionResult<ItemStack> onItemRightClick(ItemStack itemStack, World world, EntityPlayer entityPlayer, EnumHand hand) { | ||
|
||
if (!world.isRemote) | ||
{ | ||
if (!ItemStackUtils.hasOwner(itemStack)) { | ||
ItemStackUtils.setOwner(itemStack, entityPlayer); | ||
entityPlayer.addChatComponentMessage(new TextComponentTranslation(Messages.OWNER_SET_TO_SELF, itemStack.getTextComponent())); | ||
} | ||
else { | ||
entityPlayer.openGui(EquivalentExchange3.instance, GUIs.ALCHENOMICON.ordinal(), entityPlayer.worldObj, (int) entityPlayer.posX, (int) entityPlayer.posY, (int) entityPlayer.posZ); | ||
} | ||
} | ||
|
||
return new ActionResult(EnumActionResult.SUCCESS, itemStack); | ||
} | ||
} |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package com.pahimar.ee3.util; | ||
|
||
import com.pahimar.ee3.reference.Colors; | ||
|
||
public class StringHelper { | ||
|
||
private StringHelper() {} | ||
|
||
public static String colorizeString(String string, Colors.TextColor color) { | ||
// TODO Complete this | ||
return null; | ||
} | ||
} |