36 lines
1.3 KiB
Java
36 lines
1.3 KiB
Java
package tech.nevets.vplus.blocks;
|
|
|
|
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
|
|
import net.minecraft.block.Block;
|
|
import net.minecraft.block.BlockState;
|
|
import net.minecraft.block.Material;
|
|
import net.minecraft.enchantment.EnchantmentHelper;
|
|
import net.minecraft.enchantment.Enchantments;
|
|
import net.minecraft.item.ItemStack;
|
|
import net.minecraft.server.world.ServerWorld;
|
|
import net.minecraft.sound.BlockSoundGroup;
|
|
import net.minecraft.util.math.BlockPos;
|
|
import net.minecraft.util.math.MathHelper;
|
|
import net.minecraft.util.math.random.Random;
|
|
|
|
public class PlatinumOre extends Block {
|
|
public PlatinumOre() {
|
|
super(FabricBlockSettings.of(Material.STONE).sounds(BlockSoundGroup.STONE).strength(3, 1500f));
|
|
}
|
|
protected int getExperienceWhenMined(Random random) {
|
|
return MathHelper.nextInt(random, 3, 7);
|
|
}
|
|
|
|
/*
|
|
public void onStacksDropped(BlockState state, ServerWorld world, BlockPos pos, ItemStack stack) {
|
|
super.onStacksDropped(state, world, pos, stack);
|
|
if (EnchantmentHelper.getLevel(Enchantments.SILK_TOUCH, stack) == 0) {
|
|
int i = this.getExperienceWhenMined(world.random);
|
|
if (i > 0) {
|
|
this.dropExperience(world, pos, i);
|
|
}
|
|
}
|
|
}
|
|
*/
|
|
}
|