Moved the honey block to its own class

This commit is contained in:
Matt Caughey 2013-10-30 14:56:32 -04:00
parent f98ea5e6ae
commit 0cac2622b6
12 changed files with 72 additions and 4 deletions

View File

@ -123,7 +123,6 @@ public class BlockReferences {
cragRock (Blocks.cragRock, 0), cragRock (Blocks.cragRock, 0),
quicksand (Blocks.mud, 1), quicksand (Blocks.mud, 1),
cloud (Blocks.cloud, 0), cloud (Blocks.cloud, 0),
hive (Blocks.hive, 0),
smolderingGrass (Blocks.holyGrass, 1), smolderingGrass (Blocks.holyGrass, 1),
redRockCobble (Blocks.redRock, 1), redRockCobble (Blocks.redRock, 1),
giantFlowerRed (Blocks.petals, 0), giantFlowerRed (Blocks.petals, 0),
@ -150,6 +149,12 @@ public class BlockReferences {
kelp (Blocks.coral, 0), kelp (Blocks.coral, 0),
honeycomb (Blocks.hive, 0),
hive (Blocks.hive, 1),
honeycombempty (Blocks.hive, 2),
honeyBlock (Blocks.honeyBlock, 0),
toadstool (Blocks.mushrooms, 0), toadstool (Blocks.mushrooms, 0),
portobello (Blocks.mushrooms, 1), portobello (Blocks.mushrooms, 1),
bluemilk (Blocks.mushrooms, 2), bluemilk (Blocks.mushrooms, 2),

View File

@ -86,6 +86,7 @@ public class Blocks
public static Optional<? extends Block> bamboo = Optional.absent(); public static Optional<? extends Block> bamboo = Optional.absent();
public static Optional<? extends Block> cloud = Optional.absent(); public static Optional<? extends Block> cloud = Optional.absent();
public static Optional<? extends Block> hive = Optional.absent(); public static Optional<? extends Block> hive = Optional.absent();
public static Optional<? extends Block> honeyBlock = Optional.absent();
//Nether //Nether
public static Optional<? extends Block> bones = Optional.absent(); public static Optional<? extends Block> bones = Optional.absent();

View File

@ -17,7 +17,7 @@ import biomesoplenty.entities.EntityWasp;
public class BlockHive extends Block public class BlockHive extends Block
{ {
private static final String[] hiveTypes = new String[] {"honeycomb", "hive", "honeycombempty", "honeyblock"}; private static final String[] hiveTypes = new String[] {"honeycomb", "hive", "honeycombempty"};
private Icon[] textures; private Icon[] textures;
public BlockHive(int par1) public BlockHive(int par1)

View File

@ -0,0 +1,55 @@
package biomesoplenty.blocks;
import static net.minecraftforge.common.ForgeDirection.UP;
import java.util.Random;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IconRegister;
import net.minecraft.entity.Entity;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
import net.minecraftforge.common.ForgeDirection;
import biomesoplenty.BiomesOPlenty;
import biomesoplenty.api.Blocks;
import biomesoplenty.api.Items;
public class BlockHoney extends Block
{
public BlockHoney(int par1)
{
super(par1, Material.glass);
this.setCreativeTab(BiomesOPlenty.tabBiomesOPlenty);
}
@Override
public void registerIcons(IconRegister par1IconRegister)
{
blockIcon = par1IconRegister.registerIcon("biomesoplenty:honeyblock");
}
@Override
@SideOnly(Side.CLIENT)
public int getRenderBlockPass()
{
return 1;
}
@Override
public boolean shouldSideBeRendered(IBlockAccess par1IBlockAccess, int par2, int par3, int par4, int par5)
{
return super.shouldSideBeRendered(par1IBlockAccess, par2, par3, par4, 1 - par5);
}
@Override
public boolean isOpaqueCube()
{
return false;
}
}

View File

@ -41,6 +41,7 @@ import biomesoplenty.blocks.BlockCloud;
import biomesoplenty.blocks.BlockFlesh; import biomesoplenty.blocks.BlockFlesh;
import biomesoplenty.blocks.BlockGrave; import biomesoplenty.blocks.BlockGrave;
import biomesoplenty.blocks.BlockHive; import biomesoplenty.blocks.BlockHive;
import biomesoplenty.blocks.BlockHoney;
import biomesoplenty.blocks.BlockIvy; import biomesoplenty.blocks.BlockIvy;
import biomesoplenty.blocks.BlockLongGrass; import biomesoplenty.blocks.BlockLongGrass;
import biomesoplenty.blocks.BlockMoss; import biomesoplenty.blocks.BlockMoss;
@ -182,6 +183,7 @@ public class BOPBlocks
Blocks.cloud = Optional.of((new BlockCloud(BOPConfigurationIDs.cloudID)).setHardness(0.1F).setLightOpacity(3).setStepSound(Block.soundClothFootstep).setUnlocalizedName("bop.cloud")); Blocks.cloud = Optional.of((new BlockCloud(BOPConfigurationIDs.cloudID)).setHardness(0.1F).setLightOpacity(3).setStepSound(Block.soundClothFootstep).setUnlocalizedName("bop.cloud"));
Blocks.hive = Optional.of((new BlockHive(BOPConfigurationIDs.hiveID)).setHardness(0.5F).setStepSound(Block.soundGrassFootstep).setUnlocalizedName("bop.hive")); Blocks.hive = Optional.of((new BlockHive(BOPConfigurationIDs.hiveID)).setHardness(0.5F).setStepSound(Block.soundGrassFootstep).setUnlocalizedName("bop.hive"));
Blocks.honeyBlock = Optional.of((new BlockHoney(BOPConfigurationIDs.honeyBlockID)).setHardness(0.5F).setStepSound(Block.soundGlassFootstep).setUnlocalizedName("bop.honeyBlock"));
Blocks.bones = Optional.of((new BlockBones(BOPConfigurationIDs.bonesID)).setStepSound(Block.soundStoneFootstep).setUnlocalizedName("bop.bones")); Blocks.bones = Optional.of((new BlockBones(BOPConfigurationIDs.bonesID)).setStepSound(Block.soundStoneFootstep).setUnlocalizedName("bop.bones"));
@ -266,6 +268,7 @@ public class BOPBlocks
GameRegistry.registerBlock(Blocks.cragRock.get(), "bop.cragRock"); GameRegistry.registerBlock(Blocks.cragRock.get(), "bop.cragRock");
GameRegistry.registerBlock(Blocks.cloud.get(), "bop.cloud"); GameRegistry.registerBlock(Blocks.cloud.get(), "bop.cloud");
GameRegistry.registerBlock(Blocks.hive.get(), ItemBlockHive.class, "bop.hive"); GameRegistry.registerBlock(Blocks.hive.get(), ItemBlockHive.class, "bop.hive");
GameRegistry.registerBlock(Blocks.honeyBlock.get(), "bop.honeyBlock");
GameRegistry.registerBlock(Blocks.bones.get(), ItemBlockBones.class, "bop.bones"); GameRegistry.registerBlock(Blocks.bones.get(), ItemBlockBones.class, "bop.bones");
GameRegistry.registerBlock(Blocks.glass.get(), ItemBlockGlass.class, "bop.glass"); GameRegistry.registerBlock(Blocks.glass.get(), ItemBlockGlass.class, "bop.glass");

View File

@ -97,6 +97,7 @@ public class BOPConfigurationIDs
public static int crystalID; public static int crystalID;
public static int cloudID; public static int cloudID;
public static int hiveID; public static int hiveID;
public static int honeyBlockID;
public static int bonesID; public static int bonesID;
public static int glassID; public static int glassID;
@ -415,6 +416,8 @@ public class BOPConfigurationIDs
liquidPoisonStillID = config.get("Liquid IDs", "Liquid Poison Still ID (ID before this must be free!)", 1987, null).getInt(); liquidPoisonStillID = config.get("Liquid IDs", "Liquid Poison Still ID (ID before this must be free!)", 1987, null).getInt();
honeyStillID = config.get("Liquid IDs", "Honey Still ID (ID before this must be free!)", 1989, null).getInt(); honeyStillID = config.get("Liquid IDs", "Honey Still ID (ID before this must be free!)", 1989, null).getInt();
honeyBlockID = config.getBlock("Honey Block ID", 1991, null).getInt();
// Get Item ID's // Get Item ID's
foodID = config.getItem("Food ID", 21003, null).getInt(); foodID = config.getItem("Food ID", 21003, null).getInt();

View File

@ -8,7 +8,7 @@ import net.minecraft.world.World;
public class ItemBlockHive extends ItemBlock public class ItemBlockHive extends ItemBlock
{ {
private static final String[] types = new String[] {"honeycomb", "hive", "honeycombempty", "honeyblock"}; private static final String[] types = new String[] {"honeycomb", "hive", "honeycombempty"};
public ItemBlockHive(int par1) public ItemBlockHive(int par1)
{ {

View File

@ -160,7 +160,8 @@ tile.bop.cloud.name=Cloud Block
tile.bop.hive.honeycomb.name=Honeycomb Block tile.bop.hive.honeycomb.name=Honeycomb Block
tile.bop.hive.hive.name=Hive Block tile.bop.hive.hive.name=Hive Block
tile.bop.hive.honeycombempty.name=Empty Honeycomb Block tile.bop.hive.honeycombempty.name=Empty Honeycomb Block
tile.bop.hive.honeyblock.name=Solid Honey Block
tile.bop.honeyBlock.name=Honey Block
tile.bop.bones.bones_small.name=Small Bone Segment tile.bop.bones.bones_small.name=Small Bone Segment
tile.bop.bones.bones_medium.name=Medium Bone Segment tile.bop.bones.bones_medium.name=Medium Bone Segment

Binary file not shown.

Before

Width:  |  Height:  |  Size: 726 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 673 B

After

Width:  |  Height:  |  Size: 747 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 756 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 669 B

After

Width:  |  Height:  |  Size: 1.2 KiB