mirror of
https://github.com/Sollace/Unicopia.git
synced 2024-11-30 16:28:00 +01:00
You can now safely collect slime pustules with shears and silk touch tools
This commit is contained in:
parent
5d7227f547
commit
8a2463d0a8
2 changed files with 56 additions and 1 deletions
|
@ -115,7 +115,7 @@ public class SlimePustuleBlock extends Block {
|
|||
@Override
|
||||
public void onBreak(World world, BlockPos pos, BlockState state, PlayerEntity player) {
|
||||
if (state.get(SHAPE) == Shape.POD) {
|
||||
world.getOtherEntities(null, new Box(pos).expand(1)).forEach(entity -> {
|
||||
world.getOtherEntities(player.canHarvest(state) ? player : null, new Box(pos).expand(1)).forEach(entity -> {
|
||||
entity.damage(entity.getDamageSources().inFire(), 2);
|
||||
entity.setFireTicks(3);
|
||||
});
|
||||
|
|
|
@ -0,0 +1,55 @@
|
|||
{
|
||||
"type": "minecraft:block",
|
||||
"pools": [
|
||||
{
|
||||
"rolls": 1.0,
|
||||
"bonus_rolls": 0.0,
|
||||
"entries": [
|
||||
{
|
||||
"type": "minecraft:item",
|
||||
"name": "unicopia:slime_pustule"
|
||||
}
|
||||
],
|
||||
"conditions": [
|
||||
{
|
||||
"condition": "minecraft:all_of",
|
||||
"terms": [
|
||||
{
|
||||
"block": "unicopia:slime_pustule",
|
||||
"condition": "minecraft:block_state_property",
|
||||
"properties": {
|
||||
"shape": "pod"
|
||||
}
|
||||
},
|
||||
{
|
||||
"condition": "minecraft:any_of",
|
||||
"terms": [
|
||||
{
|
||||
"condition": "minecraft:match_tool",
|
||||
"predicate": {
|
||||
"items": [
|
||||
"minecraft:shears"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"condition": "minecraft:match_tool",
|
||||
"predicate": {
|
||||
"enchantments": [
|
||||
{
|
||||
"enchantment": "minecraft:silk_touch",
|
||||
"levels": {
|
||||
"min": 1
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
Loading…
Reference in a new issue