mirror of
https://github.com/GTNewHorizons/Chisel.git
synced 2026-11-13 16:54:13 +00:00
Fix #133
Also refactor BlockLightstoneCarvable to BlockCarvableGlowstone (Consistency)
This commit is contained in:
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);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user