diff --git a/kubejs/startup_scripts/wheat_plus.js b/kubejs/startup_scripts/wheat_plus.js index 4d8f719..1bde45d 100644 --- a/kubejs/startup_scripts/wheat_plus.js +++ b/kubejs/startup_scripts/wheat_plus.js @@ -1512,6 +1512,19 @@ StartupEvents.registry('block', regBlockReinforcedConcrete); StartupEvents.registry('block', regBlockOtherBasic); StartupEvents.registry('block', regBlockOtherShaped); +// 注册物品 +StartupEvents.registry('item', (event) => { + + let itemMaizitong = event.create(`${MOD_ID}:maizitong`); + + itemMaizitong.displayName({ text: '麦子通' }); + itemMaizitong.tooltip({ text: '麦子交通一卡通' }) + itemMaizitong.fireResistant(); + itemMaizitong.maxStackSize(1); + itemMaizitong.parentModel(`${P_ITEM}/maizitong`); + +}); + // 注册创造模式标签页 StartupEvents.registry('creative_mode_tab', (event) => { diff --git a/resourcepack/assets/wheat_plus/models/item/maizitong.json b/resourcepack/assets/wheat_plus/models/item/maizitong.json new file mode 100644 index 0000000..c69d1c6 --- /dev/null +++ b/resourcepack/assets/wheat_plus/models/item/maizitong.json @@ -0,0 +1,56 @@ +{ + "credit": "Created by Frost-ZX using Blockbench.", + "textures": { + "front": "wheat_plus:item/mai_zi_tong_f", + "back": "wheat_plus:item/mai_zi_tong_b" + }, + "elements": [ + { + "name": "麦子交通一卡通", + "from": [0, 3, 8], + "to": [16, 13, 8.5], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 11, 16]}, + "faces": { + "north": {"uv": [0, 3, 16, 13], "texture": "#front"}, + "east": {"uv": [0, 0.5, 10, 1], "rotation": 90, "texture": "#front"}, + "south": {"uv": [0, 3, 16, 13], "texture": "#back"}, + "west": {"uv": [0, 0.5, 10, 1], "rotation": 90, "texture": "#front"}, + "up": {"uv": [0, 0, 16, 0.5], "texture": "#front"}, + "down": {"uv": [0, 0, 16, 0.5], "texture": "#front"} + } + } + ], + "display": { + "thirdperson_righthand": { + "rotation": [90, 0, -105], + "translation": [-1, -2, -3], + "scale": [0.5, 0.5, 0.5] + }, + "thirdperson_lefthand": { + "rotation": [90, 0, -105], + "translation": [-1, -2, -3], + "scale": [0.5, 0.5, 0.5] + }, + "firstperson_righthand": { + "rotation": [125, 0, -105], + "scale": [0.5, 0.5, 0.5] + }, + "firstperson_lefthand": { + "rotation": [125, 0, -105], + "scale": [0.5, 0.5, 0.5] + }, + "ground": { + "rotation": [90, 0, 0], + "scale": [0.8, 0.8, 0.8] + }, + "gui": { + "rotation": [0, -180, 0] + }, + "head": { + "translation": [0, 11, 0] + }, + "fixed": { + "translation": [0, 0, -1] + } + } +} \ No newline at end of file diff --git a/resourcepack/assets/wheat_plus/textures/item/mai_zi_tong_b.png b/resourcepack/assets/wheat_plus/textures/item/mai_zi_tong_b.png new file mode 100644 index 0000000..0197c4a Binary files /dev/null and b/resourcepack/assets/wheat_plus/textures/item/mai_zi_tong_b.png differ diff --git a/resourcepack/assets/wheat_plus/textures/item/mai_zi_tong_f.png b/resourcepack/assets/wheat_plus/textures/item/mai_zi_tong_f.png new file mode 100644 index 0000000..7b15c73 Binary files /dev/null and b/resourcepack/assets/wheat_plus/textures/item/mai_zi_tong_f.png differ diff --git a/resourcepack/assets/wheat_plus/textures/item/mai_zi_tong_f_l.png b/resourcepack/assets/wheat_plus/textures/item/mai_zi_tong_f_l.png new file mode 100644 index 0000000..7b15c73 Binary files /dev/null and b/resourcepack/assets/wheat_plus/textures/item/mai_zi_tong_f_l.png differ