Update Checker done, NEI, InventoryTweaks and Waila implemented

This commit is contained in:
Ellpeck 2015-04-27 17:08:50 +02:00
parent 9110724bec
commit fc4a7421d6
18 changed files with 58 additions and 27 deletions

View file

@ -18,7 +18,7 @@ buildscript {
apply plugin: 'forge' apply plugin: 'forge'
apply plugin: 'maven' apply plugin: 'maven'
version = "1.7.10-0.0.4" version = "1.7.10-0.0.4.1"
group = "ellpeck.actuallyadditions" group = "ellpeck.actuallyadditions"
archivesBaseName = "ActuallyAdditions" archivesBaseName = "ActuallyAdditions"
@ -40,9 +40,14 @@ repositories {
dependencies { dependencies {
compile "mcp.mobius.waila:Waila:1.5.6_1.7.10" compile "mcp.mobius.waila:Waila:1.5.6_1.7.10"
/*When Compiling from Github, you will need to have this file present
because InventoryTweaks doesn't have a Maven Repo.
But no one is going to download and compile this anyway, so it doesn't really matter. */
compile files("lib/InventoryTweaks-api-1.58-147.jar")
} }
task copyChicken(type: Copy, dependsOn: "extractUserDev") { task copyChickenBones(type: Copy, dependsOn: "extractUserDev") {
from { configurations.compile } from { configurations.compile }
include "**/*Chicken*.jar", "**/*NotEnoughItems*.jar" include "**/*Chicken*.jar", "**/*NotEnoughItems*.jar"
exclude "**/CodeChickenLib*" exclude "**/CodeChickenLib*"
@ -50,8 +55,6 @@ task copyChicken(type: Copy, dependsOn: "extractUserDev") {
mustRunAfter "deobfBinJar" mustRunAfter "deobfBinJar"
mustRunAfter "repackMinecraft" mustRunAfter "repackMinecraft"
} }
tasks.setupDevWorkspace.dependsOn copyChicken
tasks.setupDecompWorkspace.dependsOn copyChicken
processResources{ processResources{

View file

@ -1 +1 @@
1.7.10-0.0.4 1.7.10-0.0.4.1

View file

@ -63,13 +63,17 @@ public class GrinderCrafting{
ItemStack input = theInput.copy(); ItemStack input = theInput.copy();
if(GrinderRecipes.instance().getOutput(input, false) == null){ if(GrinderRecipes.instance().getOutput(input, false) == null){
ArrayList<ItemStack> specialStacks = null; ArrayList<ItemStack> specialStacks = null;
int specialAmount = 0;
if(name.equals("oreNickel")) specialStacks = OreDictionary.getOres("dustPlatinum"); if(name.equals("oreNickel")){
specialStacks = OreDictionary.getOres("dustPlatinum");
specialAmount = 30;
}
if(specialStacks != null && specialStacks.size() > 0){ if(specialStacks != null && specialStacks.size() > 0){
for(ItemStack theSpecial : specialStacks){ for(ItemStack theSpecial : specialStacks){
ItemStack special = theSpecial.copy(); ItemStack special = theSpecial.copy();
GrinderRecipes.instance().registerRecipe(input, output, special, 10); GrinderRecipes.instance().registerRecipe(input, output, special, specialAmount);
} }
} }
else GrinderRecipes.instance().registerRecipe(input, output, null, 0); else GrinderRecipes.instance().registerRecipe(input, output, null, 0);

View file

@ -83,7 +83,7 @@ public class ItemCrafting{
//SpeedUpgrade //SpeedUpgrade
if(ConfigCrafting.SPEED_UPGRADE.isEnabled()) if(ConfigCrafting.SPEED_UPGRADE.isEnabled())
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemSpeedUpgrade), GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemSpeedUpgrade, 2),
"RGR", "GUG", "RGR", "RGR", "GUG", "RGR",
'U', TheMiscItems.COIL.getOredictName(), 'U', TheMiscItems.COIL.getOredictName(),
'R', "dustRedstone", 'R', "dustRedstone",

View file

@ -2,12 +2,14 @@ package ellpeck.actuallyadditions.inventory;
import ellpeck.actuallyadditions.tile.TileEntityBase; import ellpeck.actuallyadditions.tile.TileEntityBase;
import ellpeck.actuallyadditions.tile.TileEntityBreaker; import ellpeck.actuallyadditions.tile.TileEntityBreaker;
import invtweaks.api.container.InventoryContainer;
import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.inventory.Container; import net.minecraft.inventory.Container;
import net.minecraft.inventory.Slot; import net.minecraft.inventory.Slot;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
@InventoryContainer
public class ContainerBreaker extends Container{ public class ContainerBreaker extends Container{
private TileEntityBreaker breaker; private TileEntityBreaker breaker;

View file

@ -1,5 +1,6 @@
package ellpeck.actuallyadditions.inventory; package ellpeck.actuallyadditions.inventory;
import invtweaks.api.container.InventoryContainer;
import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.inventory.*; import net.minecraft.inventory.*;
@ -7,6 +8,7 @@ import net.minecraft.item.ItemStack;
import net.minecraft.item.crafting.CraftingManager; import net.minecraft.item.crafting.CraftingManager;
import net.minecraft.world.World; import net.minecraft.world.World;
@InventoryContainer
public class ContainerCrafter extends Container{ public class ContainerCrafter extends Container{
public InventoryCrafting craftMatrix = new InventoryCrafting(this, 3, 3); public InventoryCrafting craftMatrix = new InventoryCrafting(this, 3, 3);

View file

@ -4,6 +4,7 @@ import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly; import cpw.mods.fml.relauncher.SideOnly;
import ellpeck.actuallyadditions.tile.TileEntityBase; import ellpeck.actuallyadditions.tile.TileEntityBase;
import ellpeck.actuallyadditions.tile.TileEntityFeeder; import ellpeck.actuallyadditions.tile.TileEntityFeeder;
import invtweaks.api.container.InventoryContainer;
import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.inventory.Container; import net.minecraft.inventory.Container;
@ -11,6 +12,7 @@ import net.minecraft.inventory.ICrafting;
import net.minecraft.inventory.Slot; import net.minecraft.inventory.Slot;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
@InventoryContainer
public class ContainerFeeder extends Container{ public class ContainerFeeder extends Container{
private TileEntityFeeder tileFeeder; private TileEntityFeeder tileFeeder;

View file

@ -5,6 +5,7 @@ import cpw.mods.fml.relauncher.SideOnly;
import ellpeck.actuallyadditions.inventory.slot.SlotOutput; import ellpeck.actuallyadditions.inventory.slot.SlotOutput;
import ellpeck.actuallyadditions.tile.TileEntityBase; import ellpeck.actuallyadditions.tile.TileEntityBase;
import ellpeck.actuallyadditions.tile.TileEntityFurnaceDouble; import ellpeck.actuallyadditions.tile.TileEntityFurnaceDouble;
import invtweaks.api.container.InventoryContainer;
import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.inventory.Container; import net.minecraft.inventory.Container;
@ -14,6 +15,7 @@ import net.minecraft.item.ItemStack;
import net.minecraft.item.crafting.FurnaceRecipes; import net.minecraft.item.crafting.FurnaceRecipes;
import net.minecraft.tileentity.TileEntityFurnace; import net.minecraft.tileentity.TileEntityFurnace;
@InventoryContainer
public class ContainerFurnaceDouble extends Container{ public class ContainerFurnaceDouble extends Container{
private TileEntityFurnaceDouble tileFurnace; private TileEntityFurnaceDouble tileFurnace;

View file

@ -2,12 +2,14 @@ package ellpeck.actuallyadditions.inventory;
import ellpeck.actuallyadditions.tile.TileEntityBase; import ellpeck.actuallyadditions.tile.TileEntityBase;
import ellpeck.actuallyadditions.tile.TileEntityGiantChest; import ellpeck.actuallyadditions.tile.TileEntityGiantChest;
import invtweaks.api.container.ChestContainer;
import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.inventory.Container; import net.minecraft.inventory.Container;
import net.minecraft.inventory.Slot; import net.minecraft.inventory.Slot;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
@ChestContainer(rowSize = 13)
public class ContainerGiantChest extends Container{ public class ContainerGiantChest extends Container{
public TileEntityGiantChest tileChest; public TileEntityGiantChest tileChest;

View file

@ -6,6 +6,7 @@ import ellpeck.actuallyadditions.inventory.slot.SlotOutput;
import ellpeck.actuallyadditions.recipe.GrinderRecipes; import ellpeck.actuallyadditions.recipe.GrinderRecipes;
import ellpeck.actuallyadditions.tile.TileEntityBase; import ellpeck.actuallyadditions.tile.TileEntityBase;
import ellpeck.actuallyadditions.tile.TileEntityGrinder; import ellpeck.actuallyadditions.tile.TileEntityGrinder;
import invtweaks.api.container.InventoryContainer;
import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.inventory.Container; import net.minecraft.inventory.Container;
@ -14,6 +15,7 @@ import net.minecraft.inventory.Slot;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntityFurnace; import net.minecraft.tileentity.TileEntityFurnace;
@InventoryContainer
public class ContainerGrinder extends Container{ public class ContainerGrinder extends Container{
private TileEntityGrinder tileGrinder; private TileEntityGrinder tileGrinder;

View file

@ -5,6 +5,7 @@ import cpw.mods.fml.relauncher.SideOnly;
import ellpeck.actuallyadditions.inventory.slot.SlotFilter; import ellpeck.actuallyadditions.inventory.slot.SlotFilter;
import ellpeck.actuallyadditions.tile.TileEntityBase; import ellpeck.actuallyadditions.tile.TileEntityBase;
import ellpeck.actuallyadditions.tile.TileEntityInputter; import ellpeck.actuallyadditions.tile.TileEntityInputter;
import invtweaks.api.container.InventoryContainer;
import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.inventory.Container; import net.minecraft.inventory.Container;
@ -12,6 +13,7 @@ import net.minecraft.inventory.ICrafting;
import net.minecraft.inventory.Slot; import net.minecraft.inventory.Slot;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
@InventoryContainer
public class ContainerInputter extends Container{ public class ContainerInputter extends Container{
private TileEntityInputter tileInputter; private TileEntityInputter tileInputter;

View file

@ -5,6 +5,7 @@ import cpw.mods.fml.relauncher.SideOnly;
import ellpeck.actuallyadditions.inventory.slot.SlotOutput; import ellpeck.actuallyadditions.inventory.slot.SlotOutput;
import ellpeck.actuallyadditions.tile.TileEntityBase; import ellpeck.actuallyadditions.tile.TileEntityBase;
import ellpeck.actuallyadditions.tile.TileEntityItemRepairer; import ellpeck.actuallyadditions.tile.TileEntityItemRepairer;
import invtweaks.api.container.InventoryContainer;
import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.inventory.Container; import net.minecraft.inventory.Container;
@ -13,6 +14,7 @@ import net.minecraft.inventory.Slot;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntityFurnace; import net.minecraft.tileentity.TileEntityFurnace;
@InventoryContainer
public class ContainerRepairer extends Container{ public class ContainerRepairer extends Container{
private TileEntityItemRepairer tileRepairer; private TileEntityItemRepairer tileRepairer;

View file

@ -158,7 +158,7 @@ public class CrusherRecipeHandler extends TemplateRecipeHandler{
if(crush.resultTwo != null){ if(crush.resultTwo != null){
int secondChance = crush.secondChance; int secondChance = crush.secondChance;
String secondString = secondChance + "%"; String secondString = secondChance + "%";
GuiDraw.drawString(secondString, 87, 24, StringUtil.DECIMAL_COLOR_WHITE, false); GuiDraw.drawString(secondString, 87, 24, StringUtil.DECIMAL_COLOR_GRAY_TEXT, false);
} }
} }

View file

@ -30,6 +30,10 @@ public class ClientProxy implements IProxy{
public void init(){ public void init(){
Util.logInfo("Initializing ClientProxy..."); Util.logInfo("Initializing ClientProxy...");
if(ConfigBoolValues.DO_UPDATE_CHECK.isEnabled()){
new UpdateChecker().init();
}
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityCompost.class, new RenderTileEntity(new ModelCompost())); ClientRegistry.bindTileEntitySpecialRenderer(TileEntityCompost.class, new RenderTileEntity(new ModelCompost()));
MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(InitBlocks.blockCompost), new RenderItems(new ModelCompost())); MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(InitBlocks.blockCompost), new RenderItems(new ModelCompost()));
@ -42,7 +46,6 @@ public class ClientProxy implements IProxy{
VillagerRegistry.instance().registerVillagerSkin(ConfigIntValues.JAM_VILLAGER_ID.getValue(), new ResourceLocation(ModUtil.MOD_ID_LOWER, "textures/entity/villager/jamVillager.png")); VillagerRegistry.instance().registerVillagerSkin(ConfigIntValues.JAM_VILLAGER_ID.getValue(), new ResourceLocation(ModUtil.MOD_ID_LOWER, "textures/entity/villager/jamVillager.png"));
Util.registerEvent(new RenderPlayerEventAA()); Util.registerEvent(new RenderPlayerEventAA());
if(ConfigBoolValues.DO_UPDATE_CHECK.isEnabled()) new UpdateChecker().init();
} }
@Override @Override

View file

@ -65,6 +65,7 @@ public class UpdateChecker{
BufferedReader r = new BufferedReader(new InputStreamReader(url.openStream())); BufferedReader r = new BufferedReader(new InputStreamReader(url.openStream()));
onlineVersion = r.readLine(); onlineVersion = r.readLine();
r.close(); r.close();
Util.logInfo("Update Check done!");
} }
catch(Exception e){ catch(Exception e){
ModUtil.AA_LOGGER.log(Level.ERROR, "Update Check failed!"); ModUtil.AA_LOGGER.log(Level.ERROR, "Update Check failed!");

View file

@ -5,7 +5,7 @@ import org.apache.logging.log4j.Logger;
public class ModUtil{ public class ModUtil{
public static final String VERSION = "1.7.10-0.0.4"; public static final String VERSION = "1.7.10-0.0.4.1";
public static final String MOD_ID = "ActuallyAdditions"; public static final String MOD_ID = "ActuallyAdditions";
public static final String NAME = "Actually Additions"; public static final String NAME = "Actually Additions";

View file

@ -34,26 +34,30 @@ public class WailaDataProvider implements IWailaDataProvider{
public List<String> getWailaBody(ItemStack itemStack, List<String> currentTip, IWailaDataAccessor accessor, IWailaConfigHandler config){ public List<String> getWailaBody(ItemStack itemStack, List<String> currentTip, IWailaDataAccessor accessor, IWailaConfigHandler config){
if (accessor.getTileEntity() instanceof TileEntityCompost){ if (accessor.getTileEntity() instanceof TileEntityCompost){
int meta = accessor.getMetadata(); this.compostBody(accessor, currentTip);
TileEntityCompost tile = (TileEntityCompost)accessor.getTileEntity();
if(meta <= tile.amountNeededToConvert){
String tip1 = StatCollector.translateToLocal(WAILA_PRE_LANG + "compostAmount" + ".name") + ": " + meta + "/" + tile.amountNeededToConvert;
currentTip.add(tip1);
if(meta == tile.amountNeededToConvert){
currentTip.add(StatCollector.translateToLocal(WAILA_PRE_LANG + "compostConverting" + ".name"));
}
}
if(meta == tile.amountNeededToConvert+1){
currentTip.add(StatCollector.translateToLocal(WAILA_PRE_LANG + "compostDone" + ".name"));
}
} }
return currentTip; return currentTip;
} }
public void compostBody(IWailaDataAccessor accessor, List<String> currentTip){
int meta = accessor.getMetadata();
TileEntityCompost tile = (TileEntityCompost)accessor.getTileEntity();
if(meta <= tile.amountNeededToConvert){
String tip1 = StatCollector.translateToLocal(WAILA_PRE_LANG + "compostAmount" + ".name") + ": " + meta + "/" + tile.amountNeededToConvert;
currentTip.add(tip1);
if(meta == tile.amountNeededToConvert){
currentTip.add(StatCollector.translateToLocal(WAILA_PRE_LANG + "compostConverting" + ".name"));
}
}
if(meta == tile.amountNeededToConvert+1){
currentTip.add(StatCollector.translateToLocal(WAILA_PRE_LANG + "compostDone" + ".name"));
}
}
@Override @Override
public List<String> getWailaTail(ItemStack itemStack, List<String> currentTip, IWailaDataAccessor accessor, IWailaConfigHandler config){ public List<String> getWailaTail(ItemStack itemStack, List<String> currentTip, IWailaDataAccessor accessor, IWailaConfigHandler config){
return currentTip; return currentTip;

View file

@ -3,7 +3,7 @@
"modid": "ActuallyAdditions", "modid": "ActuallyAdditions",
"name": "Actually Additions", "name": "Actually Additions",
"description": "Actually Additions is a Mod that offers a bunch of things from Machines for Automation and tons of food to advanced Hopper Mechanisms and Effect Rings!", "description": "Actually Additions is a Mod that offers a bunch of things from Machines for Automation and tons of food to advanced Hopper Mechanisms and Effect Rings!",
"version": "0.0.4", "version": "0.0.4.1",
"mcversion": "1.7.10", "mcversion": "1.7.10",
"url": "https://github.com/Ellpeck/ActuallyAdditions", "url": "https://github.com/Ellpeck/ActuallyAdditions",
"updateUrl": "", "updateUrl": "",