sapdon 2.0.2 → 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +1 -1
- package/doc/BlockAPI.md +145 -0
- package/doc/api.md +1 -1
- package/doc/hello_sapdon/a9aad643f5609da73404d1f7f35fd5d0.png +0 -0
- package/doc/hello_sapdon/sapdon/344/275/277/347/224/250/346/225/231/347/250/213.md +159 -0
- package/examples/guidebook/build.config +33 -0
- package/examples/guidebook/dev/guidebook_BP/items/sapdon_test_guidebook.json +19 -0
- package/examples/{masterball/dev/masterball_BP/masterball_BP_1_20_20 → guidebook/dev/guidebook_BP}/manifest.json +63 -59
- package/examples/guidebook/dev/guidebook_BP/scripts/custom_components/cropComponent.js +50 -0
- package/examples/guidebook/dev/guidebook_BP/scripts/custom_components/items/gui_book.js +37 -0
- package/examples/guidebook/dev/guidebook_BP/scripts/custom_components/registry.js +20 -0
- package/examples/guidebook/dev/guidebook_BP/scripts/index.js +3 -0
- package/examples/guidebook/dev/guidebook_RP/blocks.json +3 -0
- package/examples/guidebook/dev/guidebook_RP/manifest.json +44 -0
- package/examples/guidebook/dev/guidebook_RP/models/blocks/crop.geo.json +48 -0
- package/examples/{masterball/dev/masterball_RP/masterball_RP_1_20_20.zip → guidebook/dev/guidebook_RP/pack_icon.png} +0 -0
- package/examples/guidebook/dev/guidebook_RP/textures/blocks/test_log_oak.png +0 -0
- package/examples/guidebook/dev/guidebook_RP/textures/blocks/test_log_top.png +0 -0
- package/examples/guidebook/dev/guidebook_RP/textures/flipbook_textures.json +1 -0
- package/examples/guidebook/dev/guidebook_RP/textures/item_texture.json +9 -0
- package/examples/guidebook/dev/guidebook_RP/textures/items/masterball.png +0 -0
- package/examples/guidebook/dev/guidebook_RP/textures/terrain_texture.json +14 -0
- package/examples/guidebook/dev/guidebook_RP/ui/_ui_defs.json +6 -0
- package/examples/guidebook/dev/guidebook_RP/ui/guidebook.json +581 -0
- package/examples/guidebook/dev/guidebook_RP/ui/server_form.json +91 -0
- package/examples/guidebook/main.mjs +66 -0
- package/examples/guidebook/mod.info +7 -0
- package/examples/{masterball/dev/masterball_BP/masterball_BP_1_20_20.zip → guidebook/pack_icon.png} +0 -0
- package/examples/guidebook/res/models/blocks/crop.geo.json +48 -0
- package/examples/guidebook/res/textures/blocks/test_log_oak.png +0 -0
- package/examples/guidebook/res/textures/blocks/test_log_top.png +0 -0
- package/examples/guidebook/res/textures/items/masterball.png +0 -0
- package/examples/guidebook/scripts/custom_components/cropComponent.js +50 -0
- package/examples/guidebook/scripts/custom_components/items/gui_book.js +37 -0
- package/examples/guidebook/scripts/custom_components/registry.js +20 -0
- package/examples/guidebook/scripts/index.js +3 -0
- package/examples/hello_sapdon/build.config +29 -0
- package/examples/hello_sapdon/main.mjs +3 -0
- package/examples/hello_sapdon/mod.info +7 -0
- package/examples/hello_sapdon/pack_icon.png +0 -0
- package/examples/hello_sapdon/res/models/blocks/crop.geo.json +48 -0
- package/examples/hello_sapdon/res/textures/blocks/test_log_oak.png +0 -0
- package/examples/hello_sapdon/res/textures/blocks/test_log_top.png +0 -0
- package/examples/hello_sapdon/res/textures/items/masterball.png +0 -0
- package/examples/hello_sapdon/scripts/custom_components/cropComponent.js +50 -0
- package/examples/hello_sapdon/scripts/custom_components/items/gui_book.js +37 -0
- package/examples/hello_sapdon/scripts/custom_components/registry.js +25 -0
- package/examples/hello_sapdon/scripts/index.js +0 -0
- package/examples/masterball/build.config +1 -0
- package/examples/masterball/dev/masterball_1_20_30.mcaddon +0 -0
- package/examples/masterball/dev/masterball_BP/entities/sapdon_projectile_masterball.json +56 -55
- package/examples/masterball/dev/masterball_BP/manifest.json +59 -59
- package/examples/masterball/dev/masterball_BP/pack_icon.png +0 -0
- package/examples/masterball/dev/masterball_BP/recipes/masterball.json +25 -0
- package/examples/masterball/dev/masterball_BP_1_20_30.mcpack +0 -0
- package/examples/masterball/dev/masterball_RP/attachables/sapdon_caught_masterball.json +19 -0
- package/examples/masterball/dev/masterball_RP/manifest.json +43 -43
- package/examples/masterball/dev/masterball_RP/pack_icon.png +0 -0
- package/examples/masterball/dev/masterball_RP/textures/flipbook_textures.json +1 -0
- package/examples/masterball/dev/masterball_RP/ui/_ui_defs.json +3 -0
- package/examples/masterball/dev/masterball_RP_1_20_30.mcpack +0 -0
- package/examples/masterball/main.mjs +18 -1
- package/examples/masterball/pack_icon.png +0 -0
- package/examples/mob_chest/build.config +29 -0
- package/examples/mob_chest/dev/mob_chest_BP/blocks/mob_chest_chest.json +56 -0
- package/examples/mob_chest/dev/mob_chest_BP/entities/mob_chest_chest_entity.json +79 -0
- package/examples/mob_chest/dev/mob_chest_BP/manifest.json +64 -0
- package/examples/mob_chest/dev/mob_chest_BP/pack_icon.png +0 -0
- package/examples/mob_chest/dev/mob_chest_BP/scripts/custom_components/block/block_with_entity.js +46 -0
- package/examples/mob_chest/dev/mob_chest_BP/scripts/custom_components/block/cropComponent.js +50 -0
- package/examples/mob_chest/dev/mob_chest_BP/scripts/custom_components/items/gui_book.js +37 -0
- package/examples/mob_chest/dev/mob_chest_BP/scripts/custom_components/registry.js +25 -0
- package/examples/mob_chest/dev/mob_chest_BP/scripts/index.js +4 -0
- package/examples/mob_chest/dev/mob_chest_RP/animation_controllers/mob_chest.animation_controllers.json +30 -0
- package/examples/mob_chest/dev/mob_chest_RP/animations/animation_item.animation.json +34 -0
- package/examples/mob_chest/dev/mob_chest_RP/animations/large_item.animation.json +27 -0
- package/examples/mob_chest/dev/mob_chest_RP/animations/mob_chest.animation.json +64 -0
- package/examples/mob_chest/dev/mob_chest_RP/blocks.json +13 -0
- package/examples/mob_chest/dev/mob_chest_RP/entity/mob_chest_chest_entity.json +32 -0
- package/examples/mob_chest/dev/mob_chest_RP/manifest.json +44 -0
- package/examples/mob_chest/dev/mob_chest_RP/models/blocks/crop.geo.json +48 -0
- package/examples/mob_chest/dev/mob_chest_RP/models/blocks/cube.geo.json +35 -0
- package/examples/mob_chest/dev/mob_chest_RP/models/blocks/empty.geo.json +35 -0
- package/examples/mob_chest/dev/mob_chest_RP/models/entity/mob_chest.geo.json +98 -0
- package/examples/mob_chest/dev/mob_chest_RP/pack_icon.png +0 -0
- package/examples/mob_chest/dev/mob_chest_RP/textures/blocks/entity/double_normal.png +0 -0
- package/examples/mob_chest/dev/mob_chest_RP/textures/blocks/entity/none.png +0 -0
- package/examples/mob_chest/dev/mob_chest_RP/textures/blocks/entity/normal.png +0 -0
- package/examples/mob_chest/dev/mob_chest_RP/textures/blocks/test_log_oak.png +0 -0
- package/examples/mob_chest/dev/mob_chest_RP/textures/blocks/test_log_top.png +0 -0
- package/examples/mob_chest/dev/mob_chest_RP/textures/flipbook_textures.json +1 -0
- package/examples/mob_chest/dev/mob_chest_RP/textures/item_texture.json +9 -0
- package/examples/mob_chest/dev/mob_chest_RP/textures/items/masterball.png +0 -0
- package/examples/mob_chest/dev/mob_chest_RP/textures/terrain_texture.json +23 -0
- package/examples/mob_chest/dev/mob_chest_RP/ui/_ui_defs.json +3 -0
- package/examples/mob_chest/main.mjs +31 -0
- package/examples/mob_chest/mod.info +7 -0
- package/examples/mob_chest/pack_icon.png +0 -0
- package/examples/mob_chest/res/animation_controllers/mob_chest.animation_controllers.json +30 -0
- package/examples/mob_chest/res/animations/animation_item.animation.json +34 -0
- package/examples/mob_chest/res/animations/large_item.animation.json +27 -0
- package/examples/mob_chest/res/animations/mob_chest.animation.json +64 -0
- package/examples/mob_chest/res/models/blocks/crop.geo.json +48 -0
- package/examples/mob_chest/res/models/blocks/cube.geo.json +35 -0
- package/examples/mob_chest/res/models/blocks/empty.geo.json +35 -0
- package/examples/mob_chest/res/models/entity/mob_chest.geo.json +98 -0
- package/examples/mob_chest/res/textures/blocks/entity/double_normal.png +0 -0
- package/examples/mob_chest/res/textures/blocks/entity/none.png +0 -0
- package/examples/mob_chest/res/textures/blocks/entity/normal.png +0 -0
- package/examples/mob_chest/res/textures/blocks/test_log_oak.png +0 -0
- package/examples/mob_chest/res/textures/blocks/test_log_top.png +0 -0
- package/examples/mob_chest/res/textures/items/masterball.png +0 -0
- package/examples/mob_chest/resource/cube.bbmodel +1 -0
- package/examples/mob_chest/resource/flipbook_item.bbmodel +1 -0
- package/examples/mob_chest/resource/flipbook_item.geo.bbmodel +1 -0
- package/examples/mob_chest/resource/flipbook_item.geo.json +3124 -0
- package/examples/mob_chest/resource/mob_chest.bbmodel +1 -0
- package/examples/mob_chest/scripts/custom_components/block/block_with_entity.js +46 -0
- package/examples/mob_chest/scripts/custom_components/block/cropComponent.js +50 -0
- package/examples/mob_chest/scripts/custom_components/items/gui_book.js +37 -0
- package/examples/mob_chest/scripts/custom_components/registry.js +25 -0
- package/examples/mob_chest/scripts/index.js +4 -0
- package/examples/test/build.config +29 -0
- package/examples/test/dev/test_BP/blocks/sapdon_ore_cinnabar.json +15 -15
- package/examples/test/dev/test_BP/blocks/sapdon_test_block.json +15 -15
- package/examples/test/dev/test_BP/blocks/sapdon_test_crop.json +191 -191
- package/examples/test/dev/test_BP/blocks/sapdon_wire.json +102 -102
- package/examples/test/dev/test_BP/entities/sapdon_test_projectile.json +56 -55
- package/examples/test/dev/test_BP/feature_rules/ore_cinnabar_orefeatre_rule.json +52 -52
- package/examples/test/dev/test_BP/feature_rules/overworld_underground_titanite_ore_feature.json +52 -52
- package/examples/test/dev/test_BP/features/ore_cinnabar_ore_feature.json +16 -16
- package/examples/test/dev/test_BP/features/titanite_ore_feature.json +22 -22
- package/examples/test/dev/test_BP/items/sapdon_chest.json +22 -22
- package/examples/test/dev/test_BP/items/sapdon_test_book.json +19 -0
- package/examples/test/dev/test_BP/items/sapdon_test_food.json +25 -25
- package/examples/test/dev/test_BP/items/sapdon_test_item.json +30 -30
- package/examples/test/dev/test_BP/manifest.json +63 -59
- package/examples/test/dev/test_BP/recipes/sapdon_test_furnace.json +12 -12
- package/examples/test/dev/test_BP/scripts/custom_components/cropComponent.js +1 -10
- package/examples/test/dev/test_BP/scripts/custom_components/items/gui_book.js +37 -0
- package/examples/test/dev/test_BP/scripts/custom_components/registry.js +20 -0
- package/examples/test/dev/test_BP/scripts/index.js +4 -3
- package/examples/test/dev/test_RP/attachables/sapdon_chest.json +24 -24
- package/examples/test/dev/test_RP/blocks.json +42 -42
- package/examples/test/dev/test_RP/entity/sapdon_test_projectile.json +27 -27
- package/examples/test/dev/test_RP/manifest.json +43 -43
- package/examples/test/dev/test_RP/models/blocks/arcane_workbench.geo.json +105 -105
- package/examples/test/dev/test_RP/models/blocks/jar_normal.geo.json +46 -46
- package/examples/test/dev/test_RP/models/blocks/jar_normal_0.geo.json +58 -58
- package/examples/test/dev/test_RP/models/blocks/jar_normal_1.geo.json +58 -58
- package/examples/test/dev/test_RP/models/blocks/jar_normal_2.geo.json +58 -58
- package/examples/test/dev/test_RP/models/blocks/jar_normal_3.geo.json +58 -58
- package/examples/test/dev/test_RP/models/blocks/wire.geo.json +153 -153
- package/examples/test/dev/test_RP/textures/item_texture.json +788 -788
- package/examples/test/dev/test_RP/textures/items/seals/seal_breaker.png.mcmeta +5 -5
- package/examples/test/dev/test_RP/textures/items/seals/seal_butcher.png.mcmeta +5 -5
- package/examples/test/dev/test_RP/textures/items/seals/seal_empty.png.mcmeta +5 -5
- package/examples/test/dev/test_RP/textures/items/seals/seal_empty_advanced.png.mcmeta +5 -5
- package/examples/test/dev/test_RP/textures/items/seals/seal_fill.png.mcmeta +5 -5
- package/examples/test/dev/test_RP/textures/items/seals/seal_fill_advanced.png.mcmeta +5 -5
- package/examples/test/dev/test_RP/textures/items/seals/seal_guard.png.mcmeta +5 -5
- package/examples/test/dev/test_RP/textures/items/seals/seal_guard_advanced.png.mcmeta +5 -5
- package/examples/test/dev/test_RP/textures/items/seals/seal_harvest.png.mcmeta +5 -5
- package/examples/test/dev/test_RP/textures/items/seals/seal_lumber.png.mcmeta +5 -5
- package/examples/test/dev/test_RP/textures/items/seals/seal_pickup.png.mcmeta +5 -5
- package/examples/test/dev/test_RP/textures/items/seals/seal_pickup_advanced.png.mcmeta +5 -5
- package/examples/test/dev/test_RP/textures/items/seals/seal_provider.png.mcmeta +5 -5
- package/examples/test/dev/test_RP/textures/items/seals/seal_use.png.mcmeta +5 -5
- package/examples/test/dev/test_RP/textures/items/wand/cap_thaumium.png.mcmeta +11 -11
- package/examples/test/dev/test_RP/textures/items/wand/cap_void.png.mcmeta +11 -11
- package/examples/test/dev/test_RP/textures/items/wand/focus_pech.png.mcmeta +2 -2
- package/examples/test/dev/test_RP/textures/items/wand/focus_portablehole.png.mcmeta +2 -2
- package/examples/test/dev/test_RP/textures/items/wand/focus_primal.png.mcmeta +2 -2
- package/examples/test/dev/test_RP/textures/items/wand/focus_shard.png.mcmeta +2 -2
- package/examples/test/dev/test_RP/textures/items/wand/focus_warding.png.mcmeta +2 -2
- package/examples/test/dev/test_RP/textures/items/wand/rod_primal_mat.png.mcmeta +44 -44
- package/examples/test/dev/test_RP/textures/terrain_texture.json +136 -136
- package/examples/test/dev/test_RP/ui/_ui_defs.json +6 -0
- package/examples/test/dev/test_RP/ui/guidebook.json +446 -0
- package/examples/test/dev/test_RP/ui/server_form.json +91 -0
- package/examples/test/main.mjs +46 -1
- package/examples/test/res/models/blocks/arcane_workbench.geo.json +105 -105
- package/examples/test/res/models/blocks/jar_normal.geo.json +46 -46
- package/examples/test/res/models/blocks/jar_normal_0.geo.json +58 -58
- package/examples/test/res/models/blocks/jar_normal_1.geo.json +58 -58
- package/examples/test/res/models/blocks/jar_normal_2.geo.json +58 -58
- package/examples/test/res/models/blocks/jar_normal_3.geo.json +58 -58
- package/examples/test/res/models/blocks/wire.geo.json +153 -153
- package/examples/test/res/textures/items/seals/seal_breaker.png.mcmeta +5 -5
- package/examples/test/res/textures/items/seals/seal_butcher.png.mcmeta +5 -5
- package/examples/test/res/textures/items/seals/seal_empty.png.mcmeta +5 -5
- package/examples/test/res/textures/items/seals/seal_empty_advanced.png.mcmeta +5 -5
- package/examples/test/res/textures/items/seals/seal_fill.png.mcmeta +5 -5
- package/examples/test/res/textures/items/seals/seal_fill_advanced.png.mcmeta +5 -5
- package/examples/test/res/textures/items/seals/seal_guard.png.mcmeta +5 -5
- package/examples/test/res/textures/items/seals/seal_guard_advanced.png.mcmeta +5 -5
- package/examples/test/res/textures/items/seals/seal_harvest.png.mcmeta +5 -5
- package/examples/test/res/textures/items/seals/seal_lumber.png.mcmeta +5 -5
- package/examples/test/res/textures/items/seals/seal_pickup.png.mcmeta +5 -5
- package/examples/test/res/textures/items/seals/seal_pickup_advanced.png.mcmeta +5 -5
- package/examples/test/res/textures/items/seals/seal_provider.png.mcmeta +5 -5
- package/examples/test/res/textures/items/seals/seal_use.png.mcmeta +5 -5
- package/examples/test/res/textures/items/wand/cap_thaumium.png.mcmeta +11 -11
- package/examples/test/res/textures/items/wand/cap_void.png.mcmeta +11 -11
- package/examples/test/res/textures/items/wand/focus_pech.png.mcmeta +2 -2
- package/examples/test/res/textures/items/wand/focus_portablehole.png.mcmeta +2 -2
- package/examples/test/res/textures/items/wand/focus_primal.png.mcmeta +2 -2
- package/examples/test/res/textures/items/wand/focus_shard.png.mcmeta +2 -2
- package/examples/test/res/textures/items/wand/focus_warding.png.mcmeta +2 -2
- package/examples/test/res/textures/items/wand/rod_primal_mat.png.mcmeta +44 -44
- package/examples/test/scripts/custom_components/cropComponent.js +1 -10
- package/examples/test/scripts/custom_components/items/gui_book.js +37 -0
- package/examples/test/scripts/custom_components/registry.js +20 -0
- package/examples/test/scripts/index.js +4 -3
- package/log.md +8 -0
- package/package.json +4 -1
- package/src/cli/build.js +210 -210
- package/src/cli/load.js +116 -112
- package/src/cli/tools/textureSet.js +114 -114
- package/src/cli/utils.js +82 -82
- package/src/core/addon/controllers/animation_controller.js +80 -0
- package/src/core/addon/entity/entity.js +52 -51
- package/src/core/block/GeometryBlock.js +8 -0
- package/src/core/block/OreBlock.js +1 -0
- package/src/core/block/TileBlock.js +117 -0
- package/src/core/block/block.js +106 -106
- package/src/core/block/blockComponent.js +557 -557
- package/src/core/block/cropBlock.js +1 -1
- package/src/core/entity/BasicEntity.js +195 -166
- package/src/core/entity/bundles/BasicBundle.js +51 -0
- package/src/core/factory/BlockFactory.js +166 -158
- package/src/core/factory/EntityFactory.js +82 -82
- package/src/core/factory/ItemFactory.js +120 -95
- package/src/core/factory/RecipeFactory.js +46 -46
- package/src/core/index.js +2 -1
- package/src/core/item/Item.js +96 -96
- package/src/core/item/ItemComponents.js +251 -235
- package/src/core/item/armor.js +117 -89
- package/src/core/item/attachable.js +33 -33
- package/src/core/item/food.js +61 -61
- package/src/core/registry.js +16 -16
- package/src/core/ui/Properties/{Grid.js → GridProp.js} +2 -2
- package/src/core/ui/Properties/Sound.js +72 -0
- package/src/core/ui/elements/Button.js +111 -0
- package/src/core/ui/elements/CollectionPanel.js +61 -0
- package/src/core/ui/elements/Grid.js +24 -0
- package/src/core/ui/elements/Image.js +4 -0
- package/src/core/ui/elements/Label.js +10 -2
- package/src/core/ui/elements/Panel.js +7 -0
- package/src/core/ui/elements/ScrollingPanel.js +68 -0
- package/src/core/ui/elements/StackPanel.js +40 -0
- package/src/core/ui/elements/UIElement.js +43 -2
- package/src/core/ui/registry/UISystemRegistry.js +35 -0
- package/src/core/ui/systems/UISystem.js +9 -5
- package/src/core/ui/systems/guidebook.js +299 -0
- package/src/core/ui/systems/server_form.js +94 -83
- package/src/templates/test_sapdon/build.config +28 -28
- package/src/templates/test_sapdon/res/animations/animation_item.animation.json +34 -0
- package/src/templates/test_sapdon/res/animations/large_item.animation.json +27 -0
- package/src/templates/test_sapdon/res/models/entity/animation/animation_item.geo.json +26 -0
- package/src/templates/test_sapdon/res/models/entity/animation/large_item.geo.json +28 -0
- package/src/templates/test_sapdon/res/textures/blocks/none.png +0 -0
- package/src/templates/test_sapdon/scripts/custom_components/cropComponent.js +50 -0
- package/src/templates/test_sapdon/scripts/custom_components/items/gui_book.js +37 -0
- package/src/templates/test_sapdon/scripts/custom_components/registry.js +25 -0
- package/examples/masterball/dev/masterball[1.20.20+].mcaddon.zip +0 -0
- package/examples/masterball/dev/masterball_BP/masterball_BP_1_20_20/entities/sapdon_projectile_masterball.json +0 -56
- package/examples/masterball/dev/masterball_BP/masterball_BP_1_20_20/items/sapdon_caught_masterball.json +0 -32
- package/examples/masterball/dev/masterball_BP/masterball_BP_1_20_20/items/sapdon_uncaught_masterball.json +0 -31
- package/examples/masterball/dev/masterball_BP/masterball_BP_1_20_20/scripts/index.js +0 -159
- package/examples/test/dev/test_BP/biomes/test_biome.json +0 -48
- package/examples/test/dev/test_BP/blocks/sapdon_block.json +0 -111
- package/examples/test/dev/test_BP/entities/sapdon_body.json +0 -118
- package/examples/test/dev/test_BP/entities/sapdon_test_entity_ctrl1.json +0 -55
- package/examples/test/dev/test_BP/entities/sapdon_test_entity_ctrl2.json +0 -61
- package/examples/test/dev/test_BP/entities/sapdon_test_entity_header.json +0 -408
- package/examples/test/dev/test_RP/entity/sapdon_body.json +0 -44
- package/examples/test/dev/test_RP/entity/sapdon_test_entity_ctrl1.json +0 -38
- package/examples/test/dev/test_RP/entity/sapdon_test_entity_ctrl2.json +0 -38
- package/examples/test/dev/test_RP/entity/sapdon_test_entity_header.json +0 -44
- package/src/cli/build.config +0 -4
- package/src/core/ui/registry/ServerUISystem.js +0 -19
- /package/examples/{masterball/dev/masterball_BP/masterball_BP_1_20_20 → guidebook/dev/guidebook_BP}/pack_icon.png +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"meta":{"format_version":"4.10","model_format":"free","box_uv":false},"name":"mob_chest","model_identifier":"mob_chest","visible_box":[3,3.5,1.25],"variable_placeholders":"","variable_placeholder_buttons":[],"timeline_setups":[],"unhandled_root_fields":{},"resolution":{"width":64,"height":64},"elements":[{"name":"bottom","box_uv":false,"rescale":false,"locked":false,"light_emission":0,"render_order":"default","allow_mirror_modeling":true,"from":[-7,0,-7],"to":[7,10,7],"autouv":0,"color":1,"origin":[0,0,0],"uv_offset":[0,19],"faces":{"north":{"uv":[14,33,28,43],"texture":0},"east":{"uv":[0,33,14,43],"texture":0},"south":{"uv":[42,33,56,43],"texture":0},"west":{"uv":[28,33,42,43],"texture":0},"up":{"uv":[28,33,14,19],"texture":0},"down":{"uv":[42,19,28,33],"texture":0}},"type":"cube","uuid":"8dc66527-8b53-1320-2b61-759659e523f6"},{"name":"top","box_uv":false,"rescale":false,"locked":false,"light_emission":0,"render_order":"default","allow_mirror_modeling":true,"from":[-7,10,-7],"to":[7,15,7],"autouv":0,"color":2,"origin":[0,0,0],"faces":{"north":{"uv":[14,14,28,19],"texture":0},"east":{"uv":[0,14,14,19],"texture":0},"south":{"uv":[42,14,56,19],"texture":0},"west":{"uv":[28,14,42,19],"texture":0},"up":{"uv":[28,14,14,0],"texture":0},"down":{"uv":[42,0,28,14],"texture":0}},"type":"cube","uuid":"cbb553e3-e4e4-bd49-36c5-92deb62c0d2e"},{"name":"lock","box_uv":false,"rescale":false,"locked":false,"light_emission":0,"render_order":"default","allow_mirror_modeling":true,"from":[-1,8,-8],"to":[1,12,-7],"autouv":0,"color":3,"origin":[0,0,0],"faces":{"north":{"uv":[1,1,3,5],"texture":0},"east":{"uv":[0,1,1,5],"texture":0},"south":{"uv":[4,1,6,5],"texture":0},"west":{"uv":[3,1,4,5],"texture":0},"up":{"uv":[3,1,1,0],"texture":0},"down":{"uv":[5,0,3,1],"texture":0}},"type":"cube","uuid":"bed069c9-0fff-12cc-bb28-089a80d2bd58"},{"name":"cube","box_uv":false,"rescale":false,"locked":false,"light_emission":0,"render_order":"default","allow_mirror_modeling":true,"from":[-8,2.7755575615628914e-17,-8],"to":[8.100000000000001,16.100000000000005,8.100000000000001],"autouv":0,"color":1,"origin":[0.05000000000000071,8.050000000000002,0.05000000000000071],"uv_offset":[0,32],"faces":{"north":{"uv":[16,48,32,64],"texture":0},"east":{"uv":[0,48,16,64],"texture":0},"south":{"uv":[48,48,64,64],"texture":0},"west":{"uv":[32,48,48,64],"texture":0},"up":{"uv":[16,64,0,48],"texture":0},"down":{"uv":[16,48,0,64],"texture":0}},"type":"cube","uuid":"cc0d3571-e245-0449-105e-1e5215fc90eb"}],"outliner":[{"name":"chest","origin":[0,0,0],"rotation":[0,-180,0],"color":0,"uuid":"03bb3ad7-c2e4-80e1-9e4f-2a591558a93b","export":true,"mirror_uv":false,"isOpen":true,"locked":false,"visibility":true,"autouv":0,"selected":true,"children":[{"name":"bottom","origin":[0,5,0],"color":1,"uuid":"3a68c123-f97a-158f-65e0-ce745a7bce00","export":true,"mirror_uv":false,"isOpen":false,"locked":false,"visibility":true,"autouv":0,"selected":false,"children":["8dc66527-8b53-1320-2b61-759659e523f6"]},{"name":"top","origin":[0,10.5,7],"color":2,"uuid":"55c5a123-8404-e8f7-dc34-ab0cc5aafcb7","export":true,"mirror_uv":false,"isOpen":false,"locked":false,"visibility":true,"autouv":0,"selected":false,"children":["cbb553e3-e4e4-bd49-36c5-92deb62c0d2e",{"name":"lock","origin":[0,10,-7.5],"color":3,"uuid":"094879fc-2317-6274-1bb8-52bcd855cebb","export":true,"mirror_uv":false,"isOpen":false,"locked":false,"visibility":true,"autouv":0,"selected":false,"children":["bed069c9-0fff-12cc-bb28-089a80d2bd58"]}]},{"name":"interact","origin":[0.050000000000000704,8.050000000000002,0.05000000000000072],"color":0,"uuid":"b583da9f-b625-6666-303a-acae2c9301f2","export":true,"mirror_uv":false,"isOpen":false,"locked":false,"visibility":true,"autouv":0,"selected":false,"children":["cc0d3571-e245-0449-105e-1e5215fc90eb"]}]}],"textures":[{"path":"E:\\vscodeProjects\\gitProjects\\sapdon\\examples\\mob_chest\\res\\textures\\blocks\\entity\\normal.png","name":"normal.png","folder":"","namespace":"","id":"0","group":"","width":64,"height":64,"uv_width":64,"uv_height":64,"particle":false,"use_as_default":false,"layers_enabled":false,"sync_to_project":"","render_mode":"default","render_sides":"auto","pbr_channel":"color","frame_time":1,"frame_order_type":"loop","frame_order":"","frame_interpolate":false,"visible":true,"internal":true,"saved":true,"uuid":"6d5bd560-a96e-6724-a2bb-3f344b409671","relative_path":"../res/textures/blocks/entity/normal.png","source":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAAAXNSR0IArs4c6QAABpBJREFUeF7tWm1sFEUYfvb27notLS1UKFAUwRQaSHq0gIS0GI1KJILEfxIUo0b/aIzxBz9IjDEm/OCHMX7F+Bk/CBh/EANGQ6IhUvzA1qZESQU/0tASLbW99q53197trnlnOndz1/Z2b/R0u9z7Z+d29tnZeeed55155jQA6O7utvr6+tDc3Ay67tu3T6P7hWzD2lVWKBTMPOLXfaxsWRYM04L4Lb9jLBqH7vNBBdf3y2Xbb7L75tnqtSNHjlii4/SAUydsbV1n7W4NYaEWg6lXsHePTiZntLGoIsTuB/QaHO+KM8eo4LrPXyqNAw4dOmR1dHSgs7OTfbwoHzx4sGCDW8Jrrb1twPKayTkdnzL8mbpIEviwywcLGgj36dcX5x4wK1u1Z/tNDHeut0QOOHDggBUOh9Hb28taFeXDhw8XdABFwF0tKdRVpRhuZV0duw5EIqxMV7JlAR8MfwjDMR1HvzfYPcKd+uY3Vq6dnkVjU7xMV7IqDdB8wK7t6xnuu56fSxMB5IDGxkYMDg6yhkXZzgGbWpqsXa0GmuoDmeGqqAiyji+prMoZ3auJOCLxAE726Ow+4c6e4w4g8+u84wt4dcYmDGDHtjUMV7IpkNuk818UAfvbK1AbnAR1XJgYeTH6/gULWdVQVMP7Z/l0IdzxL86zjgsTIy9GPzDt1923tjBcySLAeZdzn7w53GTdv9lEXSj3fkBPZ27MxgFUSbhPzvyaC5QD/L/kAFUHiAhYWsO/Nj0xjj9SZoYLJienJzPAIoQi4J2vEiwLUAScOH2e4VIpIG5luSDNaYIZRQhFAOFcNwUEB8gkKDpNc14YkSBNgx+vTORwgEyCotM054URCdI02LrJxRywd4uO66qNDAfI8586IpMhZYEPvk2xCCDcyTMXMhwgz3/CyWRIWYBwrosA4oD72jS2DpDnuswBYjSpfjiu49gPfLoQjq0DpLmO2ZKcBdzdvpbhSrYO+Lc4ID//y++lSBibqsjJAoID8vO/jKNIuPd2l2YBsRROGVH2zUtrqtl1KBrLKdNSOBD0YzSu4UQPXyrTUrhYnOvS4Pqm663qqhBoC2RMx68Oi5U1KbZp6WuYAO2VTMtCIpGECq5kHLDjljYrZWTpN6Dz1Qnt6tKmCfFbDs2/IlHU19VgPuDsHKeRA3ZuuJpDBYK95RUepTg9nWQp7ZmPI7hhxRI82p7KrPkF6/cPJREMBnBjQyV7p1McPavSnh3Obhut3dGx0dofjmI29pZZXJTpuec/M7GioR75uP6rU+ga5NG0uVHHisXZPUEhXD4R52eVudpzgrtwqbCOwCJg22q+c5uNzIjUyOr9Wmbf/+bpCTQuq0c+bmA4gUtXxlCjA1ED2LC62hFOJs9i2nOC++lif8FdpHZbe9iaiMUBLfucpmlIGyZ0Xy6WlB6y4ZFxrFm1DONM4ck+E0/QZieb3Ksq+UbBDqfanhNc/8CfhR2QH0ZOf3tGEnPa4fznPCOJqTpASGJPv1tA2pJe/tIjXNoSklixUporl8IkbT33XlbZKeTMFx/j0haZipTmupWg2A47dcCzD/JtLZmKlGa3oFGNZGWhUQgij7/ChQ07e/UJvqkhU5HSXBcBQhJ78u08aWsOTwgOoGoVKc2VHEAjWUwEyJJYsVKa66bAP+WAYqU01zmAOICkrafeuGA3/Vk9ZQFZEitWSnOdA4Qk5nQd8MJDXNoiU5HSPMEBchYQHOBUSnNdFihLYl6RxK757TAJIq0rTaTTJvx+/i8PsvFk9ty/2gf4gvxPEGQnu0aZIJKPGxpNYGCYq8RkG1fVOsKptucEZyuI3NkRtnY2JWakMr8vK5SmzewxbmwKOHYugcaGxdi9Lga5bnAkiZFxLn0vrQ2iYVFWEiuEo+dV2nOCcySJkbgpzMkh58ufj2ZEUbfjbEVR4oB7WkYyDqB/d9gdcn50NoXlDYsxH3C2DiAO2L95gjlAyNJ2h5yvfxllETAfcLYOIA54uI2rwk4POd/q5BzwQDjG5HQ344rmACcrs9dOjbEsIHOHW3G2WcDuXIAig7R6+ZDzaGeEOWBPS5rVMdZ3cDj6f+BsHUCHnNQBWgGY04ecJF3ycu4BvjjkTCQnUTn9L1G3436/XKJzgRkLh3l6Q1kTnKf9nfHZZQd4ZSRV+1GOAFXPeQVXjgCvjKRqP8oRoOo5r+DKEeCVkVTtRzkCVD3nFVw5Arwykqr9KEeAque8gitHgFdGUrUf13wE/A1vGsKMY/vPggAAAABJRU5ErkJggg=="}]}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import {EquipmentSlot, ItemStack, world } from "@minecraft/server";
|
|
2
|
+
|
|
3
|
+
const BlockEntities = {
|
|
4
|
+
"mob_chest:chest":"mob_chest:chest_entity",
|
|
5
|
+
};
|
|
6
|
+
|
|
7
|
+
/** @type {import("@minecraft/server").BlockCustomComponent} */
|
|
8
|
+
export const BlockWithEntityComponent = {
|
|
9
|
+
onPlace({block,dimension,previousBlock}) {
|
|
10
|
+
const place_position = {
|
|
11
|
+
x:block.center().x,
|
|
12
|
+
y:block.center().y -0.5,
|
|
13
|
+
z:block.center().z
|
|
14
|
+
};
|
|
15
|
+
const block_entity_typeId = BlockEntities[block.typeId];
|
|
16
|
+
world.sendMessage("block_entity:"+block_entity_typeId);
|
|
17
|
+
dimension.spawnEntity(block_entity_typeId,place_position);
|
|
18
|
+
|
|
19
|
+
const block_typeId = block.typeId;
|
|
20
|
+
switch(block_typeId){
|
|
21
|
+
case "mob_chest:chest":
|
|
22
|
+
block.setPermutation(block.permutation.withState("sapdon:block_or_entity",1));
|
|
23
|
+
break;
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
onPlayerInteract({block,dimension,player,face,faceLocation}) {
|
|
27
|
+
world.sendMessage("interact");
|
|
28
|
+
const block_typeId = block.typeId;
|
|
29
|
+
const block_entity_typeId = BlockEntities[block_typeId];
|
|
30
|
+
switch(block_typeId){
|
|
31
|
+
case "mob_chest:chest":
|
|
32
|
+
const block_entity = dimension.getEntitiesAtBlockLocation(block.center())[0];
|
|
33
|
+
//获取属性
|
|
34
|
+
const chest_state = block_entity.getProperty("mob_chest:chest_state");
|
|
35
|
+
world.sendMessage("chest_state:"+chest_state);
|
|
36
|
+
if(chest_state === "open"){
|
|
37
|
+
//设置属性
|
|
38
|
+
block_entity.setProperty("mob_chest:chest_state","close");
|
|
39
|
+
}else{
|
|
40
|
+
//设置属性
|
|
41
|
+
block_entity.setProperty("mob_chest:chest_state","open");
|
|
42
|
+
}
|
|
43
|
+
break;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
};
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { EquipmentSlot, GameMode, world } from "@minecraft/server";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @param {number} min The minimum integer
|
|
5
|
+
* @param {number} max The maximum integer
|
|
6
|
+
* @returns {number} A random integer between the `min` and `max` parameters (inclusive)
|
|
7
|
+
*/
|
|
8
|
+
const randomInt = (min, max) => Math.floor(Math.random() * (max - min + 1)) + min;
|
|
9
|
+
|
|
10
|
+
const maxGrowth = 3;
|
|
11
|
+
|
|
12
|
+
/** @type {import("@minecraft/server").BlockCustomComponent} */
|
|
13
|
+
export const CustomCropGrowthBlockComponent = {
|
|
14
|
+
onRandomTick({ block }) {
|
|
15
|
+
const growthChance = 1 / 3;
|
|
16
|
+
if (Math.random() > growthChance) return;
|
|
17
|
+
|
|
18
|
+
const growth = block.permutation.getState("sapdon:block_variant_tag");
|
|
19
|
+
block.setPermutation(block.permutation.withState("sapdon:block_variant_tag", growth + 1));
|
|
20
|
+
},
|
|
21
|
+
onPlayerInteract({ block, dimension, player }) {
|
|
22
|
+
if (!player) return;
|
|
23
|
+
|
|
24
|
+
const equippable = player.getComponent("minecraft:equippable");
|
|
25
|
+
if (!equippable) return;
|
|
26
|
+
|
|
27
|
+
const mainhand = equippable.getEquipmentSlot(EquipmentSlot.Mainhand);
|
|
28
|
+
if (!mainhand.hasItem() || mainhand.typeId !== "minecraft:bone_meal") return;
|
|
29
|
+
|
|
30
|
+
if (player.getGameMode() === GameMode.creative) {
|
|
31
|
+
// Grow crop fully
|
|
32
|
+
block.setPermutation(block.permutation.withState("sapdon:block_variant_tag", maxGrowth));
|
|
33
|
+
} else {
|
|
34
|
+
let growth = block.permutation.getState("sapdon:block_variant_tag");
|
|
35
|
+
|
|
36
|
+
// Add random amount of growth
|
|
37
|
+
growth += randomInt(1, maxGrowth - growth);
|
|
38
|
+
block.setPermutation(block.permutation.withState("sapdon:block_variant_tag", growth));
|
|
39
|
+
|
|
40
|
+
// Decrement stack
|
|
41
|
+
if (mainhand.amount > 1) mainhand.amount--;
|
|
42
|
+
else mainhand.setItem(undefined);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
// Play effects
|
|
46
|
+
const effectLocation = block.center();
|
|
47
|
+
dimension.playSound("item.bone_meal.use", effectLocation);
|
|
48
|
+
dimension.spawnParticle("minecraft:crop_growth_emitter", effectLocation);
|
|
49
|
+
},
|
|
50
|
+
};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { world } from "@minecraft/server";
|
|
2
|
+
import { ActionFormData} from "@minecraft/server-ui";
|
|
3
|
+
|
|
4
|
+
const item_ui_list ={
|
|
5
|
+
"thaumcraft:thaumonomicon":"guidebook"
|
|
6
|
+
};
|
|
7
|
+
|
|
8
|
+
var page_index = 0;
|
|
9
|
+
/** @type {import("@minecraft/server").ItemCustomComponent} */
|
|
10
|
+
export const GuiBookItemComponent = {
|
|
11
|
+
onUse({itemStack,source}){
|
|
12
|
+
if(source.typeId != "minecraft:player") return
|
|
13
|
+
showGuidebook(source,item_ui_list[itemStack.typeId])
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
function showGuidebook(target,ui){
|
|
18
|
+
const form = new ActionFormData()
|
|
19
|
+
.title(ui)
|
|
20
|
+
.body("page_index"+ page_index)
|
|
21
|
+
.button("test1")
|
|
22
|
+
.button("test2")
|
|
23
|
+
|
|
24
|
+
form.show(target).then((response) => {
|
|
25
|
+
if (response.selection === 0) {
|
|
26
|
+
page_index--;
|
|
27
|
+
world.sendMessage("上一页")
|
|
28
|
+
showGuidebook(target,ui)
|
|
29
|
+
|
|
30
|
+
}
|
|
31
|
+
else if (response.selection === 1) {
|
|
32
|
+
page_index++;
|
|
33
|
+
world.sendMessage("下一页")
|
|
34
|
+
showGuidebook(target,ui)
|
|
35
|
+
}
|
|
36
|
+
});
|
|
37
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
|
|
2
|
+
import { BlockWithEntityComponent } from "./block/block_with_entity.js";
|
|
3
|
+
import { CustomCropGrowthBlockComponent } from "./block/cropComponent.js";
|
|
4
|
+
import { GuiBookItemComponent } from "./items/gui_book.js";
|
|
5
|
+
import { world } from "@minecraft/server";
|
|
6
|
+
|
|
7
|
+
export const registerCustomItemComponent = ()=>{
|
|
8
|
+
world.beforeEvents.worldInitialize.subscribe(({ itemComponentRegistry }) => {
|
|
9
|
+
itemComponentRegistry.registerCustomComponent("sapdon:guibook",GuiBookItemComponent);
|
|
10
|
+
});
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export const registerCustomBlockComponent = ()=>{
|
|
14
|
+
world.beforeEvents.worldInitialize.subscribe(({ blockComponentRegistry }) => {
|
|
15
|
+
blockComponentRegistry.registerCustomComponent(
|
|
16
|
+
"sapdon:block_with_entity",
|
|
17
|
+
BlockWithEntityComponent
|
|
18
|
+
);
|
|
19
|
+
blockComponentRegistry.registerCustomComponent(
|
|
20
|
+
"sapdon:crop_growth",
|
|
21
|
+
CustomCropGrowthBlockComponent
|
|
22
|
+
);
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
{
|
|
2
|
+
"defaultConfig": {
|
|
3
|
+
"buildMode": "development",
|
|
4
|
+
"buildEntry": "main.mjs",
|
|
5
|
+
"scriptEntry": "scripts/index.js",
|
|
6
|
+
"buildDir": "dev/",
|
|
7
|
+
"dependencies": [
|
|
8
|
+
{
|
|
9
|
+
"module_name": "@minecraft/server",
|
|
10
|
+
"version": "1.16.0"
|
|
11
|
+
}
|
|
12
|
+
]
|
|
13
|
+
},
|
|
14
|
+
"libraries": [
|
|
15
|
+
{
|
|
16
|
+
"path": "lib/"
|
|
17
|
+
}
|
|
18
|
+
],
|
|
19
|
+
"resources": [
|
|
20
|
+
{
|
|
21
|
+
"path": "res/"
|
|
22
|
+
}
|
|
23
|
+
],
|
|
24
|
+
"scripts": [
|
|
25
|
+
{
|
|
26
|
+
"path": "scripts/"
|
|
27
|
+
}
|
|
28
|
+
]
|
|
29
|
+
}
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
{
|
|
2
|
-
"format_version": "1.21.50",
|
|
3
|
-
"minecraft:block": {
|
|
4
|
-
"description": {
|
|
5
|
-
"identifier": "sapdon:ore_cinnabar",
|
|
6
|
-
"traits": {},
|
|
7
|
-
"states": {},
|
|
8
|
-
"menu_category": {
|
|
9
|
-
"category": "construction",
|
|
10
|
-
"is_hidden_in_commands": false
|
|
11
|
-
}
|
|
12
|
-
},
|
|
13
|
-
"components": {},
|
|
14
|
-
"permutations": []
|
|
15
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"format_version": "1.21.50",
|
|
3
|
+
"minecraft:block": {
|
|
4
|
+
"description": {
|
|
5
|
+
"identifier": "sapdon:ore_cinnabar",
|
|
6
|
+
"traits": {},
|
|
7
|
+
"states": {},
|
|
8
|
+
"menu_category": {
|
|
9
|
+
"category": "construction",
|
|
10
|
+
"is_hidden_in_commands": false
|
|
11
|
+
}
|
|
12
|
+
},
|
|
13
|
+
"components": {},
|
|
14
|
+
"permutations": []
|
|
15
|
+
}
|
|
16
16
|
}
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
{
|
|
2
|
-
"format_version": "1.21.50",
|
|
3
|
-
"minecraft:block": {
|
|
4
|
-
"description": {
|
|
5
|
-
"identifier": "sapdon:test_block",
|
|
6
|
-
"traits": {},
|
|
7
|
-
"states": {},
|
|
8
|
-
"menu_category": {
|
|
9
|
-
"category": "construction",
|
|
10
|
-
"is_hidden_in_commands": false
|
|
11
|
-
}
|
|
12
|
-
},
|
|
13
|
-
"components": {},
|
|
14
|
-
"permutations": []
|
|
15
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"format_version": "1.21.50",
|
|
3
|
+
"minecraft:block": {
|
|
4
|
+
"description": {
|
|
5
|
+
"identifier": "sapdon:test_block",
|
|
6
|
+
"traits": {},
|
|
7
|
+
"states": {},
|
|
8
|
+
"menu_category": {
|
|
9
|
+
"category": "construction",
|
|
10
|
+
"is_hidden_in_commands": false
|
|
11
|
+
}
|
|
12
|
+
},
|
|
13
|
+
"components": {},
|
|
14
|
+
"permutations": []
|
|
15
|
+
}
|
|
16
16
|
}
|
|
@@ -1,192 +1,192 @@
|
|
|
1
|
-
{
|
|
2
|
-
"format_version": "1.21.50",
|
|
3
|
-
"minecraft:block": {
|
|
4
|
-
"description": {
|
|
5
|
-
"identifier": "sapdon:test_crop",
|
|
6
|
-
"traits": {},
|
|
7
|
-
"states": {
|
|
8
|
-
"sapdon:block_variant_tag": {
|
|
9
|
-
"values": {
|
|
10
|
-
"min": 0,
|
|
11
|
-
"max": 3
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
},
|
|
15
|
-
"menu_category": {
|
|
16
|
-
"category": "construction",
|
|
17
|
-
"is_hidden_in_commands": false
|
|
18
|
-
}
|
|
19
|
-
},
|
|
20
|
-
"components": {
|
|
21
|
-
"minecraft:collision_box": false,
|
|
22
|
-
"minecraft:geometry": {
|
|
23
|
-
"identifier": "geometry.crop"
|
|
24
|
-
},
|
|
25
|
-
"minecraft:light_emission": 0,
|
|
26
|
-
"minecraft:placement_filter": {
|
|
27
|
-
"conditions": [
|
|
28
|
-
{
|
|
29
|
-
"allowed_faces": [
|
|
30
|
-
"up"
|
|
31
|
-
],
|
|
32
|
-
"block_filter": [
|
|
33
|
-
"minecraft:farmland"
|
|
34
|
-
]
|
|
35
|
-
}
|
|
36
|
-
]
|
|
37
|
-
}
|
|
38
|
-
},
|
|
39
|
-
"permutations": [
|
|
40
|
-
{
|
|
41
|
-
"condition": "q.block_state('sapdon:block_variant_tag') == 0",
|
|
42
|
-
"components": {
|
|
43
|
-
"minecraft:material_instances": {
|
|
44
|
-
"*": {
|
|
45
|
-
"texture": "garlic_stage_0",
|
|
46
|
-
"ambient_occlusion": true,
|
|
47
|
-
"face_dimming": true,
|
|
48
|
-
"render_method": "alpha_test"
|
|
49
|
-
},
|
|
50
|
-
"up": {
|
|
51
|
-
"texture": "garlic_stage_0",
|
|
52
|
-
"ambient_occlusion": true,
|
|
53
|
-
"face_dimming": true,
|
|
54
|
-
"render_method": "alpha_test"
|
|
55
|
-
},
|
|
56
|
-
"down": {
|
|
57
|
-
"texture": "garlic_stage_0",
|
|
58
|
-
"ambient_occlusion": true,
|
|
59
|
-
"face_dimming": true,
|
|
60
|
-
"render_method": "alpha_test"
|
|
61
|
-
},
|
|
62
|
-
"north": {
|
|
63
|
-
"texture": "garlic_stage_0",
|
|
64
|
-
"ambient_occlusion": true,
|
|
65
|
-
"face_dimming": true,
|
|
66
|
-
"render_method": "alpha_test"
|
|
67
|
-
},
|
|
68
|
-
"south": {
|
|
69
|
-
"texture": "garlic_stage_0",
|
|
70
|
-
"ambient_occlusion": true,
|
|
71
|
-
"face_dimming": true,
|
|
72
|
-
"render_method": "alpha_test"
|
|
73
|
-
},
|
|
74
|
-
"east": {
|
|
75
|
-
"texture": "garlic_stage_0",
|
|
76
|
-
"ambient_occlusion": true,
|
|
77
|
-
"face_dimming": true,
|
|
78
|
-
"render_method": "alpha_test"
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
},
|
|
83
|
-
{
|
|
84
|
-
"condition": "q.block_state('sapdon:block_variant_tag') == 1",
|
|
85
|
-
"components": {
|
|
86
|
-
"minecraft:material_instances": {
|
|
87
|
-
"*": {
|
|
88
|
-
"texture": "garlic_stage_1",
|
|
89
|
-
"ambient_occlusion": true,
|
|
90
|
-
"face_dimming": true,
|
|
91
|
-
"render_method": "alpha_test"
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
},
|
|
96
|
-
{
|
|
97
|
-
"condition": "q.block_state('sapdon:block_variant_tag') == 2",
|
|
98
|
-
"components": {
|
|
99
|
-
"minecraft:material_instances": {
|
|
100
|
-
"*": {
|
|
101
|
-
"texture": "garlic_stage_2",
|
|
102
|
-
"ambient_occlusion": true,
|
|
103
|
-
"face_dimming": true,
|
|
104
|
-
"render_method": "alpha_test"
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
},
|
|
109
|
-
{
|
|
110
|
-
"condition": "q.block_state('sapdon:block_variant_tag') == 3",
|
|
111
|
-
"components": {
|
|
112
|
-
"minecraft:material_instances": {
|
|
113
|
-
"*": {
|
|
114
|
-
"texture": "garlic_stage_3",
|
|
115
|
-
"ambient_occlusion": true,
|
|
116
|
-
"face_dimming": true,
|
|
117
|
-
"render_method": "alpha_test"
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
},
|
|
122
|
-
{
|
|
123
|
-
"condition": "q.block_state('sapdon:block_variant_tag') == 0",
|
|
124
|
-
"components": {
|
|
125
|
-
"minecraft:selection_box": {
|
|
126
|
-
"origin": [
|
|
127
|
-
-8,
|
|
128
|
-
0,
|
|
129
|
-
-8
|
|
130
|
-
],
|
|
131
|
-
"size": [
|
|
132
|
-
16,
|
|
133
|
-
0.25,
|
|
134
|
-
16
|
|
135
|
-
]
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
},
|
|
139
|
-
{
|
|
140
|
-
"condition": "q.block_state('sapdon:block_variant_tag') == 1",
|
|
141
|
-
"components": {
|
|
142
|
-
"minecraft:selection_box": {
|
|
143
|
-
"origin": [
|
|
144
|
-
-8,
|
|
145
|
-
0,
|
|
146
|
-
-8
|
|
147
|
-
],
|
|
148
|
-
"size": [
|
|
149
|
-
16,
|
|
150
|
-
0.5,
|
|
151
|
-
16
|
|
152
|
-
]
|
|
153
|
-
}
|
|
154
|
-
}
|
|
155
|
-
},
|
|
156
|
-
{
|
|
157
|
-
"condition": "q.block_state('sapdon:block_variant_tag') == 2",
|
|
158
|
-
"components": {
|
|
159
|
-
"minecraft:selection_box": {
|
|
160
|
-
"origin": [
|
|
161
|
-
-8,
|
|
162
|
-
0,
|
|
163
|
-
-8
|
|
164
|
-
],
|
|
165
|
-
"size": [
|
|
166
|
-
16,
|
|
167
|
-
0.75,
|
|
168
|
-
16
|
|
169
|
-
]
|
|
170
|
-
}
|
|
171
|
-
}
|
|
172
|
-
},
|
|
173
|
-
{
|
|
174
|
-
"condition": "q.block_state('sapdon:block_variant_tag') == 3",
|
|
175
|
-
"components": {
|
|
176
|
-
"minecraft:selection_box": {
|
|
177
|
-
"origin": [
|
|
178
|
-
-8,
|
|
179
|
-
0,
|
|
180
|
-
-8
|
|
181
|
-
],
|
|
182
|
-
"size": [
|
|
183
|
-
16,
|
|
184
|
-
1,
|
|
185
|
-
16
|
|
186
|
-
]
|
|
187
|
-
}
|
|
188
|
-
}
|
|
189
|
-
}
|
|
190
|
-
]
|
|
191
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"format_version": "1.21.50",
|
|
3
|
+
"minecraft:block": {
|
|
4
|
+
"description": {
|
|
5
|
+
"identifier": "sapdon:test_crop",
|
|
6
|
+
"traits": {},
|
|
7
|
+
"states": {
|
|
8
|
+
"sapdon:block_variant_tag": {
|
|
9
|
+
"values": {
|
|
10
|
+
"min": 0,
|
|
11
|
+
"max": 3
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
"menu_category": {
|
|
16
|
+
"category": "construction",
|
|
17
|
+
"is_hidden_in_commands": false
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
"components": {
|
|
21
|
+
"minecraft:collision_box": false,
|
|
22
|
+
"minecraft:geometry": {
|
|
23
|
+
"identifier": "geometry.crop"
|
|
24
|
+
},
|
|
25
|
+
"minecraft:light_emission": 0,
|
|
26
|
+
"minecraft:placement_filter": {
|
|
27
|
+
"conditions": [
|
|
28
|
+
{
|
|
29
|
+
"allowed_faces": [
|
|
30
|
+
"up"
|
|
31
|
+
],
|
|
32
|
+
"block_filter": [
|
|
33
|
+
"minecraft:farmland"
|
|
34
|
+
]
|
|
35
|
+
}
|
|
36
|
+
]
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
"permutations": [
|
|
40
|
+
{
|
|
41
|
+
"condition": "q.block_state('sapdon:block_variant_tag') == 0",
|
|
42
|
+
"components": {
|
|
43
|
+
"minecraft:material_instances": {
|
|
44
|
+
"*": {
|
|
45
|
+
"texture": "garlic_stage_0",
|
|
46
|
+
"ambient_occlusion": true,
|
|
47
|
+
"face_dimming": true,
|
|
48
|
+
"render_method": "alpha_test"
|
|
49
|
+
},
|
|
50
|
+
"up": {
|
|
51
|
+
"texture": "garlic_stage_0",
|
|
52
|
+
"ambient_occlusion": true,
|
|
53
|
+
"face_dimming": true,
|
|
54
|
+
"render_method": "alpha_test"
|
|
55
|
+
},
|
|
56
|
+
"down": {
|
|
57
|
+
"texture": "garlic_stage_0",
|
|
58
|
+
"ambient_occlusion": true,
|
|
59
|
+
"face_dimming": true,
|
|
60
|
+
"render_method": "alpha_test"
|
|
61
|
+
},
|
|
62
|
+
"north": {
|
|
63
|
+
"texture": "garlic_stage_0",
|
|
64
|
+
"ambient_occlusion": true,
|
|
65
|
+
"face_dimming": true,
|
|
66
|
+
"render_method": "alpha_test"
|
|
67
|
+
},
|
|
68
|
+
"south": {
|
|
69
|
+
"texture": "garlic_stage_0",
|
|
70
|
+
"ambient_occlusion": true,
|
|
71
|
+
"face_dimming": true,
|
|
72
|
+
"render_method": "alpha_test"
|
|
73
|
+
},
|
|
74
|
+
"east": {
|
|
75
|
+
"texture": "garlic_stage_0",
|
|
76
|
+
"ambient_occlusion": true,
|
|
77
|
+
"face_dimming": true,
|
|
78
|
+
"render_method": "alpha_test"
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
"condition": "q.block_state('sapdon:block_variant_tag') == 1",
|
|
85
|
+
"components": {
|
|
86
|
+
"minecraft:material_instances": {
|
|
87
|
+
"*": {
|
|
88
|
+
"texture": "garlic_stage_1",
|
|
89
|
+
"ambient_occlusion": true,
|
|
90
|
+
"face_dimming": true,
|
|
91
|
+
"render_method": "alpha_test"
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
"condition": "q.block_state('sapdon:block_variant_tag') == 2",
|
|
98
|
+
"components": {
|
|
99
|
+
"minecraft:material_instances": {
|
|
100
|
+
"*": {
|
|
101
|
+
"texture": "garlic_stage_2",
|
|
102
|
+
"ambient_occlusion": true,
|
|
103
|
+
"face_dimming": true,
|
|
104
|
+
"render_method": "alpha_test"
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
"condition": "q.block_state('sapdon:block_variant_tag') == 3",
|
|
111
|
+
"components": {
|
|
112
|
+
"minecraft:material_instances": {
|
|
113
|
+
"*": {
|
|
114
|
+
"texture": "garlic_stage_3",
|
|
115
|
+
"ambient_occlusion": true,
|
|
116
|
+
"face_dimming": true,
|
|
117
|
+
"render_method": "alpha_test"
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
"condition": "q.block_state('sapdon:block_variant_tag') == 0",
|
|
124
|
+
"components": {
|
|
125
|
+
"minecraft:selection_box": {
|
|
126
|
+
"origin": [
|
|
127
|
+
-8,
|
|
128
|
+
0,
|
|
129
|
+
-8
|
|
130
|
+
],
|
|
131
|
+
"size": [
|
|
132
|
+
16,
|
|
133
|
+
0.25,
|
|
134
|
+
16
|
|
135
|
+
]
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
"condition": "q.block_state('sapdon:block_variant_tag') == 1",
|
|
141
|
+
"components": {
|
|
142
|
+
"minecraft:selection_box": {
|
|
143
|
+
"origin": [
|
|
144
|
+
-8,
|
|
145
|
+
0,
|
|
146
|
+
-8
|
|
147
|
+
],
|
|
148
|
+
"size": [
|
|
149
|
+
16,
|
|
150
|
+
0.5,
|
|
151
|
+
16
|
|
152
|
+
]
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
"condition": "q.block_state('sapdon:block_variant_tag') == 2",
|
|
158
|
+
"components": {
|
|
159
|
+
"minecraft:selection_box": {
|
|
160
|
+
"origin": [
|
|
161
|
+
-8,
|
|
162
|
+
0,
|
|
163
|
+
-8
|
|
164
|
+
],
|
|
165
|
+
"size": [
|
|
166
|
+
16,
|
|
167
|
+
0.75,
|
|
168
|
+
16
|
|
169
|
+
]
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
},
|
|
173
|
+
{
|
|
174
|
+
"condition": "q.block_state('sapdon:block_variant_tag') == 3",
|
|
175
|
+
"components": {
|
|
176
|
+
"minecraft:selection_box": {
|
|
177
|
+
"origin": [
|
|
178
|
+
-8,
|
|
179
|
+
0,
|
|
180
|
+
-8
|
|
181
|
+
],
|
|
182
|
+
"size": [
|
|
183
|
+
16,
|
|
184
|
+
1,
|
|
185
|
+
16
|
|
186
|
+
]
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
]
|
|
191
|
+
}
|
|
192
192
|
}
|