mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-14 01:04:16 +00:00
Added the Jaded Amaranthus. Guess who requested that >.<
This commit is contained in:
1 parent
7f0c6f5ce2
commit
4f9bec6dd8
7 files changed
+75
No files matched your search
@@ -57,6 +57,7 @@ public class BlockSpecialFlower extends BlockFlower implements ITileEntityProvid
|
||||
LibBlockNames.SUBTILE_ENDOFLAME,
|
||||
|
||||
// Functional
|
||||
LibBlockNames.SUBTILE_JADED_AMARANTHUS,
|
||||
LibBlockNames.SUBTILE_BELLETHORN,
|
||||
LibBlockNames.SUBTILE_HEISEI_DREAM,
|
||||
LibBlockNames.SUBTILE_TIGERSEYE,
|
||||
|
||||
@@ -18,6 +18,7 @@ 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.SubTileHeiseiDream;
|
||||
import vazkii.botania.common.block.subtile.functional.SubTileJadedAmaranthus;
|
||||
import vazkii.botania.common.block.subtile.functional.SubTileTigerseye;
|
||||
import vazkii.botania.common.block.subtile.generating.SubTileDaybloom;
|
||||
import vazkii.botania.common.block.subtile.generating.SubTileEndoflame;
|
||||
@@ -93,6 +94,7 @@ public final class ModBlocks {
|
||||
BotaniaAPI.registerSubTile(LibBlockNames.SUBTILE_BELLETHORN, SubTileBellethorn.class);
|
||||
BotaniaAPI.registerSubTile(LibBlockNames.SUBTILE_HEISEI_DREAM, SubTileHeiseiDream.class);
|
||||
BotaniaAPI.registerSubTile(LibBlockNames.SUBTILE_TIGERSEYE, SubTileTigerseye.class);
|
||||
BotaniaAPI.registerSubTile(LibBlockNames.SUBTILE_JADED_AMARANTHUS, SubTileJadedAmaranthus.class);
|
||||
}
|
||||
|
||||
private static void registerMultiparts() {
|
||||
|
||||
@@ -0,0 +1,69 @@
|
||||
/**
|
||||
* 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 3, 2014, 10:31:29 PM (GMT)]
|
||||
*/
|
||||
package vazkii.botania.common.block.subtile.functional;
|
||||
|
||||
import cpw.mods.fml.common.network.PacketDispatcher;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.world.World;
|
||||
import vazkii.botania.common.block.ModBlocks;
|
||||
import vazkii.botania.common.block.subtile.SubTileFunctional;
|
||||
|
||||
public class SubTileJadedAmaranthus extends SubTileFunctional {
|
||||
|
||||
private static final int COST = 100;
|
||||
int cooldown = 0;
|
||||
|
||||
@Override
|
||||
public void onUpdate() {
|
||||
super.onUpdate();
|
||||
|
||||
if(cooldown > 0) {
|
||||
cooldown--;
|
||||
return;
|
||||
}
|
||||
|
||||
if(mana >= COST && !supertile.worldObj.isRemote) {
|
||||
int range = 4;
|
||||
int x = supertile.xCoord - range + supertile.worldObj.rand.nextInt(range * 2 + 1);
|
||||
int y = supertile.yCoord + range;
|
||||
int z = supertile.zCoord - range + supertile.worldObj.rand.nextInt(range * 2 + 1);
|
||||
|
||||
for(int i = 0; i < range * 2; i++) {
|
||||
int blockID = supertile.worldObj.getBlockId(x, y, z);
|
||||
if((blockID == Block.grass.blockID || blockID == Block.dirt.blockID || blockID == Block.tilledField.blockID) && supertile.worldObj.isAirBlock(x, y + 1, z)) {
|
||||
int color = supertile.worldObj.rand.nextInt(16);
|
||||
if(ModBlocks.flower.canBlockStay(supertile.worldObj, x, y + 1, z))
|
||||
supertile.worldObj.setBlock(x, y + 1, z, ModBlocks.flower.blockID, color, 1 | 2);
|
||||
|
||||
mana -= COST;
|
||||
PacketDispatcher.sendPacketToAllInDimension(supertile.getDescriptionPacket(), supertile.worldObj.provider.dimensionId);
|
||||
|
||||
cooldown = 30;
|
||||
break;
|
||||
}
|
||||
|
||||
y--;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getColor() {
|
||||
return 0x961283;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMaxMana() {
|
||||
return COST;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -42,6 +42,7 @@ public final class BotaniaCreativeTab extends CreativeTabs {
|
||||
addItem(ModItems.lexicon);
|
||||
|
||||
addBlock(ModBlocks.flower);
|
||||
addBlock(ModBlocks.specialFlower);
|
||||
addItem(ModItems.petal);
|
||||
addItem(ModItems.manaPetal);
|
||||
addItem(ModItems.pestleAndMortar);
|
||||
|
||||
@@ -39,5 +39,6 @@ public final class LibBlockNames {
|
||||
public static final String SUBTILE_BELLETHORN = "bellethorn";
|
||||
public static final String SUBTILE_HEISEI_DREAM = "heiseiDream";
|
||||
public static final String SUBTILE_TIGERSEYE = "tigerseye";
|
||||
public static final String SUBTILE_JADED_AMARANTHUS = "jadedAmaranthus";
|
||||
|
||||
}
|
||||
@@ -110,6 +110,7 @@ tile.botania:flower.endoflame.name=Endoflame
|
||||
tile.botania:flower.bellethorn.name=Bellethorne
|
||||
tile.botania:flower.heiseiDream.name=Heisei Dream
|
||||
tile.botania:flower.tigerseye.name=Tigerseye
|
||||
tile.botania:flower.jadedAmaranthus.name=Jaded Amaranthus
|
||||
|
||||
# ITEM NAMES
|
||||
item.botania:lexicon.name=Lexica Botania
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 3.2 KiB |
Reference in new issue
Block a user