forked from virt-mirrors/Sit
more comments
This commit is contained in:
parent
05ed35e0ef
commit
691eacb82e
1 changed files with 6 additions and 6 deletions
|
@ -59,12 +59,12 @@ public class SitCommand {
|
||||||
pos = pos.add(0,-1,0);
|
pos = pos.add(0,-1,0);
|
||||||
}
|
}
|
||||||
World world = player.getWorld();
|
World world = player.getWorld();
|
||||||
if (Events.checkBlocks(pos,world)) {
|
// if already sitting, ignore
|
||||||
if (Events.entities.containsKey(player)) {
|
if (Events.entities.containsKey(player)) return 1;
|
||||||
return 1;
|
// make entity first to check the blocks
|
||||||
}
|
DisplayEntity.TextDisplayEntity entity = new DisplayEntity.TextDisplayEntity(EntityType.TEXT_DISPLAY,player.getServerWorld());
|
||||||
DisplayEntity.TextDisplayEntity entity = new DisplayEntity.TextDisplayEntity(EntityType.TEXT_DISPLAY,player.getServerWorld());
|
Events.setEntity(pos,world,entity);
|
||||||
Events.setEntity(pos,world,entity);
|
if (Events.checkBlocks(pos,world,Events.isAboveBlockheight(entity))) {
|
||||||
player.getServerWorld().spawnEntity(entity);
|
player.getServerWorld().spawnEntity(entity);
|
||||||
player.startRiding(entity);
|
player.startRiding(entity);
|
||||||
Events.entities.put(player,entity);
|
Events.entities.put(player,entity);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue