Compare commits
2
Commits
8dc165952a
...
f23495ecdd
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f23495ecdd | ||
|
|
89b81a3288 |
No files matched your search
+9
-6
@@ -51,15 +51,18 @@ class HighGround extends StatelessGame {
|
||||
|
||||
this.eventNode().addListener(
|
||||
EntityKnockbackEvent.class,
|
||||
entityKnockbackEvent -> entityKnockbackEvent.setSettings(
|
||||
entityKnockbackEvent -> {
|
||||
if(entityKnockbackEvent.getEntity().getVelocity().y() > 4) { entityKnockbackEvent.setCancelled(true); return; }
|
||||
entityKnockbackEvent.setSettings(
|
||||
KnockbackSettings.builder()
|
||||
.horizontal(1.1)
|
||||
.vertical(KnockbackSettings.DEFAULT.vertical())
|
||||
.verticalLimit(KnockbackSettings.DEFAULT.verticalLimit())
|
||||
.extraHorizontal(KnockbackSettings.DEFAULT.extraHorizontal())
|
||||
.extraVertical(KnockbackSettings.DEFAULT.extraVertical())
|
||||
.vertical(0)
|
||||
.verticalLimit(0)
|
||||
.extraHorizontal(0.5)
|
||||
.extraVertical(0)
|
||||
.build()
|
||||
)
|
||||
);
|
||||
}
|
||||
);
|
||||
|
||||
this.eventNode().addListener(InstanceTickEvent.class, instanceTickEvent -> {
|
||||
|
||||
+1
-2
@@ -147,10 +147,10 @@ class Tetris extends StatelessGame {
|
||||
|
||||
TetrisGame tetrisGame = this.tetrisGames.get(p);
|
||||
|
||||
p.teleport(tetrisGame.getPlayerSpawnPosition());
|
||||
tetrisGame.sidebar.addViewer(p);
|
||||
|
||||
MinecraftServer.getSchedulerManager().scheduleTask(() -> {
|
||||
p.teleport(tetrisGame.getPlayerSpawnPosition());
|
||||
Entity ghostBlock = new Entity(EntityType.BLOCK_DISPLAY);
|
||||
((BlockDisplayMeta) ghostBlock.getEntityMeta()).setBlockState(Block.AIR);
|
||||
ghostBlock.setNoGravity(true);
|
||||
@@ -159,7 +159,6 @@ class Tetris extends StatelessGame {
|
||||
return TaskSchedule.stop();
|
||||
}, TaskSchedule.nextTick());
|
||||
|
||||
|
||||
return super.onPlayerJoin(p);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user