Skip to content

Commit

Permalink
fix(skyblock): ✏️Fix teleportation with Enigmatica book into Skyblock…
Browse files Browse the repository at this point in the history
… dimension
  • Loading branch information
Krutoy242 committed Jan 20, 2024
1 parent 38eb0d6 commit 0137502
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 9 deletions.
2 changes: 1 addition & 1 deletion resources/contenttweaker/lang/en_us.lang
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@ e2ee.danknull_dock.must_have=§7You need a %s in the inventory to insert %s into
e2ee.restrict.vis_seeds=§7§eVis Seeds§7 can only be planted in §nthe Void§7 dimension or on §nplanets§7. They also need Oxygen.
e2ee.creature_resisted_morb=§8This creature resist capture by the §n§8%s.
e2ee.creature_uncapturable=§7This creature can't be captured.
e2ee.skyblock.need_item=§bTo access the §3Skyblock§b dimension, hold %s in your hand and ascend to a height of §3%s§b blocks.
e2ee.skyblock.need_item=§bTo access the §3Skyblock§b dimension, hold %s§b in your hand and ascend to a height of §3%s§b blocks.
tooltips.lang.morb_resist=§rEffective against monsters at §4<%s%%§r hearts, or with fewer than §c%s§r hearts total.
# >

Expand Down
2 changes: 1 addition & 1 deletion resources/contenttweaker/lang/ru_ru.lang
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@ e2ee.danknull_dock.must_have=§7Вам понадобится %s в инвент
e2ee.restrict.vis_seeds=§7Вы можете сажать §6Семена Вис§7 только в §nМире пустоты§r§7 или на §nпланетах§r§7. Им также необходим кислород.
e2ee.creature_resisted_morb=§8Существо сопротивлялось захвату §n§8%s.
e2ee.creature_uncapturable=§7Это существо нельзя поймать.
e2ee.skyblock.need_item=§bЧтобы попасть в измерение §3Скайблока§b, держите %s в руке и поднимитесь на высоту §3%s§b блоков.
e2ee.skyblock.need_item=§bЧтобы попасть в измерение §3Скайблока§b, держите %s§b в руке и поднимитесь на высоту §3%s§b блоков.
tooltips.lang.morb_resist=Эффективен против монстров с §4<%s%%§r сердец или менее §c%s§r сердец.
# >

Expand Down
2 changes: 1 addition & 1 deletion resources/contenttweaker/lang/zh_cn.lang
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@ e2ee.danknull_dock.must_have=§7你需要在副手持有一个 %s 才能把 %s
e2ee.restrict.vis_seeds=§7§e魔力种子§7只能被种在§nthe Void§7维度或是§n其他星球§7。种植这些种子需要氧气。
e2ee.creature_resisted_morb=§8这个生物在反抗 §n§8%s 的捕捉。
e2ee.creature_uncapturable=§7该生物不能被捕捉。
e2ee.skyblock.need_item=§b要进入 §3Skyblock§b 维度,您需要手持 %s 并达到 §3%s§b 方块的高度。
e2ee.skyblock.need_item=§b要进入 §3Skyblock§b 维度,您需要手持 %s§b 并达到 §3%s§b 方块的高度。
tooltips.lang.morb_resist=§r对血量低于总血量的 §4<%s%%§r,或者少于 §c%s§r 颗心的怪物有效。
# >

Expand Down
10 changes: 4 additions & 6 deletions scripts/skyblock/tp.zs
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,12 @@ events.onPlayerTick(function (e as crafttweaker.event.PlayerTickEvent) {
if (
e.player.world.remote
|| e.player.world.getWorldTime() % 2 != 0
|| isNull(e.player.currentItem)
|| e.player.getDimension() != 0
|| e.player.posY < SKY_TP_HEIGHT
) return;

print('~~~ entering onPlayerTick');
// Show warning message if player doesnt hold book but only once per server restart
if (!(requiredItem has e.player.currentItem)) {
if (isNull(e.player.currentItem) || !(requiredItem has e.player.currentItem)) {
if (isNull(playersNoted[e.player])) {
playersNoted[e.player] = true;
e.player.sendRichTextMessage(crafttweaker.text.ITextComponent.fromData([{
Expand All @@ -32,8 +30,8 @@ events.onPlayerTick(function (e as crafttweaker.event.PlayerTickEvent) {
return;
}

print('~~~ executing tp');
e.player.addPotionEffect(<potion:minecraft:levitation>.makePotionEffect(600, 0));
e.player.changeDimension(3);
e.player.posY = SKY_TP_HEIGHT - 255.0;
server.commandManager.executeCommandSilent(server,
'/tpx ' ~ e.player.name ~ ' ' ~ e.player.posX ~ ' ' ~ (SKY_TP_HEIGHT - 255.0) ~ ' ' ~ e.player.posZ ~ ' 3'
);
});

0 comments on commit 0137502

Please sign in to comment.