BiomesOPlenty/common/biomesoplenty/api/BlockReferences.java

252 lines
7.3 KiB
Java
Raw Normal View History

2013-05-03 13:00:44 +00:00
package biomesoplenty.api;
import net.minecraft.block.Block;
import net.minecraft.item.ItemStack;
import com.google.common.base.Optional;
public class BlockReferences {
public static enum EnumBlocks
{
acaciaLog (Blocks.logs1, 0),
cherryLog (Blocks.logs1, 1),
darkLog (Blocks.logs1, 2),
firLog (Blocks.logs1, 3),
holyLog (Blocks.logs2, 0),
magicLog (Blocks.logs2, 1),
mangroveLog (Blocks.logs2, 2),
palmLog (Blocks.logs2, 3),
2013-05-31 10:34:02 +00:00
redwoodLog (Blocks.logs3, 0),
2013-05-03 13:00:44 +00:00
willowLog (Blocks.logs3, 1),
2013-05-31 10:34:02 +00:00
deadLog (Blocks.logs3, 2),
2013-05-03 13:00:44 +00:00
bigFlowerStem (Blocks.logs3, 3),
2013-06-01 13:42:00 +00:00
pineLog (Blocks.logs4, 0),
2013-06-02 07:41:24 +00:00
hellBarkLog (Blocks.logs4, 1),
jacarandaLog (Blocks.logs4, 2),
2013-05-31 10:34:02 +00:00
2013-05-03 13:00:44 +00:00
acaciaPlank (Blocks.planks, 0),
cherryPlank (Blocks.planks, 1),
darkPlank (Blocks.planks, 2),
firPlank (Blocks.planks, 3),
holyPlank (Blocks.planks, 4),
magicPlank (Blocks.planks, 5),
mangrovePlank (Blocks.planks, 6),
palmPlank (Blocks.planks, 7),
redwoodPlank (Blocks.planks, 8),
willowPlank (Blocks.planks, 9),
bambooThatching (Blocks.planks, 10),
2013-06-02 07:41:24 +00:00
pinePlank (Blocks.planks, 11),
hellBarkPlank (Blocks.planks, 12),
jacarandaPlank (Blocks.planks, 13),
2013-05-31 10:34:02 +00:00
2013-05-03 13:00:44 +00:00
acaciaLeaves (Blocks.leavesColorized, 0),
mangroveLeaves (Blocks.leavesColorized, 1),
palmLeaves (Blocks.leavesColorized, 2),
redwoodLeaves (Blocks.leavesColorized, 3),
willowLeaves (Blocks.leavesColorized, 4),
2013-05-25 21:31:11 +00:00
pineLeaves (Blocks.leavesColorized, 5),
2013-05-31 10:34:02 +00:00
2013-05-03 13:00:44 +00:00
yellowAutumnLeaves (Blocks.leaves1, 0),
bambooLeaves (Blocks.leaves1, 1),
magicLeaves (Blocks.leaves1, 2),
darkLeaves (Blocks.leaves1, 3),
deadLeaves (Blocks.leaves1, 4),
firLeaves (Blocks.leaves1, 5),
holyLeaves (Blocks.leaves1, 6),
orangeAutumnLeaves (Blocks.leaves1, 7),
originLeaves (Blocks.leaves2, 0),
pinkCherryLeaves (Blocks.leaves2, 1),
mapleLeaves (Blocks.leaves2, 2),
whiteCherryLeaves (Blocks.leaves2, 3),
2013-06-02 07:41:24 +00:00
hellBarkLeaves (Blocks.leaves2, 4),
jacarandaLeaves (Blocks.leaves2, 5),
2013-05-31 10:34:02 +00:00
2013-05-03 13:00:44 +00:00
appleLeaves (Blocks.leavesFruit, 3),
appleLeavesFruitless (Blocks.leavesFruit, 0),
2013-09-10 13:52:37 +00:00
persimmonLeaves (Blocks.leavesFruit2, 3),
persimmonLeavesFruitless (Blocks.leavesFruit2, 3),
2013-05-31 10:34:02 +00:00
2013-05-03 13:00:44 +00:00
bamboo (Blocks.bamboo, 0),
2013-05-31 10:34:02 +00:00
dryGrassItem (Blocks.foliage, 11),
2013-09-20 17:33:44 +00:00
wheatGrassItem (Blocks.foliage, 10),
2013-09-21 01:43:58 +00:00
shrubItem (Blocks.foliage, 9),
poisonIvyItem (Blocks.foliage, 7),
2013-05-03 13:00:44 +00:00
sproutItem (Blocks.foliage, 5),
bushItem (Blocks.foliage, 4),
highGrassItem (Blocks.foliage, 3),
mediumGrassItem (Blocks.foliage, 2),
shortGrassItem (Blocks.foliage, 1),
algae (Blocks.foliage, 0),
holySapling (Blocks.saplings, 7),
magicSapling (Blocks.saplings, 3),
darkSapling (Blocks.saplings, 4),
deadSapling (Blocks.saplings, 5),
acaciaSapling (Blocks.colorizedSaplings, 0),
firSapling (Blocks.saplings, 6),
mangroveSapling (Blocks.colorizedSaplings, 1),
palmSapling (Blocks.colorizedSaplings, 2),
redwoodSapling (Blocks.colorizedSaplings, 3),
willowSapling (Blocks.colorizedSaplings, 4),
2013-05-25 21:31:11 +00:00
pineSapling (Blocks.colorizedSaplings, 5),
2013-09-28 22:53:14 +00:00
sacredoakSapling (Blocks.colorizedSaplings, 6),
2013-05-03 13:00:44 +00:00
mapleSapling (Blocks.saplings, 11),
orangeAutumnSapling (Blocks.saplings, 8),
pinkCherrySapling (Blocks.saplings, 10),
whiteCherrySapling (Blocks.saplings, 12),
2013-06-02 07:41:24 +00:00
hellBarkSapling (Blocks.saplings, 13),
jacarandaSapling (Blocks.saplings, 14),
2013-05-03 13:00:44 +00:00
appleSapling (Blocks.saplings, 0),
originSapling (Blocks.saplings, 9),
yellowAutumnSapling (Blocks.saplings, 1),
bambooSapling (Blocks.saplings, 2),
2013-09-10 13:52:37 +00:00
persimmonSapling (Blocks.saplings, 15),
2013-05-31 10:34:02 +00:00
2013-05-03 13:00:44 +00:00
mud (Blocks.mud, 0),
driedDirt (Blocks.driedDirt, 0),
redRock (Blocks.redRock, 0),
ash (Blocks.ash, 0),
ashStone (Blocks.ashStone, 0),
2013-10-26 16:32:03 +00:00
flesh (Blocks.flesh, 0),
2013-05-03 13:00:44 +00:00
hardIce (Blocks.hardIce, 0),
originGrass (Blocks.originGrass, 0),
longGrass (Blocks.longGrass, 0),
2013-05-03 13:00:44 +00:00
hardSand (Blocks.hardSand, 0),
hardDirt (Blocks.hardDirt, 0),
holyGrass (Blocks.holyGrass, 0),
holyDirt (Blocks.holyDirt, 0),
2013-05-03 13:00:44 +00:00
holyStone (Blocks.holyStone, 0),
holyStoneCobble (Blocks.holyStone, 1),
crystal (Blocks.crystal, 0),
2013-05-03 13:00:44 +00:00
cragRock (Blocks.cragRock, 0),
quicksand (Blocks.mud, 1),
cloud (Blocks.cloud, 0),
2013-05-03 13:00:44 +00:00
smolderingGrass (Blocks.holyGrass, 1),
redRockCobble (Blocks.redRock, 1),
giantFlowerRed (Blocks.petals, 0),
giantFlowerYellow (Blocks.petals, 1),
amethystOre (Blocks.amethystOre, 0),
amethystBlock (Blocks.amethystOre, 1),
rubyOre (Blocks.amethystOre, 2),
rubyBlock (Blocks.amethystOre, 3),
peridotOre (Blocks.amethystOre, 4),
peridotBlock (Blocks.amethystOre, 5),
topazOre (Blocks.amethystOre, 6),
topazBlock (Blocks.amethystOre, 7),
tanzaniteOre (Blocks.amethystOre, 8),
tanzaniteBlock (Blocks.amethystOre, 9),
apatiteOre (Blocks.amethystOre, 10),
apatiteBlock (Blocks.amethystOre, 11),
sapphireOre (Blocks.amethystOre, 12),
sapphireBlock (Blocks.amethystOre, 13),
2013-05-31 10:34:02 +00:00
smallBoneSegment (Blocks.bones, 0),
mediumBoneSegment (Blocks.bones, 1),
largeBoneSegment (Blocks.bones, 2),
2013-05-31 10:34:02 +00:00
2013-05-23 15:20:06 +00:00
kelp (Blocks.coral, 0),
2013-10-30 18:56:32 +00:00
honeycomb (Blocks.hive, 0),
hive (Blocks.hive, 1),
honeycombempty (Blocks.hive, 2),
honeyBlock (Blocks.honeyBlock, 0),
2013-05-31 10:34:02 +00:00
2013-05-13 13:43:16 +00:00
toadstool (Blocks.mushrooms, 0),
portobello (Blocks.mushrooms, 1),
bluemilk (Blocks.mushrooms, 2),
glowshroom (Blocks.mushrooms, 3),
flatmushroom (Blocks.mushrooms, 4),
2013-05-31 10:34:02 +00:00
2013-05-13 13:43:16 +00:00
deadGrass (Blocks.plants, 0),
desertGrass (Blocks.plants, 1),
2013-05-03 13:00:44 +00:00
desertSprouts (Blocks.plants, 2),
duneGrass (Blocks.plants, 3),
2013-05-13 13:43:16 +00:00
holyTallGrass (Blocks.plants, 4),
2013-05-03 13:00:44 +00:00
thorn (Blocks.plants, 5),
2013-05-13 13:43:16 +00:00
barley (Blocks.plants, 6),
cattail (Blocks.plants, 7),
rivercane (Blocks.plants, 8),
2013-07-24 17:27:45 +00:00
tinyCactus (Blocks.plants, 12),
2013-09-07 00:47:53 +00:00
witherwart (Blocks.plants, 13),
reed (Blocks.plants, 14),
2013-05-31 10:34:02 +00:00
treeMoss (Blocks.treeMoss, 0),
2013-05-03 13:00:44 +00:00
moss (Blocks.moss, 0),
willow (Blocks.willow, 0),
2013-05-20 14:41:19 +00:00
ivy (Blocks.ivy, 0),
2013-05-31 10:34:02 +00:00
2013-05-13 13:43:16 +00:00
clover (Blocks.flowers, 0),
swampFlower (Blocks.flowers, 1),
2013-05-03 13:00:44 +00:00
deathbloom (Blocks.flowers, 2),
glowFlower (Blocks.flowers, 3),
2013-05-13 13:43:16 +00:00
hydrangea (Blocks.flowers, 4),
cosmos (Blocks.flowers, 5),
daffodil (Blocks.flowers, 6),
2013-05-13 13:43:16 +00:00
wildFlower (Blocks.flowers, 7),
violet (Blocks.flowers, 8),
anenome (Blocks.flowers, 9),
lilyflower (Blocks.flowers, 10),
2013-07-24 17:27:45 +00:00
rainbowflower (Blocks.flowers, 11),
bromeliad (Blocks.flowers, 12),
sunflower (Blocks.flowers, 13),
2013-05-13 13:43:16 +00:00
dandelion (Blocks.flowers, 15),
hibiscus (Blocks.flowers2, 0),
lilyofthevalley (Blocks.flowers2, 1),
burningblossom (Blocks.flowers2, 2),
2013-09-20 04:21:28 +00:00
lavender (Blocks.flowers2, 3),
goldenrod (Blocks.flowers2, 4),
bluebells (Blocks.flowers2, 5),
minersdelight (Blocks.flowers2, 6),
icyiris (Blocks.flowers2, 7),
2013-05-03 13:00:44 +00:00
;
public Optional<? extends Block> block;
public int meta;
private EnumBlocks(Optional<? extends Block> block, int meta) {
this.block = block;
this.meta = meta;
}
2013-05-31 10:34:02 +00:00
2013-05-03 13:00:44 +00:00
public Optional<? extends Block> getBlock() {
return block;
}
2013-05-31 10:34:02 +00:00
2013-05-03 13:00:44 +00:00
public int getMeta() {
return meta;
}
}
public static ItemStack getBlockItemStack(String string)
{
Optional<? extends Block> stackblock = EnumBlocks.valueOf(string).block;
int stackmeta = EnumBlocks.valueOf(string).meta;
2013-05-31 10:34:02 +00:00
2013-05-03 13:00:44 +00:00
if (stackmeta != 0)
2013-07-01 00:31:34 +00:00
{
2013-05-03 13:00:44 +00:00
return new ItemStack(stackblock.get(), 1, stackmeta);
2013-07-01 00:31:34 +00:00
}
return new ItemStack(stackblock.get(), 1);
2013-05-03 13:00:44 +00:00
}
2013-05-31 10:34:02 +00:00
2013-05-03 13:00:44 +00:00
public static int getBlockID(String string)
{
Optional<? extends Block> stackblock = EnumBlocks.valueOf(string).block;
return stackblock.get().blockID;
}
2013-05-31 10:34:02 +00:00
2013-05-03 13:00:44 +00:00
public static int getBlockMeta(String string)
{
int stackmeta = EnumBlocks.valueOf(string).meta;
return stackmeta;
}
}