From 2a66515e0d12a8a243d29add3e880cb4def7c1d7 Mon Sep 17 00:00:00 2001 From: Jayly <65847850+JaylyDev@users.noreply.github.com> Date: Sat, 1 Jun 2024 19:55:02 +0100 Subject: [PATCH] Add 9 bedrock capes to terminator --- assets/behavior_pack/entities/terminator.json | 9 +++++ assets/resource_pack/attachables/elytra.json | 20 +++++++--- .../entity/terminator.entity.json | 15 +++++-- .../cape.render_controllers.json | 29 ++++++++++---- .../elytra.render_controllers.json | 37 +++++++++++++++--- .../textures/entity/cape_15th_anniv.png | Bin 0 -> 1038 bytes .../textures/entity/cape_cherry.png | Bin 0 -> 694 bytes .../textures/entity/cape_founder.png | Bin 0 -> 364 bytes .../{cape_custom.png => cape_migrator.png} | Bin .../textures/entity/cape_mojang_new.png | Bin 0 -> 808 bytes .../textures/entity/cape_pan.png | Bin 0 -> 481 bytes .../textures/entity/cape_pride.png | Bin 0 -> 5711 bytes .../textures/entity/cape_tiktok.png | Bin 0 -> 926 bytes .../textures/entity/cape_twitch.png | Bin 0 -> 1253 bytes .../textures/entity/cape_vanilla.png | Bin 0 -> 616 bytes .../terminator => skins}/alex_default.pdn | Bin .../entity/terminator => skins}/alex_xmas.pdn | Bin .../terminator => skins}/steve_default.pdn | Bin .../terminator => skins}/steve_xmas.pdn | Bin src/commands/index.ts | 12 ++++-- src/commands/summon.ts | 9 ++++- src/terminator/capeVariant.ts | 27 +++++++++++++ src/terminator/ridingTransport.ts | 37 ++++-------------- 23 files changed, 141 insertions(+), 54 deletions(-) create mode 100644 assets/resource_pack/textures/entity/cape_15th_anniv.png create mode 100644 assets/resource_pack/textures/entity/cape_cherry.png create mode 100644 assets/resource_pack/textures/entity/cape_founder.png rename assets/resource_pack/textures/entity/{cape_custom.png => cape_migrator.png} (100%) create mode 100644 assets/resource_pack/textures/entity/cape_mojang_new.png create mode 100644 assets/resource_pack/textures/entity/cape_pan.png create mode 100644 assets/resource_pack/textures/entity/cape_pride.png create mode 100644 assets/resource_pack/textures/entity/cape_tiktok.png create mode 100644 assets/resource_pack/textures/entity/cape_twitch.png create mode 100644 assets/resource_pack/textures/entity/cape_vanilla.png rename assets/{resource_pack/textures/entity/terminator => skins}/alex_default.pdn (100%) rename assets/{resource_pack/textures/entity/terminator => skins}/alex_xmas.pdn (100%) rename assets/{resource_pack/textures/entity/terminator => skins}/steve_default.pdn (100%) rename assets/{resource_pack/textures/entity/terminator => skins}/steve_xmas.pdn (100%) create mode 100644 src/terminator/capeVariant.ts diff --git a/assets/behavior_pack/entities/terminator.json b/assets/behavior_pack/entities/terminator.json index b147104..a54d71b 100644 --- a/assets/behavior_pack/entities/terminator.json +++ b/assets/behavior_pack/entities/terminator.json @@ -45,6 +45,12 @@ "client_sync": true, "type": "bool", "default": false + }, + "terminator:cape": { + "client_sync": true, + "type": "int", + "default": 0, + "range": [0, 10] } } }, @@ -2594,6 +2600,9 @@ "minecraft:melee_attack", "terminator:break_blocks.v2" ] + }, + "set_property": { + "terminator:cape": "math.random_integer(0, 10)" } }, "minecraft:gain_bad_omen": { diff --git a/assets/resource_pack/attachables/elytra.json b/assets/resource_pack/attachables/elytra.json index afc0566..5492c8a 100644 --- a/assets/resource_pack/attachables/elytra.json +++ b/assets/resource_pack/attachables/elytra.json @@ -9,8 +9,18 @@ }, "textures": { "default": "textures/models/armor/elytra", - "cape": "textures/cape_custom", - "enchanted": "textures/misc/enchanted_item_glint" + "enchanted": "textures/misc/enchanted_item_glint", + "cape": "textures/entity/cape_invisible", + "cape_15th_anniv": "textures/entity/cape_15th_anniv", + "cape_cherry": "textures/entity/cape_cherry", + "cape_founder": "textures/entity/cape_founder", + "cape_migrator": "textures/entity/cape_migrator", + "cape_mojang_new": "textures/entity/cape_mojang_new", + "cape_pan": "textures/entity/cape_pan", + "cape_pride": "textures/entity/cape_pride", + "cape_tiktok": "textures/entity/cape_tiktok", + "cape_twitch": "textures/entity/cape_twitch", + "cape_vanilla": "textures/entity/cape_vanilla" }, "geometry": { "default": "geometry.elytra" @@ -25,11 +35,9 @@ }, "scripts": { "parent_setup": "variable.chest_layer_visible = 0.0;", - "animate": [ - "default_controller" - ] + "animate": ["default_controller"] }, - "render_controllers": [ "controller.render.elytra" ] + "render_controllers": ["controller.render.terminator.elytra"] } } } diff --git a/assets/resource_pack/entity/terminator.entity.json b/assets/resource_pack/entity/terminator.entity.json index 5b5dcea..c3d4031 100644 --- a/assets/resource_pack/entity/terminator.entity.json +++ b/assets/resource_pack/entity/terminator.entity.json @@ -22,8 +22,17 @@ "alex_xmas": "textures/entity/terminator/alex_xmas", "custom": "textures/entity/steve", "customSlim": "textures/entity/alex", - "cape_default": "textures/entity/cape_invisible", - "cape": "textures/entity/cape_custom" + "cape": "textures/entity/cape_invisible", + "cape_15th_anniv": "textures/entity/cape_15th_anniv", + "cape_cherry": "textures/entity/cape_cherry", + "cape_founder": "textures/entity/cape_founder", + "cape_migrator": "textures/entity/cape_migrator", + "cape_mojang_new": "textures/entity/cape_mojang_new", + "cape_pan": "textures/entity/cape_pan", + "cape_pride": "textures/entity/cape_pride", + "cape_tiktok": "textures/entity/cape_tiktok", + "cape_twitch": "textures/entity/cape_twitch", + "cape_vanilla": "textures/entity/cape_vanilla" }, "geometry": { "default": "geometry.terminator", @@ -127,7 +136,7 @@ }, "render_controllers": [ "controller.render.terminator", - "controller.render.player.cape" + "controller.render.terminator.cape" ], "enable_attachables": true } diff --git a/assets/resource_pack/render_controllers/cape.render_controllers.json b/assets/resource_pack/render_controllers/cape.render_controllers.json index 296e2d2..09a5595 100644 --- a/assets/resource_pack/render_controllers/cape.render_controllers.json +++ b/assets/resource_pack/render_controllers/cape.render_controllers.json @@ -1,13 +1,28 @@ { "format_version": "1.10.0", "render_controllers": { - "controller.render.player.cape": { + "controller.render.terminator.cape": { + "arrays": { + "textures": { + "Array.capes": [ + "Texture.cape", + "Texture.cape_15th_anniv", + "Texture.cape_cherry", + "Texture.cape_founder", + "Texture.cape_migrator", + "Texture.cape_mojang_new", + "Texture.cape_pan", + "Texture.cape_pride", + "Texture.cape_tiktok", + "Texture.cape_twitch", + "Texture.cape_vanilla" + ] + } + }, "geometry": "Geometry.cape", - "materials": [ { "*": "Material.cape" } ], - "textures": [ "Texture.cape" ], - "part_visibility": [ - { "cape": "query.armor_texture_slot(1) != 5" } - ] + "materials": [{ "*": "Material.cape" }], + "textures": ["Array.capes[query.property('terminator:cape')]"], + "part_visibility": [{ "cape": "query.armor_texture_slot(1) != 5" }] } } -} \ No newline at end of file +} diff --git a/assets/resource_pack/render_controllers/elytra.render_controllers.json b/assets/resource_pack/render_controllers/elytra.render_controllers.json index 062748f..9f90d82 100644 --- a/assets/resource_pack/render_controllers/elytra.render_controllers.json +++ b/assets/resource_pack/render_controllers/elytra.render_controllers.json @@ -1,13 +1,40 @@ { "format_version": "1.8.0", "render_controllers": { - "controller.render.elytra": { + "controller.render.terminator.elytra": { "geometry": "Geometry.default", - "materials": [ { "*": "variable.is_enchanted ? Material.enchanted : Material.default" } ], - "textures": [ "Texture.default", "Texture.cape", "Texture.enchanted" ], + "arrays": { + "textures": { + "Array.capes": [ + "Texture.cape", + "Texture.cape_15th_anniv", + "Texture.cape_cherry", + "Texture.cape_founder", + "Texture.cape_migrator", + "Texture.cape_mojang_new", + "Texture.cape_pan", + "Texture.cape_pride", + "Texture.cape_tiktok", + "Texture.cape_twitch", + "Texture.cape_vanilla" + ] + } + }, + "materials": [ + { "*": "variable.is_enchanted ? Material.enchanted : Material.default" } + ], + "textures": [ + "Texture.default", + "Array.capes[(query.has_property('terminator:cape') ? query.property('terminator:cape') : 0)]", + "Texture.enchanted" + ], "part_visibility": [ - { "cape": "query.armor_texture_slot(1) == 5 && query.has_cape" }, - { "default": "query.armor_texture_slot(1) == 5 && !query.has_cape" } + { + "cape": "query.armor_texture_slot(1) == 5 && (query.has_cape || query.property('terminator:cape') != 0)" + }, + { + "default": "query.armor_texture_slot(1) == 5 && (!query.has_cape || query.property('terminator:cape') == 0)" + } ] } } diff --git a/assets/resource_pack/textures/entity/cape_15th_anniv.png b/assets/resource_pack/textures/entity/cape_15th_anniv.png new file mode 100644 index 0000000000000000000000000000000000000000..c9e0299ae75bd99c428cb01465acc4a0a9165a17 GIT binary patch literal 1038 zcmV+p1o8WcP)Px&$Vo&&RA@u(mrZCBK@`U)2ns^#2LX+iL=X5R0;_n(Q2F~*L(+^M{I@qvAv_>OK)Te5l~YudbqVGbJ2!?;mDc52*ZXvkpj zMy5}}aF@H^^fzX0o0;bdoU2pd+{&e1HZ_~loW#c%M-$)0BS|xM*a`0nvS_6Z~e|j||6#y9{5TbFcjfTKn+Vsd2P*a-|Cb^LQsl*KXocLBS zwU_x9F|Xgl?hnLRCh@D_I&S}bHu*4ZX~P5{l}>QmzvmX@tkKtS&5}(sFf;&|3m_#$}g+20*OuhLDeMf}BMk@1Yf?06^&v7yyAxcpV*gCIg@W z6op%dqYRO44Xx!vLy`A9)jO{QwLn1woGJnA1wxDl;X`X{YUaz62;gL}lgwU6%1H1&N_91e}0pTpXpcoxEZD8mk6s^T^+7MAO}+gxl2rl_$7F1p`2v40Pw1oV?hO>B*jLBY zt1$o|D96HK4S<*lvUGrJfCxaWd5U~jdk5cy2!Na>0Q%A>767t<#O}hr2wxXkB$fom zWR*dd2I$jIzo=dV00EBEu_=}aw4<0a8vrQM06?eG^8r;1(Z{-0{%~c9ny#Y(z@ijs zN2H0`3(6@E~KnLhTl@~nH0DLcI5dlC}K_kju17rXwg$>6v zpcI>zu|^eu42qR(qnZJg96cF(uV#P@ij{1mngNv@JsErd14(;M1&07*qo IM6N<$g2p@0)c^nh literal 0 HcmV?d00001 diff --git a/assets/resource_pack/textures/entity/cape_cherry.png b/assets/resource_pack/textures/entity/cape_cherry.png new file mode 100644 index 0000000000000000000000000000000000000000..647fbd99ee74765ed431fdaf38266c52b496b8c7 GIT binary patch literal 694 zcmV;n0!jUeP)yRl$-k^_=DXSmHZ_uacY9zC_)Jp^i&?F#PG}$rC z4%CqpBgvFZp$4iCFhp6uNZs-7cnkpEmyaA4Ts_>_$l!hd%xrY}y5`(0&BgWSSF5?Y z!rqsU++U1v*uFIi{l!R*ZM1Cpt(6l#t$y@sXdUdh*>M11PcPE2tA`t~G{@oh7Jx8_ z-_F%b7FydVAWlVLUk>tVz;Ea3Ce6X8VQJTO+Gt(DSI^uws@mYufJFf?n~0kv1ABTY z30az}yo>_%phnvkbBD>HbUkd}z*o;!wW1ZuRrR4^BrB= z^`nZKq+k0&MnK6BiiBd!r=f7r`n9Y{vU=?q=tfK9XOmJLa)tjPTy?{eOoTWf41*Tl zx`r^coj=Ol@nRhY;JDfGwgt8ck59w$2iF)ze9)TIrBPcbvZ^A@Au0v*1*-D8>E8C) z3H-%K?7nGqPsRg)C#(D2xO$-?uUQm`pQW}Fvq|qeZlW5YG;cfw^w77_vM2!i!dmC* zakJxf$0(nMas#@|U4=(G+nBrBGg~c>_b$G#1R3vgZjZ-%F=186-Cv8V_N-RhQ@-kv z=i-Pp@c<*F$$lTOviSm?+EZt zOa48w4e#1tG;om)ps3XQ0jevmop6y303a(rIf0CK-Cta+11JhgeLxS*)xf~Oz`(%3 cz`*~?UlFuNENN?JJpcdz07*qoM6N<$f?RD=%>V!Z literal 0 HcmV?d00001 diff --git a/assets/resource_pack/textures/entity/cape_founder.png b/assets/resource_pack/textures/entity/cape_founder.png new file mode 100644 index 0000000000000000000000000000000000000000..21d8da55e75133d1a2cb125c01a17c447bd3aa7c GIT binary patch literal 364 zcmV-y0h9iTP)^g5CyvzsRlvz6J*JuJO}Pe`p(cbO&H&kKro-0000< KMNUMnLSTaDppM-D literal 0 HcmV?d00001 diff --git a/assets/resource_pack/textures/entity/cape_custom.png b/assets/resource_pack/textures/entity/cape_migrator.png similarity index 100% rename from assets/resource_pack/textures/entity/cape_custom.png rename to assets/resource_pack/textures/entity/cape_migrator.png diff --git a/assets/resource_pack/textures/entity/cape_mojang_new.png b/assets/resource_pack/textures/entity/cape_mojang_new.png new file mode 100644 index 0000000000000000000000000000000000000000..4847f1dcf1824881e606f37f1befd6c9e7ff1840 GIT binary patch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+^af2nwELlI z`=A`pv%#llo36jJ!lzVUX&X`Aa=2nlXiSP_S#G~i%uA}qX}roDGaa&@tD6mD!M)k| zJ!<;_>zr#$2eq!g+}4&-?IeHs)3VSU$LeFagCwjFQ~!F$b>LD#Y4xq;qm$HS&Kt@O z482!0NH>zbZ*B~XEjrJA+Gp;)$cduH!PJo|k8h$b1=`Fej#Q1zb}Y+Xcg7@PiotUH zg_^l*j<-@VH0kWjDny@FDQlA-{kmsGLiHZUPw#I>PdNtK2Q68dk#+pn z+0~my565SHZ_RuC+m0`a zuGFUcPC1~BeV88`nsd}DC8}^*i${6o5c?U*n7TK5f*;kll75)+O)*#%ylQLqRx|IU zJ0~6lq#eyOOp^TUP*PtWX(HWPEWcgAIv6nb(EJ%o>Yd^1N5&V+2X9swY!?@ed27D; S*>2;%eEq!x#RZ;om;M`F0BS1$ literal 0 HcmV?d00001 diff --git a/assets/resource_pack/textures/entity/cape_tiktok.png b/assets/resource_pack/textures/entity/cape_tiktok.png new file mode 100644 index 0000000000000000000000000000000000000000..a420dcac19e718e83c2dea8c41476a885a820ca4 GIT binary patch literal 926 zcmV;P17ZA$P){SqLn#Go?N9;iH`@XLs`X9B z?`@z=sw=2Cj(xdUYg0xT5{`k*IW#^26Kgf>?YGcu9bf@>aP#pTcK4cSwL7SHDqTVG zt8>mLEUBJQSZm>&gE1y$&Y_T(f211@gw?_7ky3W4Wn4JP>`gP}V$d@1nmSosK?P?@ z*lvFVaN)uz0P|+jFA_q)7z5{=uTkbIPKgstL?e4lKT=&_Vy)&|5CBY_uA|r4I%;&d7}z#g1|*PmQunP6SNF`0+J`UQhb6( zFJJlV?54OwD5VfZQL09nP%TSJ2_i~;Z%9%KI9XjmxipQh>JR?yY+-h$vvjMT8)g z%492(Qumk(?l%zF7JP4QYYP8X=wH(ip$ zc-fVT1y?E-T)8yuLOvOWv(pU0+tsA#kv1=cYT#-0zi$p>ZD72|b+Db;fA|d{SmWqfYB1vO6@Go!;pq}|qD4be} zwBo{>F36X5)JiO9ytw|wzl`XXqp#VBjxhfx?iE*=nuFf$63cYLY8sQAie_8HLYI`K>`$ zMtAJ}=#D^?$q|LcC-;o3|a>Y@0N)aJp1RH{)L`7&%$S zWhZ0A=u9SAZP&Vls8mu3(%{VS*&Y3l`hI(6vfM8^io~e5jt!y|+`8?z4Au(%ob%b( ztkY;Ds}0F&XR~5_983H7aXO*k4FBWS&9?W`LK`E=?BZ;JwT(KbOJ$6L;h{3Ig~2xl znY>Yu!CJz_84pQia8)3mPeP;<9&FZk^q(e3r|2k>kN)O7e0sIO!!>#Ft-pL$*Xw+8 zwLlz8jJI1^Yb7LhdqyV&0Zh&oc(7T2V#Uu4pXICfZE9hlT@Bx8Dn52iJmJ{DAeHL{ zayj_^LmA_;u`yzJ5XdB9n1n%VKk*+Mo2PMiae;hZ^2pe=Ldz4#wI*e|Ze2SKtYsazKkUVrmMIu`Fj zS4Vutj{B|M-P%UIRmQ$KFDp9!bAjrJ&%}^VW!P_J{Ox-J=M7N=V<-IfZ`&iz!@fNy z?c{8s6%xC1L#OCsuSaZUA7HI0?&5j#pE}0C#E_3xQ0(#0O8StvzRM$VEYCWvf-a#x zTCcZuqhYvHh_uid1zxX*X&UBSywQNljRNDxr7ZUKdMFYRE}ryTu^L4(equ<*dPT3J zkD5B=qqQVu$4?(iYYeQfuXZ&5b~K0)FE`Kgmzsy6T#lCUM~Yr6xoIV0SS!!9me83R zk(Ga?*Td5OY`+(#=LS??uSXb4-{q4>>-E-oG+a9mqsMS9<3+w-e?@W!aR)^QUDhQK_Gb`2*mhYF4=IU#S1Bb zW2$)~&F7^YMp1HHPm4^dv!%%N+<>Z<=Izv}bPev(rAwDCUAlDX(na_ekTo0niwW7( P00000NkvXXu0mjflF($3 literal 0 HcmV?d00001 diff --git a/assets/resource_pack/textures/entity/cape_vanilla.png b/assets/resource_pack/textures/entity/cape_vanilla.png new file mode 100644 index 0000000000000000000000000000000000000000..9a3c1292479c532f5a2d4c6ac0f6adb63f569bc0 GIT binary patch literal 616 zcmV-u0+;=XP)_|`R&%Av*vum$Cxm^8DmM>?`)5l%&_FXiuU(4PxTAYJ3pU<1=blL^a(H2F~lx5i- zPmGX#`9kL;2ZTL*Ui1W`mEv(so|UWX_;4_xKCDhpnr(IK6vmZ+d*D6apPRY5P6#k< zC^SDAXu#vmtP_TK|EXGGxCY_U01H>w3Bk7#Y3$xipaGlBrW3{i;277cs_GeF;p#dT zATPDCLC^pcKtKcvQxHQMVBzXI79ejQ#ts6VmRGY*lw9Uo6nIvyu44gBPHpTUxRpT| zmbOb23d=3f!qs&wpaHIa*?00C1B1O@EZRYHc3GUuj(a_LR<5pN0rEq}CO3eh7!bzd zD2i)!UH3Q^uC8MN-t-}3WBc}kV%F<*PZ$Lu ({ @@ -97,6 +100,7 @@ const getDefaultSpawnOptions = (player: Player): TerminatorInputParam => ({ breedable: false, coords: player.location, skinmodel: TerminatorSkinModel.Steve, + cape: CapeVariant.None, }); function getPlayerSpawnOptions(player: Player): TerminatorInputParam { @@ -131,6 +135,7 @@ export function showSpawnTerminatorForm(player: Player) { regeneration, respawn, breedable, + cape, ] = result.formValues as TerminatorSpawnFormValues; let skinmodel: TerminatorSkinModel = TerminatorSkinModel.Steve; switch (skinModelIndex) { @@ -159,7 +164,8 @@ export function showSpawnTerminatorForm(player: Player) { respawn: respawn, breedable: breedable, coords: parseCoordinates(locationString, player.location), - skinmodel, + skinmodel: skinmodel, + cape: cape, }; spawnTerminator(jsonInput, player); }) diff --git a/src/commands/summon.ts b/src/commands/summon.ts index fe0f7a8..8f29036 100644 --- a/src/commands/summon.ts +++ b/src/commands/summon.ts @@ -1,5 +1,6 @@ import { Player, Vector3, system } from "@minecraft/server"; import { debugEnabled } from "../config"; +import { CapeVariant } from "../terminator/capeVariant"; export enum TerminatorSkinModel { Steve = "steve", @@ -20,6 +21,7 @@ export interface TerminatorInputParam { breedable: boolean; coords: Vector3; skinmodel: TerminatorSkinModel; + cape: CapeVariant; } export function spawnTerminator( @@ -38,7 +40,9 @@ export function spawnTerminator( * If the option is undefined in user_input * Script Engine will replace key values with 'default_nbt' variable */ - user_input.nametag = user_input.nametag.replace(/[^a-zA-Z0-9_ ]/g, '').substring(0, 15); + user_input.nametag = user_input.nametag + .replace(/[^a-zA-Z0-9_ ]/g, "") + .substring(0, 15); entity.nameTag = user_input.nametag; if (user_input.customskin == true) { @@ -72,6 +76,9 @@ export function spawnTerminator( } else if (user_input.skinmodel == TerminatorSkinModel.CustomSlim) { entity.triggerEvent("terminator:enable_customSlim_skin"); } + if (user_input.cape !== 0) { + entity.setProperty("terminator:cape", user_input.cape); + } const userInputString = JSON.stringify(user_input); if (debugEnabled) console.log("User input: " + userInputString); diff --git a/src/terminator/capeVariant.ts b/src/terminator/capeVariant.ts new file mode 100644 index 0000000..14b18dd --- /dev/null +++ b/src/terminator/capeVariant.ts @@ -0,0 +1,27 @@ +export enum CapeVariant { + None, + Fifteenth_anniv, + Cherry, + Founder, + Migrator, + Mojang_new, + Pan, + Pride, + Tiktok, + Twitch, + Vanilla, +} + +export const CapeVariants = [ + "None", + "15th Anniversary", + "Cherry Blossom", + "Founder", + "Migrator", + "Mojang New", + "Pan", + "Progress Pride", + "Follower (TikTok)", + "Purple Heart (Twitch)", + "One Vanilla", +]; diff --git a/src/terminator/ridingTransport.ts b/src/terminator/ridingTransport.ts index 2221fbe..980c80f 100644 --- a/src/terminator/ridingTransport.ts +++ b/src/terminator/ridingTransport.ts @@ -2,20 +2,17 @@ import { ItemStack, TicksPerSecond, system, world } from "@minecraft/server"; import { MinecraftEntityTypes } from "@minecraft/vanilla-data"; const overworld = world.getDimension("overworld"); +const rideableTransports = [ + MinecraftEntityTypes.Minecart, + MinecraftEntityTypes.ChestBoat, + MinecraftEntityTypes.Boat, +]; // Replacement of controller.animation.terminator.sitting system.runInterval(() => { const terminators = overworld.getEntities({ type: "entity:terminator" }); if (terminators.length === 0) return; - const boats = overworld.getEntities({ type: MinecraftEntityTypes.Boat }); - const chestBoats = overworld.getEntities({ - type: MinecraftEntityTypes.ChestBoat, - }); - const minecarts = overworld.getEntities({ - type: MinecraftEntityTypes.Minecart, - }); - for (const terminator of terminators) { let rideableCooldown = terminator.getDynamicProperty( "terminator:rideable_cooldown" @@ -40,29 +37,11 @@ system.runInterval(() => { // If the rideable cooldown is 0 and terminator is sitting, then leave the transport they're riding in // Note: Rideable component is not released to stable, kill the transport entity else if (rideableCooldown === 0) { - const nearbyBoats = boats.filter( - (boat) => - boat.matches({ maxDistance: 1, location: terminator.location }) && - boat.dimension === terminator.dimension - ); - const nearbyChestBoats = chestBoats.filter( - (chestBoat) => - chestBoat.matches({ - maxDistance: 1, - location: terminator.location, - }) && chestBoat.dimension === terminator.dimension - ); - const nearbyMinecarts = minecarts.filter( - (minecart) => - minecart.matches({ maxDistance: 1, location: terminator.location }) && - minecart.dimension === terminator.dimension + const nearbyTransport = terminator.dimension.getEntitiesAtBlockLocation( + terminator.location ); - const nearbyTransport = [ - ...nearbyBoats, - ...nearbyChestBoats, - ...nearbyMinecarts, - ]; for (const transport of nearbyTransport) { + if (rideableTransports.some((id) => transport.typeId !== id)) continue; transport.dimension.spawnItem( new ItemStack(transport.typeId, 1), transport.location