diff --git a/src/main/java/ellpeck/actuallyadditions/blocks/BlockPhantomface.java b/src/main/java/ellpeck/actuallyadditions/blocks/BlockPhantomface.java index d3100a4f1..7a7943e1e 100644 --- a/src/main/java/ellpeck/actuallyadditions/blocks/BlockPhantomface.java +++ b/src/main/java/ellpeck/actuallyadditions/blocks/BlockPhantomface.java @@ -86,9 +86,9 @@ public class BlockPhantomface extends BlockContainerBase implements INameableIte else player.addChatComponentMessage(new ChatComponentText(StatCollector.translateToLocal("tooltip."+ModUtil.MOD_ID_LOWER+".phantom.connectedNoRange.desc"))); } else player.addChatComponentMessage(new ChatComponentText(StatCollector.translateToLocal("tooltip."+ModUtil.MOD_ID_LOWER+".phantom.notConnected.desc"))); + player.addChatComponentMessage(new ChatComponentText("")); } else player.openGui(ActuallyAdditions.instance, GuiHandler.PHANTOM_PLACER_ID, world, x, y, z); - player.addChatComponentMessage(new ChatComponentText("")); } } } diff --git a/src/main/java/ellpeck/actuallyadditions/config/values/ConfigIntValues.java b/src/main/java/ellpeck/actuallyadditions/config/values/ConfigIntValues.java index 11debb0c4..ee2834c40 100644 --- a/src/main/java/ellpeck/actuallyadditions/config/values/ConfigIntValues.java +++ b/src/main/java/ellpeck/actuallyadditions/config/values/ConfigIntValues.java @@ -98,7 +98,10 @@ public enum ConfigIntValues{ DRILL_FORTUNE_EXTRA_USE("Fortune Upgrade: Extra Energy Use", ConfigCategories.DRILL_VALUES, 40, 0, 10000, "How much extra Energy the Fortune Upgrade uses"), DRILL_FORTUNE_II_EXTRA_USE("Fortune II Upgrade: Extra Energy Use", ConfigCategories.DRILL_VALUES, 60, 0, 10000, "How much extra Energy the Fortune II Upgrade uses"), DRILL_THREE_BY_THREE_EXTRA_USE("3x3 Upgrade: Extra Energy Use", ConfigCategories.DRILL_VALUES, 10, 0, 10000, "How much extra Energy the 3x3 Upgrade uses"), - DRILL_FIVE_BY_FIVE_EXTRA_USE("5x5 Upgrade: Extra Energy Use", ConfigCategories.DRILL_VALUES, 30, 0, 10000, "How much extra Energy the 5x5 Upgrade uses"); + DRILL_FIVE_BY_FIVE_EXTRA_USE("5x5 Upgrade: Extra Energy Use", ConfigCategories.DRILL_VALUES, 30, 0, 10000, "How much extra Energy the 5x5 Upgrade uses"), + + TELE_STAFF_REACH("TeleStaff: Reach", ConfigCategories.MACHINE_VALUES, 150, 5, 500, "How far the TeleStaff can teleport you"), + TELE_STAFF_ENERGY_USE("TeleStaff: Energy Use per Block", ConfigCategories.MACHINE_VALUES, 200, 1, 5000, "How much energy the TeleStaff uses per Block you teleport"); public final String name; public final String category; diff --git a/src/main/java/ellpeck/actuallyadditions/items/ItemTeleStaff.java b/src/main/java/ellpeck/actuallyadditions/items/ItemTeleStaff.java index 48ef802dd..1348423bc 100644 --- a/src/main/java/ellpeck/actuallyadditions/items/ItemTeleStaff.java +++ b/src/main/java/ellpeck/actuallyadditions/items/ItemTeleStaff.java @@ -1,9 +1,11 @@ package ellpeck.actuallyadditions.items; +import ellpeck.actuallyadditions.config.values.ConfigIntValues; import ellpeck.actuallyadditions.util.INameableItem; import ellpeck.actuallyadditions.util.WorldUtil; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayerMP; +import net.minecraft.item.EnumRarity; import net.minecraft.item.ItemStack; import net.minecraft.util.MovingObjectPosition; import net.minecraft.world.World; @@ -11,13 +13,18 @@ import net.minecraftforge.common.util.ForgeDirection; public class ItemTeleStaff extends ItemEnergy implements INameableItem{ - private static final double reach = 250D; - private static final int energyUsedPerBlock = 250; + private static final double reach = ConfigIntValues.TELE_STAFF_REACH.getValue(); + private static final int energyUsedPerBlock = ConfigIntValues.TELE_STAFF_ENERGY_USE.getValue(); public ItemTeleStaff(){ super(1000000, 12000, 1); } + @Override + public EnumRarity getRarity(ItemStack stack){ + return EnumRarity.epic; + } + @Override public String getName(){ return "itemTeleStaff"; @@ -25,7 +32,7 @@ public class ItemTeleStaff extends ItemEnergy implements INameableItem{ @Override public ItemStack onItemRightClick(ItemStack stack, World world, EntityPlayer player){ - MovingObjectPosition pos = WorldUtil.getMovingObjectPosWithReachDistance(world, player, reach, false, true, false); + MovingObjectPosition pos = WorldUtil.getMovingObjectPosWithReachDistance(world, player, reach); if(pos != null){ int side = pos.sideHit; if(side != -1){ @@ -39,7 +46,7 @@ public class ItemTeleStaff extends ItemEnergy implements INameableItem{ player.swingItem(); if(!world.isRemote){ ((EntityPlayerMP)player).playerNetServerHandler.setPlayerLocation(x, y, z, player.rotationYaw, player.rotationPitch); - this.extractEnergy(stack, use, false); + if(!player.capabilities.isCreativeMode) this.extractEnergy(stack, use, false); } } } diff --git a/src/main/java/ellpeck/actuallyadditions/util/ModUtil.java b/src/main/java/ellpeck/actuallyadditions/util/ModUtil.java index a5b51720a..ab16e8350 100644 --- a/src/main/java/ellpeck/actuallyadditions/util/ModUtil.java +++ b/src/main/java/ellpeck/actuallyadditions/util/ModUtil.java @@ -5,7 +5,7 @@ import org.apache.logging.log4j.Logger; public class ModUtil{ - public static final String VERSION = "1.7.10-0.0.6.4"; + public static final String VERSION = "1.7.10-0.0.6.5"; public static final String MOD_ID = "ActuallyAdditions"; public static final String NAME = "Actually Additions"; diff --git a/src/main/java/ellpeck/actuallyadditions/util/WorldUtil.java b/src/main/java/ellpeck/actuallyadditions/util/WorldUtil.java index bd1a4e202..439291151 100644 --- a/src/main/java/ellpeck/actuallyadditions/util/WorldUtil.java +++ b/src/main/java/ellpeck/actuallyadditions/util/WorldUtil.java @@ -214,14 +214,10 @@ public class WorldUtil{ } public static MovingObjectPosition getMovingObjectPosWithReachDistance(World world, EntityPlayer player, double distance){ - return getMovingObjectPosWithReachDistance(world, player, distance, false, true, false); - } - - public static MovingObjectPosition getMovingObjectPosWithReachDistance(World world, EntityPlayer player, double distance, boolean arg1, boolean arg2, boolean arg3){ float f1 = player.prevRotationPitch+(player.rotationPitch-player.prevRotationPitch)*1.0F; float f2 = player.prevRotationYaw+(player.rotationYaw-player.prevRotationYaw)*1.0F; Vec3 vec = Vec3.createVectorHelper(player.prevPosX+(player.posX-player.prevPosX)*(double)1.0F, player.prevPosY+(player.posY-player.prevPosY)*(double)1.0F+(double)(world.isRemote ? player.getEyeHeight()-player.getDefaultEyeHeight() : player.getEyeHeight()), player.prevPosZ+(player.posZ-player.prevPosZ)*(double)1.0F); Vec3 vec1 = vec.addVector((double)MathHelper.sin(-f2*0.017453292F-(float)Math.PI)*-MathHelper.cos(-f1*0.017453292F)*distance, (double)MathHelper.sin(-f1*0.017453292F)*distance, (double)MathHelper.cos(-f2*0.017453292F-(float)Math.PI)*-MathHelper.cos(-f1*0.017453292F)*distance); - return world.func_147447_a(vec, vec1, arg1, arg2, arg3); + return world.func_147447_a(vec, vec1, false, true, false); } } diff --git a/src/main/resources/assets/actuallyadditions/lang/en_US.lang b/src/main/resources/assets/actuallyadditions/lang/en_US.lang index f73d7f401..e2901de9e 100644 --- a/src/main/resources/assets/actuallyadditions/lang/en_US.lang +++ b/src/main/resources/assets/actuallyadditions/lang/en_US.lang @@ -281,6 +281,9 @@ item.actuallyadditions.itemMiscKnifeHandle.name=Knife Handle item.actuallyadditions.itemMiscBlackQuartz.name=Black Quartz item.actuallyadditions.itemMiscRing.name=Ring +item.actuallyadditions.itemTeleStaff.name=Teleport Staff +tooltip.actuallyadditions.itemTeleStaff.desc=Teleports you to where you're looking when you right-click. + item.actuallyadditions.itemJamCuBaRa.name=CuBaRa-Jam item.actuallyadditions.itemJamGraKiBa.name=GraKiBa-Jam item.actuallyadditions.itemJamPlApLe.name=PlApLe-Jam