Advertisement
jayhillx

DamageSource01

Jun 5th, 2021
202
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.61 KB | None | 0 0
  1. public ITextComponent getDeathMessage(LivingEntity playerEntityIn) {
  2. PlayerEntity playerEntity = (PlayerEntity) playerEntityIn;
  3. String s = "death.attack." + this.damageType;
  4. String s1 = s + ".boundPlayer";
  5.  
  6. IBoundCapability boundPlayer = playerEntity.getCapability(BindingCapabilities.LIFE_BOUND_CAPABILITY).orElse(null);
  7.  
  8. return playerEntity != null ? new TranslationTextComponent(s1, playerEntityIn.getDisplayName(), playerEntity.getServer().getPlayerList().getPlayerByUUID(boundPlayer.getUUID())) : new TranslationTextComponent(s, playerEntityIn.getDisplayName());
  9. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement