Add new coord selector textures and rename to fit more appropriately

This commit is contained in:
tterrag1098 committed 2015-02-13 23:21:41 -05:00
1 parent 95d123a132
commit 2e74bbd5e6
8 files changed
+28 -27

No files matched your search

@@ -154,7 +154,7 @@ import crazypants.enderio.teleport.TeleportRecipes;
import crazypants.enderio.teleport.TravelController;
import crazypants.enderio.teleport.anchor.BlockTravelAnchor;
import crazypants.enderio.teleport.telepad.BlockTelePad;
import crazypants.enderio.teleport.telepad.ItemCoordsCard;
import crazypants.enderio.teleport.telepad.ItemCoordSelector;
import crazypants.util.EntityUtil;
@Mod(modid = MODID, name = MOD_NAME, version = VERSION, dependencies = "required-after:[email protected],);after:MineFactoryReloaded;after:Waila@[1.5.8,)", guiFactory = "crazypants.enderio.config.ConfigFactoryEIO")
@@ -192,7 +192,7 @@ public class EnderIO {
//Teleporting
public static BlockTravelAnchor blockTravelPlatform;
public static BlockTelePad blockTelePad;
public static ItemCoordsCard itemCoordsCard;
public static ItemCoordSelector itemCoordsCard;
public static ItemTravelStaff itemTravelStaff;
// Painter
@@ -345,7 +345,7 @@ public class EnderIO {
blockEnderIo = BlockEnderIO.create();
blockTravelPlatform = BlockTravelAnchor.create();
blockTelePad = BlockTelePad.create();
itemCoordsCard = ItemCoordsCard.create();
itemCoordsCard = ItemCoordSelector.create();
blockSliceAndSplice = BlockSliceAndSplice.create();
blockSoulFuser = BlockSoulBinder.create();
@@ -96,7 +96,7 @@ public enum ModObject {
blockTravelAnchor,
blockTelePad,
itemCoordsCard,
itemCoordSelector,
itemTravelStaff,
itemMagnet,
itemGliderWing,
@@ -28,18 +28,18 @@ import crazypants.util.Lang;
import crazypants.util.Util;
import crazypants.vecmath.Vector3d;
public class ItemCoordsCard extends Item implements IResourceTooltipProvider {
public class ItemCoordSelector extends Item implements IResourceTooltipProvider {
public static ItemCoordsCard create() {
ItemCoordsCard ret = new ItemCoordsCard();
GameRegistry.registerItem(ret, ModObject.itemCoordsCard.unlocalisedName);
public static ItemCoordSelector create() {
ItemCoordSelector ret = new ItemCoordSelector();
GameRegistry.registerItem(ret, ModObject.itemCoordSelector.unlocalisedName);
return ret;
}
private ItemCoordsCard() {
private ItemCoordSelector() {
setCreativeTab(EnderIOTab.tabEnderIO);
setUnlocalizedName(ModObject.itemCoordsCard.unlocalisedName);
setTextureName("EnderIO:" + ModObject.itemCoordsCard.unlocalisedName);
setUnlocalizedName(ModObject.itemCoordSelector.unlocalisedName);
setTextureName("EnderIO:" + ModObject.itemCoordSelector.unlocalisedName);
setMaxStackSize(1);
}
@@ -86,11 +86,6 @@ public class ItemCoordsCard extends Item implements IResourceTooltipProvider {
if (!rayTraceCoords(stack, world, player)) {
return false;
}
if(world.isRemote) {
sendItemUsePacket(stack, player, world, x, y, z, side, hitX, hitY, hitZ);
return true;
}
TileEntity te = world.getTileEntity(x, y, z);
if(te instanceof ITelePad) {
@@ -101,7 +96,7 @@ public class ItemCoordsCard extends Item implements IResourceTooltipProvider {
if(!bc.equals(cur)) {
tp.setCoords(getCoords(stack));
if(!world.isRemote) {
player.addChatMessage(new ChatComponentText(Lang.localize("itemCoordsCard.chat.setCoords", bc.chatString())));
player.addChatMessage(new ChatComponentText(Lang.localize("itemCoordSelector.chat.setCoords", bc.chatString())));
}
} else {
return false;
@@ -110,6 +105,12 @@ public class ItemCoordsCard extends Item implements IResourceTooltipProvider {
BlockTravelAnchor.sendPrivateChatMessage(player, tp.getPlacedBy());
}
}
if(world.isRemote) {
sendItemUsePacket(stack, player, world, x, y, z, side, hitX, hitY, hitZ);
}
return true;
}
@@ -153,7 +154,7 @@ public class ItemCoordsCard extends Item implements IResourceTooltipProvider {
private void onCoordsChanged(EntityPlayer player, BlockCoord bc) {
if(!player.worldObj.isRemote) {
player.addChatMessage(new ChatComponentText(Lang.localize("itemCoordsCard.chat.newCoords", bc.chatString())));
player.addChatMessage(new ChatComponentText(Lang.localize("itemCoordSelector.chat.newCoords", bc.chatString())));
}
}