mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-17 19:05:16 +00:00
Added the Exoflame.
This commit is contained in:
1 parent
4cbe6be3a0
commit
16428b2ee1
6 files changed
+102
-3
No files matched your search
@@ -66,7 +66,8 @@ public class BlockSpecialFlower extends BlockFlower implements ITileEntityProvid
|
||||
LibBlockNames.SUBTILE_HEISEI_DREAM,
|
||||
LibBlockNames.SUBTILE_TIGERSEYE,
|
||||
LibBlockNames.SUBTILE_ORECHID,
|
||||
LibBlockNames.SUBTILE_FALLEN_KANADE
|
||||
LibBlockNames.SUBTILE_FALLEN_KANADE,
|
||||
LibBlockNames.SUBTILE_EXOFLAME
|
||||
};
|
||||
|
||||
protected BlockSpecialFlower() {
|
||||
|
||||
@@ -17,6 +17,7 @@ import net.minecraftforge.oredict.OreDictionary;
|
||||
import vazkii.botania.api.BotaniaAPI;
|
||||
import vazkii.botania.common.block.subtile.SubTilePureDaisy;
|
||||
import vazkii.botania.common.block.subtile.functional.SubTileBellethorn;
|
||||
import vazkii.botania.common.block.subtile.functional.SubTileExoflame;
|
||||
import vazkii.botania.common.block.subtile.functional.SubTileFallenKanade;
|
||||
import vazkii.botania.common.block.subtile.functional.SubTileHeiseiDream;
|
||||
import vazkii.botania.common.block.subtile.functional.SubTileJadedAmaranthus;
|
||||
@@ -139,6 +140,7 @@ public final class ModBlocks {
|
||||
BotaniaAPI.registerSubTile(LibBlockNames.SUBTILE_JADED_AMARANTHUS, SubTileJadedAmaranthus.class);
|
||||
BotaniaAPI.registerSubTile(LibBlockNames.SUBTILE_ORECHID, SubtileOrechid.class);
|
||||
BotaniaAPI.registerSubTile(LibBlockNames.SUBTILE_FALLEN_KANADE, SubTileFallenKanade.class);
|
||||
BotaniaAPI.registerSubTile(LibBlockNames.SUBTILE_EXOFLAME, SubTileExoflame.class);
|
||||
}
|
||||
|
||||
private static void registerMultiparts() {
|
||||
@@ -152,4 +154,4 @@ public final class ModBlocks {
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,93 @@
|
||||
/**
|
||||
* This class was created by <Vazkii>. It's distributed as
|
||||
* part of the Botania Mod. Get the Source Code in github:
|
||||
* https://github.com/Vazkii/Botania
|
||||
*
|
||||
* Botania is Open Source and distributed under a
|
||||
* Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License
|
||||
* (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB)
|
||||
*
|
||||
* File Created @ [Mar 19, 2014, 3:42:32 PM (GMT)]
|
||||
*/
|
||||
package vazkii.botania.common.block.subtile.functional;
|
||||
|
||||
import net.minecraft.block.BlockFurnace;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.crafting.FurnaceRecipes;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.tileentity.TileEntityFurnace;
|
||||
import vazkii.botania.api.subtile.SubTileFunctional;
|
||||
import cpw.mods.fml.common.network.PacketDispatcher;
|
||||
|
||||
public class SubTileExoflame extends SubTileFunctional {
|
||||
|
||||
@Override
|
||||
public void onUpdate() {
|
||||
super.onUpdate();
|
||||
|
||||
int range = 5;
|
||||
int rangeY = 2;
|
||||
|
||||
fireFurnaces : {
|
||||
for(int i = -range + 1; i < range; i++)
|
||||
for(int j = -rangeY; j < rangeY; j++)
|
||||
for(int k = -range + 1; k < range; k++) {
|
||||
int x = supertile.xCoord + i;
|
||||
int y = supertile.yCoord + j;
|
||||
int z = supertile.zCoord + k;
|
||||
|
||||
TileEntity tile = supertile.worldObj.getBlockTileEntity(x, y, z);
|
||||
if(tile != null && tile instanceof TileEntityFurnace) {
|
||||
TileEntityFurnace furnace = (TileEntityFurnace) tile;
|
||||
boolean canSmelt = canFurnaceSmelt(furnace);
|
||||
if(canSmelt && mana > 2) {
|
||||
if(furnace.furnaceBurnTime < 2) {
|
||||
if(furnace.furnaceBurnTime == 0)
|
||||
BlockFurnace.updateFurnaceBlockState(true, supertile.worldObj, x, y, z);
|
||||
furnace.furnaceBurnTime = 200;
|
||||
}
|
||||
if(supertile.worldObj.getTotalWorldTime() % 2 == 0)
|
||||
furnace.furnaceCookTime = Math.min(199, furnace.furnaceCookTime + 1);
|
||||
|
||||
mana -= 2;
|
||||
|
||||
if(mana == 0)
|
||||
break fireFurnaces;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public boolean canFurnaceSmelt(TileEntityFurnace furnace){
|
||||
if(furnace.getStackInSlot(0) == null)
|
||||
return false;
|
||||
else {
|
||||
ItemStack itemstack = FurnaceRecipes.smelting().getSmeltingResult(furnace.getStackInSlot(0));
|
||||
|
||||
if(itemstack == null)
|
||||
return false;
|
||||
|
||||
if(furnace.getStackInSlot(2) == null)
|
||||
return true;
|
||||
|
||||
if(!furnace.getStackInSlot(2).isItemEqual(itemstack))
|
||||
return false;
|
||||
|
||||
int result = furnace.getStackInSlot(2).stackSize + itemstack.stackSize;
|
||||
return result <= 64 && result <= itemstack.getMaxStackSize();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public int getMaxMana() {
|
||||
return 300;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getColor() {
|
||||
return 0x661600;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -50,5 +50,6 @@ public final class LibBlockNames {
|
||||
public static final String SUBTILE_JADED_AMARANTHUS = "jadedAmaranthus";
|
||||
public static final String SUBTILE_ORECHID = "orechid";
|
||||
public static final String SUBTILE_FALLEN_KANADE = "fallenKanade";
|
||||
public static final String SUBTILE_EXOFLAME = "exoflame";
|
||||
|
||||
}
|
||||
@@ -118,7 +118,7 @@ tile.botania:flower.puredaisy.reference=What color do you want to be?
|
||||
tile.botania:flower.daybloom.name=Daybloom
|
||||
tile.botania:flower.daybloom.reference=A Sting of light
|
||||
tile.botania:flower.endoflame.name=Endoflame
|
||||
tile.botania:flower.endoflame.reference=An endotermic reaction
|
||||
tile.botania:flower.endoflame.reference=An endothermic reaction
|
||||
tile.botania:flower.hydroangeas.name=Hydroangeas
|
||||
tile.botania:flower.hydroangeas.reference=Careful: Wet floor
|
||||
tile.botania:flower.thermalily.name=Thermalily
|
||||
@@ -141,6 +141,8 @@ tile.botania:flower.orechid.name=Orechid
|
||||
tile.botania:flower.orechid.reference=I seed what you did there
|
||||
tile.botania:flower.fallenKanade.name=Fallen Kanade
|
||||
tile.botania:flower.fallenKanade.reference=I'm not an Angel
|
||||
tile.botania:flower.exoflame.name=Exoflame
|
||||
tile.botania:flower.exoflame.reference=An exothermic reaction
|
||||
|
||||
# ITEM NAMES
|
||||
item.botania:lexicon.name=Lexica Botania
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 2.9 KiB |
Reference in new issue
Block a user