mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-20 12:19:46 +00:00
Merge upstream pull request #1693 from Katrix-/relicsUUID
This commit is contained in:
commit
d1ff5e89ca
5 files changed
+132
-11
No files matched your search
@@ -15,6 +15,7 @@ import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
@@ -108,7 +109,7 @@ public class EntityDoppleganger extends EntityCreature implements IBotaniaBossWi
|
||||
boolean spawnPixies = false;
|
||||
boolean anyWithArmor = false;
|
||||
|
||||
List<String> playersWhoAttacked = new ArrayList<>();
|
||||
List<UUID> playersWhoAttacked = new ArrayList<>();
|
||||
|
||||
private static boolean isPlayingMusic = false;
|
||||
|
||||
@@ -358,8 +359,9 @@ public class EntityDoppleganger extends EntityCreature implements IBotaniaBossWi
|
||||
Entity e = par1DamageSource.getEntity();
|
||||
if((par1DamageSource.damageType.equals("player") || e instanceof EntityPixie) && e != null && isTruePlayer(e) && getInvulTime() == 0) {
|
||||
EntityPlayer player = (EntityPlayer) e;
|
||||
if(!playersWhoAttacked.contains(player.getName()))
|
||||
playersWhoAttacked.add(player.getName());
|
||||
|
||||
if(!playersWhoAttacked.contains(player.getUniqueID()))
|
||||
playersWhoAttacked.add(player.getUniqueID());
|
||||
|
||||
float dmg = par2;
|
||||
boolean crit = false;
|
||||
@@ -446,7 +448,7 @@ public class EntityDoppleganger extends EntityCreature implements IBotaniaBossWi
|
||||
entityDropItem(new ItemStack(ModItems.ancientWill, 1, rand.nextInt(6)), 1F);
|
||||
if(ConfigHandler.relicsEnabled) {
|
||||
ItemStack dice = new ItemStack(ModItems.dice);
|
||||
ItemRelic.bindToUsernameS(playersWhoAttacked.get(pl), dice);
|
||||
ItemRelic.bindToUUIDS(playersWhoAttacked.get(pl), dice);
|
||||
entityDropItem(dice, 1F);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user