fixed untracked files

This commit is contained in:
Ellpeck 2015-04-26 20:07:57 +02:00
parent 66fcde800a
commit baf07d13c1
22 changed files with 462 additions and 14 deletions

3
.gitignore vendored
View file

@ -5,4 +5,5 @@
/.idea
/*.iml
/*.ipr
/*.iws
/*.iws
/lib

View file

@ -16,20 +16,43 @@ buildscript {
}
apply plugin: 'forge'
apply plugin: 'maven'
version = "1.7.10-0.0.3.5"
version = "1.7.10-0.0.4"
group = "ellpeck.actuallyadditions"
archivesBaseName = "ActuallyAdditions"
minecraft {
version = "1.7.10-10.13.2.1291"
version = "1.7.10-10.13.3.1395-1710ls"
runDir = "idea"
}
dependencies{
repositories {
maven {
name "Mobius"
url "http://mobiusstrip.eu/maven"
}
maven {
name "ChickenBones"
url "http://chickenbones.net/maven/"
}
}
dependencies {
compile "mcp.mobius.waila:Waila:1.5.6_1.7.10"
}
task copyChicken(type: Copy, dependsOn: "extractUserDev") {
from { configurations.compile }
include "**/*Chicken*.jar", "**/*NotEnoughItems*.jar"
exclude "**/CodeChickenLib*"
into file("./run/mods")
mustRunAfter "deobfBinJar"
mustRunAfter "repackMinecraft"
}
tasks.setupDevWorkspace.dependsOn copyChicken
tasks.setupDecompWorkspace.dependsOn copyChicken
processResources{
inputs.property "version", project.version

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View file

@ -5,6 +5,7 @@ import cpw.mods.fml.common.Mod.EventHandler;
import cpw.mods.fml.common.Mod.Instance;
import cpw.mods.fml.common.SidedProxy;
import cpw.mods.fml.common.event.FMLInitializationEvent;
import cpw.mods.fml.common.event.FMLInterModComms;
import cpw.mods.fml.common.event.FMLPostInitializationEvent;
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
import ellpeck.actuallyadditions.achievement.InitAchievements;
@ -59,6 +60,7 @@ public class ActuallyAdditions{
TileEntityBase.init();
InitEvents.init();
InitCrafting.init();
FMLInterModComms.sendMessage("Waila", "register", "ellpeck.actuallyadditions.waila.WailaDataProvider.register");
proxy.init();
Util.logInfo("Initialization Finished.");

View file

@ -0,0 +1,119 @@
package ellpeck.actuallyadditions.blocks;
import cpw.mods.fml.client.registry.RenderingRegistry;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import ellpeck.actuallyadditions.util.BlockUtil;
import ellpeck.actuallyadditions.util.INameableItem;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Blocks;
import net.minecraft.item.EnumRarity;
import net.minecraft.item.ItemBlock;
import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.IIcon;
import net.minecraft.world.World;
import java.util.List;
public class BlockCoffeeMachine extends BlockContainerBase implements INameableItem{
public BlockCoffeeMachine(){
super(Material.wood);
this.setHarvestLevel("axe", 0);
this.setHardness(1.0F);
this.setStepSound(soundTypeWood);
}
@Override
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int f6, float f7, float f8, float f9){
if(!world.isRemote){
}
return true;
}
@Override
public IIcon getIcon(int side, int metadata){
return this.blockIcon;
}
@Override
@SideOnly(Side.CLIENT)
public void registerBlockIcons(IIconRegister iconReg){
this.blockIcon = Blocks.hopper.getIcon(0, 0);
}
@Override
public boolean isOpaqueCube(){
return false;
}
@Override
public boolean renderAsNormalBlock(){
return false;
}
@Override
public int getRenderType(){
return RenderingRegistry.getNextAvailableRenderId();
}
@Override
public TileEntity createNewTileEntity(World world, int meta){
return null;
}
@Override
public void breakBlock(World world, int x, int y, int z, Block block, int par6){
this.dropInventory(world, x, y, z);
super.breakBlock(world, x, y, z, block, par6);
}
@Override
public String getName(){
return "blockCoffeeMachine";
}
@Override
public String getOredictName(){
return this.getName();
}
public static class TheItemBlock extends ItemBlock{
private Block theBlock;
public TheItemBlock(Block block){
super(block);
this.theBlock = block;
this.setHasSubtypes(false);
this.setMaxDamage(0);
}
@Override
public EnumRarity getRarity(ItemStack stack){
return EnumRarity.uncommon;
}
@Override
public String getUnlocalizedName(ItemStack stack){
return this.getUnlocalizedName();
}
@Override
@SuppressWarnings("unchecked")
@SideOnly(Side.CLIENT)
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean isHeld) {
BlockUtil.addInformation(theBlock, list, 1, "");
}
@Override
public int getMetadata(int damage){
return damage;
}
}
}

View file

@ -104,7 +104,7 @@ public class BlockInputter extends BlockContainerBase implements INameableItem{
if(this.lastSysTime+5000 < sysTime){
this.lastSysTime = sysTime;
this.toPick = rand.nextInt(NAME_FLAVOUR_AMOUNTS+1);
this.toPick = rand.nextInt(NAME_FLAVOUR_AMOUNTS)+1;
}
return StatCollector.translateToLocal(this.getUnlocalizedName() + ".name") + " (" + StatCollector.translateToLocal("tile." + ModUtil.MOD_ID_LOWER + ".blockInputter.add." + this.toPick + ".name") + ")";

View file

@ -24,6 +24,8 @@ public class InitBlocks{
public static Block blockBreaker;
public static Block blockPlacer;
//public static Block blockCoffeeMachine;
public static void init(){
Util.logInfo("Initializing Blocks...");
@ -74,5 +76,8 @@ public class InitBlocks{
blockPlacer = new BlockBreaker(true);
BlockUtil.register(blockPlacer, BlockBreaker.TheItemBlock.class);
//blockCoffeeMachine = new BlockCoffeeMachine();
//BlockUtil.register(blockCoffeeMachine, BlockCoffeeMachine.TheItemBlock.class);
}
}

View file

@ -32,8 +32,10 @@ public class CreativeTab extends CreativeTabs{
this.addBlock(InitBlocks.blockGrinder);
this.addBlock(InitBlocks.blockGrinderDouble);
this.addBlock(InitBlocks.blockFurnaceDouble);
this.addBlock(InitBlocks.blockFurnaceSolar);
this.addBlock(InitBlocks.blockHeatCollector);
//TODO Re-add
//this.addBlock(InitBlocks.blockFurnaceSolar);
//this.addBlock(InitBlocks.blockHeatCollector);
this.addBlock(InitBlocks.blockItemRepairer);
this.addBlock(InitBlocks.blockFishingNet);
this.addBlock(InitBlocks.blockBreaker);

View file

@ -0,0 +1,191 @@
package ellpeck.actuallyadditions.nei;
import codechicken.lib.gui.GuiDraw;
import codechicken.nei.ItemList;
import codechicken.nei.NEIServerUtils;
import codechicken.nei.PositionedStack;
import codechicken.nei.recipe.TemplateRecipeHandler;
import ellpeck.actuallyadditions.inventory.GuiGrinder;
import ellpeck.actuallyadditions.recipe.GrinderRecipes;
import ellpeck.actuallyadditions.util.ModUtil;
import ellpeck.actuallyadditions.util.StringUtil;
import net.minecraft.client.gui.inventory.GuiContainer;
import net.minecraft.init.Blocks;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntityFurnace;
import net.minecraft.util.StatCollector;
import org.lwjgl.opengl.GL11;
import java.awt.*;
import java.util.*;
import java.util.List;
public class CrusherRecipeHandler extends TemplateRecipeHandler{
public static final String NAME = "crushing";
public static final String FUEL = "fuel";
public static ArrayList<Fuel> fuels;
public class CachedCrush extends CachedRecipe{
public PositionedStack ingredient;
public PositionedStack resultOne;
public PositionedStack resultTwo;
public int secondChance;
public CachedCrush(ItemStack in, ItemStack resultOne, ItemStack resultTwo, int secondChance){
in.stackSize = 1;
this.ingredient = new PositionedStack(in, 7, 37);
this.resultOne = new PositionedStack(resultOne, 60, 39);
if(resultTwo != null) this.resultTwo = new PositionedStack(resultTwo, 86, 39);
this.secondChance = secondChance;
}
@Override
public List<PositionedStack> getIngredients(){
return getCycledIngredients(cycleticks / 48, Collections.singletonList(ingredient));
}
@Override
public PositionedStack getResult(){
return resultOne;
}
@Override
public PositionedStack getOtherStack(){
return fuels.get((cycleticks / 48) % fuels.size()).stack;
}
@Override
public List<PositionedStack> getOtherStacks(){
ArrayList<PositionedStack> list = new ArrayList<PositionedStack>();
list.add(this.getOtherStack());
if(this.resultTwo != null) list.add(this.resultTwo);
return list;
}
}
public static class Fuel{
public Fuel(ItemStack in, int burnTime){
this.stack = new PositionedStack(in, 7, 3, false);
this.burnTime = burnTime;
}
public PositionedStack stack;
public int burnTime;
}
@Override
public void loadTransferRects(){
transferRects.add(new RecipeTransferRect(new Rectangle(29, 3, 16, 16), FUEL));
transferRects.add(new RecipeTransferRect(new Rectangle(29, 32, 22, 22), NAME));
}
@Override
public Class<? extends GuiContainer> getGuiClass(){
return GuiGrinder.class;
}
@Override
public String getRecipeName(){
return StatCollector.translateToLocal("container." + ModUtil.MOD_ID_LOWER + ".nei." + NAME + ".name");
}
@Override
public TemplateRecipeHandler newInstance(){
if (fuels == null || fuels.isEmpty()) findFuels();
return super.newInstance();
}
@Override
public void loadCraftingRecipes(String outputId, Object... results){
if(outputId.equals(NAME) && getClass() == CrusherRecipeHandler.class){
ArrayList<GrinderRecipes.GrinderRecipe> recipes = GrinderRecipes.instance().recipes;
for(GrinderRecipes.GrinderRecipe recipe : recipes){
arecipes.add(new CachedCrush(recipe.input, recipe.firstOutput, recipe.secondOutput, recipe.secondChance));
}
}
else super.loadCraftingRecipes(outputId, results);
}
@Override
public void loadCraftingRecipes(ItemStack result){
ArrayList<GrinderRecipes.GrinderRecipe> recipes = GrinderRecipes.instance().recipes;
for(GrinderRecipes.GrinderRecipe recipe : recipes){
if(NEIServerUtils.areStacksSameType(recipe.firstOutput, result) || NEIServerUtils.areStacksSameType(recipe.secondOutput, result)) arecipes.add(new CachedCrush(recipe.input, recipe.firstOutput, recipe.secondOutput, recipe.secondChance));
}
}
@Override
public void loadUsageRecipes(String inputId, Object... ingredients){
if (inputId.equals(FUEL) && getClass() == CrusherRecipeHandler.class) loadCraftingRecipes(NAME);
else super.loadUsageRecipes(inputId, ingredients);
}
@Override
public void loadUsageRecipes(ItemStack ingredient){
ArrayList<GrinderRecipes.GrinderRecipe> recipes = GrinderRecipes.instance().recipes;
for(GrinderRecipes.GrinderRecipe recipe : recipes){
if(NEIServerUtils.areStacksSameTypeCrafting(recipe.input, ingredient)){
CachedCrush theRecipe = new CachedCrush(recipe.input, recipe.firstOutput, recipe.secondOutput, recipe.secondChance);
theRecipe.setIngredientPermutation(Collections.singletonList(theRecipe.ingredient), ingredient);
arecipes.add(theRecipe);
}
}
}
@Override
public String getGuiTexture(){
return ModUtil.MOD_ID_LOWER + ":textures/gui/nei/grinder.png";
}
@Override
public void drawBackground(int recipeIndex){
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
GuiDraw.changeTexture(getGuiTexture());
GuiDraw.drawTexturedModalRect(0, 0, 0, 0, 113, 66);
}
@Override
public void drawExtras(int recipe){
drawProgressBar(29, 4, 113, 44, 14, 14, 48, 7);
drawProgressBar(29, 32, 113, 0, 22, 22, 48, 0);
CachedCrush crush = (CachedCrush)this.arecipes.get(recipe);
if(crush.resultTwo != null){
int secondChance = crush.secondChance;
String secondString = secondChance + "%";
GuiDraw.drawString(secondString, 87, 24, StringUtil.DECIMAL_COLOR_WHITE, false);
}
}
private static Set<Item> excludedFuels(){
Set<Item> theFuels = new HashSet<Item>();
theFuels.add(Item.getItemFromBlock(Blocks.brown_mushroom));
theFuels.add(Item.getItemFromBlock(Blocks.red_mushroom));
theFuels.add(Item.getItemFromBlock(Blocks.standing_sign));
theFuels.add(Item.getItemFromBlock(Blocks.wall_sign));
theFuels.add(Item.getItemFromBlock(Blocks.wooden_door));
theFuels.add(Item.getItemFromBlock(Blocks.trapped_chest));
return theFuels;
}
private static void findFuels(){
fuels = new ArrayList<Fuel>();
Set<Item> theFuels = excludedFuels();
for(ItemStack item : ItemList.items){
if(!theFuels.contains(item.getItem())){
int burnTime = TileEntityFurnace.getItemBurnTime(item);
if(burnTime > 0) fuels.add(new Fuel(item.copy(), burnTime));
}
}
}
@Override
public String getOverlayIdentifier(){
return NAME;
}
}

View file

@ -0,0 +1,34 @@
package ellpeck.actuallyadditions.nei;
import codechicken.nei.api.API;
import codechicken.nei.api.IConfigureNEI;
import ellpeck.actuallyadditions.blocks.InitBlocks;
import ellpeck.actuallyadditions.util.ModUtil;
import ellpeck.actuallyadditions.util.Util;
import net.minecraft.item.ItemStack;
public class NEIActuallyAdditionsConfig implements IConfigureNEI{
@Override
public void loadConfig(){
Util.logInfo("Initializing Not Enough Items Plugin...");
CrusherRecipeHandler crusherRecipeHandler = new CrusherRecipeHandler();
API.registerRecipeHandler(crusherRecipeHandler);
API.registerUsageHandler(crusherRecipeHandler);
//TODO Re-add
API.hideItem(new ItemStack(InitBlocks.blockHeatCollector));
API.hideItem(new ItemStack(InitBlocks.blockFurnaceSolar));
}
@Override
public String getName(){
return ModUtil.MOD_ID + " NEI Plugin";
}
@Override
public String getVersion(){
return ModUtil.VERSION;
}
}

View file

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

View file

@ -0,0 +1,67 @@
package ellpeck.actuallyadditions.waila;
import ellpeck.actuallyadditions.tile.TileEntityCompost;
import ellpeck.actuallyadditions.util.ModUtil;
import ellpeck.actuallyadditions.util.Util;
import mcp.mobius.waila.api.IWailaConfigHandler;
import mcp.mobius.waila.api.IWailaDataAccessor;
import mcp.mobius.waila.api.IWailaDataProvider;
import mcp.mobius.waila.api.IWailaRegistrar;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.StatCollector;
import net.minecraft.world.World;
import java.util.List;
@SuppressWarnings("unused")
public class WailaDataProvider implements IWailaDataProvider{
private final String WAILA_PRE_LANG = "gui." + ModUtil.MOD_ID_LOWER + ".waila.";
@Override
public ItemStack getWailaStack(IWailaDataAccessor accessor, IWailaConfigHandler config){
return null;
}
@Override
public List<String> getWailaHead(ItemStack itemStack, List<String> currentTip, IWailaDataAccessor accessor, IWailaConfigHandler config){
return currentTip;
}
@Override
public List<String> getWailaBody(ItemStack itemStack, List<String> currentTip, IWailaDataAccessor accessor, IWailaConfigHandler config){
if (accessor.getTileEntity() instanceof TileEntityCompost){
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+1){
currentTip.add(StatCollector.translateToLocal(WAILA_PRE_LANG + "compostDone" + ".name"));
}
}
return currentTip;
}
@Override
public List<String> getWailaTail(ItemStack itemStack, List<String> currentTip, IWailaDataAccessor accessor, IWailaConfigHandler config){
return currentTip;
}
public NBTTagCompound getNBTData(TileEntity te, NBTTagCompound tag, World world, int x, int y, int z){
return tag;
}
public static void register(IWailaRegistrar registrar){
Util.logInfo("Initializing Waila Plugin...");
registrar.registerBodyProvider(new WailaDataProvider(), TileEntityCompost.class);
}
}

View file

@ -24,8 +24,7 @@ tile.actuallyadditions.blockPlacer.name=Placer
tile.actuallyadditions.blockInputter.name=ESD
tile.actuallyadditions.blockInputterAdvanced.name=Advanced ESD
tile.actuallyadditions.blockInputter.add.0.name=Ellpeck's Slot Device
tile.actuallyadditions.blockInputter.add.1.name=Energetic Solo Dancer
tile.actuallyadditions.blockInputter.add.1.name=Ellpeck's Slot Device
tile.actuallyadditions.blockInputter.add.2.name=Ethereal System Dude
tile.actuallyadditions.blockInputter.add.3.name=Energy Stuff Distributor
tile.actuallyadditions.blockInputter.add.4.name=Existing Stuff Donator
@ -36,7 +35,7 @@ tile.actuallyadditions.blockInputter.add.8.name=Extraordinary Sample Deliverer
tile.actuallyadditions.blockInputter.add.9.name=Express Sending Doughnut
tile.actuallyadditions.blockInputter.add.10.name=Expelling Sugar Dagger
tile.actuallyadditions.blockInputter.add.11.name=Extra-Long Solidifying Dissociation
tile.actuallyadditions.blockInputter.add.12.name=Extravagant Supreme Dirt
tile.actuallyadditions.blockInputter.add.12.name=Energetic Solo Dancer
tile.actuallyadditions.blockInputter.add.13.name=Efficient Sucking Dilettant
tile.actuallyadditions.blockInputter.add.14.name=Extreme Sand Digger
tile.actuallyadditions.blockInputter.add.15.name=MISSINGNO
@ -280,6 +279,11 @@ container.actuallyadditions.placer.name=Placer
container.actuallyadditions.breaker.name=Breaker
container.actuallyadditions.crafting.name=Crafting Table On A Stick
container.actuallyadditions.nei.crushing.name=Crusher
gui.actuallyadditions.waila.compostAmount.name=Amount of Mashed Food
gui.actuallyadditions.waila.compostDone.name=Done!
achievement.actuallyadditions.pickUpSolidXP=Hard and Rich and Stuff
achievement.actuallyadditions.pickUpSolidXP.desc=Pick up some Solidified Experience
achievement.actuallyadditions.craftKnifeBlade=Sharp! So Sharp!

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

View file

@ -2,8 +2,8 @@
{
"modid": "ActuallyAdditions",
"name": "Actually Additions",
"description": "Actually Additions is a mod that adds a lot of Random Things and Gadgets to your Minecraft, including better Furnaces, Crushers that double your Ores, Automation, a bunch of food and lots more!",
"version": "0.0.3.5",
"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",
"mcversion": "1.7.10",
"url": "https://github.com/Ellpeck/ActuallyAdditions",
"updateUrl": "",