mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-19 03:39:17 +00:00
Added the agricarnation. Moar puns :D
This commit is contained in:
1 parent
7820637be6
commit
c337282ab0
7 files changed
+70
-2
No files matched your search
@@ -67,7 +67,8 @@ public class BlockSpecialFlower extends BlockFlower implements ITileEntityProvid
|
||||
LibBlockNames.SUBTILE_TIGERSEYE,
|
||||
LibBlockNames.SUBTILE_ORECHID,
|
||||
LibBlockNames.SUBTILE_FALLEN_KANADE,
|
||||
LibBlockNames.SUBTILE_EXOFLAME
|
||||
LibBlockNames.SUBTILE_EXOFLAME,
|
||||
LibBlockNames.SUBTILE_AGRICARNATION
|
||||
};
|
||||
|
||||
protected BlockSpecialFlower() {
|
||||
|
||||
@@ -16,6 +16,7 @@ import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
import vazkii.botania.api.BotaniaAPI;
|
||||
import vazkii.botania.common.block.subtile.SubTilePureDaisy;
|
||||
import vazkii.botania.common.block.subtile.functional.SubTileAgricarnation;
|
||||
import vazkii.botania.common.block.subtile.functional.SubTileBellethorn;
|
||||
import vazkii.botania.common.block.subtile.functional.SubTileExoflame;
|
||||
import vazkii.botania.common.block.subtile.functional.SubTileFallenKanade;
|
||||
@@ -141,6 +142,7 @@ public final class ModBlocks {
|
||||
BotaniaAPI.registerSubTile(LibBlockNames.SUBTILE_ORECHID, SubtileOrechid.class);
|
||||
BotaniaAPI.registerSubTile(LibBlockNames.SUBTILE_FALLEN_KANADE, SubTileFallenKanade.class);
|
||||
BotaniaAPI.registerSubTile(LibBlockNames.SUBTILE_EXOFLAME, SubTileExoflame.class);
|
||||
BotaniaAPI.registerSubTile(LibBlockNames.SUBTILE_AGRICARNATION, SubTileAgricarnation.class);
|
||||
}
|
||||
|
||||
private static void registerMultiparts() {
|
||||
|
||||
@@ -0,0 +1,63 @@
|
||||
/**
|
||||
* 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, 10:16:53 PM (GMT)]
|
||||
*/
|
||||
package vazkii.botania.common.block.subtile.functional;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import vazkii.botania.api.subtile.SubTileFunctional;
|
||||
|
||||
public class SubTileAgricarnation extends SubTileFunctional {
|
||||
|
||||
@Override
|
||||
public void onUpdate() {
|
||||
super.onUpdate();
|
||||
|
||||
if(supertile.worldObj.getTotalWorldTime() % 3 == 0) {
|
||||
int range = 5;
|
||||
int x = supertile.xCoord + supertile.worldObj.rand.nextInt(range * 2 + 1) - range;
|
||||
int z = supertile.zCoord + supertile.worldObj.rand.nextInt(range * 2 + 1) - range;
|
||||
|
||||
for(int i = 4; i > -2; i--) {
|
||||
int y = supertile.yCoord + i;
|
||||
|
||||
if(supertile.worldObj.isAirBlock(x, y, z))
|
||||
continue;
|
||||
|
||||
if(isPlant(x, y, z) && mana > 5) {
|
||||
int id = supertile.worldObj.getBlockId(x, y, z);
|
||||
mana -= 5;
|
||||
supertile.worldObj.scheduleBlockUpdate(x, y, z, id, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
boolean isPlant(int x, int y, int z) {
|
||||
int id = supertile.worldObj.getBlockId(x, y, z);
|
||||
if(id == Block.grass.blockID || id == Block.leaves.blockID || id == Block.tallGrass.blockID)
|
||||
return false;
|
||||
|
||||
Material mat = supertile.worldObj.getBlockMaterial(x, y, z);
|
||||
return mat != null && (mat == Material.plants || mat == Material.cactus || mat == Material.grass || mat == Material.leaves || mat == Material.vine || mat == Material.wood || mat == Material.pumpkin);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getColor() {
|
||||
return 0x8EF828;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMaxMana() {
|
||||
return 200;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -19,7 +19,6 @@ import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.util.Icon;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
@@ -51,5 +51,6 @@ public final class LibBlockNames {
|
||||
public static final String SUBTILE_ORECHID = "orechid";
|
||||
public static final String SUBTILE_FALLEN_KANADE = "fallenKanade";
|
||||
public static final String SUBTILE_EXOFLAME = "exoflame";
|
||||
public static final String SUBTILE_AGRICARNATION = "agricarnation";
|
||||
|
||||
}
|
||||
@@ -143,6 +143,8 @@ 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
|
||||
tile.botania:flower.agricarnation.name=Agricarnation
|
||||
tile.botania:flower.agricarnation.reference=Wear on the 25th of april
|
||||
|
||||
# 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