Compare commits
2 Commits
d018c369ae
...
40887164a9
Author | SHA1 | Date | |
---|---|---|---|
40887164a9 | |||
e33be889a4 |
13
README.md
13
README.md
@@ -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
|
||||

|
||||
|
||||
```
|
||||
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 |
@@ -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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user