fix(04-bugfix): move wand JSON to Server/Item/Items/ and clone Weapon_Wand_Root template
Empirical findings from HytaleServer.jar decompile + Assets.zip introspection:
- AssetRegistryLoader.loadAssets0() resolves each plugin asset-pack root to
<root>/Server/, then iterates AssetStores and loads from
Server/<assetStore.getPath()>/. For the Item AssetStore, path is
'Item/Items'. So the wand JSON MUST live at Server/Item/Items/.
- The previous src/main/resources/Items/gravityflip_wand.json path was
never scanned: the loader would look at <jar>/Server/Item/Items/.
- Key function is Item::getId with item.id = blockTypeKey (filename minus
.json). So file 'gravityflip_wand.json' -> lookup id 'gravityflip_wand'.
JSON content cloned from vanilla Weapon_Wand_Root.json (extracted from
HYTALE SERVER/Assets.zip), which is the minimal wand template:
- Categories: ['Items.Weapons'] -> shows up in builder/creative menu.
- Icon/Model/Texture reuse vanilla wand assets (no custom art shipped).
- PlayerAnimationsId: Wand -> proper holding animation.
- ItemSoundSetId: ISS_Weapons_Wand -> pickup/drop SFX.
- Utility.Compatible=true and Weapon={} keep it functional in builder tools.
- Interactions.Primary/Secondary are inline {Type: GravityFlipWand} objects,
which the plugin's CodecRegistry(Interaction.CODEC).register call binds
to GravityFlipWandInteraction.CODEC (04-01 pattern, Finding 3).
This commit is contained in:
@@ -1,16 +0,0 @@
|
|||||||
{
|
|
||||||
"Icon": "Torch_Fire",
|
|
||||||
"TranslationProperties": {
|
|
||||||
"Translation": "Gravity Flip Wand"
|
|
||||||
},
|
|
||||||
"ResourceType": "Utility",
|
|
||||||
"MaxStackSize": 1,
|
|
||||||
"Interactions": {
|
|
||||||
"Primary": {
|
|
||||||
"Type": "GravityFlipWand"
|
|
||||||
},
|
|
||||||
"Secondary": {
|
|
||||||
"Type": "GravityFlipWand"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -0,0 +1,50 @@
|
|||||||
|
{
|
||||||
|
"TranslationProperties": {
|
||||||
|
"Name": "Gravity Flip Wand",
|
||||||
|
"Description": "Primary click: set pos1. Secondary click: set pos2. Use /gravityflip define to finalise a region."
|
||||||
|
},
|
||||||
|
"Categories": [
|
||||||
|
"Items.Weapons"
|
||||||
|
],
|
||||||
|
"Icon": "Icons/ItemsGenerated/Weapon_Wand_Wood.png",
|
||||||
|
"Quality": "Rare",
|
||||||
|
"ItemLevel": 40,
|
||||||
|
"Model": "Items/Weapons/Wand/Wood.blockymodel",
|
||||||
|
"Texture": "Items/Weapons/Wand/Wood_Texture.png",
|
||||||
|
"PlayerAnimationsId": "Wand",
|
||||||
|
"Utility": {
|
||||||
|
"Compatible": true
|
||||||
|
},
|
||||||
|
"Interactions": {
|
||||||
|
"Primary": {
|
||||||
|
"Type": "GravityFlipWand"
|
||||||
|
},
|
||||||
|
"Secondary": {
|
||||||
|
"Type": "GravityFlipWand"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"IconProperties": {
|
||||||
|
"Scale": 0.6,
|
||||||
|
"Translation": [
|
||||||
|
-13,
|
||||||
|
-16
|
||||||
|
],
|
||||||
|
"Rotation": [
|
||||||
|
45,
|
||||||
|
90,
|
||||||
|
0
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"DroppedItemAnimation": "Items/Animations/Dropped/Dropped_Diagonal_Left.blockyanim",
|
||||||
|
"Tags": {
|
||||||
|
"Type": [
|
||||||
|
"Weapon"
|
||||||
|
],
|
||||||
|
"Family": [
|
||||||
|
"Wand"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"Weapon": {},
|
||||||
|
"ItemSoundSetId": "ISS_Weapons_Wand",
|
||||||
|
"MaxStackSize": 1
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user