Conditionally teleport
This commit is contained in:
parent
5cb73c9774
commit
056910ab1a
1 changed files with 3 additions and 1 deletions
|
@ -22,6 +22,8 @@ public abstract class ServerPlayerEntityMixin extends PlayerEntityMixin {
|
|||
@Inject(method = "onDeath", at = @At("HEAD"), cancellable = true)
|
||||
public void checkDeath(DamageSource source, CallbackInfo ci) {
|
||||
this.doOnDeathStuff(source, ci);
|
||||
TeleportUtil.teleportRandom(this, ModDimensions.LIMBO_DIMENSION, 384);
|
||||
if (ci.isCancelled()) {
|
||||
TeleportUtil.teleportRandom(this, ModDimensions.LIMBO_DIMENSION, 384);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue