修复矿物方块的问题
This commit is contained in:
parent
3ceea4481f
commit
cede106430
11 changed files with 209 additions and 248 deletions
|
@ -1,39 +1,12 @@
|
|||
package net.mcreator.target.block;
|
||||
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.network.chat.Component;
|
||||
import net.minecraft.world.entity.player.Player;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
import net.minecraft.world.item.PickaxeItem;
|
||||
import net.minecraft.world.item.TooltipFlag;
|
||||
import net.minecraft.world.level.BlockGetter;
|
||||
import net.minecraft.world.level.block.Block;
|
||||
import net.minecraft.world.level.block.SoundType;
|
||||
import net.minecraft.world.level.block.state.BlockBehaviour;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
import net.minecraft.world.level.block.state.properties.NoteBlockInstrument;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class DeepslateGalenaOreBlock extends Block {
|
||||
public DeepslateGalenaOreBlock() {
|
||||
super(BlockBehaviour.Properties.of().instrument(NoteBlockInstrument.BASEDRUM).sound(SoundType.STONE).strength(3f, 8f).requiresCorrectToolForDrops());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void appendHoverText(ItemStack itemstack, BlockGetter world, List<Component> list, TooltipFlag flag) {
|
||||
super.appendHoverText(itemstack, world, list, flag);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getLightBlock(BlockState state, BlockGetter worldIn, BlockPos pos) {
|
||||
return 15;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canHarvestBlock(BlockState state, BlockGetter world, BlockPos pos, Player player) {
|
||||
if (player.getInventory().getSelected().getItem() instanceof PickaxeItem tieredItem)
|
||||
return tieredItem.getTier().getLevel() >= 2;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,39 +1,12 @@
|
|||
package net.mcreator.target.block;
|
||||
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.network.chat.Component;
|
||||
import net.minecraft.world.entity.player.Player;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
import net.minecraft.world.item.PickaxeItem;
|
||||
import net.minecraft.world.item.TooltipFlag;
|
||||
import net.minecraft.world.level.BlockGetter;
|
||||
import net.minecraft.world.level.block.Block;
|
||||
import net.minecraft.world.level.block.SoundType;
|
||||
import net.minecraft.world.level.block.state.BlockBehaviour;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
import net.minecraft.world.level.block.state.properties.NoteBlockInstrument;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class DeepslateScheeliteOreBlock extends Block {
|
||||
public DeepslateScheeliteOreBlock() {
|
||||
super(BlockBehaviour.Properties.of().instrument(NoteBlockInstrument.BASEDRUM).sound(SoundType.STONE).strength(3f, 8f).requiresCorrectToolForDrops());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void appendHoverText(ItemStack itemstack, BlockGetter world, List<Component> list, TooltipFlag flag) {
|
||||
super.appendHoverText(itemstack, world, list, flag);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getLightBlock(BlockState state, BlockGetter worldIn, BlockPos pos) {
|
||||
return 15;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canHarvestBlock(BlockState state, BlockGetter world, BlockPos pos, Player player) {
|
||||
if (player.getInventory().getSelected().getItem() instanceof PickaxeItem tieredItem)
|
||||
return tieredItem.getTier().getLevel() >= 2;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,39 +1,12 @@
|
|||
package net.mcreator.target.block;
|
||||
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.network.chat.Component;
|
||||
import net.minecraft.world.entity.player.Player;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
import net.minecraft.world.item.PickaxeItem;
|
||||
import net.minecraft.world.item.TooltipFlag;
|
||||
import net.minecraft.world.level.BlockGetter;
|
||||
import net.minecraft.world.level.block.Block;
|
||||
import net.minecraft.world.level.block.SoundType;
|
||||
import net.minecraft.world.level.block.state.BlockBehaviour;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
import net.minecraft.world.level.block.state.properties.NoteBlockInstrument;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class GalenaOreBlock extends Block {
|
||||
public GalenaOreBlock() {
|
||||
super(BlockBehaviour.Properties.of().instrument(NoteBlockInstrument.BASEDRUM).sound(SoundType.STONE).strength(3f, 5f).requiresCorrectToolForDrops());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void appendHoverText(ItemStack itemstack, BlockGetter world, List<Component> list, TooltipFlag flag) {
|
||||
super.appendHoverText(itemstack, world, list, flag);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getLightBlock(BlockState state, BlockGetter worldIn, BlockPos pos) {
|
||||
return 15;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canHarvestBlock(BlockState state, BlockGetter world, BlockPos pos, Player player) {
|
||||
if (player.getInventory().getSelected().getItem() instanceof PickaxeItem tieredItem)
|
||||
return tieredItem.getTier().getLevel() >= 2;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,39 +1,12 @@
|
|||
package net.mcreator.target.block;
|
||||
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.network.chat.Component;
|
||||
import net.minecraft.world.entity.player.Player;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
import net.minecraft.world.item.PickaxeItem;
|
||||
import net.minecraft.world.item.TooltipFlag;
|
||||
import net.minecraft.world.level.BlockGetter;
|
||||
import net.minecraft.world.level.block.Block;
|
||||
import net.minecraft.world.level.block.SoundType;
|
||||
import net.minecraft.world.level.block.state.BlockBehaviour;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
import net.minecraft.world.level.block.state.properties.NoteBlockInstrument;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class ScheeliteOreBlock extends Block {
|
||||
public ScheeliteOreBlock() {
|
||||
super(BlockBehaviour.Properties.of().instrument(NoteBlockInstrument.BASEDRUM).sound(SoundType.STONE).strength(3f, 5f).requiresCorrectToolForDrops());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void appendHoverText(ItemStack itemstack, BlockGetter world, List<Component> list, TooltipFlag flag) {
|
||||
super.appendHoverText(itemstack, world, list, flag);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getLightBlock(BlockState state, BlockGetter worldIn, BlockPos pos) {
|
||||
return 15;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canHarvestBlock(BlockState state, BlockGetter world, BlockPos pos, Player player) {
|
||||
if (player.getInventory().getSelected().getItem() instanceof PickaxeItem tieredItem)
|
||||
return tieredItem.getTier().getLevel() >= 2;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
{
|
||||
"replace": false,
|
||||
"values": [
|
||||
"target:galena_ore",
|
||||
"target:deepslate_galena_ore",
|
||||
"target:scheelite_ore",
|
||||
"target:deepslate_scheelite_ore"
|
||||
]
|
||||
}
|
|
@ -1 +1,50 @@
|
|||
{"type":"minecraft:block","pools":[{"bonus_rolls":0.0,"entries":[{"type":"minecraft:alternatives","children":[{"type":"minecraft:item","conditions":[{"condition":"minecraft:match_tool","predicate":{"enchantments":[{"enchantment":"minecraft:silk_touch","levels":{"min":1}}]}}],"name":"target:galena"},{"type":"minecraft:item","functions":[{"enchantment":"minecraft:fortune","formula":"minecraft:ore_drops","function":"minecraft:apply_bonus"},{"function":"minecraft:explosion_decay"}],"name":"target:galena"}]}],"rolls":1.0}],"random_sequence":"target:blocks/deepslate_galena_ore"}
|
||||
{
|
||||
"type": "minecraft:block",
|
||||
"pools": [
|
||||
{
|
||||
"bonus_rolls": 0.0,
|
||||
"entries": [
|
||||
{
|
||||
"type": "minecraft:alternatives",
|
||||
"children": [
|
||||
{
|
||||
"type": "minecraft:item",
|
||||
"conditions": [
|
||||
{
|
||||
"condition": "minecraft:match_tool",
|
||||
"predicate": {
|
||||
"enchantments": [
|
||||
{
|
||||
"enchantment": "minecraft:silk_touch",
|
||||
"levels": {
|
||||
"min": 1
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
],
|
||||
"name": "target:deepslate_galena_ore"
|
||||
},
|
||||
{
|
||||
"type": "minecraft:item",
|
||||
"functions": [
|
||||
{
|
||||
"enchantment": "minecraft:fortune",
|
||||
"formula": "minecraft:ore_drops",
|
||||
"function": "minecraft:apply_bonus"
|
||||
},
|
||||
{
|
||||
"function": "minecraft:explosion_decay"
|
||||
}
|
||||
],
|
||||
"name": "target:galena"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"rolls": 1.0
|
||||
}
|
||||
],
|
||||
"random_sequence": "target:blocks/deepslate_galena_ore"
|
||||
}
|
|
@ -1 +1,50 @@
|
|||
{"type":"minecraft:block","pools":[{"bonus_rolls":0.0,"entries":[{"type":"minecraft:alternatives","children":[{"type":"minecraft:item","conditions":[{"condition":"minecraft:match_tool","predicate":{"enchantments":[{"enchantment":"minecraft:silk_touch","levels":{"min":1}}]}}],"name":"target:scheelite"},{"type":"minecraft:item","functions":[{"enchantment":"minecraft:fortune","formula":"minecraft:ore_drops","function":"minecraft:apply_bonus"},{"function":"minecraft:explosion_decay"}],"name":"target:scheelite"}]}],"rolls":1.0}],"random_sequence":"target:blocks/deepslate_scheelite_ore"}
|
||||
{
|
||||
"type": "minecraft:block",
|
||||
"pools": [
|
||||
{
|
||||
"bonus_rolls": 0.0,
|
||||
"entries": [
|
||||
{
|
||||
"type": "minecraft:alternatives",
|
||||
"children": [
|
||||
{
|
||||
"type": "minecraft:item",
|
||||
"conditions": [
|
||||
{
|
||||
"condition": "minecraft:match_tool",
|
||||
"predicate": {
|
||||
"enchantments": [
|
||||
{
|
||||
"enchantment": "minecraft:silk_touch",
|
||||
"levels": {
|
||||
"min": 1
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
],
|
||||
"name": "target:deepslate_scheelite_ore"
|
||||
},
|
||||
{
|
||||
"type": "minecraft:item",
|
||||
"functions": [
|
||||
{
|
||||
"enchantment": "minecraft:fortune",
|
||||
"formula": "minecraft:ore_drops",
|
||||
"function": "minecraft:apply_bonus"
|
||||
},
|
||||
{
|
||||
"function": "minecraft:explosion_decay"
|
||||
}
|
||||
],
|
||||
"name": "target:scheelite"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"rolls": 1.0
|
||||
}
|
||||
],
|
||||
"random_sequence": "target:blocks/deepslate_scheelite_ore"
|
||||
}
|
|
@ -1 +1,50 @@
|
|||
{"type":"minecraft:block","pools":[{"bonus_rolls":0.0,"entries":[{"type":"minecraft:alternatives","children":[{"type":"minecraft:item","conditions":[{"condition":"minecraft:match_tool","predicate":{"enchantments":[{"enchantment":"minecraft:silk_touch","levels":{"min":1}}]}}],"name":"target:galena"},{"type":"minecraft:item","functions":[{"enchantment":"minecraft:fortune","formula":"minecraft:ore_drops","function":"minecraft:apply_bonus"},{"function":"minecraft:explosion_decay"}],"name":"target:galena"}]}],"rolls":1.0}],"random_sequence":"target:blocks/galena_ore"}
|
||||
{
|
||||
"type": "minecraft:block",
|
||||
"pools": [
|
||||
{
|
||||
"bonus_rolls": 0.0,
|
||||
"entries": [
|
||||
{
|
||||
"type": "minecraft:alternatives",
|
||||
"children": [
|
||||
{
|
||||
"type": "minecraft:item",
|
||||
"conditions": [
|
||||
{
|
||||
"condition": "minecraft:match_tool",
|
||||
"predicate": {
|
||||
"enchantments": [
|
||||
{
|
||||
"enchantment": "minecraft:silk_touch",
|
||||
"levels": {
|
||||
"min": 1
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
],
|
||||
"name": "target:galena_ore"
|
||||
},
|
||||
{
|
||||
"type": "minecraft:item",
|
||||
"functions": [
|
||||
{
|
||||
"enchantment": "minecraft:fortune",
|
||||
"formula": "minecraft:ore_drops",
|
||||
"function": "minecraft:apply_bonus"
|
||||
},
|
||||
{
|
||||
"function": "minecraft:explosion_decay"
|
||||
}
|
||||
],
|
||||
"name": "target:galena"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"rolls": 1.0
|
||||
}
|
||||
],
|
||||
"random_sequence": "target:blocks/galena_ore"
|
||||
}
|
|
@ -1 +1,50 @@
|
|||
{"type":"minecraft:block","pools":[{"bonus_rolls":0.0,"entries":[{"type":"minecraft:alternatives","children":[{"type":"minecraft:item","conditions":[{"condition":"minecraft:match_tool","predicate":{"enchantments":[{"enchantment":"minecraft:silk_touch","levels":{"min":1}}]}}],"name":"target:scheelite"},{"type":"minecraft:item","functions":[{"enchantment":"minecraft:fortune","formula":"minecraft:ore_drops","function":"minecraft:apply_bonus"},{"function":"minecraft:explosion_decay"}],"name":"target:scheelite"}]}],"rolls":1.0}],"random_sequence":"target:blocks/scheelite_ore"}
|
||||
{
|
||||
"type": "minecraft:block",
|
||||
"pools": [
|
||||
{
|
||||
"bonus_rolls": 0.0,
|
||||
"entries": [
|
||||
{
|
||||
"type": "minecraft:alternatives",
|
||||
"children": [
|
||||
{
|
||||
"type": "minecraft:item",
|
||||
"conditions": [
|
||||
{
|
||||
"condition": "minecraft:match_tool",
|
||||
"predicate": {
|
||||
"enchantments": [
|
||||
{
|
||||
"enchantment": "minecraft:silk_touch",
|
||||
"levels": {
|
||||
"min": 1
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
],
|
||||
"name": "target:scheelite_ore"
|
||||
},
|
||||
{
|
||||
"type": "minecraft:item",
|
||||
"functions": [
|
||||
{
|
||||
"enchantment": "minecraft:fortune",
|
||||
"formula": "minecraft:ore_drops",
|
||||
"function": "minecraft:apply_bonus"
|
||||
},
|
||||
{
|
||||
"function": "minecraft:explosion_decay"
|
||||
}
|
||||
],
|
||||
"name": "target:scheelite"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"rolls": 1.0
|
||||
}
|
||||
],
|
||||
"random_sequence": "target:blocks/scheelite_ore"
|
||||
}
|
|
@ -1,68 +0,0 @@
|
|||
{
|
||||
"type": "minecraft:chest",
|
||||
"pools": [
|
||||
{
|
||||
"rolls": 1,
|
||||
"entries": [
|
||||
{
|
||||
"type": "minecraft:tag",
|
||||
"name": "target:blueprint_epic",
|
||||
"functions": [
|
||||
{
|
||||
"function": "minecraft:set_count",
|
||||
"count": 1
|
||||
}
|
||||
],
|
||||
"conditions": [
|
||||
{
|
||||
"condition": "minecraft:random_chance",
|
||||
"chance": 0.45
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"rolls": 1,
|
||||
"entries": [
|
||||
{
|
||||
"type": "minecraft:tag",
|
||||
"name": "target:blueprint_legendary",
|
||||
"functions": [
|
||||
{
|
||||
"function": "minecraft:set_count",
|
||||
"count": 1
|
||||
}
|
||||
],
|
||||
"conditions": [
|
||||
{
|
||||
"condition": "minecraft:random_chance",
|
||||
"chance": 0.35
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"rolls": 1,
|
||||
"entries": [
|
||||
{
|
||||
"type": "minecraft:tag",
|
||||
"name": "target:blueprint_special",
|
||||
"functions": [
|
||||
{
|
||||
"function": "minecraft:set_count",
|
||||
"count": 1
|
||||
}
|
||||
],
|
||||
"conditions": [
|
||||
{
|
||||
"condition": "minecraft:random_chance",
|
||||
"chance": 0.25
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
|
@ -1,68 +0,0 @@
|
|||
{
|
||||
"type": "minecraft:chest",
|
||||
"pools": [
|
||||
{
|
||||
"rolls": 1,
|
||||
"entries": [
|
||||
{
|
||||
"type": "minecraft:tag",
|
||||
"name": "target:blueprint_rare",
|
||||
"functions": [
|
||||
{
|
||||
"function": "minecraft:set_count",
|
||||
"count": 1
|
||||
}
|
||||
],
|
||||
"conditions": [
|
||||
{
|
||||
"condition": "minecraft:random_chance",
|
||||
"chance": 0.35
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"rolls": 1,
|
||||
"entries": [
|
||||
{
|
||||
"type": "minecraft:tag",
|
||||
"name": "target:blueprint_epic",
|
||||
"functions": [
|
||||
{
|
||||
"function": "minecraft:set_count",
|
||||
"count": 1
|
||||
}
|
||||
],
|
||||
"conditions": [
|
||||
{
|
||||
"condition": "minecraft:random_chance",
|
||||
"chance": 0.25
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"rolls": 1,
|
||||
"entries": [
|
||||
{
|
||||
"type": "minecraft:tag",
|
||||
"name": "target:blueprint_legendary",
|
||||
"functions": [
|
||||
{
|
||||
"function": "minecraft:set_count",
|
||||
"count": 1
|
||||
}
|
||||
],
|
||||
"conditions": [
|
||||
{
|
||||
"condition": "minecraft:random_chance",
|
||||
"chance": 0.15
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
Loading…
Add table
Reference in a new issue