-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
26 changed files
with
804 additions
and
70 deletions.
There are no files selected for viewing
87 changes: 87 additions & 0 deletions
87
src/main/java/reobf/proghatches/ae/BlockCraftingCondenser.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
package reobf.proghatches.ae; | ||
|
||
import java.util.List; | ||
|
||
import appeng.block.crafting.BlockCraftingUnit; | ||
import appeng.block.crafting.ItemCraftingStorage; | ||
import appeng.client.texture.ExtraBlockTextures; | ||
import appeng.tile.crafting.TileCraftingStorageTile; | ||
import cpw.mods.fml.relauncher.Side; | ||
import cpw.mods.fml.relauncher.SideOnly; | ||
import net.minecraft.creativetab.CreativeTabs; | ||
import net.minecraft.item.Item; | ||
import net.minecraft.item.ItemStack; | ||
import net.minecraft.tileentity.TileEntity; | ||
import net.minecraft.util.IIcon; | ||
import net.minecraft.util.StatCollector; | ||
import net.minecraft.world.World; | ||
|
||
public class BlockCraftingCondenser extends BlockCraftingUnit { | ||
|
||
public BlockCraftingCondenser(int tier) { | ||
this.setTileEntity(TileCraftingCondenser.class); | ||
setBlockName("proghatches.craftingdumper."+tier); | ||
setBlockTextureName("?");setHardness(1); | ||
this.tier=tier; | ||
} | ||
|
||
@Override | ||
public Class<ItemCraftingStorage> getItemBlockClass() { | ||
return ItemCraftingStorage.class; | ||
} | ||
|
||
ExtraBlockTextures[] nfit= | ||
{ | ||
ExtraBlockTextures. BlockCraftingStorage1k, | ||
ExtraBlockTextures. BlockCraftingStorage4k, | ||
ExtraBlockTextures. BlockCraftingStorage16k, | ||
ExtraBlockTextures. BlockCraftingStorage64k, | ||
ExtraBlockTextures. BlockCraftingStorage256k, | ||
ExtraBlockTextures. BlockCraftingStorage1024k, | ||
ExtraBlockTextures. BlockCraftingStorage4096k, | ||
ExtraBlockTextures. BlockCraftingStorage16384k, | ||
ExtraBlockTextures. BlockCraftingStorageSingularity }; | ||
ExtraBlockTextures[] fit= | ||
{ | ||
ExtraBlockTextures. BlockCraftingStorage1kFit, | ||
ExtraBlockTextures. BlockCraftingStorage4kFit, | ||
ExtraBlockTextures. BlockCraftingStorage16kFit, | ||
ExtraBlockTextures. BlockCraftingStorage64kFit, | ||
ExtraBlockTextures. BlockCraftingStorage256kFit, | ||
ExtraBlockTextures. BlockCraftingStorage1024kFit, | ||
ExtraBlockTextures. BlockCraftingStorage4096kFit, | ||
ExtraBlockTextures. BlockCraftingStorage16384kFit, | ||
ExtraBlockTextures. BlockCraftingStorageSingularityFit | ||
}; | ||
int[] num={1,4,16,64,256,1024,4096,16384,Integer.MAX_VALUE}; | ||
|
||
|
||
@Override | ||
public IIcon getIcon(final int direction, final int metadata) { | ||
if((metadata &8)>0){ | ||
|
||
|
||
return fit[tier].getIcon(); | ||
|
||
} | ||
|
||
return nfit[tier].getIcon(); | ||
} | ||
|
||
@Override | ||
@SideOnly(Side.CLIENT) | ||
public void getCheckedSubBlocks(final Item item, final CreativeTabs tabs, final List<ItemStack> itemStacks) { | ||
itemStacks.add(new ItemStack(this, 1, 0)); | ||
} | ||
int tier; | ||
public int getSkips() { | ||
return num[tier]; | ||
} | ||
|
||
public void addTips(List<String> toolTip) { | ||
toolTip.add(StatCollector.translateToLocalFormatted("proghatches.craftingdumper.tooltip.0",num[tier])); | ||
|
||
} | ||
|
||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
package reobf.proghatches.ae; | ||
|
||
public interface ICondenser { | ||
public int getSkips(); | ||
public default boolean isinf(){return false;} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
42 changes: 42 additions & 0 deletions
42
src/main/java/reobf/proghatches/ae/TileCraftingCondenser.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
|
||
package reobf.proghatches.ae; | ||
|
||
import net.minecraft.block.Block; | ||
import net.minecraft.item.ItemStack; | ||
|
||
import appeng.api.AEApi; | ||
import appeng.api.definitions.IBlocks; | ||
import appeng.block.crafting.BlockAdvancedCraftingStorage; | ||
import appeng.block.crafting.BlockSingularityCraftingStorage; | ||
import appeng.tile.crafting.TileCraftingTile; | ||
|
||
public class TileCraftingCondenser extends TileCraftingTile implements ICondenser { | ||
|
||
|
||
public TileCraftingCondenser(){ | ||
|
||
|
||
} | ||
|
||
@Override | ||
public boolean isAccelerator() { | ||
return false; | ||
} | ||
|
||
@Override | ||
public boolean isStorage() { | ||
return false; | ||
} | ||
@Override | ||
public boolean isinf() { | ||
// TODO Auto-generated method stub | ||
return getSkips()==Integer.MAX_VALUE; | ||
} | ||
@Override | ||
public int getSkips() { | ||
|
||
return ((BlockCraftingCondenser)getBlockType()).getSkips(); | ||
} | ||
|
||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.