parent
286a12f142
commit
25ed35627a
@ -0,0 +1,26 @@
|
||||
package com.technovision.tutorial.blocks;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.block.OreBlock;
|
||||
import net.minecraft.block.SoundType;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.IWorldReader;
|
||||
import net.minecraftforge.common.ToolType;
|
||||
|
||||
public class RubyOre extends OreBlock {
|
||||
|
||||
public RubyOre() {
|
||||
super(Block.Properties.create(Material.IRON)
|
||||
.hardnessAndResistance(3.0f, 4.0f)
|
||||
.sound(SoundType.STONE)
|
||||
.harvestLevel(2)
|
||||
.harvestTool(ToolType.PICKAXE));
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getExpDrop(BlockState state, IWorldReader reader, BlockPos pos, int fortune, int silktouch) {
|
||||
return 1;
|
||||
}
|
||||
}
|
@ -0,0 +1,5 @@
|
||||
{
|
||||
"variants": {
|
||||
"": { "model": "tutorial:block/ruby_ore" }
|
||||
}
|
||||
}
|
@ -0,0 +1,6 @@
|
||||
{
|
||||
"parent": "block/cube_all",
|
||||
"textures": {
|
||||
"all": "tutorial:blocks/ruby_ore"
|
||||
}
|
||||
}
|
@ -0,0 +1,3 @@
|
||||
{
|
||||
"parent": "tutorial:block/ruby_ore"
|
||||
}
|
After Width: | Height: | Size: 591 B |
@ -0,0 +1,56 @@
|
||||
{
|
||||
"type": "minecraft:block",
|
||||
"pools": [
|
||||
{
|
||||
"rolls": 1,
|
||||
"entries": [
|
||||
{
|
||||
"type": "minecraft:alternatives",
|
||||
"children": [
|
||||
{
|
||||
"type": "minecraft:item",
|
||||
"conditions": [
|
||||
{
|
||||
"condition": "minecraft:match_tool",
|
||||
"predicate": {
|
||||
"enchantments": [
|
||||
{
|
||||
"enchantment": "minecraft:silk_touch",
|
||||
"levels": {
|
||||
"min": 1
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
],
|
||||
"name": "tutorial:ruby_ore"
|
||||
},
|
||||
{
|
||||
"type": "minecraft:item",
|
||||
"functions": [
|
||||
{
|
||||
"function": "minecraft:set_count",
|
||||
"count": {
|
||||
"min": 1,
|
||||
"max": 2,
|
||||
"type": "minecraft:uniform"
|
||||
}
|
||||
},
|
||||
{
|
||||
"function": "minecraft:apply_bonus",
|
||||
"enchantment": "minecraft:fortune",
|
||||
"formula": "minecraft:uniform_bonus_count",
|
||||
"parameters": {
|
||||
"bonusMultiplier": 1
|
||||
}
|
||||
}
|
||||
],
|
||||
"name": "tutorial:ruby"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
Loading…
Reference in new issue