mirror of
https://github.com/Ellpeck/ActuallyAdditions.git
synced 2024-11-26 00:38:35 +01:00
-Added Lava Factory
This commit is contained in:
parent
505162cfd0
commit
aecea40bb9
36 changed files with 340 additions and 71 deletions
|
@ -69,13 +69,6 @@
|
|||
-You can mark an area
|
||||
-On Activation, all blocks in the area get a Signal
|
||||
|
||||
-Lava Factory
|
||||
-Bowl-Looking Multi Block
|
||||
-Requires Energy
|
||||
-Produces Lava
|
||||
-Has a Controller in the Middle
|
||||
-Places produced Lava Blocks on top of the Controller
|
||||
|
||||
-Thermopile
|
||||
-Needs a hot and a cold fluid
|
||||
-Depending on the fluids, it generates more power
|
||||
|
@ -89,3 +82,8 @@
|
|||
-Ring of Suction: Sucks up Items in the area
|
||||
-Ring of Water Absorption: Removes Water around
|
||||
-Ring of Striptease (Or something like that): Attacker lose parts of their Armor
|
||||
|
||||
-Coffee
|
||||
-Coffee Machine
|
||||
-Coffee Cup
|
||||
-Bedrockium Coffee Cup
|
||||
|
|
|
@ -0,0 +1,118 @@
|
|||
package ellpeck.actuallyadditions.blocks;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import ellpeck.actuallyadditions.tile.TileEntityLavaFactoryController;
|
||||
import ellpeck.actuallyadditions.util.BlockUtil;
|
||||
import ellpeck.actuallyadditions.util.INameableItem;
|
||||
import ellpeck.actuallyadditions.util.KeyUtil;
|
||||
import ellpeck.actuallyadditions.util.ModUtil;
|
||||
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.item.EnumRarity;
|
||||
import net.minecraft.item.ItemBlock;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.ChatComponentText;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class BlockLavaFactoryController extends BlockContainerBase implements INameableItem{
|
||||
|
||||
private IIcon topIcon;
|
||||
|
||||
public BlockLavaFactoryController(){
|
||||
super(Material.rock);
|
||||
this.setHarvestLevel("pickaxe", 0);
|
||||
this.setHardness(1.0F);
|
||||
this.setStepSound(soundTypeStone);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getOredictName(){
|
||||
return this.getName();
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World world, int par2){
|
||||
return new TileEntityLavaFactoryController();
|
||||
}
|
||||
|
||||
@Override
|
||||
public IIcon getIcon(int side, int meta){
|
||||
return side == 1 ? this.topIcon : this.blockIcon;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister iconReg){
|
||||
this.blockIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER + ":" + this.getName());
|
||||
this.topIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER + ":" + this.getName() + "Top");
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int par6, float par7, float par8, float par9){
|
||||
if(!world.isRemote){
|
||||
TileEntityLavaFactoryController factory = (TileEntityLavaFactoryController)world.getTileEntity(x, y, z);
|
||||
if(factory != null){
|
||||
int state = factory.isMultiblock();
|
||||
if(state == TileEntityLavaFactoryController.NOT_MULTI){
|
||||
player.addChatComponentMessage(new ChatComponentText(StatCollector.translateToLocal("tooltip."+ModUtil.MOD_ID_LOWER+".factory.notPart.desc")));
|
||||
}
|
||||
if(state == TileEntityLavaFactoryController.HAS_AIR || state == TileEntityLavaFactoryController.HAS_LAVA){
|
||||
player.addChatComponentMessage(new ChatComponentText(StatCollector.translateToLocal("tooltip."+ModUtil.MOD_ID_LOWER+".factory.works.desc")));
|
||||
}
|
||||
player.addChatComponentMessage(new ChatComponentText(factory.storage.getEnergyStored() + "/" + factory.storage.getMaxEnergyStored() + " RF"));
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName(){
|
||||
return "blockLavaFactoryController";
|
||||
}
|
||||
|
||||
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, 3, "");
|
||||
if(KeyUtil.isShiftPressed()){
|
||||
list.add(StatCollector.translateToLocal("tooltip."+ModUtil.MOD_ID_LOWER+".uses.desc") + " " + TileEntityLavaFactoryController.energyNeededToProduceLava + " RF/B");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMetadata(int damage){
|
||||
return damage;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -3,6 +3,7 @@ package ellpeck.actuallyadditions.blocks;
|
|||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import ellpeck.actuallyadditions.ActuallyAdditions;
|
||||
import ellpeck.actuallyadditions.config.values.ConfigIntValues;
|
||||
import ellpeck.actuallyadditions.inventory.GuiHandler;
|
||||
import ellpeck.actuallyadditions.tile.TileEntityPhantomPlacer;
|
||||
import ellpeck.actuallyadditions.tile.TileEntityPhantomface;
|
||||
|
@ -31,6 +32,7 @@ public class BlockPhantomface extends BlockContainerBase implements INameableIte
|
|||
public static final int ENERGYFACE = 4;
|
||||
|
||||
public int type;
|
||||
public int range;
|
||||
|
||||
public BlockPhantomface(int type){
|
||||
super(Material.rock);
|
||||
|
@ -38,6 +40,9 @@ public class BlockPhantomface extends BlockContainerBase implements INameableIte
|
|||
this.setHarvestLevel("pickaxe", 0);
|
||||
this.setHardness(1.0F);
|
||||
this.setStepSound(soundTypeStone);
|
||||
|
||||
if(type == FACE || type == LIQUIFACE || type == ENERGYFACE) this.range = ConfigIntValues.PHANTOMFACE_RANGE.getValue();
|
||||
else if(type == BREAKER || type == PLACER) this.range = ConfigIntValues.PHANTOM_PLACER_RANGE.getValue();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -150,11 +155,14 @@ public class BlockPhantomface extends BlockContainerBase implements INameableIte
|
|||
@SideOnly(Side.CLIENT)
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean isHeld) {
|
||||
BlockUtil.addInformation(theBlock, list, 2, "");
|
||||
if(KeyUtil.isShiftPressed() && ((BlockPhantomface)this.theBlock).type == LIQUIFACE){
|
||||
if(KeyUtil.isShiftPressed()){
|
||||
if(((BlockPhantomface)this.theBlock).type == LIQUIFACE){
|
||||
list.add(StringUtil.ORANGE+StatCollector.translateToLocal("tooltip."+ModUtil.MOD_ID_LOWER+".blockPhantomLiquiface.desc.3"));
|
||||
list.add(StringUtil.ORANGE+StatCollector.translateToLocal("tooltip."+ModUtil.MOD_ID_LOWER+".blockPhantomLiquiface.desc.4"));
|
||||
list.add(StringUtil.ORANGE+StatCollector.translateToLocal("tooltip."+ModUtil.MOD_ID_LOWER+".blockPhantomLiquiface.desc.5"));
|
||||
}
|
||||
list.add(StatCollector.translateToLocal("tooltip."+ModUtil.MOD_ID_LOWER+".blockPhantomRange.desc") + ": " + ((BlockPhantomface)theBlock).range);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -32,10 +32,14 @@ public class BlockPlant extends BlockCrops implements INameableItem, IFactoryHar
|
|||
private String name;
|
||||
public Item seedItem;
|
||||
public ItemStack returnItem;
|
||||
private int minDropAmount;
|
||||
private int addDropAmount;
|
||||
|
||||
public BlockPlant(String name, int stages){
|
||||
public BlockPlant(String name, int stages, int minDropAmount, int addDropAmount){
|
||||
this.name = name;
|
||||
this.textures = new IIcon[stages];
|
||||
this.minDropAmount = minDropAmount;
|
||||
this.addDropAmount = addDropAmount;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -48,10 +52,12 @@ public class BlockPlant extends BlockCrops implements INameableItem, IFactoryHar
|
|||
ArrayList<ItemStack> ret = super.getDrops(world, x, y, z, metadata, fortune);
|
||||
if(metadata >= 7){
|
||||
for(int i = 0; i < 3; ++i){
|
||||
if(world.rand.nextInt(15) <= metadata) ret.add(new ItemStack(this.seedItem));
|
||||
if(world.rand.nextInt(6) == 0) ret.add(new ItemStack(this.seedItem));
|
||||
}
|
||||
if(this == InitBlocks.blockCanola) ret.add(new ItemStack(this.returnItem.getItem(), new Random().nextInt(3)+3, this.returnItem.getItemDamage()));
|
||||
else ret.add(this.returnItem.copy());
|
||||
|
||||
ItemStack stack = this.returnItem.copy();
|
||||
stack.stackSize = new Random().nextInt(addDropAmount)+minDropAmount;
|
||||
ret.add(stack);
|
||||
}
|
||||
else ret.add(new ItemStack(this.seedItem));
|
||||
|
||||
|
|
|
@ -33,6 +33,7 @@ public class InitBlocks{
|
|||
|
||||
public static Block blockRice;
|
||||
public static Block blockCanola;
|
||||
public static Block blockFlax;
|
||||
|
||||
public static Fluid fluidCanolaOil;
|
||||
public static Block blockCanolaOil;
|
||||
|
@ -54,16 +55,25 @@ public class InitBlocks{
|
|||
public static Block blockFluidPlacer;
|
||||
public static Block blockFluidCollector;
|
||||
|
||||
public static Block blockLavaFactoryController;
|
||||
|
||||
public static void init(){
|
||||
Util.logInfo("Initializing Blocks...");
|
||||
|
||||
fluidCanolaOil = new FluidAA("canolaOil").setDensity(1200).setViscosity(1500).setTemperature(300).setRarity(EnumRarity.uncommon);
|
||||
blockLavaFactoryController = new BlockLavaFactoryController();
|
||||
BlockUtil.register(blockLavaFactoryController, BlockLavaFactoryController.TheItemBlock.class);
|
||||
|
||||
fluidCanolaOil = new FluidAA("canolaoil").setDensity(1200).setViscosity(1500).setTemperature(300).setRarity(EnumRarity.uncommon);
|
||||
FluidRegistry.registerFluid(fluidCanolaOil);
|
||||
fluidCanolaOil = FluidRegistry.getFluid(fluidCanolaOil.getName());
|
||||
|
||||
blockCanolaOil = new BlockFluidFlowing(fluidCanolaOil, Material.water, "blockCanolaOil");
|
||||
BlockUtil.register(blockCanolaOil, BlockFluidFlowing.TheItemBlock.class, false);
|
||||
|
||||
fluidOil = new FluidAA("oil").setDensity(1200).setViscosity(1500).setTemperature(300).setRarity(EnumRarity.uncommon);
|
||||
FluidRegistry.registerFluid(fluidOil);
|
||||
fluidOil = FluidRegistry.getFluid(fluidOil.getName());
|
||||
|
||||
blockOil = new BlockFluidFlowing(fluidOil, Material.water, "blockOil");
|
||||
BlockUtil.register(blockOil, BlockFluidFlowing.TheItemBlock.class, false);
|
||||
|
||||
|
@ -94,16 +104,21 @@ public class InitBlocks{
|
|||
blockFermentingBarrel = new BlockFermentingBarrel();
|
||||
BlockUtil.register(blockFermentingBarrel, BlockFermentingBarrel.TheItemBlock.class);
|
||||
|
||||
blockRice = new BlockPlant("blockRice", 6);
|
||||
blockRice = new BlockPlant("blockRice", 6, 1, 2);
|
||||
BlockUtil.register(blockRice, BlockPlant.TheItemBlock.class, false);
|
||||
FactoryRegistry.sendMessage("registerHarvestable", blockRice);
|
||||
FactoryRegistry.sendMessage("registerFertilizable", blockRice);
|
||||
|
||||
blockCanola = new BlockPlant("blockCanola", 4);
|
||||
blockCanola = new BlockPlant("blockCanola", 4, 3, 3);
|
||||
BlockUtil.register(blockCanola, BlockPlant.TheItemBlock.class, false);
|
||||
FactoryRegistry.sendMessage("registerHarvestable", blockCanola);
|
||||
FactoryRegistry.sendMessage("registerFertilizable", blockCanola);
|
||||
|
||||
blockFlax = new BlockPlant("blockFlax", 6, 2, 4);
|
||||
BlockUtil.register(blockFlax, BlockPlant.TheItemBlock.class);
|
||||
FactoryRegistry.sendMessage("registerHarvestable", blockFlax);
|
||||
FactoryRegistry.sendMessage("registerFertilizable", blockFlax);
|
||||
|
||||
blockCompost = new BlockCompost();
|
||||
BlockUtil.register(blockCompost, BlockCompost.TheItemBlock.class);
|
||||
|
||||
|
|
|
@ -12,7 +12,8 @@ public enum TheMiscBlocks implements INameableItem{
|
|||
WOOD_CASING("WoodCasing", EnumRarity.common, "blockCasingWood"),
|
||||
STONE_CASING("StoneCasing", EnumRarity.uncommon, "blockCasingStone"),
|
||||
CHARCOAL_BLOCK("Charcoal", EnumRarity.common, "blockCharcoal"),
|
||||
ENDERPEARL_BLOCK("Enderpearl", EnumRarity.rare, "blockEnderpearl");
|
||||
ENDERPEARL_BLOCK("Enderpearl", EnumRarity.rare, "blockEnderpearl"),
|
||||
LAVA_FACTORY_CASE("LavaFactoryCase", EnumRarity.uncommon, "blockLavaFactoryCase");
|
||||
|
||||
public final String name;
|
||||
public final String oredictName;
|
||||
|
|
|
@ -26,7 +26,8 @@ public enum ConfigBoolValues{
|
|||
DO_WAILA_INFO("Waila Display Info", ConfigCategories.OTHER, true, "If the Shift Description should display in Waila too"),
|
||||
|
||||
DO_RICE_GEN("Rice Gen", ConfigCategories.WORLD_GEN, true, "If Rice should generate in the World"),
|
||||
DO_CANOLA_GEN("Canola Gen", ConfigCategories.WORLD_GEN, true, "If Canola should generate in the World");
|
||||
DO_CANOLA_GEN("Canola Gen", ConfigCategories.WORLD_GEN, true, "If Canola should generate in the World"),
|
||||
DO_FLAX_GEN("Flax Gen", ConfigCategories.WORLD_GEN, true, "If Flax should generate in the World");
|
||||
|
||||
public final String name;
|
||||
public final String category;
|
||||
|
|
|
@ -43,7 +43,7 @@ public enum ConfigIntValues{
|
|||
HEAT_COLLECTOR_BLOCKS("Heat Collector: Blocks Needed", ConfigCategories.MACHINE_VALUES, 4, 1, 5, "How many Blocks are needed for the Heat Collector to power Machines above it"),
|
||||
HEAT_COLLECTOR_LAVA_CHANCE("Heat Collector: Random Chance", ConfigCategories.MACHINE_VALUES, 10000, 10, 100000, "The Chance of the Heat Collector destroying a Lava Block around (Default Value 2000 meaning a 1/2000 Chance!)"),
|
||||
|
||||
GLASS_TIME_NEEDED("Greenhouse Glass: Time", ConfigCategories.MACHINE_VALUES, 5000, 10, 1000000, "The Time Needed for the Greenhouse Glass to grow a Plant below it"),
|
||||
GLASS_TIME_NEEDED("Greenhouse Glass: Time", ConfigCategories.MACHINE_VALUES, 300, 1, 10000, "Time Needed for the Greenhouse Glass to grow a Plant below it"),
|
||||
|
||||
BREAKER_TIME_NEEDED("Breaker and Placer: Time Needed", ConfigCategories.MACHINE_VALUES, 15, 1, 10000, "The Time Needed for the Breaker and the Placer to place or break a Block"),
|
||||
DROPPER_TIME_NEEDED("Dropper: Time Needed", ConfigCategories.MACHINE_VALUES, 10, 1, 10000, "The Time Needed for the Dropper to drop an Item"),
|
||||
|
@ -51,7 +51,8 @@ public enum ConfigIntValues{
|
|||
CAT_DROP_CHANCE("Cat Drops: Chance", ConfigCategories.OTHER, 5000, 5, 10000000, "The 1 in X chance for a Hairy Ball to Drop from a Cat with X being this value"),
|
||||
|
||||
RICE_AMOUNT("Rice Amount", ConfigCategories.WORLD_GEN, 15, 1, 100, "The Chance of Rice generating"),
|
||||
CANOLA_AMOUNT("Canola Amount", ConfigCategories.WORLD_GEN, 2, 1, 50, "The Chance of Canola generating"),
|
||||
CANOLA_AMOUNT("Canola Amount", ConfigCategories.WORLD_GEN, 10, 1, 50, "The Chance of Canola generating"),
|
||||
FLAX_AMOUNT("Flax Amount", ConfigCategories.WORLD_GEN, 5, 1, 50, "The Chance of Flax generating"),
|
||||
|
||||
GRINDER_ENERGY_USED("Energy Use: Crusher", ConfigCategories.MACHINE_VALUES, 40, 1, 500, "The Amount of Energy used by the Crusher per Tick"),
|
||||
GRINDER_DOUBLE_ENERGY_USED("Energy Use: Double Crusher", ConfigCategories.MACHINE_VALUES, 60, 1, 500, "The Amount of Energy used by the Double Crusher per Tick"),
|
||||
|
@ -75,7 +76,10 @@ public enum ConfigIntValues{
|
|||
OIL_GEN_BURN_TIME("Oil Generator: Burn Time", ConfigCategories.MACHINE_VALUES, 100, 1, 1000, "The Amount of Time Fuel keeps burning for"),
|
||||
|
||||
PHANTOM_PLACER_TIME("Phantom Placer and Breaker: Time Needed", ConfigCategories.MACHINE_VALUES, 30, 1, 500, "The Amount of Time a Phantom Placer/Breaker needs"),
|
||||
PHANTOM_PLACER_RANGE("Phantom Placer and Breaker: Range", ConfigCategories.MACHINE_VALUES, 3, 1, 100, "The Default Range of the Phantom Placer/Breaker");
|
||||
PHANTOM_PLACER_RANGE("Phantom Placer and Breaker: Range", ConfigCategories.MACHINE_VALUES, 3, 1, 100, "The Default Range of the Phantom Placer/Breaker"),
|
||||
|
||||
LAVA_FACTORY_ENERGY_USED("Lava Factory: Energy Used", ConfigCategories.MACHINE_VALUES, 150000, 10, 3000000, "The amount of Energy used by the Lava Factory per Bucket of Lava produced"),
|
||||
LAVA_FACTORY_TIME("Lava Factory: Production Time", ConfigCategories.MACHINE_VALUES, 200, 5, 10000, "The amount of time it takes for the Lava Factory to produce one Bucket");
|
||||
|
||||
public final String name;
|
||||
public final String category;
|
||||
|
|
|
@ -38,6 +38,7 @@ public class CreativeTab extends CreativeTabs{
|
|||
this.addBlock(InitBlocks.blockGrinder);
|
||||
this.addBlock(InitBlocks.blockGrinderDouble);
|
||||
this.addBlock(InitBlocks.blockFurnaceDouble);
|
||||
this.addBlock(InitBlocks.blockLavaFactoryController);
|
||||
|
||||
this.addBlock(InitBlocks.blockFurnaceSolar);
|
||||
this.addBlock(InitBlocks.blockHeatCollector);
|
||||
|
@ -64,6 +65,7 @@ public class CreativeTab extends CreativeTabs{
|
|||
|
||||
this.addItem(InitItems.itemRiceSeed);
|
||||
this.addItem(InitItems.itemCanolaSeed);
|
||||
this.addItem(InitItems.itemFlaxSeed);
|
||||
this.addItem(InitItems.itemHairyBall);
|
||||
this.addItem(InitItems.itemMisc);
|
||||
this.addItem(InitItems.itemResonantRice);
|
||||
|
|
|
@ -15,7 +15,6 @@ public class RenderPlayerEventAA{
|
|||
private RenderSpecial hoseRender = new RenderSpecial(new ModelTorch());
|
||||
//private RenderSpecial paktoRender = new RenderSpecial(new ModelStandardBlock("Pakto"));
|
||||
private RenderSpecial glenRender = new RenderSpecial(new ModelStandardBlock("Glenthor"));
|
||||
private RenderSpecial lordiRender = new RenderSpecial(new ModelStandardBlock("Lordi"));
|
||||
|
||||
@SubscribeEvent(priority = EventPriority.HIGHEST)
|
||||
public void RenderPlayerEvent(RenderPlayerEvent.Pre event){
|
||||
|
@ -42,11 +41,6 @@ public class RenderPlayerEventAA{
|
|||
if(event.entityPlayer.getUniqueID().equals(UUID.fromString("cb7b293a-5031-484e-b5be-b4f2f4e92726"))){
|
||||
hoseRender.render(event.entityPlayer, event.partialRenderTick, 0.5F, 1.3F);
|
||||
}
|
||||
|
||||
//Lordhallo
|
||||
if(event.entityPlayer.getUniqueID().equals(UUID.fromString("990ecf6d-15dd-442c-b91b-323a6420c78e"))){
|
||||
lordiRender.render(event.entityPlayer, event.partialRenderTick, 0.3F, 1F);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,6 +4,7 @@ import cpw.mods.fml.common.eventhandler.SubscribeEvent;
|
|||
import ellpeck.actuallyadditions.blocks.InitBlocks;
|
||||
import ellpeck.actuallyadditions.config.values.ConfigBoolValues;
|
||||
import ellpeck.actuallyadditions.config.values.ConfigIntValues;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.event.terraingen.DecorateBiomeEvent;
|
||||
|
@ -35,15 +36,20 @@ public class WorldDecorationEvent{
|
|||
}
|
||||
}
|
||||
|
||||
if(ConfigBoolValues.DO_CANOLA_GEN.isEnabled()){
|
||||
for(int i = 0; i < ConfigIntValues.CANOLA_AMOUNT.getValue(); i++){
|
||||
if(new Random().nextInt(50) == 0){
|
||||
this.genPlantNormally(InitBlocks.blockCanola, ConfigIntValues.CANOLA_AMOUNT.getValue(), ConfigBoolValues.DO_CANOLA_GEN.isEnabled(), Material.grass, event);
|
||||
this.genPlantNormally(InitBlocks.blockFlax, ConfigIntValues.FLAX_AMOUNT.getValue(), ConfigBoolValues.DO_FLAX_GEN.isEnabled(), Material.grass, event);
|
||||
}
|
||||
|
||||
public void genPlantNormally(Block plant, int amount, boolean doIt, Material blockBelow, DecorateBiomeEvent event){
|
||||
if(doIt){
|
||||
for(int i = 0; i < amount; i++){
|
||||
if(new Random().nextInt(100) == 0){
|
||||
int genX = event.chunkX+event.rand.nextInt(16)+8;
|
||||
int genZ = event.chunkZ+event.rand.nextInt(16)+8;
|
||||
int genY = event.world.getTopSolidOrLiquidBlock(genX, genZ)-1;
|
||||
|
||||
if(event.world.getBlock(genX, genY, genZ).getMaterial() == Material.grass){
|
||||
event.world.setBlock(genX, genY+1, genZ, InitBlocks.blockCanola, event.rand.nextInt(8), 2);
|
||||
if(event.world.getBlock(genX, genY, genZ).getMaterial() == blockBelow){
|
||||
event.world.setBlock(genX, genY+1, genZ, plant, event.rand.nextInt(8), 2);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -55,7 +55,7 @@ public class OreGen implements IWorldGenerator{
|
|||
new WorldGenMinable(block, meta, maxVeinSize, blockIn).generate(world, random, posX, posY, posZ);
|
||||
}
|
||||
}
|
||||
else ModUtil.AA_LOGGER.log(Level.FATAL, "Couldn't generate '" + block.getUnlocalizedName() + "' into the world because the Min Y coordinate is bigger than the Max! This is definitely a Config Error! Check the Files!");
|
||||
else ModUtil.LOGGER.log(Level.FATAL, "Couldn't generate '" + block.getUnlocalizedName() + "' into the world because the Min Y coordinate is bigger than the Max! This is definitely a Config Error! Check the Files!");
|
||||
}
|
||||
|
||||
public int getRandom(int base, int extra, Random rand){
|
||||
|
|
|
@ -4,7 +4,6 @@ import cpw.mods.fml.relauncher.Side;
|
|||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import ellpeck.actuallyadditions.blocks.InitBlocks;
|
||||
import ellpeck.actuallyadditions.inventory.slot.SlotOutput;
|
||||
import ellpeck.actuallyadditions.items.InitItems;
|
||||
import ellpeck.actuallyadditions.tile.TileEntityBase;
|
||||
import ellpeck.actuallyadditions.tile.TileEntityFermentingBarrel;
|
||||
import invtweaks.api.container.InventoryContainer;
|
||||
|
@ -15,6 +14,7 @@ import net.minecraft.inventory.Container;
|
|||
import net.minecraft.inventory.ICrafting;
|
||||
import net.minecraft.inventory.Slot;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.fluids.FluidContainerRegistry;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
|
||||
@InventoryContainer
|
||||
|
@ -95,7 +95,7 @@ public class ContainerFermentingBarrel extends Container{
|
|||
|
||||
if(currentStack.getItem() != null){
|
||||
if(slot <= hotbarEnd && slot >= inventoryStart){
|
||||
if(currentStack.getItem() == InitItems.itemBucketCanolaOil){
|
||||
if(FluidContainerRegistry.containsFluid(currentStack, new FluidStack(InitBlocks.fluidCanolaOil, FluidContainerRegistry.BUCKET_VOLUME))){
|
||||
this.mergeItemStack(newStack, 0, 1, false);
|
||||
}
|
||||
if(currentStack.getItem() == Items.bucket){
|
||||
|
|
|
@ -4,7 +4,6 @@ import cpw.mods.fml.relauncher.Side;
|
|||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import ellpeck.actuallyadditions.blocks.InitBlocks;
|
||||
import ellpeck.actuallyadditions.inventory.slot.SlotOutput;
|
||||
import ellpeck.actuallyadditions.items.InitItems;
|
||||
import ellpeck.actuallyadditions.tile.TileEntityBase;
|
||||
import ellpeck.actuallyadditions.tile.TileEntityOilGenerator;
|
||||
import invtweaks.api.container.InventoryContainer;
|
||||
|
@ -15,6 +14,7 @@ import net.minecraft.inventory.ICrafting;
|
|||
import net.minecraft.inventory.Slot;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import net.minecraftforge.fluids.FluidContainerRegistry;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
|
||||
@InventoryContainer
|
||||
|
@ -93,7 +93,7 @@ public class ContainerOilGenerator extends Container{
|
|||
|
||||
if(currentStack.getItem() != null){
|
||||
if(slot <= hotbarEnd && slot >= inventoryStart){
|
||||
if(currentStack.getItem() == InitItems.itemBucketOil){
|
||||
if(FluidContainerRegistry.containsFluid(currentStack, new FluidStack(InitBlocks.fluidOil, FluidContainerRegistry.BUCKET_VOLUME))){
|
||||
this.mergeItemStack(newStack, 0, 1, false);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -67,7 +67,7 @@ public class GuiCanolaPress extends GuiContainer{
|
|||
this.func_146283_a(Collections.singletonList(text1), x, y);
|
||||
}
|
||||
|
||||
String text2 = this.press.tank.getFluidAmount() + "/" + this.press.tank.getCapacity() + " mB " +StatCollector.translateToLocal("fluid.canolaOil");
|
||||
String text2 = this.press.tank.getFluidAmount() + "/" + this.press.tank.getCapacity() + " mB " +StatCollector.translateToLocal("fluid.canolaoil");
|
||||
if(x >= guiLeft+117 && y >= guiTop+6 && x <= guiLeft+132 && y <= guiTop+88){
|
||||
this.func_146283_a(Collections.singletonList(text2), x, y);
|
||||
}
|
||||
|
|
|
@ -62,7 +62,7 @@ public class GuiFermentingBarrel extends GuiContainer{
|
|||
public void drawScreen(int x, int y, float f){
|
||||
super.drawScreen(x, y, f);
|
||||
|
||||
String text1 = this.press.canolaTank.getFluidAmount() + "/" + this.press.canolaTank.getCapacity() + " mB " +StatCollector.translateToLocal("fluid.canolaOil");
|
||||
String text1 = this.press.canolaTank.getFluidAmount() + "/" + this.press.canolaTank.getCapacity() + " mB " +StatCollector.translateToLocal("fluid.canolaoil");
|
||||
if(x >= guiLeft+61 && y >= guiTop+6 && x <= guiLeft+76 && y <= guiTop+88){
|
||||
this.func_146283_a(Collections.singletonList(text1), x, y);
|
||||
}
|
||||
|
|
|
@ -46,8 +46,11 @@ public class InitItems{
|
|||
public static Item itemHoeObsidian;
|
||||
|
||||
public static Item itemHairyBall;
|
||||
|
||||
public static Item itemRiceSeed;
|
||||
public static Item itemCanolaSeed;
|
||||
public static Item itemFlaxSeed;
|
||||
|
||||
public static Item itemResonantRice;
|
||||
public static Item itemBucketOil;
|
||||
public static Item itemBucketCanolaOil;
|
||||
|
@ -119,6 +122,10 @@ public class InitItems{
|
|||
ItemUtil.register(itemCanolaSeed);
|
||||
FactoryRegistry.sendMessage("registerPlantable", itemCanolaSeed);
|
||||
|
||||
itemFlaxSeed = new ItemSeed("itemFlaxSeed", InitBlocks.blockFlax, Blocks.grass, EnumPlantType.Plains, new ItemStack(Items.string));
|
||||
ItemUtil.register(itemFlaxSeed);
|
||||
FactoryRegistry.sendMessage("registerPlantable", itemFlaxSeed);
|
||||
|
||||
itemPickaxeEmerald = new ItemPickaxeAA(InitItemMaterials.toolMaterialEmerald, new ItemStack(Items.emerald), "itemPickaxeEmerald", EnumRarity.rare);
|
||||
itemAxeEmerald = new ItemAxeAA(InitItemMaterials.toolMaterialEmerald, new ItemStack(Items.emerald), "itemAxeEmerald", EnumRarity.rare);
|
||||
itemShovelEmerald = new ItemShovelAA(InitItemMaterials.toolMaterialEmerald, new ItemStack(Items.emerald), "itemShovelEmerald", EnumRarity.rare);
|
||||
|
|
|
@ -32,6 +32,7 @@ public class NEIActuallyAdditionsConfig implements IConfigureNEI{
|
|||
|
||||
API.hideItem(new ItemStack(InitBlocks.blockRice));
|
||||
API.hideItem(new ItemStack(InitBlocks.blockCanola));
|
||||
API.hideItem(new ItemStack(InitBlocks.blockFlax));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -66,13 +66,13 @@ public class GrinderRecipeRegistry{
|
|||
}
|
||||
else{
|
||||
if(ConfigBoolValues.DO_CRUSHER_SPAM.isEnabled())
|
||||
ModUtil.AA_LOGGER.log(Level.INFO, "Couldn't register Crusher Recipe! An Item with OreDictionary Registry '" + inputWithDustPrefix + "' doesn't exist! It should correspond to '" + inputName + "'! This is not an Error, just a bit sad :(");
|
||||
ModUtil.LOGGER.log(Level.INFO, "Couldn't register Crusher Recipe! An Item with OreDictionary Registry '" + inputWithDustPrefix + "' doesn't exist! It should correspond to '" + inputName + "'! This is not an Error, just a bit sad :(");
|
||||
}
|
||||
|
||||
}
|
||||
else{
|
||||
if(ConfigBoolValues.DO_CRUSHER_SPAM.isEnabled())
|
||||
ModUtil.AA_LOGGER.log(Level.WARN, "Couldn't register Crusher Recipe! Didn't find Items registered as '" + inputName + "'! This shouldn't happen as there is something registered as '" + inputName + "' that doesn't exist!");
|
||||
ModUtil.LOGGER.log(Level.WARN, "Couldn't register Crusher Recipe! Didn't find Items registered as '" + inputName + "'! This shouldn't happen as there is something registered as '" + inputName + "' that doesn't exist!");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -18,9 +18,9 @@ public class HairyBallHandler{
|
|||
addReturn(new ItemStack(Items.diamond), 2);
|
||||
addReturn(new ItemStack(Items.name_tag), 1);
|
||||
addReturn(new ItemStack(Items.fish), 80);
|
||||
addReturn(new ItemStack(Items.fish, 1), 60);
|
||||
addReturn(new ItemStack(Items.fish, 2), 10);
|
||||
addReturn(new ItemStack(Items.fish, 3), 40);
|
||||
addReturn(new ItemStack(Items.fish, 1, 1), 60);
|
||||
addReturn(new ItemStack(Items.fish, 1, 2), 10);
|
||||
addReturn(new ItemStack(Items.fish, 1, 3), 40);
|
||||
addReturn(new ItemStack(Items.feather), 60);
|
||||
addReturn(new ItemStack(Items.leather), 30);
|
||||
addReturn(new ItemStack(Items.dye), 70);
|
||||
|
|
|
@ -38,6 +38,7 @@ public class TileEntityBase extends TileEntity{
|
|||
GameRegistry.registerTileEntity(TileEntityPhantomPlacer.TileEntityPhantomBreaker.class, ModUtil.MOD_ID_LOWER + ":tileEntityPhantomBreaker");
|
||||
GameRegistry.registerTileEntity(TileEntityFluidCollector.class, ModUtil.MOD_ID_LOWER + ":tileEntityFluidCollector");
|
||||
GameRegistry.registerTileEntity(TileEntityFluidCollector.TileEntityFluidPlacer.class, ModUtil.MOD_ID_LOWER + ":tileEntityFluidPlacer");
|
||||
GameRegistry.registerTileEntity(TileEntityLavaFactoryController.class, ModUtil.MOD_ID_LOWER + ":tileEntityLavaFactoryController");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -113,7 +113,7 @@ public class TileEntityCanolaPress extends TileEntityInventoryBase implements IE
|
|||
|
||||
@Override
|
||||
public boolean canExtractItem(int slot, ItemStack stack, int side){
|
||||
return slot == 2 && stack.getItem() == InitItems.itemBucketCanolaOil;
|
||||
return slot == 2 && FluidContainerRegistry.containsFluid(this.slots[0], new FluidStack(InitBlocks.fluidCanolaOil, FluidContainerRegistry.BUCKET_VOLUME));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -42,7 +42,7 @@ public class TileEntityFermentingBarrel extends TileEntityInventoryBase implemen
|
|||
}
|
||||
else this.currentProcessTime = 0;
|
||||
|
||||
if(this.slots[0] != null && this.slots[0].getItem() == InitItems.itemBucketCanolaOil && (this.slots[1] == null || (this.slots[1].stackSize < this.slots[1].getMaxStackSize()))){
|
||||
if(this.slots[0] != null && FluidContainerRegistry.containsFluid(this.slots[0], new FluidStack(InitBlocks.fluidCanolaOil, FluidContainerRegistry.BUCKET_VOLUME)) && (this.slots[1] == null || (this.slots[1].stackSize < this.slots[1].getMaxStackSize()))){
|
||||
if(FluidContainerRegistry.BUCKET_VOLUME <= this.canolaTank.getCapacity()-this.canolaTank.getFluidAmount()){
|
||||
if(this.slots[1] == null) this.slots[1] = new ItemStack(Items.bucket);
|
||||
else this.slots[1].stackSize++;
|
||||
|
@ -101,7 +101,7 @@ public class TileEntityFermentingBarrel extends TileEntityInventoryBase implemen
|
|||
|
||||
@Override
|
||||
public boolean isItemValidForSlot(int i, ItemStack stack){
|
||||
return (i == 0 && stack.getItem() == InitItems.itemBucketCanolaOil) || (i == 2 && stack.getItem() == Items.bucket);
|
||||
return (i == 0 && FluidContainerRegistry.containsFluid(this.slots[0], new FluidStack(InitBlocks.fluidCanolaOil, FluidContainerRegistry.BUCKET_VOLUME))) || (i == 2 && stack.getItem() == Items.bucket);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -111,7 +111,7 @@ public class TileEntityFermentingBarrel extends TileEntityInventoryBase implemen
|
|||
|
||||
@Override
|
||||
public boolean canExtractItem(int slot, ItemStack stack, int side){
|
||||
return (slot == 1 && stack.getItem() == Items.bucket) || (slot == 3 && stack.getItem() == InitItems.itemBucketOil);
|
||||
return (slot == 1 && stack.getItem() == Items.bucket) || (slot == 3 && FluidContainerRegistry.containsFluid(this.slots[0], new FluidStack(InitBlocks.fluidOil, FluidContainerRegistry.BUCKET_VOLUME)));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -159,7 +159,7 @@ public class TileEntityFluidCollector extends TileEntityInventoryBase implements
|
|||
}
|
||||
|
||||
if(this.tank.getFluidAmount() > 0 && !this.isPlacer){
|
||||
WorldUtil.pushFluid(worldObj, xCoord, yCoord, zCoord, ForgeDirection.DOWN, this.tank);
|
||||
WorldUtil.pushFluid(worldObj, xCoord, yCoord, zCoord, ForgeDirection.getOrientation(worldObj.getBlockMetadata(xCoord, yCoord, zCoord)).getOpposite(), this.tank);
|
||||
}
|
||||
|
||||
if(amountBefore != this.tank.getFluidAmount()){
|
||||
|
|
|
@ -1,14 +1,10 @@
|
|||
package ellpeck.actuallyadditions.tile;
|
||||
|
||||
import ellpeck.actuallyadditions.config.values.ConfigIntValues;
|
||||
import ellpeck.actuallyadditions.util.FakePlayerUtil;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockAir;
|
||||
import net.minecraft.block.BlockGrass;
|
||||
import net.minecraft.block.IGrowable;
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.item.ItemDye;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.ChunkCoordinates;
|
||||
|
||||
import java.util.Random;
|
||||
|
@ -25,14 +21,14 @@ public class TileEntityGreenhouseGlass extends TileEntityBase{
|
|||
if(worldObj.canBlockSeeTheSky(xCoord, yCoord, zCoord) && worldObj.isDaytime()){
|
||||
ChunkCoordinates blockToFert = this.blockToFertilize();
|
||||
if(blockToFert != null){
|
||||
Random rand = new Random();
|
||||
if(this.timeUntilNextFert > 0){
|
||||
this.timeUntilNextFert--;
|
||||
if(timeUntilNextFert <= 0){
|
||||
this.applyBonemealEffect(blockToFert);
|
||||
worldObj.getBlock(blockToFert.posX, blockToFert.posY, blockToFert.posZ).updateTick(worldObj, blockToFert.posX, blockToFert.posY, blockToFert.posZ, worldObj.rand);
|
||||
worldObj.playAuxSFX(2005, blockToFert.posX, blockToFert.posY, blockToFert.posZ, 0);
|
||||
}
|
||||
}
|
||||
else this.timeUntilNextFert = this.timeUntilNextFertToSet + rand.nextInt(this.timeUntilNextFertToSet/2);
|
||||
else this.timeUntilNextFert = this.timeUntilNextFertToSet+new Random().nextInt(this.timeUntilNextFertToSet);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -51,7 +47,4 @@ public class TileEntityGreenhouseGlass extends TileEntityBase{
|
|||
return null;
|
||||
}
|
||||
|
||||
public boolean applyBonemealEffect(ChunkCoordinates coords){
|
||||
return ItemDye.applyBonemeal(new ItemStack(Items.dye, 1, 15), worldObj, coords.posX, coords.posY, coords.posZ, FakePlayerUtil.newFakePlayer(worldObj));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,102 @@
|
|||
package ellpeck.actuallyadditions.tile;
|
||||
|
||||
import cofh.api.energy.EnergyStorage;
|
||||
import cofh.api.energy.IEnergyReceiver;
|
||||
import ellpeck.actuallyadditions.blocks.BlockMisc;
|
||||
import ellpeck.actuallyadditions.blocks.metalists.TheMiscBlocks;
|
||||
import ellpeck.actuallyadditions.config.values.ConfigIntValues;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockAir;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
public class TileEntityLavaFactoryController extends TileEntityBase implements IEnergyReceiver{
|
||||
|
||||
public EnergyStorage storage = new EnergyStorage(3000000, energyNeededToProduceLava*2);
|
||||
|
||||
public static int energyNeededToProduceLava = ConfigIntValues.LAVA_FACTORY_ENERGY_USED.getValue();
|
||||
|
||||
private final int maxWorkTime = ConfigIntValues.LAVA_FACTORY_TIME.getValue();
|
||||
private int currentWorkTime;
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("unchecked")
|
||||
public void updateEntity(){
|
||||
if(!worldObj.isRemote){
|
||||
int isMulti = this.isMultiblock();
|
||||
|
||||
if(isMulti == HAS_AIR && this.storage.getEnergyStored() >= energyNeededToProduceLava){
|
||||
this.currentWorkTime++;
|
||||
if(this.currentWorkTime >= this.maxWorkTime){
|
||||
this.currentWorkTime = 0;
|
||||
worldObj.setBlock(xCoord, yCoord+1, zCoord, Blocks.lava);
|
||||
this.storage.extractEnergy(energyNeededToProduceLava, false);
|
||||
}
|
||||
}
|
||||
else this.currentWorkTime = 0;
|
||||
}
|
||||
}
|
||||
|
||||
public int isMultiblock(){
|
||||
Block blockNorth = worldObj.getBlock(xCoord+ForgeDirection.NORTH.offsetX, yCoord+1, zCoord+ForgeDirection.NORTH.offsetZ);
|
||||
Block blockEast = worldObj.getBlock(xCoord+ForgeDirection.EAST.offsetX, yCoord+1, zCoord+ForgeDirection.EAST.offsetZ);
|
||||
Block blockSouth = worldObj.getBlock(xCoord+ForgeDirection.SOUTH.offsetX, yCoord+1, zCoord+ForgeDirection.SOUTH.offsetZ);
|
||||
Block blockWest = worldObj.getBlock(xCoord+ForgeDirection.WEST.offsetX, yCoord+1, zCoord+ForgeDirection.WEST.offsetZ);
|
||||
int metaNorth = worldObj.getBlockMetadata(xCoord+ForgeDirection.NORTH.offsetX, yCoord+1, zCoord+ForgeDirection.NORTH.offsetZ);
|
||||
int metaEast = worldObj.getBlockMetadata(xCoord+ForgeDirection.EAST.offsetX, yCoord+1, zCoord+ForgeDirection.EAST.offsetZ);
|
||||
int metaSouth = worldObj.getBlockMetadata(xCoord+ForgeDirection.SOUTH.offsetX, yCoord+1, zCoord+ForgeDirection.SOUTH.offsetZ);
|
||||
int metaWest = worldObj.getBlockMetadata(xCoord+ForgeDirection.WEST.offsetX, yCoord+1, zCoord+ForgeDirection.WEST.offsetZ);
|
||||
int metaNeeded = TheMiscBlocks.LAVA_FACTORY_CASE.ordinal();
|
||||
|
||||
if(blockNorth instanceof BlockMisc && blockEast instanceof BlockMisc && blockSouth instanceof BlockMisc && blockWest instanceof BlockMisc){
|
||||
if(metaNorth == metaNeeded && metaEast == metaNeeded && metaSouth == metaNeeded && metaWest == metaNeeded){
|
||||
if(worldObj.getBlock(xCoord, yCoord+1, zCoord) == Blocks.lava || worldObj.getBlock(xCoord, yCoord+1, zCoord) == Blocks.flowing_lava){
|
||||
return HAS_LAVA;
|
||||
}
|
||||
if(worldObj.getBlock(xCoord, yCoord+1, zCoord) == null || worldObj.getBlock(xCoord, yCoord+1, zCoord) instanceof BlockAir){
|
||||
return HAS_AIR;
|
||||
}
|
||||
}
|
||||
}
|
||||
return NOT_MULTI;
|
||||
}
|
||||
|
||||
public static final int NOT_MULTI = 0;
|
||||
public static final int HAS_LAVA = 1;
|
||||
public static final int HAS_AIR = 2;
|
||||
|
||||
@Override
|
||||
public void writeToNBT(NBTTagCompound compound){
|
||||
this.storage.writeToNBT(compound);
|
||||
compound.setInteger("WorkTime", this.currentWorkTime);
|
||||
super.writeToNBT(compound);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readFromNBT(NBTTagCompound compound){
|
||||
this.storage.readFromNBT(compound);
|
||||
this.currentWorkTime = compound.getInteger("WorkTime");
|
||||
super.readFromNBT(compound);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int receiveEnergy(ForgeDirection from, int maxExtract, boolean simulate){
|
||||
return from != ForgeDirection.UP ? this.storage.receiveEnergy(maxExtract, simulate) : 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getEnergyStored(ForgeDirection from){
|
||||
return from != ForgeDirection.UP ? this.storage.getEnergyStored() : 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMaxEnergyStored(ForgeDirection from){
|
||||
return from != ForgeDirection.UP ? this.storage.getMaxEnergyStored() : 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canConnectEnergy(ForgeDirection from){
|
||||
return from != ForgeDirection.UP;
|
||||
}
|
||||
}
|
|
@ -6,7 +6,6 @@ import cpw.mods.fml.relauncher.Side;
|
|||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import ellpeck.actuallyadditions.blocks.InitBlocks;
|
||||
import ellpeck.actuallyadditions.config.values.ConfigIntValues;
|
||||
import ellpeck.actuallyadditions.items.InitItems;
|
||||
import ellpeck.actuallyadditions.util.WorldUtil;
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
@ -48,7 +47,7 @@ public class TileEntityOilGenerator extends TileEntityInventoryBase implements I
|
|||
}
|
||||
}
|
||||
|
||||
if(this.slots[0] != null && this.slots[0].getItem() == InitItems.itemBucketOil && (this.slots[1] == null || (this.slots[1].stackSize < this.slots[1].getMaxStackSize()))){
|
||||
if(this.slots[0] != null && FluidContainerRegistry.containsFluid(this.slots[0], new FluidStack(InitBlocks.fluidOil, FluidContainerRegistry.BUCKET_VOLUME)) && (this.slots[1] == null || (this.slots[1].stackSize < this.slots[1].getMaxStackSize()))){
|
||||
if(FluidContainerRegistry.BUCKET_VOLUME <= this.tank.getCapacity()-this.tank.getFluidAmount()){
|
||||
if(this.slots[1] == null) this.slots[1] = new ItemStack(Items.bucket);
|
||||
else this.slots[1].stackSize++;
|
||||
|
@ -103,7 +102,7 @@ public class TileEntityOilGenerator extends TileEntityInventoryBase implements I
|
|||
|
||||
@Override
|
||||
public boolean isItemValidForSlot(int i, ItemStack stack){
|
||||
return stack.getItem() == InitItems.itemBucketOil && i == 0;
|
||||
return FluidContainerRegistry.containsFluid(this.slots[0], new FluidStack(InitBlocks.fluidOil, FluidContainerRegistry.BUCKET_VOLUME)) && i == 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -81,7 +81,7 @@ public class UpdateChecker{
|
|||
Util.logInfo("Update Check done!");
|
||||
}
|
||||
catch(Exception e){
|
||||
ModUtil.AA_LOGGER.log(Level.ERROR, "Update Check failed!");
|
||||
ModUtil.LOGGER.log(Level.ERROR, "Update Check failed!");
|
||||
checkFailed = true;
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
|
|
@ -11,6 +11,6 @@ public class ModUtil{
|
|||
public static final String NAME = "Actually Additions";
|
||||
public static final String MOD_ID_LOWER = MOD_ID.toLowerCase();
|
||||
|
||||
public static final Logger AA_LOGGER = LogManager.getLogger(MOD_ID);
|
||||
public static final Logger LOGGER = LogManager.getLogger(MOD_ID);
|
||||
|
||||
}
|
||||
|
|
|
@ -11,7 +11,7 @@ public class Util{
|
|||
public static final int WILDCARD = OreDictionary.WILDCARD_VALUE;
|
||||
|
||||
public static void logInfo(String text){
|
||||
ModUtil.AA_LOGGER.log(Level.INFO, text);
|
||||
ModUtil.LOGGER.log(Level.INFO, text);
|
||||
}
|
||||
|
||||
public static void registerEvent(Object o){
|
||||
|
|
|
@ -85,7 +85,7 @@ public class WorldUtil{
|
|||
return stack;
|
||||
}
|
||||
catch(Exception e){
|
||||
ModUtil.AA_LOGGER.log(Level.ERROR, "Something that places Blocks at "+x+", "+y+", "+z+" in World "+world.provider.dimensionId+" threw an Exception! Don't let that happen again!");
|
||||
ModUtil.LOGGER.log(Level.ERROR, "Something that places Blocks at "+x+", "+y+", "+z+" in World "+world.provider.dimensionId+" threw an Exception! Don't let that happen again!");
|
||||
}
|
||||
}
|
||||
return stack;
|
||||
|
|
|
@ -2,7 +2,7 @@ itemGroup.actuallyadditions=Actually Additions
|
|||
achievement.page.actuallyadditions=Actually Additions
|
||||
|
||||
fluid.oil=Oil
|
||||
fluid.canolaOil=Canola Oil
|
||||
fluid.canolaoil=Canola Oil
|
||||
|
||||
tile.actuallyadditions.blockCompost.name=Compost
|
||||
tile.actuallyadditions.blockMiscOreBlackQuartz.name=Black Quartz Ore
|
||||
|
@ -74,6 +74,14 @@ tile.actuallyadditions.blockPhantomBreaker.name=Phantom Breaker
|
|||
tooltip.actuallyadditions.blockPhantomBreaker.desc.1=Breaks Blocks from a distance! Connect me with a Phantom Connector!
|
||||
tooltip.actuallyadditions.blockPhantomBreaker.desc.2=Sneak-Right-Click with an empty hand to see its Connections!
|
||||
|
||||
tile.actuallyadditions.blockLavaFactoryController.name=Lava Factory Controller
|
||||
tooltip.actuallyadditions.blockLavaFactoryController.desc.1=Place Lava Factory Casings around in the right way to produce Lava:
|
||||
tooltip.actuallyadditions.blockLavaFactoryController.desc.2=Go one block up above the Controller, that's where Lava is going to land
|
||||
tooltip.actuallyadditions.blockLavaFactoryController.desc.3=Place 4 Casings around that empty space so that it is encased
|
||||
|
||||
tile.actuallyadditions.blockMiscLavaFactoryCase.name=Lava Factory Casing
|
||||
tooltip.actuallyadditions.blockMiscLavaFactoryCase.desc=Helps the Lava Factory Controller generate Lava
|
||||
|
||||
tile.actuallyadditions.blockFluidPlacer.name=Fluid Placer
|
||||
tooltip.actuallyadditions.blockFluidPlacer.desc=Places Fluids stored inside it
|
||||
|
||||
|
@ -143,6 +151,9 @@ tooltip.actuallyadditions.phantom.connectedBlock.desc=Connected to Block at %s,
|
|||
tooltip.actuallyadditions.phantom.connectedNoRange.desc=Connected to Block at %s, %s, %s but it is not in Range!
|
||||
tooltip.actuallyadditions.phantom.notConnected.desc=This isn't connected to anything!
|
||||
|
||||
tooltip.actuallyadditions.factory.notPart.desc=The Controller isn't part of the right Multi-Block! Look at the Controller's Description!
|
||||
tooltip.actuallyadditions.factory.works.desc=This Lava Factory is complete and can produce Lava!
|
||||
|
||||
item.actuallyadditions.itemMiscMashedFood.name=Mashed Food
|
||||
item.actuallyadditions.itemFertilizer.name=Fertilizer
|
||||
item.actuallyadditions.itemMiscDough.name=Dough
|
||||
|
@ -242,6 +253,8 @@ tooltip.actuallyadditions.itemUpgradeSpeed.desc.3=-Double Furnace
|
|||
tooltip.actuallyadditions.itemUpgradeSpeed.desc.4=-Crusher
|
||||
tooltip.actuallyadditions.itemUpgradeSpeed.desc.5=-Double Crusher
|
||||
|
||||
tooltip.actuallyadditions.blockPhantomRange.desc=Range
|
||||
|
||||
tooltip.actuallyadditions.blockCompost.desc=Used to make Fertilizer with Mashed Food
|
||||
tooltip.actuallyadditions.blockMiscOreBlackQuartz.desc=The darkest form of Quartz.
|
||||
tooltip.actuallyadditions.blockMiscBlackQuartz.desc=Black, eerie Quartz! Nice for decorating.
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 773 B |
Binary file not shown.
After Width: | Height: | Size: 780 B |
Binary file not shown.
After Width: | Height: | Size: 773 B |
Binary file not shown.
Before Width: | Height: | Size: 610 B |
Loading…
Reference in a new issue