Compare commits

...

2 Commits

Author SHA1 Message Date
40887164a9 Change recepie
Some checks are pending
build / build (17, ubuntu-22.04) (push) Waiting to run
build / build (17, windows-2022) (push) Waiting to run
2024-05-07 20:07:21 +02:00
e33be889a4 Merge fix from Archie Lamb 2024-05-07 20:03:17 +02:00
3 changed files with 14 additions and 2 deletions

View File

@@ -1,6 +1,6 @@
# Televator - A Fabric Server-Side Elevator Mod
based on [JumpVader](https://github.com/StimzRx/JumpVaderMod) by [StimzRx](https://github.com/StimzRx/JumpVaderMod)
based on [JumpVader](https://github.com/StimzRx/JumpVaderMod) by [StimzRx](https://github.com/StimzRx)
## What is it
It's a mod that lets you place "Televator" blocks similar to the Quark mod's elevators.
@@ -8,7 +8,16 @@ You simply place one above the other at any vertical distance, and jump/crouch o
block to go in between the different heights.
## Crafting
![Crafting Recipe](https://github.com/VenomCodeDev/TelevatorMod/blob/d1cd96ccd846d3249a4a7fcb298e740775ee344c/assets/TelevatorCraftingRecipe.png?raw=true)
```
G A G
A P A
G A G
```
```A``` is amethyst shard
```G``` is glass
```P``` is an ender pearl
## Removal

Binary file not shown.

Before

Width:  |  Height:  |  Size: 27 KiB

View File

@@ -57,6 +57,7 @@ public class TelevatorBlock extends Block implements PolymerTexturedBlock {
if (world.getBlockState(tpPos).getBlock().equals(Blocks.AIR) && world.getBlockState(tpPos.up()).getBlock().equals(Blocks.AIR)) {
teleportWithEffect(player, world, tpPos);
break;
}
}
pos = isJumping ? pos.up() : pos.down();
@@ -66,6 +67,8 @@ public class TelevatorBlock extends Block implements PolymerTexturedBlock {
private void teleportWithEffect(ServerPlayerEntity player, ServerWorld w, BlockPos tpPos) {
player.teleport(tpPos.getX() + 0.5f, tpPos.getY(), tpPos.getZ() + 0.5f);
player.setVelocity(0, 0, 0);
player.setSneaking(false);
w.playSound(null, tpPos, SoundEvents.ENTITY_ENDERMAN_TELEPORT, SoundCategory.PLAYERS, 0.5f, 1.5f);
w.spawnParticles(ParticleTypes.POOF, tpPos.getX() + 0.5f, tpPos.getY(), tpPos.getZ() + 0.5f, 5, 0, 0, 0, 0.25f);
}