#180 - Ores now drop xp

This commit is contained in:
Kino 2017-11-01 21:45:57 -04:00
parent df42f2e876
commit 59fbe1a71e
2 changed files with 15 additions and 0 deletions

View file

@ -15,6 +15,7 @@ import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.MathHelper;
import net.minecraft.world.World;
import com.legacy.aether.common.Aether;
@ -38,6 +39,12 @@ public class BlockAmbrosiumOre extends Block
this.setDefaultState(this.getDefaultState().withProperty(double_drop, Boolean.TRUE));
}
@Override
public int getExpDrop(IBlockState state, net.minecraft.world.IBlockAccess world, BlockPos pos, int fortune)
{
return MathHelper.getRandomIntegerInRange(new Random(), 0, 2);
}
@Override
public void onBlockPlacedBy(World world, BlockPos pos, IBlockState state, EntityLivingBase placer, ItemStack stack)
{

View file

@ -7,6 +7,8 @@ import net.minecraft.block.SoundType;
import net.minecraft.block.material.Material;
import net.minecraft.block.state.IBlockState;
import net.minecraft.item.Item;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.MathHelper;
import com.legacy.aether.common.items.ItemsAether;
@ -21,6 +23,12 @@ public class BlockZaniteOre extends Block
this.setSoundType(SoundType.STONE);
}
@Override
public int getExpDrop(IBlockState state, net.minecraft.world.IBlockAccess world, BlockPos pos, int fortune)
{
return MathHelper.getRandomIntegerInRange(new Random(), 3, 5);
}
@Override
public Item getItemDropped(IBlockState state, Random rand, int fortune)
{