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-11-16 01:03:03 +00:00
|
|
|
acaciaLeaves (Blocks.leavesColorized1, 0),
|
|
|
|
mangroveLeaves (Blocks.leavesColorized1, 1),
|
|
|
|
palmLeaves (Blocks.leavesColorized1, 2),
|
|
|
|
redwoodLeaves (Blocks.leavesColorized1, 3),
|
|
|
|
willowLeaves (Blocks.leavesColorized2, 0),
|
|
|
|
pineLeaves (Blocks.leavesColorized2, 1),
|
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
|
|
|
|
2013-11-14 11:39:11 +00:00
|
|
|
cloverPatchItem (Blocks.foliage, 13),
|
|
|
|
koruItem (Blocks.foliage, 12),
|
2013-09-20 21:47:49 +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),
|
2013-05-08 13:39:07 +00:00
|
|
|
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),
|
2013-07-22 02:01:24 +00:00
|
|
|
longGrass (Blocks.longGrass, 0),
|
2013-05-03 13:00:44 +00:00
|
|
|
hardSand (Blocks.hardSand, 0),
|
|
|
|
hardDirt (Blocks.hardDirt, 0),
|
|
|
|
holyGrass (Blocks.holyGrass, 0),
|
2013-05-09 13:38:48 +00:00
|
|
|
holyDirt (Blocks.holyDirt, 0),
|
2013-05-03 13:00:44 +00:00
|
|
|
holyStone (Blocks.holyStone, 0),
|
2013-05-12 12:38:39 +00:00
|
|
|
holyStoneCobble (Blocks.holyStone, 1),
|
2013-11-14 07:50:25 +00:00
|
|
|
holyStoneMossy (Blocks.holyStone, 3),
|
2013-05-10 18:50:44 +00:00
|
|
|
crystal (Blocks.crystal, 0),
|
2013-05-03 13:00:44 +00:00
|
|
|
cragRock (Blocks.cragRock, 0),
|
|
|
|
quicksand (Blocks.mud, 1),
|
2013-05-10 20:28:30 +00:00
|
|
|
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),
|
2013-06-02 18:09:16 +00:00
|
|
|
|
|
|
|
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),
|
2013-11-06 22:04:21 +00:00
|
|
|
malachiteOre (Blocks.amethystOre, 10),
|
|
|
|
malachiteBlock (Blocks.amethystOre, 11),
|
2013-06-03 02:54:15 +00:00
|
|
|
sapphireOre (Blocks.amethystOre, 12),
|
|
|
|
sapphireBlock (Blocks.amethystOre, 13),
|
2013-05-31 10:34:02 +00:00
|
|
|
|
2013-05-24 23:41:10 +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),
|
2013-09-21 20:08:45 +00:00
|
|
|
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),
|
2013-09-23 19:02:46 +00:00
|
|
|
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),
|
2013-09-23 19:02:46 +00:00
|
|
|
reed (Blocks.plants, 14),
|
2013-11-06 15:52:04 +00:00
|
|
|
root (Blocks.plants, 15),
|
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),
|
2013-09-06 21:09:54 +00:00
|
|
|
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),
|
2013-05-15 15:37:27 +00:00
|
|
|
lilyflower (Blocks.flowers, 10),
|
2013-07-24 17:27:45 +00:00
|
|
|
rainbowflower (Blocks.flowers, 11),
|
2013-09-20 01:41:03 +00:00
|
|
|
bromeliad (Blocks.flowers, 12),
|
2013-05-15 15:37:27 +00:00
|
|
|
sunflower (Blocks.flowers, 13),
|
2013-05-13 13:43:16 +00:00
|
|
|
dandelion (Blocks.flowers, 15),
|
2013-09-19 22:18:50 +00:00
|
|
|
|
|
|
|
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),
|
2013-09-21 09:00:30 +00:00
|
|
|
minersdelight (Blocks.flowers2, 6),
|
2013-09-21 20:08:45 +00:00
|
|
|
icyiris (Blocks.flowers2, 7),
|
2013-11-08 01:26:52 +00:00
|
|
|
|
|
|
|
stalagmite (Blocks.stoneFormations, 0),
|
|
|
|
stalactite (Blocks.stoneFormations, 1),
|
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;
|
|
|
|
}
|
|
|
|
}
|