Also refactor BlockLightstoneCarvable to BlockCarvableGlowstone (Consistency)
This commit is contained in:
warlordjones committed 2015-01-11 19:40:35 +00:00
1 parent 75203c3c3d
commit e9fb9409ac
4 files changed
+46 -34

No files matched your search

@@ -0,0 +1,42 @@
package com.cricketcraft.chisel.block;
import java.util.Random;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Blocks;
import net.minecraft.init.Items;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.MovingObjectPosition;
import net.minecraft.world.World;
public class BlockCarvableGlowstone extends BlockCarvable {
public BlockCarvableGlowstone() {
super(Material.glass);
}
@Override
public int quantityDropped(Random random) {
return Blocks.glowstone.quantityDropped(random);
}
@Override
public Item getItemDropped(int i, Random random, int a) {
return Items.glowstone_dust;
}
@Override
public int damageDropped(int i) {
return 0;
}
@Override
public ItemStack getPickBlock(MovingObjectPosition target, World world, int x, int y, int z, EntityPlayer player)
{
Block glowstone = world.getBlock(x, y, z);
int meta = world.getBlockMetadata(x, y, z);
return new ItemStack(Item.getItemFromBlock(glowstone), 1, meta);
}
}
@@ -1,30 +0,0 @@
package com.cricketcraft.chisel.block;
import java.util.Random;
import net.minecraft.block.material.Material;
import net.minecraft.init.Blocks;
import net.minecraft.init.Items;
import net.minecraft.item.Item;
public class BlockLightstoneCarvable extends BlockCarvable {
public BlockLightstoneCarvable() {
super(Material.glass);
}
@Override
public int quantityDropped(Random random) {
return Blocks.glowstone.quantityDropped(random);
}
@Override
public Item getItemDropped(int i, Random random, int a) {
return Items.glowstone_dust;
}
@Override
public int damageDropped(int i) {
return 0;
}
}
@@ -16,7 +16,7 @@ import com.cricketcraft.chisel.block.BlockConcrete;
import com.cricketcraft.chisel.block.BlockGrimstone;
import com.cricketcraft.chisel.block.BlockHolystone;
import com.cricketcraft.chisel.block.BlockLavastone;
import com.cricketcraft.chisel.block.BlockLightstoneCarvable;
import com.cricketcraft.chisel.block.BlockCarvableGlowstone;
import com.cricketcraft.chisel.block.BlockMarbleCarpet;
import com.cricketcraft.chisel.block.BlockMarbleIce;
import com.cricketcraft.chisel.block.BlockMarbleIceStairs;
@@ -55,7 +55,7 @@ public final class ChiselBlocks {
public static final BlockCarvable iron_block = null;
public static final BlockCarvable gold_block = null;
public static final BlockCarvable diamond_block = null;
public static final BlockLightstoneCarvable glowstone = null;
public static final BlockCarvableGlowstone glowstone = null;
public static final BlockCarvable lapis_block = null;
public static final BlockCarvable emerald_block = null;
public static final BlockCarvable nether_brick = null;
@@ -32,7 +32,7 @@ import com.cricketcraft.chisel.block.BlockGrimstone;
import com.cricketcraft.chisel.block.BlockHolystone;
import com.cricketcraft.chisel.block.BlockLavastone;
import com.cricketcraft.chisel.block.BlockLeaf;
import com.cricketcraft.chisel.block.BlockLightstoneCarvable;
import com.cricketcraft.chisel.block.BlockCarvableGlowstone;
import com.cricketcraft.chisel.block.BlockMarbleBookshelf;
import com.cricketcraft.chisel.block.BlockMarbleCarpet;
import com.cricketcraft.chisel.block.BlockMarbleIce;
@@ -828,7 +828,7 @@ public enum Features {
@Override
void addBlocks() {
BlockLightstoneCarvable glowstone = (BlockLightstoneCarvable) new BlockLightstoneCarvable().setCreativeTab(ChiselTabs.tabOtherChiselBlocks).setHardness(0.3F).setLightLevel(1.0F)
BlockCarvableGlowstone glowstone = (BlockCarvableGlowstone) new BlockCarvableGlowstone().setCreativeTab(ChiselTabs.tabOtherChiselBlocks).setHardness(0.3F).setLightLevel(1.0F)
.setStepSound(Block.soundTypeGlass);
Carving.chisel.addVariation("glowstone", Blocks.glowstone, 0, 0);
glowstone.carverHelper.addVariation(StatCollector.translateToLocal("tile.lightstone.1.desc"), 1, "lightstone/terrain-sulphur-cobble");