Skip to content

Commit 8359ed4

Browse files
committed
Added outline and Light Fruit
1 parent 4cc2aca commit 8359ed4

File tree

13 files changed

+215
-44
lines changed

13 files changed

+215
-44
lines changed

behavior_packs/whynot/items/light.item.json

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,8 @@
11
{
2-
"format_version": "1.20.50",
2+
"format_version": "1.26.10",
33
"minecraft:item": {
44
"description": {
5-
"identifier": "whynot:light",
6-
"menu_category": {
7-
"category": "equipment",
8-
"group": "itemGroup.name.sword"
9-
}
5+
"identifier": "whynot:light"
106
},
117
"components": {
128
"minecraft:max_stack_size": 1,
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
{
2+
"format_version": "1.26.10",
3+
"minecraft:item": {
4+
"description": {
5+
"identifier": "whynot:light_fruit",
6+
"menu_category": {
7+
"category": "nature",
8+
"group": "minecraft:itemGroup.name.crop"
9+
}
10+
},
11+
"components": {
12+
"minecraft:max_stack_size": 1,
13+
"minecraft:icon": "light_fruit",
14+
"minecraft:food": {
15+
"can_always_eat": true,
16+
"nutrition": 0,
17+
"saturation_modifier": 1.0
18+
},
19+
"minecraft:use_animation": "eat",
20+
"minecraft:use_modifiers": {
21+
"use_duration": 1.6,
22+
"movement_modifier": 0.35
23+
},
24+
"minecraft:tags": {
25+
"tags": [
26+
"minecraft:is_food"
27+
]
28+
},
29+
"whynot:light_fruit": {}
30+
}
31+
}
32+
}
Lines changed: 37 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,38 @@
11
{
2-
"format_version": "1.10.0",
3-
"minecraft:attachable": {
4-
"description": {
5-
"identifier": "whynot:light",
6-
"render_controllers": ["controller.render.item_default"],
7-
"materials": {
8-
"default": "entity_alphatest",
9-
"enchanted": "entity_alphatest_glint"
10-
},
11-
"textures": {
12-
"default": "textures/entity/attachable/light",
13-
"enchanted": "textures/misc/enchanted_item_glint"
14-
},
15-
"geometry": {
16-
"default": "geometry.light"
17-
},
18-
"animations": {
19-
"first_person_hold": "animation.light.first_person_hold",
20-
"third_person_hold": "animation.light.third_person_hold"
21-
},
22-
"scripts": {
23-
"animate": [
24-
{
25-
"first_person_hold": "c.is_first_person"
26-
},
27-
{
28-
"third_person_hold": "!c.is_first_person"
29-
}
30-
]
31-
}
32-
}
33-
}
34-
}
2+
"format_version": "1.10.0",
3+
"minecraft:attachable": {
4+
"description": {
5+
"identifier": "whynot:light",
6+
"render_controllers": [
7+
"controller.render.default",
8+
"controller.render.entity.outline" // For outline.
9+
],
10+
"materials": {
11+
"default": "outline_base", // Must have due to custom material keeping the base on front.
12+
"outline": "outline" // For outline.
13+
},
14+
"textures": {
15+
"default": "textures/entity/attachable/light", // Base texture
16+
"outline": "textures/white" // Outline texture
17+
},
18+
"geometry": {
19+
"default": "geometry.light",
20+
"outline": "geometry.light_outline"
21+
},
22+
"animations": {
23+
"first_person_hold": "animation.light.first_person_hold",
24+
"third_person_hold": "animation.light.third_person_hold"
25+
},
26+
"scripts": {
27+
"animate": [
28+
{
29+
"first_person_hold": "c.is_first_person"
30+
},
31+
{
32+
"third_person_hold": "!c.is_first_person"
33+
}
34+
]
35+
}
36+
}
37+
}
38+
}
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
{
2+
"materials": {
3+
"version": "1.0.0",
4+
"outline_base:entity_alphatest": {
5+
"+states": [ "EnableStencilTest", "StencilWrite" ],
6+
"frontFace": {
7+
"stencilFunc": "Always",
8+
"stencilFailOp": "Replace",
9+
"stencilDepthFailOp": "Replace",
10+
"stencilPassOp": "Replace"
11+
},
12+
"backFace": {
13+
"stencilFunc": "Always",
14+
"stencilFailOp": "Replace",
15+
"stencilDepthFailOp": "Replace",
16+
"stencilPassOp": "Replace"
17+
},
18+
"stencilRef": 2
19+
},
20+
"outline:entity_static": {
21+
"+states": [ "InvertCulling", "EnableStencilTest", "DisableDepthWrite", "Blending" ],
22+
"+defines": [ "USE_OVERLAY" ],
23+
"-defines": [ "FANCY" ],
24+
// "depthFunc": "Always",
25+
// ^ Uncomment if you want the outline to be
26+
// rendered behind the block.
27+
"frontFace": {
28+
"stencilFunc": "NotEqual"
29+
},
30+
"backFace": {
31+
"stencilFunc": "Equal"
32+
},
33+
"stencilRef": 2,
34+
"stencilReadMark": 2
35+
}
36+
}
37+
}

resource_packs/whynot/models/entity/attachable/light.geo.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
{"origin": [-1, 12.23523, -1.54058], "size": [1, 1.5, 0.5], "pivot": [-1, 12.98523, -1.29058], "rotation": [40, 0, 0], "uv": [6, 17]},
4343
{"origin": [-1, 12.23523, 1.08442], "size": [1, 1.5, 0.5], "pivot": [-1, 12.98523, 1.33442], "rotation": [-40, 0, 0], "uv": [6, 17]},
4444
{"origin": [-1, 14.03523, -1.54058], "size": [1, 1.5, 0.35], "pivot": [-1, 14.78523, -1.29058], "rotation": [40, 0, 0], "uv": [20, 13]},
45-
{"origin": [-1, 15.18523, -1.96558], "size": [1, 4.2, 0.325], "pivot": [-1, 15.93523, -1.71558], "rotation": [0, 0, 0], "uv": [24, 15]},
45+
{"origin": [-1, 15.18523, -1.96558], "size": [1, 4.2, 0.325], "uv": [24, 15]},
4646
{"origin": [0, 15.18523, 1.25942], "size": [1, 4.2, 0.325], "pivot": [0, 15.58613, 1.64944], "rotation": [0, 180, 0], "uv": [23, 15]},
4747
{"origin": [0, 14.03942, 1.10294], "size": [1, 1.5, 0.35], "pivot": [0, 15.58613, 1.64944], "rotation": [40, 180, 0], "uv": [21, 13]},
4848
{"origin": [-1, 10.5, -1.25], "size": [1, 1, 2.5], "uv": [19, 0]},
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
{
2+
"format_version": "1.19.0",
3+
"minecraft:geometry": [
4+
{
5+
"description": {
6+
"identifier": "geometry.light_outline",
7+
"texture_width": 32,
8+
"texture_height": 32,
9+
"visible_bounds_width": 6,
10+
"visible_bounds_height": 5,
11+
"visible_bounds_offset": [0, 0.5, 0]
12+
},
13+
"bones": [
14+
{
15+
"name": "root_outline",
16+
"pivot": [-0.5, 0, 0],
17+
"binding": "q.item_slot_to_bone_name(c.item_slot)",
18+
"cubes": [
19+
{"origin": [-1, -10.25, -0.25], "size": [1, 18.25, 0.5], "inflate": 0.25, "uv": [1, 0]},
20+
{"origin": [-1, 7.25, -0.75], "size": [1, 1.25, 1.5], "inflate": 0.25, "uv": [1, 22]},
21+
{"origin": [-1, 7.75, -0.5], "size": [1, 8.25, 1], "inflate": 0.25, "uv": [9, 14]},
22+
{"origin": [-1, 15, 0.5], "size": [1, 5.75, 0.35], "inflate": 0.25, "uv": [15, 19]},
23+
{"origin": [-1, 15, -0.85], "size": [1, 5.75, 0.35], "inflate": 0.25, "uv": [19, 19]},
24+
{"origin": [-1, 15.275, -1.025], "size": [1, 5.125, 0.525], "inflate": 0.25, "uv": [15, 19]},
25+
{"origin": [-1, 15.275, 0.475], "size": [1, 5.125, 0.525], "inflate": 0.25, "uv": [15, 19]},
26+
{"origin": [-1, 17.225, 0.375], "size": [1, 0.275, 0.1], "inflate": 0.25, "uv": [1, 0]},
27+
{"origin": [-1, 17.425, 0.275], "size": [1, 0.075, 0.1], "inflate": 0.25, "uv": [1, 0]},
28+
{"origin": [0, 17.225, -0.4], "size": [1, 0.275, 0.1], "inflate": 0.25, "pivot": [0, 17.4125, -0.4], "rotation": [0, 180, 0], "uv": [1, 0]},
29+
{"origin": [0, 17.425, -0.5], "size": [1, 0.075, 0.1], "inflate": 0.25, "pivot": [0, 17.4125, -0.4], "rotation": [0, 180, 0], "uv": [1, 0]},
30+
{"origin": [0, 15.9, 0.375], "size": [1, 0.275, 0.1], "inflate": 0.25, "pivot": [0, 16.0875, -0.0125], "rotation": [0, 0, -180], "uv": [1, 0]},
31+
{"origin": [0, 16.1, 0.275], "size": [1, 0.075, 0.1], "inflate": 0.25, "pivot": [0, 16.0875, -0.0125], "rotation": [0, 0, -180], "uv": [1, 0]},
32+
{"origin": [-1, 16.1, 0.275], "size": [1, 0.075, 0.1], "inflate": 0.25, "pivot": [-1, 16.0875, -0.0125], "rotation": [0, 180, -180], "uv": [1, 0]},
33+
{"origin": [-1, 15.9, 0.375], "size": [1, 0.275, 0.1], "inflate": 0.25, "pivot": [-1, 16.0875, -0.0125], "rotation": [0, 180, -180], "uv": [1, 0]},
34+
{"origin": [-1, 17.75, -0.175], "size": [1, 17.25, 0.35], "inflate": 0.25, "uv": [5, 0]},
35+
{"origin": [-1, 17.5, -0.425], "size": [1, 14.35, 0.85], "inflate": 0.25, "uv": [15, 0]},
36+
{"origin": [-1, 17.5, -0.725], "size": [1, 13.35, 1.45], "inflate": 0.25, "uv": [9, 0]},
37+
{"origin": [-1, 22.5, -0.975], "size": [1, 4.35, 1.95], "inflate": 0.25, "uv": [19, 3]},
38+
{"origin": [-1, 23.15, -1.125], "size": [1, 3.05, 2.25], "inflate": 0.25, "uv": [15, 14]},
39+
{"origin": [-1, 23.675, -1.45], "size": [1, 2, 2.9], "inflate": 0.25, "uv": [1, 18]},
40+
{"origin": [-1, 10.5, 1.5], "size": [1, 1, 1], "inflate": 0.25, "uv": [23, 13]},
41+
{"origin": [-1, 10.5, -2.5], "size": [1, 1, 1], "inflate": 0.25, "uv": [23, 13]},
42+
{"origin": [-1, 12.23523, -1.54058], "size": [1, 1.5, 0.5], "inflate": 0.25, "pivot": [-1, 12.98523, -1.29058], "rotation": [40, 0, 0], "uv": [6, 17]},
43+
{"origin": [-1, 12.23523, 1.08442], "size": [1, 1.5, 0.5], "inflate": 0.25, "pivot": [-1, 12.98523, 1.33442], "rotation": [-40, 0, 0], "uv": [6, 17]},
44+
{"origin": [-1, 14.03523, -1.54058], "size": [1, 1.5, 0.35], "inflate": 0.25, "pivot": [-1, 14.78523, -1.29058], "rotation": [40, 0, 0], "uv": [20, 13]},
45+
{"origin": [-1, 15.18523, -1.96558], "size": [1, 4.2, 0.325], "inflate": 0.25, "uv": [24, 15]},
46+
{"origin": [0, 15.18523, 1.25942], "size": [1, 4.2, 0.325], "inflate": 0.25, "pivot": [0, 15.58613, 1.64944], "rotation": [0, 180, 0], "uv": [23, 15]},
47+
{"origin": [0, 14.03942, 1.10294], "size": [1, 1.5, 0.35], "inflate": 0.25, "pivot": [0, 15.58613, 1.64944], "rotation": [40, 180, 0], "uv": [21, 13]},
48+
{"origin": [-1, 10.5, -1.25], "size": [1, 1, 2.5], "inflate": 0.25, "uv": [19, 0]},
49+
{"origin": [-1, -7.75, -0.75], "size": [1, 0.75, 1.5], "inflate": 0.25, "uv": [23, 19]},
50+
{"origin": [-1, -8, -0.5], "size": [1, 1.25, 1], "inflate": 0.25, "uv": [19, 11]},
51+
{"origin": [-1, -6.25, -1], "size": [1, 1, 2], "inflate": 0.25, "uv": [19, 0]},
52+
{"origin": [-1, -6.5, -0.75], "size": [1, 1.5, 1.5], "inflate": 0.25, "uv": [19, 11]},
53+
{"origin": [-1, -6.75, -0.5], "size": [1, 2, 1], "inflate": 0.25, "uv": [19, 8]}
54+
]
55+
}
56+
]
57+
}
58+
]
59+
}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"format_version": "1.10.0",
3+
"render_controllers": {
4+
"controller.render.entity.outline": {
5+
"geometry": "geometry.outline",
6+
"textures": [ "texture.outline" ],
7+
"ignore_lighting": true,
8+
"materials": [
9+
{
10+
"*": "material.outline"
11+
}
12+
]
13+
}
14+
}
15+
}
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
item.whynot:light=Light
1+
item.whynot:light=Light
2+
item.whynot:light_fruit=Light Fruit
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
item.whynot:light=Luz
1+
item.whynot:light=Luz
2+
item.whynot:light_fruit=Fruta Luz

resource_packs/whynot/textures/item_texture.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
"texture_data": {
33
"light": {
44
"textures": "textures/items/light"
5+
},
6+
"light_fruit": {
7+
"textures": "textures/items/light_fruit"
58
}
69
}
710
}

0 commit comments

Comments
 (0)