simplified-mojang-jsons 0.0.20 → 0.0.22

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.
@@ -63,20 +63,28 @@ export declare class FinalEntityBuilderTemplate extends BehaviorEntityBuilder {
63
63
  */
64
64
  private byID;
65
65
  /**
66
- * Metodo auxiliar que agrega componentes a una lista de mapas objectivo garantizando que no existan previamente.
67
- * @param {BPEntityComponentsMap} target Mapa destino donde se insertaran los nuevos componentes.
66
+ * Metodo auxiliar que agrega componentes a un mapa objectivo. Si el componente ya existe en el mapa, fusiona sus datos con los del nuevo en vez de reemplazarlo.
67
+ * @param {BPEntityComponentsMap} target Mapa destiono a considerar.
68
68
  * @param {(readonly BPEntityComponent[] | undefined)} list Lista de componentes a incorporar.
69
69
  * @param {string} where Contexto u origen de la ejecucion para mensajes de error.
70
- * @param {string} replaceWith Sugerencia del metodo o alternativa recomendada cuando ya existe la clave.
71
70
  * @returns {void}
72
71
  *
73
- * @throws {Error} Marcara error si, algun componente de la lista colisiona con una clave existente en el parametro target.
74
- * @throws {Error} Marcara error si, la lista contiene componente duplicados entre si.
72
+ * @throws {Error} Marcara error si, la lista contiene componentes duplicados entre si.
75
73
  *
76
- * @author HaJuegos - 01-10-2026
74
+ * @author HaJuegos - 12-11-2026
75
+ * @private
76
+ */
77
+ private addMerge;
78
+ /**
79
+ * Metodo auxiliar que fusiona dos componentes con el mismo ID en uno solo. Los objectos se mezclan de forma recursiva.
80
+ * @param {BPEntityComponent} a Componente existente en la plantilla base.
81
+ * @param {BPEntityComponent} b Componente nuevo con los datos adiccionales a fusionar.
82
+ * @returns {BPEntityComponent} Devuelve un componente con el mismo ID cuyo build contiene los datos fusionados.
83
+ * @returns {void}
84
+ * @author HaJuegos - 12-11-2026
77
85
  * @private
78
86
  */
79
- private addUnique;
87
+ private mergeComp;
80
88
  /**
81
89
  * Metodo auxiliar que examina de manera recursiva la estructura de eventos a verificar de los grupos de componentes existan y que no tengan duplicados.
82
90
  * @param {LooseEvents} events Estructura o mapa de eventos a analizar.
@@ -1 +1 @@
1
- {"version":3,"file":"EntityTemplateBuilder.d.ts","sourceRoot":"","sources":["../../../../src/builders/behaviors/entities/EntityTemplateBuilder.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,0BAA0B,EAAE,iBAAiB,EAAqD,iBAAiB,EAAE,sBAAsB,EAAE,UAAU,EAAe,cAAc,EAAE,QAAQ,EAAE,MAAM,oDAAoD,CAAC;AAC3R,OAAO,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AAExD;;;;;GAKG;AACH,qBAAa,0BAA2B,SAAQ,qBAAqB;IACjE;;;;;OAKG;IACH,OAAO,CAAC,QAAQ,CAAC,WAAW,CAA6B;IAEzD;;;;;OAKG;IACH,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAwD;IAEjF;;;;;;OAMG;IACH,YAAa,GAAG,EAAE,cAAc,EAAE,IAAI,EAAE,QAAQ,EAmI/C;IAED;;;;;OAKG;IACI,UAAU,IAAI,MAAM,CAE1B;IAED;;;;;;;;;;;;;;OAcG;IACH,OAAO,CAAC,QAAQ;IAwBhB;;;;;;;;OAQG;IACH,OAAO,CAAC,IAAI;IAcZ;;;;;;;;;;;;;OAaG;IACH,OAAO,CAAC,SAAS;IAUjB;;;;;;;;;;;;OAYG;IACH,OAAO,CAAC,cAAc;IAoCtB;;;;;;;OAOG;IACH,OAAO,CAAC,OAAO;IAaf;;;;;;;OAOG;IACH,OAAO,CAAC,KAAK;CAmDhB;AAED;;;;;;;;;GASG;AACH,wBAAgB,cAAc,CAC1B,KAAK,CAAC,KAAK,SAAS,SAAS,iBAAiB,EAAE,EAChD,KAAK,CAAC,EAAE,SAAS,sBAAsB,EACvC,EAAE,SAAS,iBAAiB,CAAC,UAAU,CAAC,EAAE,CAAC,CAAC,EAC9C,GAAG,EAAE,qBAAqB,CAAC,KAAK,EAAE,EAAE,EAAE,EAAE,CAAC,IAEnC,KAAK,CAAC,EAAE,SAAS,SAAS,iBAAiB,EAAE,GAAG,EAAE,EAClD,KAAK,CAAC,EAAE,SAAS,sBAAsB,GAAG,EAAE,SACxC,0BAA0B,CAAC,KAAK,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,KAAQ,0BAA0B,CAG9F"}
1
+ {"version":3,"file":"EntityTemplateBuilder.d.ts","sourceRoot":"","sources":["../../../../src/builders/behaviors/entities/EntityTemplateBuilder.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,0BAA0B,EAAE,iBAAiB,EAAqD,iBAAiB,EAAE,sBAAsB,EAAE,UAAU,EAAe,cAAc,EAAE,QAAQ,EAAE,MAAM,oDAAoD,CAAC;AAC3R,OAAO,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AAExD;;;;;GAKG;AACH,qBAAa,0BAA2B,SAAQ,qBAAqB;IACjE;;;;;OAKG;IACH,OAAO,CAAC,QAAQ,CAAC,WAAW,CAA6B;IAEzD;;;;;OAKG;IACH,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAwD;IAEjF;;;;;;OAMG;IACH,YAAa,GAAG,EAAE,cAAc,EAAE,IAAI,EAAE,QAAQ,EAsI/C;IAED;;;;;OAKG;IACI,UAAU,IAAI,MAAM,CAE1B;IAED;;;;;;;;;;;;;;OAcG;IACH,OAAO,CAAC,QAAQ;IAwBhB;;;;;;;;OAQG;IACH,OAAO,CAAC,IAAI;IAcZ;;;;;;;;;;;OAWG;IACH,OAAO,CAAC,QAAQ;IAMhB;;;;;;;;OAQG;IACH,OAAO,CAAC,SAAS;IAuBjB;;;;;;;;;;;;OAYG;IACH,OAAO,CAAC,cAAc;IAoCtB;;;;;;;OAOG;IACH,OAAO,CAAC,OAAO;IAaf;;;;;;;OAOG;IACH,OAAO,CAAC,KAAK;CAmDhB;AAED;;;;;;;;;GASG;AACH,wBAAgB,cAAc,CAC1B,KAAK,CAAC,KAAK,SAAS,SAAS,iBAAiB,EAAE,EAChD,KAAK,CAAC,EAAE,SAAS,sBAAsB,EACvC,EAAE,SAAS,iBAAiB,CAAC,UAAU,CAAC,EAAE,CAAC,CAAC,EAC9C,GAAG,EAAE,qBAAqB,CAAC,KAAK,EAAE,EAAE,EAAE,EAAE,CAAC,IAEnC,KAAK,CAAC,EAAE,SAAS,SAAS,iBAAiB,EAAE,GAAG,EAAE,EAClD,KAAK,CAAC,EAAE,SAAS,sBAAsB,GAAG,EAAE,SACxC,0BAA0B,CAAC,KAAK,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,KAAQ,0BAA0B,CAG9F"}
package/dist/index.js CHANGED
@@ -13485,7 +13485,7 @@ var FinalEntityBuilderTemplate = class extends BehaviorEntityBuilder {
13485
13485
  delete comps[id];
13486
13486
  }
13487
13487
  }
13488
- this.addUnique(comps, over.add?.components, `${where} add.components`, "components");
13488
+ this.addMerge(comps, over.add?.components, `${where} add.components`);
13489
13489
  const compsGroups = {};
13490
13490
  if (!over.clearAllData) {
13491
13491
  for (const id of Object.keys(over.componentsGroups ?? {})) {
@@ -13524,7 +13524,7 @@ var FinalEntityBuilderTemplate = class extends BehaviorEntityBuilder {
13524
13524
  }
13525
13525
  for (const [id, list] of Object.entries(over.add?.componentsGroups ?? {})) {
13526
13526
  compsGroups[id] ?? (compsGroups[id] = {});
13527
- this.addUnique(compsGroups[id], list, `${where} add.componentsGroups."${id}"`, `componentsGroups."${id}"`);
13527
+ this.addMerge(compsGroups[id], list, `${where} add.componentsGroups."${id}"`);
13528
13528
  }
13529
13529
  const baseEvents = over.clearAllData ? {} : this.patchMap(def.events, over.events, `${where} events`, BPEntityDefaultEventsNames);
13530
13530
  const events = { ...baseEvents };
@@ -13543,9 +13543,11 @@ var FinalEntityBuilderTemplate = class extends BehaviorEntityBuilder {
13543
13543
  }
13544
13544
  for (const [name, event] of Object.entries(over.add?.events ?? {})) {
13545
13545
  if (!over.clearAllData && name in events) {
13546
- throw new Error(`${where} add.events: el evento "${name}" ya existe en la plantilla base. Usa events para reemplazarlo de la plantilla base.`);
13546
+ const seq = (e) => Object.keys(e).length == 1 && Array.isArray(e.sequence) ? e.sequence : [e];
13547
+ events[name] = { sequence: [...seq(events[name]), ...seq(event)] };
13548
+ } else {
13549
+ events[name] = event;
13547
13550
  }
13548
- events[name] = event;
13549
13551
  }
13550
13552
  this.validateEvents(events, Object.keys(compsGroups), where, !def.id.startsWith("minecraft:"));
13551
13553
  this.setDefaultComponents(Object.values(comps));
@@ -13614,27 +13616,50 @@ var FinalEntityBuilderTemplate = class extends BehaviorEntityBuilder {
13614
13616
  return out;
13615
13617
  }
13616
13618
  /**
13617
- * Metodo auxiliar que agrega componentes a una lista de mapas objectivo garantizando que no existan previamente.
13618
- * @param {BPEntityComponentsMap} target Mapa destino donde se insertaran los nuevos componentes.
13619
- * @param {(readonly BPEntityComponent[] | undefined)} list Lista de componentes a incorporar.
13619
+ * Metodo auxiliar que agrega componentes a un mapa objectivo. Si el componente ya existe en el mapa, fusiona sus datos con los del nuevo en vez de reemplazarlo.
13620
+ * @param {BPEntityComponentsMap} target Mapa destiono a considerar.
13621
+ * @param {(readonly BPEntityComponent[] | undefined)} list Lista de componentes a incorporar.
13620
13622
  * @param {string} where Contexto u origen de la ejecucion para mensajes de error.
13621
- * @param {string} replaceWith Sugerencia del metodo o alternativa recomendada cuando ya existe la clave.
13622
13623
  * @returns {void}
13623
13624
  *
13624
- * @throws {Error} Marcara error si, algun componente de la lista colisiona con una clave existente en el parametro target.
13625
- * @throws {Error} Marcara error si, la lista contiene componente duplicados entre si.
13625
+ * @throws {Error} Marcara error si, la lista contiene componentes duplicados entre si.
13626
13626
  *
13627
- * @author HaJuegos - 01-10-2026
13627
+ * @author HaJuegos - 12-11-2026
13628
13628
  * @private
13629
13629
  */
13630
- addUnique(target, list, where, replaceWith) {
13630
+ addMerge(target, list, where) {
13631
13631
  for (const [id, comp] of Object.entries(this.byID(list, where))) {
13632
- if (id in target) {
13633
- throw new Error(`${where}: "${id}" ya existe. Usa ${replaceWith} para reemplazarlo.`);
13634
- }
13635
- target[id] = comp;
13632
+ target[id] = id in target ? this.mergeComp(target[id], comp) : comp;
13636
13633
  }
13637
13634
  }
13635
+ /**
13636
+ * Metodo auxiliar que fusiona dos componentes con el mismo ID en uno solo. Los objectos se mezclan de forma recursiva.
13637
+ * @param {BPEntityComponent} a Componente existente en la plantilla base.
13638
+ * @param {BPEntityComponent} b Componente nuevo con los datos adiccionales a fusionar.
13639
+ * @returns {BPEntityComponent} Devuelve un componente con el mismo ID cuyo build contiene los datos fusionados.
13640
+ * @returns {void}
13641
+ * @author HaJuegos - 12-11-2026
13642
+ * @private
13643
+ */
13644
+ mergeComp(a, b) {
13645
+ const id = a.idComp;
13646
+ const merge = (x, y) => {
13647
+ if (Array.isArray(x) && Array.isArray(y)) {
13648
+ return [...x, ...y];
13649
+ }
13650
+ ;
13651
+ if (x && y && typeof x == "object" && typeof y == "object" && !Array.isArray(x) && !Array.isArray(y)) {
13652
+ const out = { ...x };
13653
+ for (const k of Object.keys(y)) {
13654
+ out[k] = k in x ? merge(x[k], y[k]) : y[k];
13655
+ }
13656
+ ;
13657
+ return out;
13658
+ }
13659
+ return y;
13660
+ };
13661
+ return { idComp: id, build: () => ({ [id]: merge(a.build()[id], b.build()[id]) }) };
13662
+ }
13638
13663
  /**
13639
13664
  * Metodo auxiliar que examina de manera recursiva la estructura de eventos a verificar de los grupos de componentes existan y que no tengan duplicados.
13640
13665
  * @param {LooseEvents} events Estructura o mapa de eventos a analizar.
@@ -219619,34 +219644,90 @@ var PlayerEntity = createRPEntityClient({
219619
219644
  },
219620
219645
  scripts: {
219621
219646
  scale: "0.9375",
219647
+ variables: {
219648
+ "variable.fpMeleeSpearUseAttachableRotationZ": "public",
219649
+ "variable.tpMeleeSpearUseAttachableRotationZ": "public",
219650
+ "variable.fpMeleeSpearAttackAttachableRotationZ": "public",
219651
+ "variable.tpMeleeSpearAttackAttachablePositionZ": "public",
219652
+ "variable.attackTime": "public",
219653
+ "variable.itemUseNormalized": "public"
219654
+ },
219622
219655
  initialize: [
219623
219656
  `${MoLang.variable("is_holding_right")} = 0.0;`,
219624
219657
  `${MoLang.variable("is_blinking")} = 0.0;`,
219625
219658
  `${MoLang.variable("last_blink_time")} = 0.0;`,
219626
- `${MoLang.variable("hand_bob")} = 0.0;`
219659
+ `${MoLang.variable("hand_bob")} = 0.0;`,
219660
+ `${MoLang.variable("melee_spear_java_to_bedrock_scale")} = 40.0;`
219627
219661
  ],
219628
219662
  preAnimation: [
219629
219663
  `${MoLang.variable("helmet_layer_visible")} = !${MoLang.hasHeadGear()};`,
219630
219664
  `${MoLang.variable("leg_layer_visible")} = 1.0;`,
219631
219665
  `${MoLang.variable("boot_layer_visible")} = 1.0;`,
219632
219666
  `${MoLang.variable("chest_layer_visible")} = 1.0;`,
219633
- "variable.attack_body_rot_y = Math.sin(360*Math.sqrt(variable.attack_time)) * 5.0;",
219634
- `${MoLang.variable("tcos0")} = (${MoLang.cos(`${MoLang.modifiedDistanceMoved()} * 38.17`)} * ${MoLang.modifiedMoveSpeed()} / ${MoLang.variable("gliding_speed_value")}) * 57.3;`,
219635
- `${MoLang.variable("first_person_rotation_factor")} = ${MoLang.sin(`(1 - ${MoLang.variable("attack_time")}) * 180.0`)};`,
219667
+ `${MoLang.variable("attack_body_rot_y")} = Math.sin(360 * Math.sqrt(${MoLang.variable("attack_time")})) * 10.0;`,
219668
+ `${MoLang.variable("tcos0")} = ${MoLang.cos(`${MoLang.modifiedDistanceMoved()} * 38.17`)} * ${MoLang.modifiedMoveSpeed()} / ${MoLang.variable("gliding_speed_value")} * 57.3;`,
219669
+ `${MoLang.variable("first_person_item_rotation_factor")} = ${MoLang.sin(`(1 - ${MoLang.variable("attack_time")}) * 180.0`)};`,
219636
219670
  `${MoLang.variable("hand_bob")} = ${MoLang.lifeTime()} < 0.01 ? 0.0 : ${MoLang.variable("hand_bob")} + ((${MoLang.isOnGround()} && ${MoLang.isAlive()} ? ${MoLang.max(0, MoLang.min(MoLang.sqrt(`${MoLang.pow(MoLang.positionDelta(0), 2)} + ${MoLang.pow(MoLang.positionDelta(2), 2)}`), 0.1))} : 0.0) - ${MoLang.variable("hand_bob")}) * 0.02;`,
219637
219671
  `${MoLang.variable("map_angle")} = ${MoLang.max(0, MoLang.min(`1 - ${MoLang.variable("player_x_rotation")} / 45.1`, 1))};`,
219672
+ `${MoLang.variable("item_use_duration")} = ${MoLang.mainHandItemUseDuration()} > 0.0 ? (${MoLang.mainHandItemMaxDuration()} - (${MoLang.mainHandItemUseDuration()} - ${MoLang.frameAlpha()} + 1.0)) : 0.0;`,
219638
219673
  `${MoLang.variable("item_use_normalized")} = ${MoLang.mainHandItemUseDuration()} / ${MoLang.mainHandItemMaxDuration()};`,
219639
- `${MoLang.variable("riding_y_offset")} = ${MoLang.isRidingAnyEntityOfType("minecraft:minecart", "minecraft:boat", "minecraft:chest_boat", "minecraft:strider")} ? -3.0 : 0.0;`
219674
+ `${MoLang.variable("riding_y_offset")} = ${MoLang.isRidingAnyEntityOfType("minecraft:minecart", "minecraft:boat", "minecraft:chest_boat", "minecraft:strider")} ? -3.0 : 0.0;`,
219675
+ `${MoLang.variable("melee_spear_equipped")} = ${MoLang.equippedItemAnyTag("slot.weapon.mainhand", "minecraft:is_spear")};`,
219676
+ `${MoLang.variable("tp_melee_spear_base_arm_rotation_x")} = (${MoLang.isSwimming()} || ${MoLang.isGliding()}) ? (-115.0 - ${MoLang.targetXRotation()}) : (${MoLang.isCrawling()} ? -115.0 : -30.0);`,
219677
+ [
219678
+ `(${MoLang.variable("melee_spear_equipped")}) ? {`,
219679
+ `${MoLang.temp("melee_spear_use_finish_raise_tick")} = ${MoLang.kineticWeaponDelay()};`,
219680
+ `t.melee_spear_use_finish_sway_tick = t.melee_spear_use_finish_raise_tick + ${MoLang.kineticWeaponDismountDuration()};`,
219681
+ "t.melee_spear_use_start_sway_tick = t.melee_spear_use_finish_sway_tick - 20.0;",
219682
+ `t.melee_spear_use_finish_lower_tick = t.melee_spear_use_finish_raise_tick + ${MoLang.kineticWeaponKnockbackDuration()};`,
219683
+ "t.melee_spear_use_start_lower_tick = t.melee_spear_use_finish_lower_tick - 40.0;",
219684
+ `t.melee_spear_use_finish_raise_back_tick = t.melee_spear_use_finish_raise_tick + ${MoLang.kineticWeaponDamageDuration()};`,
219685
+ "t.melee_spear_use_start_raise_back_tick = t.melee_spear_use_finish_raise_back_tick - 5.0;",
219686
+ "t.melee_spear_use_raise_progress = math.clamp(math.inverse_lerp(0.0, t.melee_spear_use_finish_raise_tick, v.item_use_duration), 0.0, 1.0);",
219687
+ "t.melee_spear_use_raise_progress_start = math.clamp(math.inverse_lerp(0.0, 0.5, t.melee_spear_use_raise_progress), 0.0, 1.0);",
219688
+ "t.melee_spear_use_raise_progress_middle = math.clamp(math.inverse_lerp(0.5, 0.8, t.melee_spear_use_raise_progress), 0.0, 1.0);",
219689
+ "t.melee_spear_use_raise_progress_end = math.clamp(math.inverse_lerp(0.8, 1.0, t.melee_spear_use_raise_progress), 0.0, 1.0);",
219690
+ "t.melee_spear_use_sway_progress = math.clamp(math.inverse_lerp(t.melee_spear_use_start_sway_tick, t.melee_spear_use_finish_sway_tick, v.item_use_duration), 0.0, 1.0);",
219691
+ "t.melee_spear_use_lower_progress = math.ease_in_out_elastic(0.0, 1.0, math.clamp(math.inverse_lerp(t.melee_spear_use_start_lower_tick, t.melee_spear_use_finish_lower_tick, v.item_use_duration - 20.0), 0.0, 1.0));",
219692
+ "t.melee_spear_use_raise_back_progress = math.clamp(math.inverse_lerp(t.melee_spear_use_start_raise_back_tick, t.melee_spear_use_finish_raise_back_tick, v.item_use_duration), 0.0, 1.0);",
219693
+ "t.melee_spear_use_sway_intensity = math.ease_out_circ(0.0, 2.0, t.melee_spear_use_sway_progress) + math.ease_in_circ(0.0, -2.0, t.melee_spear_use_raise_back_progress);",
219694
+ "t.melee_spear_use_sway_scale_slow = math.sin(v.item_use_duration * 19.0) * t.melee_spear_use_sway_intensity;",
219695
+ "t.melee_spear_use_sway_scale_fast = math.sin(v.item_use_duration * 30.0) * t.melee_spear_use_sway_intensity;",
219696
+ "v.fp_melee_spear_use_item_position_x = (t.melee_spear_use_raise_progress_start * 0.05 + t.melee_spear_use_raise_progress_end * -0.05 + t.melee_spear_use_sway_scale_slow * 0.005) * v.melee_spear_java_to_bedrock_scale;",
219697
+ "v.fp_melee_spear_use_item_position_y = (t.melee_spear_use_raise_progress_start * -0.075 + t.melee_spear_use_raise_progress_middle * 0.075 + t.melee_spear_use_sway_scale_fast * 0.01) * v.melee_spear_java_to_bedrock_scale;",
219698
+ "v.fp_melee_spear_use_item_position_z = (t.melee_spear_use_raise_progress_start * 0.05 + t.melee_spear_use_raise_progress_end * -0.05 + t.melee_spear_use_sway_scale_slow * 0.005) * v.melee_spear_java_to_bedrock_scale;",
219699
+ "v.fp_melee_spear_use_item_rotation_y = t.melee_spear_use_raise_progress * 20.0 + t.melee_spear_use_lower_progress * 20.0 + t.melee_spear_use_sway_scale_slow * 0.5 + t.melee_spear_use_raise_back_progress * -40.0;",
219700
+ "v.fp_melee_spear_use_item_rotation_z = math.ease_in_out_back(0.0, -60.0, t.melee_spear_use_raise_progress) + t.melee_spear_use_lower_progress * -25.0 + t.melee_spear_use_raise_back_progress * 85.0 + t.melee_spear_use_sway_scale_fast * 0.5;",
219701
+ "v.fp_melee_spear_use_attachable_rotation_z = math.clamp(math.inverse_lerp(0.5, 0.55, t.melee_spear_use_raise_progress), 0.0, 1.0) * -50.0 + t.melee_spear_use_sway_progress * 90.0 + t.melee_spear_use_raise_back_progress * -40.0;",
219702
+ "v.tp_melee_spear_use_arm_rotation_x = t.melee_spear_use_raise_progress_start * -40.0 + t.melee_spear_use_raise_progress_middle * 30.0 + t.melee_spear_use_raise_progress_end * -20.0 + t.melee_spear_use_lower_progress * 20.0 + t.melee_spear_use_raise_back_progress * 10.0;",
219703
+ "v.tp_melee_spear_use_arm_rotation_x = v.tp_melee_spear_use_arm_rotation_x + t.melee_spear_use_sway_scale_slow * 0.6;",
219704
+ "v.tp_melee_spear_use_arm_rotation_y = t.melee_spear_use_sway_scale_fast * 1.0;",
219705
+ "v.tp_melee_spear_use_arm_rotation_z = t.melee_spear_use_sway_scale_slow * 0.5;",
219706
+ "v.tp_melee_spear_use_item_rotation_x = t.melee_spear_use_raise_progress * 60.0 + t.melee_spear_use_raise_back_progress * -60.0;",
219707
+ "v.tp_melee_spear_use_attachable_rotation_z = t.melee_spear_use_raise_progress * 90.0 + t.melee_spear_use_sway_progress * -90.0;",
219708
+ `t.melee_spear_attack_duration_ratio = 1.0 / ${MoLang.baseSwingDuration()};`,
219709
+ "t.melee_spear_attack_raise_end = 0.05 * t.melee_spear_attack_duration_ratio;",
219710
+ "t.melee_spear_attack_thrust_end = 0.2 * t.melee_spear_attack_duration_ratio;",
219711
+ "t.melee_spear_attack_recover_start = 1.0 - (0.6 * t.melee_spear_attack_duration_ratio);",
219712
+ "t.melee_spear_attack_raise_progress = math.clamp(math.inverse_lerp(0.0, t.melee_spear_attack_raise_end, v.attack_time), 0.0, 1.0);",
219713
+ "t.melee_spear_attack_thrust_progress = math.clamp(math.inverse_lerp(t.melee_spear_attack_raise_end, t.melee_spear_attack_thrust_end, v.attack_time), 0.0, 1.0);",
219714
+ "t.melee_spear_attack_recover_progress = math.clamp(math.inverse_lerp(t.melee_spear_attack_recover_start, 1.0, v.attack_time), 0.0, 1.0);",
219715
+ "t.melee_spear_attack_raise_scale = math.ease_in_out_sine(0.0, 1.0, t.melee_spear_attack_raise_progress);",
219716
+ "t.melee_spear_attack_thrust_scale = math.ease_in_quad(0.0, 1.0, t.melee_spear_attack_thrust_progress);",
219717
+ "t.melee_spear_attack_recover_scale = math.ease_in_out_expo(0.0, 1.0, t.melee_spear_attack_recover_progress);",
219718
+ "v.fp_melee_spear_attack_item_position_x = (t.melee_spear_attack_raise_scale * 0.1 + t.melee_spear_attack_thrust_scale * -0.1) * v.melee_spear_java_to_bedrock_scale;",
219719
+ "v.fp_melee_spear_attack_item_position_y = (t.melee_spear_attack_raise_scale * -0.075 + t.melee_spear_attack_recover_scale * 0.075) * v.melee_spear_java_to_bedrock_scale;",
219720
+ "v.fp_melee_spear_attack_item_position_z = (t.melee_spear_attack_raise_scale * 0.65 + t.melee_spear_attack_thrust_scale * -0.65) * v.melee_spear_java_to_bedrock_scale;",
219721
+ "v.fp_melee_spear_attack_item_rotation_y = t.melee_spear_attack_raise_scale * 20.0 + t.melee_spear_attack_recover_scale * -20.0;",
219722
+ "v.fp_melee_spear_attack_item_rotation_z = t.melee_spear_attack_raise_scale * -60.0 + t.melee_spear_attack_recover_scale * 60.0;",
219723
+ "v.fp_melee_spear_attack_attachable_rotation_z = t.melee_spear_attack_raise_scale * 40.0 + t.melee_spear_attack_recover_scale * -40.0;",
219724
+ "v.tp_melee_spear_attack_arm_rotation_x = t.melee_spear_attack_raise_scale * 90.0 + t.melee_spear_attack_thrust_scale * -120.0 + t.melee_spear_attack_recover_scale * 30.0;",
219725
+ "v.tp_melee_spear_attack_item_rotation_x = t.melee_spear_attack_thrust_scale * 60.0 + t.melee_spear_attack_recover_scale * -60.0;",
219726
+ "v.tp_melee_spear_attack_attachable_position_z = (t.melee_spear_attack_thrust_scale * -0.15 + t.melee_spear_attack_recover_scale * 0.15) * v.melee_spear_java_to_bedrock_scale;",
219727
+ "};"
219728
+ ].join(" ")
219640
219729
  ],
219641
219730
  animate: ["root"],
219642
- variables: {
219643
- "variable.fpMeleeSpearUseAttachableRotationZ": "public",
219644
- "variable.tpMeleeSpearUseAttachableRotationZ": "public",
219645
- "variable.fpMeleeSpearAttackAttachableRotationZ": "public",
219646
- "variable.tpMeleeSpearAttackAttachablePositionZ": "public",
219647
- "variable.attackTime": "public",
219648
- "variable.itemUseNormalized": "public"
219649
- },
219650
219731
  shouldUpdateEffectsOffscreen: "1.0"
219651
219732
  },
219652
219733
  animations: {
@@ -219664,11 +219745,18 @@ var PlayerEntity = createRPEntityClient({
219664
219745
  "move.arms": "animation.player.move.arms",
219665
219746
  "move.legs": "animation.player.move.legs",
219666
219747
  swimming: "animation.player.swim",
219748
+ "swimming.no_right_arm": "animation.player.swim.no_right_arm",
219667
219749
  "swimming.legs": "animation.player.swim.legs",
219750
+ crawling: "animation.player.crawl",
219751
+ "crawling.no_right_arm": "animation.player.crawl.no_right_arm",
219752
+ "crawling.legs": "animation.player.crawl.legs",
219753
+ "riding.root": "animation.player.riding.root",
219668
219754
  "riding.arms": "animation.player.riding.arms",
219669
219755
  "riding.legs": "animation.player.riding.legs",
219670
219756
  holding: "animation.player.holding",
219757
+ holding_heavy_core: "animation.player.holding_heavy_core",
219671
219758
  brandish_spear: "animation.humanoid.brandish_spear",
219759
+ holding_spyglass: "animation.humanoid.holding_spyglass",
219672
219760
  charging: "animation.humanoid.charging",
219673
219761
  "attack.positions": "animation.player.attack.positions",
219674
219762
  "attack.rotations": "animation.player.attack.rotations",
@@ -219682,9 +219770,9 @@ var PlayerEntity = createRPEntityClient({
219682
219770
  first_person_base_pose: "animation.player.first_person.base_pose",
219683
219771
  first_person_empty_hand: "animation.player.first_person.empty_hand",
219684
219772
  first_person_swap_item: "animation.player.first_person.swap_item",
219773
+ first_person_shield_block: "animation.player.first_person.shield_block",
219685
219774
  first_person_attack_controller: "controller.animation.player.first_person_attack",
219686
219775
  first_person_attack_rotation: "animation.player.first_person.attack_rotation",
219687
- first_person_attack_rotation_item: "animation.player.first_person.attack_rotation_item",
219688
219776
  first_person_vr_attack_rotation: "animation.player.first_person.vr_attack_rotation",
219689
219777
  first_person_walk: "animation.player.first_person.walk",
219690
219778
  first_person_map_controller: "controller.animation.player.first_person_map",
@@ -219697,23 +219785,7 @@ var PlayerEntity = createRPEntityClient({
219697
219785
  first_person_breathing_bob: "animation.player.first_person.breathing_bob",
219698
219786
  third_person_crossbow_equipped: "animation.player.crossbow_equipped",
219699
219787
  third_person_bow_equipped: "animation.player.bow_equipped",
219700
- crossbow_hold: "animation.player.crossbow_hold",
219701
- crossbow_controller: "controller.animation.player.crossbow",
219702
- shield_block_main_hand: "animation.player.shield_block_main_hand",
219703
- shield_block_off_hand: "animation.player.shield_block_off_hand",
219704
- blink: "controller.animation.persona.blink",
219705
219788
  fishing_rod: "animation.humanoid.fishing_rod",
219706
- holding_spyglass: "animation.humanoid.holding_spyglass",
219707
- first_person_shield_block: "animation.player.first_person.shield_block",
219708
- tooting_goat_horn: "animation.humanoid.tooting_goat_horn",
219709
- holding_brush: "animation.humanoid.holding_brush",
219710
- brushing: "animation.humanoid.brushing",
219711
- crawling: "animation.player.crawl",
219712
- "crawling.legs": "animation.player.crawl.legs",
219713
- "swimming.no_right_arm": "animation.player.swim.no_right_arm",
219714
- "crawling.no_right_arm": "animation.player.crawl.no_right_arm",
219715
- "riding.root": "animation.player.riding.root",
219716
- holding_heavy_core: "animation.player.holding_heavy_core",
219717
219789
  first_person_melee_spear_use: "animation.player.first_person.melee_spear_use",
219718
219790
  first_person_melee_spear_hold: "animation.player.first_person.melee_spear_hold",
219719
219791
  first_person_melee_spear_attack: "animation.player.first_person.melee_spear_attack",
@@ -219721,7 +219793,15 @@ var PlayerEntity = createRPEntityClient({
219721
219793
  third_person_melee_spear_use: "animation.humanoid.melee_spear_use",
219722
219794
  third_person_melee_spear_hold: "animation.humanoid.melee_spear_hold",
219723
219795
  third_person_melee_spear_attack: "animation.player.melee_spear_attack",
219724
- third_person_melee_spear_controller: "controller.animation.player.melee_spear"
219796
+ third_person_melee_spear_controller: "controller.animation.player.melee_spear",
219797
+ crossbow_hold: "animation.player.crossbow_hold",
219798
+ crossbow_controller: "controller.animation.player.crossbow",
219799
+ shield_block_main_hand: "animation.player.shield_block_main_hand",
219800
+ shield_block_off_hand: "animation.player.shield_block_off_hand",
219801
+ blink: "controller.animation.persona.blink",
219802
+ tooting_goat_horn: "animation.humanoid.tooting_goat_horn",
219803
+ holding_brush: "animation.humanoid.holding_brush",
219804
+ brushing: "animation.humanoid.brushing"
219725
219805
  },
219726
219806
  renderControllers: [
219727
219807
  {