From dbd0b453dc3b20d9771724ac44f25cdf58860e74 Mon Sep 17 00:00:00 2001 From: Ellpeck Date: Tue, 7 Jul 2015 21:59:57 +0200 Subject: [PATCH] Finished TeleStaff. --- .../config/values/ConfigCrafting.java | 4 +++- .../crafting/ItemCrafting.java | 7 +++++++ .../items/ItemTeleStaff.java | 18 +++++++++++++++++- .../textures/items/itemTeleStaff.png | Bin 0 -> 503 bytes 4 files changed, 27 insertions(+), 2 deletions(-) create mode 100644 src/main/resources/assets/actuallyadditions/textures/items/itemTeleStaff.png diff --git a/src/main/java/ellpeck/actuallyadditions/config/values/ConfigCrafting.java b/src/main/java/ellpeck/actuallyadditions/config/values/ConfigCrafting.java index 24c33ca0a..1d0fb624c 100644 --- a/src/main/java/ellpeck/actuallyadditions/config/values/ConfigCrafting.java +++ b/src/main/java/ellpeck/actuallyadditions/config/values/ConfigCrafting.java @@ -118,7 +118,9 @@ public enum ConfigCrafting{ STONE("Stone -> Cobblestone", ConfigCategories.CRUSHER_RECIPES, "Crusher"), RICE_SUGAR("Rice -> Sugar", ConfigCategories.CRUSHER_RECIPES, "Crusher"), NICKEL("Nickel Ore -> Nickel Dust + Platinum Dust", ConfigCategories.CRUSHER_RECIPES, "Crusher"), - IRON("Iron Ore -> Iron Dust + Gold Dust", ConfigCategories.CRUSHER_RECIPES, "Crusher"); + IRON("Iron Ore -> Iron Dust + Gold Dust", ConfigCategories.CRUSHER_RECIPES, "Crusher"), + + TELE_STAFF("Tele Staff", ConfigCategories.ITEMS_CRAFTING); public final String name; public final String category; diff --git a/src/main/java/ellpeck/actuallyadditions/crafting/ItemCrafting.java b/src/main/java/ellpeck/actuallyadditions/crafting/ItemCrafting.java index 2202bf83b..0b459ab39 100644 --- a/src/main/java/ellpeck/actuallyadditions/crafting/ItemCrafting.java +++ b/src/main/java/ellpeck/actuallyadditions/crafting/ItemCrafting.java @@ -55,6 +55,13 @@ public class ItemCrafting{ 'R', "dustRedstone", 'I', "blockIron")); + //Tele Staff + if(ConfigCrafting.TELE_STAFF.isEnabled()) + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemTeleStaff), + " E", " S ", "S ", + 'E', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.ENDERPEARL_BLOCK.ordinal()), + 'S', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.ENDER_CASING.ordinal()))); + //Drill Speed if(ConfigCrafting.DRILL_SPEED.isEnabled()){ GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemDrillUpgradeSpeed), diff --git a/src/main/java/ellpeck/actuallyadditions/items/ItemTeleStaff.java b/src/main/java/ellpeck/actuallyadditions/items/ItemTeleStaff.java index 1348423bc..4b8b153b9 100644 --- a/src/main/java/ellpeck/actuallyadditions/items/ItemTeleStaff.java +++ b/src/main/java/ellpeck/actuallyadditions/items/ItemTeleStaff.java @@ -1,12 +1,17 @@ package ellpeck.actuallyadditions.items; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; import ellpeck.actuallyadditions.config.values.ConfigIntValues; import ellpeck.actuallyadditions.util.INameableItem; +import ellpeck.actuallyadditions.util.ModUtil; import ellpeck.actuallyadditions.util.WorldUtil; +import net.minecraft.client.renderer.texture.IIconRegister; 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.IIcon; import net.minecraft.util.MovingObjectPosition; import net.minecraft.world.World; import net.minecraftforge.common.util.ForgeDirection; @@ -17,7 +22,7 @@ public class ItemTeleStaff extends ItemEnergy implements INameableItem{ private static final int energyUsedPerBlock = ConfigIntValues.TELE_STAFF_ENERGY_USE.getValue(); public ItemTeleStaff(){ - super(1000000, 12000, 1); + super(500000, 10000, 1); } @Override @@ -30,6 +35,17 @@ public class ItemTeleStaff extends ItemEnergy implements INameableItem{ return "itemTeleStaff"; } + @Override + public IIcon getIcon(ItemStack stack, int pass){ + return this.itemIcon; + } + + @Override + @SideOnly(Side.CLIENT) + public void registerIcons(IIconRegister iconReg){ + this.itemIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER + ":" + this.getName()); + } + @Override public ItemStack onItemRightClick(ItemStack stack, World world, EntityPlayer player){ MovingObjectPosition pos = WorldUtil.getMovingObjectPosWithReachDistance(world, player, reach); diff --git a/src/main/resources/assets/actuallyadditions/textures/items/itemTeleStaff.png b/src/main/resources/assets/actuallyadditions/textures/items/itemTeleStaff.png new file mode 100644 index 0000000000000000000000000000000000000000..96b0dd24d773a5ca3485c73ce9ec9acfabea758a GIT binary patch literal 503 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Y)RhkE)4%caKYZ?lYt_f1s;*b z3=G`DAk4@xYmNj^kiEpy*OmP~JG-!+2>&;QZlI8CW=KSdbAE1aYF-JD%fR4Vl$uzQ znxasiS(2gP?&%wlqL<3fz`z*o>Eak-aeD6LoqkM(0>}2-2V@*txI(Zqu#ridb5@1Q zkz*N2xrtY}w1u_j9|+&D>C&MW+z0e7R3t1lY%AEI^2W`;fn&q2?%t)z3wa~?%9qbR z`6q4P%rgvZx|Q|bS6@j-erejc*)=LI`oQ#~&1tb0*^i%}{$g>7!_g~zh07V48tOG4 z{7{KpYsSNW^FmPH#QHPImmafCV0?YsbfTK43=4xt5aYuQ^2?qHHq9=)7Vg-xTX~}a z!~A@<9>yL+jkW%3{vTvWcoljeZ*z9i((6gH?}r}zn%XhPk6p!+A$dQq`*Eoox9{dj z?|#gex6a9AzZLsVy=ED8jp^AdLQdb{&(Hj1Ef%2Nu5w*UV4h3G-(ZfM53$p8ugQ2R zdEI{|+QBdW;jG{H7E`Vy&b~YA1buewE$H1nW1n!ZyT