Navigation Menu

Skip to content

Commit

Permalink
Added owner's name to Killer Joe death message
Browse files Browse the repository at this point in the history
  • Loading branch information
HenryLoenwind committed Dec 25, 2016
1 parent b0be086 commit d8aefc9
Showing 1 changed file with 9 additions and 5 deletions.
Expand Up @@ -8,6 +8,8 @@
import javax.annotation.Nonnull;
import javax.annotation.Nullable;

import org.apache.commons.lang3.StringUtils;

import com.enderio.core.api.common.util.ITankAccess;
import com.enderio.core.client.render.BoundingBox;
import com.enderio.core.common.fluid.FluidWrapper;
Expand All @@ -34,6 +36,7 @@
import crazypants.enderio.machine.wireless.WirelessChargedLocation;
import crazypants.enderio.network.PacketHandler;
import crazypants.util.MagnetUtil;
import crazypants.util.UserIdent;
import info.loenwind.autosave.annotations.Storable;
import info.loenwind.autosave.annotations.Store;
import net.minecraft.client.Minecraft;
Expand Down Expand Up @@ -413,8 +416,7 @@ private int getArmSwingAnimationEnd() {

Attackera getAttackera() {
if (attackera == null) {
attackera = new Attackera();
attackera.setOwner(owner);
attackera = new Attackera(owner);
}
return attackera;
}
Expand Down Expand Up @@ -502,14 +504,16 @@ protected boolean doPull(@Nullable EnumFacing dir) {
}

private static final UUID uuid = UUID.fromString("3baa66fa-a69a-11e4-89d3-123b93f75cba");
private static final GameProfile DUMMY_PROFILE = new GameProfile(uuid, "[EioKillera]");
private static final GameProfile DUMMY_PROFILE = new GameProfile(uuid, "[Killer Joe]");

private class Attackera extends FakePlayerEIO implements ICreeperTarget {

ItemStack prevWeapon;

public Attackera() {
super(getWorld(), getLocation(), DUMMY_PROFILE);
public Attackera(UserIdent owner) {
super(getWorld(), getLocation(), (owner == null || owner == UserIdent.nobody || StringUtils.isBlank(owner.getPlayerName())) ? DUMMY_PROFILE
: new GameProfile(uuid, "[" + owner.getPlayerName() + "'s Killer Joe]"));
setOwner(owner);
}

@Override
Expand Down

0 comments on commit d8aefc9

Please sign in to comment.