diff --git a/build.gradle b/build.gradle index 1fbf4402f..ad55a994f 100644 --- a/build.gradle +++ b/build.gradle @@ -18,7 +18,7 @@ buildscript { apply plugin: 'forge' apply plugin: 'maven' -version = "1.7.10-0.0.9.1" +version = "1.7.10-0.0.9.2" group = "ellpeck.actuallyadditions" archivesBaseName = "ActuallyAdditions" diff --git a/src/main/java/ellpeck/actuallyadditions/ActuallyAdditions.java b/src/main/java/ellpeck/actuallyadditions/ActuallyAdditions.java index 0572a3cb1..2a44e6792 100644 --- a/src/main/java/ellpeck/actuallyadditions/ActuallyAdditions.java +++ b/src/main/java/ellpeck/actuallyadditions/ActuallyAdditions.java @@ -29,7 +29,6 @@ import ellpeck.actuallyadditions.inventory.GuiHandler; import ellpeck.actuallyadditions.items.InitForeignPaxels; import ellpeck.actuallyadditions.items.InitItems; import ellpeck.actuallyadditions.items.ItemCoffee; -import ellpeck.actuallyadditions.items.tools.table.InitToolTableTools; import ellpeck.actuallyadditions.material.InitArmorMaterials; import ellpeck.actuallyadditions.material.InitToolMaterials; import ellpeck.actuallyadditions.misc.DispenserHandlerEmptyBucket; @@ -99,7 +98,7 @@ public class ActuallyAdditions{ HairyBallHandler.init(); TreasureChestHandler.init(); InitForeignPaxels.init(); - InitToolTableTools.init(); + //InitToolTableTools.init(); proxy.postInit(event); ModUtil.LOGGER.info("PostInitialization Finished."); diff --git a/src/main/java/ellpeck/actuallyadditions/blocks/InitBlocks.java b/src/main/java/ellpeck/actuallyadditions/blocks/InitBlocks.java index 957ad26d2..792ba28d1 100644 --- a/src/main/java/ellpeck/actuallyadditions/blocks/InitBlocks.java +++ b/src/main/java/ellpeck/actuallyadditions/blocks/InitBlocks.java @@ -93,13 +93,13 @@ public class InitBlocks{ public static Block blockSmileyCloud; - public static Block blockToolTable; + //public static Block blockToolTable; public static void init(){ ModUtil.LOGGER.info("Initializing Blocks..."); - blockToolTable = new BlockToolTable(); - BlockUtil.register(blockToolTable); + //blockToolTable = new BlockToolTable(); + //BlockUtil.register(blockToolTable); blockSmileyCloud = new BlockSmileyCloud(); BlockUtil.register(blockSmileyCloud); diff --git a/src/main/java/ellpeck/actuallyadditions/event/TooltipEvent.java b/src/main/java/ellpeck/actuallyadditions/event/TooltipEvent.java index cc684d1f9..89a38b63d 100644 --- a/src/main/java/ellpeck/actuallyadditions/event/TooltipEvent.java +++ b/src/main/java/ellpeck/actuallyadditions/event/TooltipEvent.java @@ -53,7 +53,7 @@ public class TooltipEvent{ } else{ if(ConfigBoolValues.SHOW_NEED_BOOKLET_FOR_KEYBIND_INFO.isEnabled()){ - event.toolTip.addAll(Minecraft.getMinecraft().fontRenderer.listFormattedStringToWidth(EnumChatFormatting.DARK_RED+StringUtil.localizeFormatted("booklet."+ModUtil.MOD_ID_LOWER+".noBookletInInventory"), GuiBooklet.TOOLTIP_SPLIT_LENGTH)); + event.toolTip.addAll(Minecraft.getMinecraft().fontRenderer.listFormattedStringToWidth(EnumChatFormatting.ITALIC+StringUtil.localizeFormatted("booklet."+ModUtil.MOD_ID_LOWER+".noBookletInInventory"), GuiBooklet.TOOLTIP_SPLIT_LENGTH)); } } break; diff --git a/src/main/java/ellpeck/actuallyadditions/items/tools/table/ItemLumberAxe.java b/src/main/java/ellpeck/actuallyadditions/items/tools/table/ItemLumberAxe.java new file mode 100644 index 000000000..63242c809 --- /dev/null +++ b/src/main/java/ellpeck/actuallyadditions/items/tools/table/ItemLumberAxe.java @@ -0,0 +1,139 @@ +/* + * This file ("ItemLumberAxe.java") is part of the Actually Additions Mod for Minecraft. + * It is created and owned by Ellpeck and distributed + * under the Actually Additions License to be found at + * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md + * View the source code at https://github.com/Ellpeck/ActuallyAdditions + * + * © 2015 Ellpeck + */ + +package ellpeck.actuallyadditions.items.tools.table; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import ellpeck.actuallyadditions.items.tools.ItemAxeAA; +import ellpeck.actuallyadditions.util.ModUtil; +import ellpeck.actuallyadditions.util.StringUtil; +import ellpeck.actuallyadditions.util.WorldPos; +import net.minecraft.block.Block; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.EnumRarity; +import net.minecraft.item.ItemStack; +import net.minecraft.util.IIcon; +import net.minecraft.world.World; + +import java.util.ArrayList; + +public class ItemLumberAxe extends ItemAxeAA implements IToolTableRepairItem{ + + private final int maxToolDamage; + + private ItemStack repairStack; + private int repairPerStack; + + private IIcon iconBroken; + + public ItemLumberAxe(ToolMaterial toolMat, String unlocalizedName, EnumRarity rarity, ItemStack repairStack, int repairPerStack){ + super(toolMat, "", unlocalizedName, rarity); + this.maxToolDamage = this.getMaxDamage(); + this.setMaxDamage(this.maxToolDamage+1); + this.repairStack = repairStack; + this.repairPerStack = repairPerStack; + } + + @Override + public boolean onBlockStartBreak(ItemStack stack, int x, int y, int z, EntityPlayer player){ + + return false; + } + + private ArrayList getTreeBlocksToBreak(World world, int startX, int startY, int startZ){ + ArrayList positions = new ArrayList(); + int range = 3; + for(int x = -range; x < range+1; x++){ + for(int z = -range; z < range+1; z++){ + for(int y = -range; y < range+1; y++){ + int theX = startX+x; + int theY = startY+y; + int theZ = startZ+z; + + + } + } + } + return positions; + } + + public boolean isBroken(ItemStack stack){ + return this.isBroken(stack.getItemDamage()); + } + + private boolean isBroken(int damage){ + return damage > this.maxToolDamage; + } + + @Override + public boolean hasEffect(ItemStack stack, int pass){ + return false; + } + + @Override + public boolean isRepairable(){ + return false; + } + + @Override + public boolean getIsRepairable(ItemStack stack1, ItemStack stack2){ + return this.isRepairable(); + } + + @Override + public int getItemEnchantability(ItemStack stack){ + return 0; + } + + @Override + public String getItemStackDisplayName(ItemStack stack){ + return super.getItemStackDisplayName(stack)+(this.isBroken(stack) ? " ("+StringUtil.localize("tooltip."+ModUtil.MOD_ID_LOWER+".broken.desc")+")" : ""); + } + + @Override + public float getDigSpeed(ItemStack stack, Block block, int meta){ + return this.isBroken(stack) ? 0.0F : super.getDigSpeed(stack, block, meta); + } + + @Override + public boolean canHarvestBlock(Block block, ItemStack stack){ + return !this.isBroken(stack) && super.canHarvestBlock(block, stack); + } + + @Override + public IIcon getIcon(ItemStack stack, int renderPass, EntityPlayer player, ItemStack useItem, int useRemaining){ + return this.isBroken(stack) ? this.iconBroken : this.itemIcon; + } + + @Override + @SideOnly(Side.CLIENT) + public IIcon getIconFromDamage(int damage){ + return this.isBroken(damage) ? this.iconBroken : this.itemIcon; + } + + @Override + @SideOnly(Side.CLIENT) + public void registerIcons(IIconRegister iconReg){ + this.iconBroken = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getName()+"Broken"); + this.itemIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getName()); + } + + @Override + public ItemStack getRepairStack(){ + return this.repairStack; + } + + @Override + public int repairPerStack(){ + return this.repairPerStack; + } +} diff --git a/src/main/java/ellpeck/actuallyadditions/tile/TileEntityBase.java b/src/main/java/ellpeck/actuallyadditions/tile/TileEntityBase.java index fc1ebaa94..3db725d77 100644 --- a/src/main/java/ellpeck/actuallyadditions/tile/TileEntityBase.java +++ b/src/main/java/ellpeck/actuallyadditions/tile/TileEntityBase.java @@ -71,7 +71,7 @@ public class TileEntityBase extends TileEntity{ GameRegistry.registerTileEntity(TileEntityXPSolidifier.class, ModUtil.MOD_ID_LOWER+":tileEntityXPSolidifier"); GameRegistry.registerTileEntity(TileEntityOreMagnet.class, ModUtil.MOD_ID_LOWER+":tileEntityOreMagnet"); GameRegistry.registerTileEntity(TileEntitySmileyCloud.class, ModUtil.MOD_ID_LOWER+":tileEntityCloud"); - GameRegistry.registerTileEntity(TileEntityToolTable.class, ModUtil.MOD_ID_LOWER+":tileEntityToolTable"); + //GameRegistry.registerTileEntity(TileEntityToolTable.class, ModUtil.MOD_ID_LOWER+":tileEntityToolTable"); } @Override diff --git a/src/main/java/ellpeck/actuallyadditions/util/ModUtil.java b/src/main/java/ellpeck/actuallyadditions/util/ModUtil.java index c9766d4a2..dc5ed5f37 100644 --- a/src/main/java/ellpeck/actuallyadditions/util/ModUtil.java +++ b/src/main/java/ellpeck/actuallyadditions/util/ModUtil.java @@ -15,7 +15,7 @@ import org.apache.logging.log4j.Logger; public class ModUtil{ - public static final String VERSION = "1.7.10-0.0.9.1"; + public static final String VERSION = "1.7.10-0.0.9.2"; public static final String MOD_ID = "ActuallyAdditions"; public static final String NAME = "Actually Additions"; diff --git a/update/changelog.txt b/update/changelog.txt index a6d9524f1..7d7814365 100644 --- a/update/changelog.txt +++ b/update/changelog.txt @@ -1 +1 @@ -Added the Actually Additions Manual with everything you need to know awesomely organized! \ No newline at end of file +Made the ActAdd Manual Tooltip more subtle, added better coffee machine pages into the book \ No newline at end of file diff --git a/update/newestVersion.txt b/update/newestVersion.txt index 08801fd89..7d4c58d34 100644 --- a/update/newestVersion.txt +++ b/update/newestVersion.txt @@ -1 +1 @@ -1.7.10-0.0.9.1 \ No newline at end of file +1.7.10-0.0.9.2 \ No newline at end of file