Skip to content

Commit 63f5909

Browse files
committed
v1.0.1
1 parent f6f062b commit 63f5909

File tree

8 files changed

+54
-14
lines changed

8 files changed

+54
-14
lines changed
Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
#execute store result score .temp1 mf.vars run kill @e[type=item,distance=..0.5,sort=nearest,limit=1,nbt={Item:{id:"minecraft:mangrove_roots",Count:1b}}]
2-
#execute if score .temp1 mf.vars matches 1.. run loot spawn ~ ~ ~ loot miscfeatures:blocks/redstone_button
3-
execute if data entity @s Passengers[0].item.tag.display.color store result entity @e[type=item,distance=..0.5,sort=nearest,limit=1,nbt={Item:{id:"minecraft:mangrove_roots",Count:1b}}] Item.tag.display.color int 1 run data get entity @s Passengers[0].item.tag.display.color
2+
#execute if score .temp1 mf.vars matches 1.. run loot spawn ~ ~ ~ loot miscfeatures:blocks/leather_block
3+
execute if data entity @s item.tag.display.color store result entity @e[type=item,distance=..0.5,sort=nearest,limit=1,nbt={Item:{id:"minecraft:mangrove_roots",Count:1b}}] Item.tag.display.color int 1 run data get entity @s item.tag.display.color
44
execute as @e[type=item,distance=..0.5,sort=nearest,limit=1,nbt={Item:{id:"minecraft:mangrove_roots",Count:1b}}] run data merge entity @s {Item:{id:"minecraft:leather_horse_armor",tag:{mf.item:"leather_block",display:{Name:'{"translate":"block.miscfeatures.leather_block","fallback":"Please use the Miscellaneous Features resource pack and set your game language to English (US).","italic":false}'},CustomModelData:1}}}
55

6-
particle minecraft:item leather ~ ~ ~ 0.25 0.25 0.25 0.075 64
6+
particle minecraft:item leather_horse_armor{CustomModelData:1} ~ ~ ~ 0.25 0.25 0.25 0.075 64
77

88
stopsound @a[distance=..16] block block.mangrove_roots.break
99
playsound block.scaffolding.break block @a[distance=..16] ~ ~ ~ 1 0.6
1010

11-
execute on passengers run kill @s
1211
kill @s[type=item_display]

Data Pack/data/miscfeatures/functions/block/leather_block/place.mcfunction

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,12 @@ execute unless block ~ ~ ~ #replaceable as @e[type=item,sort=nearest,limit=1,nbt
33
execute unless block ~ ~ ~ #replaceable run return 0
44

55
## Summon
6-
summon item_display ~ ~0.5 ~ {Tags:["mf.block","mf.block.leather_block","mf.block.justPlaced"],start_interpolation:0,interpolation_duration:1,item:{id:"minecraft:stone",Count:1b,tag:{CustomModelData:3}},Passengers:[{id:"minecraft:item_display",Rotation:[0f,0f],item:{id:"minecraft:leather_horse_armor",Count:1b,tag:{CustomModelData:2}},transformation:{translation:[0f,0f,0.5f],left_rotation:[0f,0f,0f,1f],scale:[1f,1f,0.1f],right_rotation:[0f,0f,0f,1f]}},{id:"minecraft:item_display",Rotation:[90f,0f],item:{id:"minecraft:leather_horse_armor",Count:1b,tag:{CustomModelData:2}},transformation:{translation:[0f,0f,0.5f],left_rotation:[0f,0f,0f,1f],scale:[1f,1f,0.1f],right_rotation:[0f,0f,0f,1f]}},{id:"minecraft:item_display",Rotation:[-180f,0f],item:{id:"minecraft:leather_horse_armor",Count:1b,tag:{CustomModelData:2}},transformation:{translation:[0f,0f,0.5f],left_rotation:[0f,0f,0f,1f],scale:[1f,1f,0.1f],right_rotation:[0f,0f,0f,1f]}},{id:"minecraft:item_display",Rotation:[-90f,0f],item:{id:"minecraft:leather_horse_armor",Count:1b,tag:{CustomModelData:2}},transformation:{translation:[0f,0f,0.5f],left_rotation:[0f,0f,0f,1f],scale:[1f,1f,0.1f],right_rotation:[0f,0f,0f,1f]}},{id:"minecraft:item_display",Rotation:[0f,90f],item:{id:"minecraft:leather_horse_armor",Count:1b,tag:{CustomModelData:2}},transformation:{translation:[0f,0f,0.5f],left_rotation:[0f,0f,0f,1f],scale:[1f,1f,0.1f],right_rotation:[0f,0f,0f,1f]}},{id:"minecraft:item_display",Rotation:[0f,-90f],item:{id:"minecraft:leather_horse_armor",Count:1b,tag:{CustomModelData:2}},transformation:{translation:[0f,0f,0.5f],left_rotation:[0f,0f,0f,1f],scale:[1f,1f,0.1f],right_rotation:[0f,0f,0f,1f]}}]}
6+
summon item_display ~ ~0.5 ~ {Tags:["mf.block","mf.block.leather_block","mf.block.justPlaced"],start_interpolation:0,interpolation_duration:1,item:{id:"minecraft:leather_horse_armor",Count:1b,tag:{CustomModelData:2}}}
77

88
## Get color
9-
execute as @e[type=item_display,tag=mf.block.justPlaced,sort=nearest,limit=1] if data entity @a[tag=mf.raycasting,sort=nearest,limit=1] SelectedItem.tag.display.color on passengers store result entity @s item.tag.display.color int 1 run data get entity @a[tag=mf.raycasting,sort=nearest,limit=1] SelectedItem.tag.display.color
9+
execute as @e[type=item_display,tag=mf.block.justPlaced,sort=nearest,limit=1] if data entity @a[tag=mf.raycasting,sort=nearest,limit=1] SelectedItem.tag.display.color store result entity @s item.tag.display.color int 1 run data get entity @a[tag=mf.raycasting,sort=nearest,limit=1] SelectedItem.tag.display.color
1010

1111
## Set rotation
12-
#execute run data merge entity @e[type=item_display,tag=mf.block.justPlaced,sort=nearest,limit=1] {transformation:{translation:[0f,0f,0f],left_rotation:[0f,0f,0f,1f],scale:[1f,1f,1f],right_rotation:[0f,0f,0f,1f]}}
1312
execute run tag @e[type=item_display,tag=mf.block.justPlaced,sort=nearest,limit=1] add mf.blockFace.none
1413
execute run setblock ~ ~ ~ mangrove_roots
1514

Resource Pack/assets/minecraft/models/item/leather_horse_armor.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,12 @@
1515
"custom_model_data": 2
1616
},
1717
"model": "miscfeatures:block/leather_block"
18+
},
19+
{
20+
"predicate": {
21+
"custom_model_data": 3
22+
},
23+
"model": "miscfeatures:block/leather_block_sprite"
1824
}
1925
]
2026
}
Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,22 @@
11
{
2-
"parent": "minecraft:item/leather_horse_armor",
2+
"parent": "minecraft:block/block",
33
"texture_size": [16, 16],
44
"textures": {
5-
"layer0": "miscfeatures:block/leather_block",
5+
"0": "miscfeatures:block/leather_block",
66
"particle": "miscfeatures:block/leather_block_colored"
7-
}
7+
},
8+
"elements": [
9+
{
10+
"from": [-0.01, -0.01, -0.01],
11+
"to": [16.01, 16.01, 16.01],
12+
"faces": {
13+
"north": {"texture": "#0", "tintindex": 0},
14+
"east": {"texture": "#0", "tintindex": 0},
15+
"south": {"texture": "#0", "tintindex": 0},
16+
"west": {"texture": "#0", "tintindex": 0},
17+
"up": {"texture": "#0", "tintindex": 0},
18+
"down": {"texture": "#0", "tintindex": 0}
19+
}
20+
}
21+
]
822
}
Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,22 @@
11
{
2-
"parent": "minecraft:item/leather_horse_armor",
2+
"parent": "minecraft:block/block",
33
"texture_size": [16, 16],
44
"textures": {
5-
"layer0": "miscfeatures:item/leather_block",
6-
"particle": "miscfeatures:item/leather_block_colored"
7-
}
5+
"0": "miscfeatures:block/leather_block",
6+
"particle": "miscfeatures:block/leather_block_colored"
7+
},
8+
"elements": [
9+
{
10+
"from": [0, 0, 0],
11+
"to": [16, 16, 16],
12+
"faces": {
13+
"north": {"texture": "#0", "tintindex": 0},
14+
"east": {"texture": "#0", "tintindex": 0},
15+
"south": {"texture": "#0", "tintindex": 0},
16+
"west": {"texture": "#0", "tintindex": 0},
17+
"up": {"texture": "#0", "tintindex": 0},
18+
"down": {"texture": "#0", "tintindex": 0}
19+
}
20+
}
21+
]
822
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"parent": "minecraft:item/leather_horse_armor",
3+
"texture_size": [16, 16],
4+
"textures": {
5+
"layer0": "miscfeatures:item/leather_block",
6+
"particle": "miscfeatures:item/leather_block_colored"
7+
}
8+
}
332 Bytes
Loading
383 Bytes
Loading

0 commit comments

Comments
 (0)