Added Skystone Cobble/Brick, along with stairs and slabs for both.
This commit is contained in:
parent
965d02d518
commit
e85443bdd0
12 changed files with 177 additions and 8 deletions
|
@ -102,6 +102,7 @@ public class BlockReferences {
|
|||
holyGrass (Blocks.holyGrass, 0),
|
||||
holyDirt (Blocks.holyDirt, 0),
|
||||
holyStone (Blocks.holyStone, 0),
|
||||
holyStoneCobble (Blocks.holyStone, 1),
|
||||
crystal (Blocks.crystal, 0),
|
||||
cragRock (Blocks.cragRock, 0),
|
||||
quicksand (Blocks.mud, 1),
|
||||
|
|
|
@ -46,6 +46,8 @@ public class Blocks
|
|||
public static Optional<? extends Block> redCobbleStairs = Optional.absent();
|
||||
public static Optional<? extends Block> redBricksStairs = Optional.absent();
|
||||
public static Optional<? extends Block> mudBricksStairs = Optional.absent();
|
||||
public static Optional<? extends Block> holyCobbleStairs = Optional.absent();
|
||||
public static Optional<? extends Block> holyBricksStairs = Optional.absent();
|
||||
|
||||
// Slabs
|
||||
public static Optional<? extends BlockHalfSlab> woodenSingleSlab1 = Optional.absent();
|
||||
|
|
108
src/minecraft/biomesoplenty/blocks/BlockBOPSkystone.java
Normal file
108
src/minecraft/biomesoplenty/blocks/BlockBOPSkystone.java
Normal file
|
@ -0,0 +1,108 @@
|
|||
package biomesoplenty.blocks;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.Icon;
|
||||
import net.minecraft.world.World;
|
||||
import biomesoplenty.BiomesOPlenty;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class BlockBOPSkystone extends Block
|
||||
{
|
||||
private static final String[] types = new String[] {"holystone", "holycobble", "holybrick"};
|
||||
private Icon[] textures = {null, null, null};
|
||||
|
||||
public BlockBOPSkystone(int par1)
|
||||
{
|
||||
super(par1, Material.rock);
|
||||
this.setCreativeTab(BiomesOPlenty.tabBiomesOPlenty);
|
||||
setStepSound(Block.soundStoneFootstep);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void registerIcons(IconRegister iconRegister)
|
||||
{
|
||||
textures = new Icon[types.length];
|
||||
|
||||
for (int i = 0; i < types.length; ++i)
|
||||
textures[i] = iconRegister.registerIcon("BiomesOPlenty:"+types[i]);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Icon getIcon(int side, int meta)
|
||||
{
|
||||
if (meta < 0 || meta >= textures.length)
|
||||
meta = 0;
|
||||
|
||||
return textures[meta];
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getDamageValue(World world, int x, int y, int z) {
|
||||
return world.getBlockMetadata(x, y, z);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings({ "rawtypes", "unchecked" })
|
||||
public void getSubBlocks(int blockID, CreativeTabs creativeTabs, List list) {
|
||||
for (int i = 0; i < types.length; ++i)
|
||||
list.add(new ItemStack(blockID, 1, i));
|
||||
}
|
||||
|
||||
@Override
|
||||
public int damageDropped(int meta)
|
||||
{
|
||||
return meta == 0 ? 1 : meta;
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getBlockHardness(World world, int x, int y, int z)
|
||||
{
|
||||
int meta = world.getBlockMetadata(x, y, z);
|
||||
float hardness = this.blockHardness;
|
||||
|
||||
switch (meta)
|
||||
{
|
||||
case 0:
|
||||
hardness = 1.0F;
|
||||
break;
|
||||
|
||||
case 1:
|
||||
hardness = 1.6F;
|
||||
break;
|
||||
|
||||
case 2:
|
||||
hardness = 1.1F;
|
||||
break;
|
||||
}
|
||||
|
||||
return hardness;
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getExplosionResistance(Entity par1Entity, World world, int x, int y, int z, double explosionX, double explosionY, double explosionZ)
|
||||
{
|
||||
int meta = world.getBlockMetadata(x, y, z);
|
||||
float resistance = this.blockResistance;
|
||||
|
||||
switch (meta)
|
||||
{
|
||||
case 1:
|
||||
resistance = 7.5F;
|
||||
break;
|
||||
|
||||
case 2:
|
||||
resistance = 7.0F;
|
||||
break;
|
||||
}
|
||||
|
||||
return resistance / 5.0F;
|
||||
}
|
||||
}
|
|
@ -26,7 +26,7 @@ public class BlockBOPSlab extends BlockHalfSlab
|
|||
WOOD1, WOOD2, STONE;
|
||||
}
|
||||
private static final String[] woodTypes = new String[] {"acacia", "cherry", "dark", "fir", "holy", "magic", "mangrove", "palm", "redwood", "willow"};
|
||||
private static final String[] rockTypes = new String[] {"redcobble", "redbrick", "mudbrick"};
|
||||
private static final String[] rockTypes = new String[] {"redcobble", "redbrick", "mudbrick", "holycobble", "holybrick"};
|
||||
private Icon[] textures;
|
||||
protected final boolean isDoubleSlab;
|
||||
|
||||
|
@ -91,7 +91,7 @@ public class BlockBOPSlab extends BlockHalfSlab
|
|||
else if (category == SlabCategory.WOOD2)
|
||||
max = 2;
|
||||
else if (category == SlabCategory.STONE)
|
||||
max = 3;
|
||||
max = 5;
|
||||
|
||||
for (int i = 0; i < max; ++i)
|
||||
list.add(new ItemStack(blockID, 1, i));
|
||||
|
@ -148,6 +148,14 @@ public class BlockBOPSlab extends BlockHalfSlab
|
|||
|
||||
case 2:
|
||||
hardness = 1.0F;
|
||||
break;
|
||||
|
||||
case 3:
|
||||
hardness = 1.6F;
|
||||
break;
|
||||
|
||||
case 4:
|
||||
hardness = 1.1F;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -175,6 +183,14 @@ public class BlockBOPSlab extends BlockHalfSlab
|
|||
|
||||
case 2:
|
||||
resistance = 2.0F;
|
||||
break;
|
||||
|
||||
case 3:
|
||||
resistance = 7.0F;
|
||||
break;
|
||||
|
||||
case 4:
|
||||
resistance = 7.5F;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -13,10 +13,10 @@ public class BlockBOPStairs extends BlockStairs
|
|||
{
|
||||
public static enum Category
|
||||
{
|
||||
ACACIA, CHERRY, DARK, FIR, HOLY, MAGIC, MANGROVE, PALM, REDWOOD, WILLOW, RED_COBBLE, RED_BRICKS, MUD_BRICKS;
|
||||
ACACIA, CHERRY, DARK, FIR, HOLY, MAGIC, MANGROVE, PALM, REDWOOD, WILLOW, RED_COBBLE, RED_BRICKS, MUD_BRICKS, HOLY_COBBLE, HOLY_BRICKS;
|
||||
}
|
||||
|
||||
private static final String[] types = new String[] {"acacia", "cherry", "dark", "fir", "holy", "magic", "mangrove", "palm", "redwood", "willow", "redcobble", "redbrick", "mudbrick"};
|
||||
private static final String[] types = new String[] {"acacia", "cherry", "dark", "fir", "holy", "magic", "mangrove", "palm", "redwood", "willow", "redcobble", "redbrick", "mudbrick", "holycobble", "holybrick"};
|
||||
private Icon[] textures;
|
||||
private final Category category;
|
||||
|
||||
|
|
|
@ -25,6 +25,7 @@ import biomesoplenty.blocks.BlockBOPPlank;
|
|||
import biomesoplenty.blocks.BlockBOPPlant;
|
||||
import biomesoplenty.blocks.BlockBOPRedRock;
|
||||
import biomesoplenty.blocks.BlockBOPSapling;
|
||||
import biomesoplenty.blocks.BlockBOPSkystone;
|
||||
import biomesoplenty.blocks.BlockBOPSlab;
|
||||
import biomesoplenty.blocks.BlockBOPSlab.SlabCategory;
|
||||
import biomesoplenty.blocks.BlockBOPStairs;
|
||||
|
@ -54,6 +55,7 @@ import biomesoplenty.items.ItemBOPPlank;
|
|||
import biomesoplenty.items.ItemBOPPlant;
|
||||
import biomesoplenty.items.ItemBOPRedRock;
|
||||
import biomesoplenty.items.ItemBOPSapling;
|
||||
import biomesoplenty.items.ItemBOPSkystone;
|
||||
import biomesoplenty.items.ItemBOPSlab;
|
||||
import biomesoplenty.items.ItemBOPWillow;
|
||||
|
||||
|
@ -125,7 +127,9 @@ public class BOPBlocks {
|
|||
Blocks.hardDirt = Optional.of(new BlockBOPGeneric(BOPConfiguration.hardDirtID, Material.rock, BlockType.HARD_DIRT));
|
||||
Blocks.holyGrass = Optional.of(new BlockBOPGrass(BOPConfiguration.holyGrassID).setUnlocalizedName("holyGrass"));
|
||||
Blocks.holyDirt = Optional.of(new BlockBOPGeneric(BOPConfiguration.holyDirtID, Material.sand, BlockType.HOLY_DIRT));
|
||||
Blocks.holyStone = Optional.of(new BlockBOPGeneric(BOPConfiguration.holyStoneID, Material.rock, BlockType.HOLY_STONE));
|
||||
Blocks.holyStone = Optional.of((new BlockBOPSkystone(BOPConfiguration.holyStoneID)).setUnlocalizedName("holyStone"));
|
||||
Blocks.holyCobbleStairs = Optional.of((new BlockBOPStairs(BOPConfiguration.holyCobbleStairsID, Blocks.holyStone.get(), Category.HOLY_COBBLE)).setUnlocalizedName("holyCobbleStairs"));
|
||||
Blocks.holyBricksStairs = Optional.of((new BlockBOPStairs(BOPConfiguration.holyBrickStairsID, Blocks.holyStone.get(), Category.HOLY_BRICKS)).setUnlocalizedName("holyBricksStairs"));
|
||||
Blocks.crystal = Optional.of(new BlockBOPGeneric(BOPConfiguration.crystalID, Material.glass, BlockType.CRYSTAL));
|
||||
Blocks.promisedPortal = Optional.of(new BlockPromisedPortal(BOPConfiguration.promisedLandPortalID).setUnlocalizedName("promisedPortal").setBlockUnbreakable().setResistance(6000000.0F).setLightValue(1.0F));
|
||||
// Blocks.amethystOre = Optional.of(new BlockBOPGeneric(BOPConfiguration.amethystOreID, Material.rock, BlockType.AMETHYST_ORE));
|
||||
|
@ -194,7 +198,9 @@ public class BOPBlocks {
|
|||
// GameRegistry.registerBlock(Blocks.holyGrass.get(), "holyGrass");
|
||||
GameRegistry.registerBlock(Blocks.holyGrass.get(), ItemBOPGrass.class, "holyGrass");
|
||||
GameRegistry.registerBlock(Blocks.holyDirt.get(), "holyDirt");
|
||||
GameRegistry.registerBlock(Blocks.holyStone.get(), "holyStone");
|
||||
GameRegistry.registerBlock(Blocks.holyStone.get(), ItemBOPSkystone.class, "holyStone");
|
||||
GameRegistry.registerBlock(Blocks.holyCobbleStairs.get(), "holyCobbleStairs");
|
||||
GameRegistry.registerBlock(Blocks.holyBricksStairs.get(), "holyBricksStairs");
|
||||
GameRegistry.registerBlock(Blocks.promisedPortal.get(), "promisedPortal");
|
||||
GameRegistry.registerBlock(Blocks.amethystOre.get(), ItemBOPAmethyst.class, "amethystOre");
|
||||
// GameRegistry.registerBlock(Blocks.amethystBlock.get(), "amethystBlock");
|
||||
|
@ -322,7 +328,11 @@ public class BOPBlocks {
|
|||
LanguageRegistry.addName(new ItemStack(Blocks.holyGrass.get(), 1, 0), "Purified Grass");
|
||||
LanguageRegistry.addName(new ItemStack(Blocks.holyGrass.get(), 1, 1), "Smoldering Grass");
|
||||
LanguageRegistry.addName(Blocks.holyDirt.get(), "Purified Dirt");
|
||||
LanguageRegistry.addName(Blocks.holyStone.get(), "Skystone");
|
||||
LanguageRegistry.addName(new ItemStack(Blocks.holyStone.get(),1,0), "Skystone");
|
||||
LanguageRegistry.addName(new ItemStack(Blocks.holyStone.get(),1,1), "Skystone Cobblestone");
|
||||
LanguageRegistry.addName(Blocks.holyCobbleStairs.get(), "Skystone Cobblestone Stairs");
|
||||
LanguageRegistry.addName(new ItemStack(Blocks.holyStone.get(),1,2), "Skystone Bricks");
|
||||
LanguageRegistry.addName(Blocks.holyBricksStairs.get(), "Skystone Bricks Stairs");
|
||||
LanguageRegistry.addName(Blocks.crystal.get(), "Celestial Crystal");
|
||||
LanguageRegistry.addName(new ItemStack(Blocks.plants.get(),1,4), "Purified Tall Grass");
|
||||
LanguageRegistry.addName(Blocks.promisedPortal.get(), "Promised Land Portal");
|
||||
|
|
|
@ -145,6 +145,8 @@ public class BOPConfiguration {
|
|||
public static int colourizedSaplingsID;
|
||||
public static int redCobbleStairsID;
|
||||
public static int redBrickStairsID;
|
||||
public static int holyCobbleStairsID;
|
||||
public static int holyBrickStairsID;
|
||||
|
||||
public static int promisedLandPortalID;
|
||||
public static int amethystOreID;
|
||||
|
@ -603,7 +605,7 @@ public class BOPConfiguration {
|
|||
hardDirtID = config.getTerrainBlock("Terrain Block IDs", "Hard Dirt ID", 168, null).getInt();
|
||||
holyGrassID = config.getTerrainBlock("Terrain Block IDs", "Holy Grass ID", 169, null).getInt();
|
||||
holyDirtID = config.getTerrainBlock("Terrain Block IDs", "Holy Dirt ID", 170, null).getInt();
|
||||
holyStoneID = config.getTerrainBlock("Terrain Block IDs", "Holy Stone ID", 171, null).getInt();
|
||||
holyStoneID = config.getTerrainBlock("Terrain Block IDs", "Skystone ID", 171, null).getInt();
|
||||
cragRockID = config.getTerrainBlock("Terrain Block IDs", "Crag Rock ID", 172, null).getInt();
|
||||
|
||||
// Get Crafted Block ID's
|
||||
|
@ -660,6 +662,9 @@ public class BOPConfiguration {
|
|||
|
||||
crystalID = config.getBlock("Crystal ID", 1963, null).getInt();
|
||||
cloudID = config.getBlock("Cloud ID", 1964, null).getInt();
|
||||
|
||||
holyCobbleStairsID = config.getBlock("Skystone Cobble Stairs ID", 1965, null).getInt();
|
||||
holyBrickStairsID = config.getBlock("Skystone Brick Stairs ID", 1966, null).getInt();
|
||||
|
||||
// Get Item ID's
|
||||
shroomPowderID = config.getItem("Shroom Powder ID", 21001, null).getInt();
|
||||
|
|
27
src/minecraft/biomesoplenty/items/ItemBOPSkystone.java
Normal file
27
src/minecraft/biomesoplenty/items/ItemBOPSkystone.java
Normal file
|
@ -0,0 +1,27 @@
|
|||
package biomesoplenty.items;
|
||||
|
||||
import net.minecraft.item.ItemBlock;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class ItemBOPSkystone extends ItemBlock
|
||||
{
|
||||
private static final String[] types = new String[] {"holystone", "holycobble", "holybrick"};
|
||||
|
||||
public ItemBOPSkystone(int par1)
|
||||
{
|
||||
super(par1);
|
||||
setMaxDamage(0);
|
||||
setHasSubtypes(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMetadata(int meta)
|
||||
{
|
||||
return meta & 15;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getUnlocalizedName(ItemStack itemstack) {
|
||||
return types[itemstack.getItemDamage() & 15];
|
||||
}
|
||||
}
|
Binary file not shown.
Before Width: | Height: | Size: 366 B After Width: | Height: | Size: 450 B |
BIN
src/minecraft/mods/BiomesOPlenty/textures/blocks/holybrick.png
Normal file
BIN
src/minecraft/mods/BiomesOPlenty/textures/blocks/holybrick.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 325 B |
BIN
src/minecraft/mods/BiomesOPlenty/textures/blocks/holycobble.png
Normal file
BIN
src/minecraft/mods/BiomesOPlenty/textures/blocks/holycobble.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 552 B |
Binary file not shown.
Before Width: | Height: | Size: 334 B After Width: | Height: | Size: 334 B |
Loading…
Reference in a new issue