diff --git a/assets/minecraft/models/block/piston_head.json b/assets/minecraft/models/block/piston_head.json index 2caa096c..e5d5bce8 100644 --- a/assets/minecraft/models/block/piston_head.json +++ b/assets/minecraft/models/block/piston_head.json @@ -3,6 +3,7 @@ "textures": { "platform": "minecraft:block/piston_top", "side": "minecraft:block/piston_side", - "unsticky": "minecraft:block/piston_top" + "unsticky": "minecraft:block/piston_top", + "unsticky_side": "minecraft:block/piston_side" } } \ No newline at end of file diff --git a/assets/minecraft/models/block/piston_head_short.json b/assets/minecraft/models/block/piston_head_short.json index 490b1c50..2ca6f30d 100644 --- a/assets/minecraft/models/block/piston_head_short.json +++ b/assets/minecraft/models/block/piston_head_short.json @@ -3,6 +3,7 @@ "textures": { "platform": "minecraft:block/piston_top", "side": "minecraft:block/piston_side", - "unsticky": "minecraft:block/piston_top" + "unsticky": "minecraft:block/piston_top", + "unsticky_side": "minecraft:block/piston_side" } } \ No newline at end of file diff --git a/assets/minecraft/models/block/piston_head_short_sticky.json b/assets/minecraft/models/block/piston_head_short_sticky.json index 95553e97..351d3911 100644 --- a/assets/minecraft/models/block/piston_head_short_sticky.json +++ b/assets/minecraft/models/block/piston_head_short_sticky.json @@ -3,6 +3,7 @@ "textures": { "platform": "minecraft:block/piston_top_sticky", "side": "minecraft:block/piston_side_sticky", - "unsticky": "minecraft:block/piston_top" + "unsticky": "minecraft:block/piston_top", + "unsticky_side": "minecraft:block/piston_side" } } \ No newline at end of file diff --git a/assets/minecraft/models/block/piston_head_sticky.json b/assets/minecraft/models/block/piston_head_sticky.json index fb98d242..29df0709 100644 --- a/assets/minecraft/models/block/piston_head_sticky.json +++ b/assets/minecraft/models/block/piston_head_sticky.json @@ -1,34 +1,9 @@ { - "credit": "Created by Stridey", - "textures": { - "3": "block/piston_side_sticky", - "4": "block/piston_bottom_sticky", - "particle": "block/piston_top_sticky", - "platform": "block/piston_top_sticky", - "side": "block/piston_side" - }, - "elements": [ - { - "from": [0, 0, 0], - "to": [16, 16, 4], - "faces": { - "north": {"uv": [0, 0, 16, 16], "texture": "#platform", "cullface": "north"}, - "east": {"uv": [0, 0, 16, 4], "rotation": 90, "texture": "#3", "cullface": "east"}, - "south": {"uv": [0, 0, 16, 16], "texture": "#4"}, - "west": {"uv": [0, 0, 16, 4], "rotation": 270, "texture": "#3", "cullface": "west"}, - "up": {"uv": [0, 0, 16, 4], "texture": "#3", "cullface": "up"}, - "down": {"uv": [0, 0, 16, 4], "rotation": 180, "texture": "#3", "cullface": "down"} - } - }, - { - "from": [6, 6, 4], - "to": [10, 10, 20], - "faces": { - "east": {"uv": [0, 0, 16, 4], "texture": "#side"}, - "west": {"uv": [16, 4, 0, 0], "texture": "#side"}, - "up": {"uv": [0, 0, 16, 4], "rotation": 270, "texture": "#side"}, - "down": {"uv": [0, 0, 16, 4], "rotation": 90, "texture": "#side"} - } - } - ] + "parent": "minecraft:block/template_piston_head", + "textures": { + "platform": "minecraft:block/piston_top_sticky", + "side": "minecraft:block/piston_side_sticky", + "unsticky": "minecraft:block/piston_top", + "unsticky_side": "minecraft:block/piston_side" + } } \ No newline at end of file diff --git a/assets/minecraft/models/block/template_piston_head.json b/assets/minecraft/models/block/template_piston_head.json index f4fcb910..d8e416a0 100644 --- a/assets/minecraft/models/block/template_piston_head.json +++ b/assets/minecraft/models/block/template_piston_head.json @@ -17,10 +17,10 @@ { "from": [ 6, 6, 4 ], "to": [ 10, 10, 20 ], "faces": { - "down": { "uv": [ 0, 0, 16, 4 ], "texture": "#side", "rotation": 90 }, - "up": { "uv": [ 0, 0, 16, 4 ], "texture": "#side", "rotation": 270 }, - "west": { "uv": [ 16, 4, 0, 0 ], "texture": "#side" }, - "east": { "uv": [ 0, 0, 16, 4 ], "texture": "#side" } + "down": { "uv": [ 0, 0, 16, 4 ], "texture": "#unsticky_side", "rotation": 90 }, + "up": { "uv": [ 0, 0, 16, 4 ], "texture": "#unsticky_side", "rotation": 270 }, + "west": { "uv": [ 16, 4, 0, 0 ], "texture": "#unsticky_side" }, + "east": { "uv": [ 0, 0, 16, 4 ], "texture": "#unsticky_side" } } } ] diff --git a/assets/minecraft/models/block/template_piston_head_short.json b/assets/minecraft/models/block/template_piston_head_short.json index cdbe9e12..30d61fdf 100644 --- a/assets/minecraft/models/block/template_piston_head_short.json +++ b/assets/minecraft/models/block/template_piston_head_short.json @@ -17,10 +17,10 @@ { "from": [ 6, 6, 4 ], "to": [ 10, 10, 16 ], "faces": { - "down": { "uv": [ 4, 0, 16, 4 ], "texture": "#side", "rotation": 90 }, - "up": { "uv": [ 4, 0, 16, 4 ], "texture": "#side", "rotation": 270 }, - "west": { "uv": [ 16, 4, 4, 0 ], "texture": "#side" }, - "east": { "uv": [ 4, 0, 16, 4 ], "texture": "#side" } + "down": { "uv": [ 4, 0, 16, 4 ], "texture": "#unsticky_side", "rotation": 90 }, + "up": { "uv": [ 4, 0, 16, 4 ], "texture": "#unsticky_side", "rotation": 270 }, + "west": { "uv": [ 16, 4, 4, 0 ], "texture": "#unsticky_side" }, + "east": { "uv": [ 4, 0, 16, 4 ], "texture": "#unsticky_side" } } } ] diff --git a/index.html b/index.html index ff5cb5b7..3f7db7f0 100644 --- a/index.html +++ b/index.html @@ -105,13 +105,14 @@ locked: 'false', powered: 'false' }); - demo2.world.setBlock('minecraft:piston', 2, 0, 0, {facing: 'east', extended: 'false'}); - demo2.world.setBlock('minecraft:piston', 2, 0, 1, {facing: 'east', extended: 'true'}); - demo2.world.setBlock('minecraft:piston', 2, 0, 2, {facing: 'east', extended: 'true'}); + demo2.world.setBlock('minecraft:sticky_piston', 2, 0, 0, {facing: 'east', extended: 'false'}); + demo2.world.setBlock('minecraft:sticky_piston', 2, 0, 1, {facing: 'east', extended: 'true'}); + demo2.world.setBlock('minecraft:sticky_piston', 2, 0, 2, {facing: 'east', extended: 'true'}); demo2.world.setBlock('minecraft:piston_head', 2.5, 0, 1, {facing: 'east', short: 'true',type: 'sticky'}); - demo2.world.setBlock('minecraft:piston_head', 3, 0, 2, {facing: 'east', short: 'false',type: 'normal'}); - demo2.world.setBlock('minecraft:redstone_block', 3, 0, 0); - // demo2.world.setBlock('minecraft:redstone_block', 3.5, 0, 1); + demo2.world.setBlock('minecraft:piston_head', 3, 0, 2, {facing: 'east', short: 'false',type: 'sticky'}); + + demo2.world.setBlock('minecraft:glass', 3, 0, 0); + demo2.world.setBlock('minecraft:observer', 3.5, 0, 1, {facing: 'up', powered: 'true'}); demo2.world.setBlock('minecraft:redstone_block', 4, 0, 2); demo2.centerView()