public class Raid
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
(package private) static class |
Raid.Status |
(package private) static class |
Raid.WaveMember |
Modifier and Type | Field and Description |
---|---|
private boolean |
active |
private int |
badOmenLevel |
private ServerBossInfo |
bossInfo |
private int |
celebrationTicks |
private BlockPos |
center |
private static TranslationTextComponent |
DEFEAT |
private int |
groupsSpawned |
private java.util.Set<java.util.UUID> |
heroes |
private int |
id |
private java.util.Map<java.lang.Integer,AbstractRaiderEntity> |
leaders |
private int |
numGroups |
private int |
postRaidTicks |
private int |
preRaidTicks |
private static TranslationTextComponent |
RAID |
private static ITextComponent |
RAID_DEFEAT |
private static ITextComponent |
RAID_VICTORY |
private java.util.Map<java.lang.Integer,java.util.Set<AbstractRaiderEntity>> |
raiders |
private java.util.Random |
random |
private boolean |
started |
private Raid.Status |
status |
private long |
ticksActive |
private float |
totalHealth |
private static TranslationTextComponent |
VICTORY |
private java.util.Optional<BlockPos> |
waveSpawnPos |
private ServerWorld |
world |
Constructor and Description |
---|
Raid(int p_i50144_1_,
ServerWorld p_i50144_2_,
BlockPos p_i50144_3_) |
Raid(ServerWorld p_i50145_1_,
CompoundNBT p_i50145_2_) |
Modifier and Type | Method and Description |
---|---|
void |
addHero(Entity p_221311_1_) |
static ItemStack |
createIllagerBanner() |
private BlockPos |
findRandomSpawnPos(int p_221298_1_,
int p_221298_2_) |
boolean |
func_221297_c() |
int |
getBadOmenLevel() |
BlockPos |
getCenter() |
float |
getCurrentHealth() |
private int |
getDefaultNumSpawns(Raid.WaveMember p_221330_1_,
int p_221330_2_,
boolean p_221330_3_) |
float |
getEnchantOdds() |
int |
getGroupsSpawned() |
int |
getId() |
AbstractRaiderEntity |
getLeader(int p_221332_1_) |
int |
getMaxLevel() |
private java.util.function.Predicate<ServerPlayerEntity> |
getParticipantsPredicate() |
private int |
getPotentialBonusSpawns(Raid.WaveMember p_221335_1_,
java.util.Random p_221335_2_,
int wave,
DifficultyInstance p_221335_4_,
boolean p_221335_5_) |
int |
getRaiderCount() |
private java.util.Optional<BlockPos> |
getValidSpawnPos(int p_221313_1_) |
int |
getWaves(Difficulty difficultyIn) |
World |
getWorld() |
private boolean |
hasBonusWave() |
private boolean |
hasMoreWaves() |
private boolean |
hasSpawnedBonusWave() |
void |
increaseLevel(PlayerEntity player) |
boolean |
isActive() |
boolean |
isBetweenWaves() |
private boolean |
isFinalWave() |
boolean |
isLoss() |
boolean |
isOver() |
boolean |
isStarted() |
boolean |
isStopped() |
boolean |
isVictory() |
private boolean |
joinRaid(int p_221287_1_,
AbstractRaiderEntity p_221287_2_) |
void |
joinRaid(int wave,
AbstractRaiderEntity p_221317_2_,
BlockPos p_221317_3_,
boolean p_221317_4_) |
boolean |
joinRaid(int p_221300_1_,
AbstractRaiderEntity p_221300_2_,
boolean p_221300_3_) |
void |
leaveRaid(AbstractRaiderEntity p_221322_1_,
boolean p_221322_2_) |
private void |
markDirty() |
private void |
moveRaidCenterToNearbyVillageSection() |
private void |
playWaveStartSound(BlockPos p_221293_1_) |
void |
removeLeader(int p_221296_1_) |
private void |
setCenter(BlockPos p_223024_1_) |
void |
setLeader(int raidId,
AbstractRaiderEntity p_221324_2_) |
private boolean |
shouldSpawnBonusGroup() |
private boolean |
shouldSpawnGroup() |
private void |
spawnNextWave(BlockPos p_221294_1_) |
void |
stop() |
void |
tick() |
void |
updateBarPercentage() |
private void |
updateBossInfoVisibility() |
private void |
updateRaiders() |
CompoundNBT |
write(CompoundNBT nbt) |
private static final TranslationTextComponent RAID
private static final TranslationTextComponent VICTORY
private static final TranslationTextComponent DEFEAT
private static final ITextComponent RAID_VICTORY
private static final ITextComponent RAID_DEFEAT
private final java.util.Map<java.lang.Integer,AbstractRaiderEntity> leaders
private final java.util.Map<java.lang.Integer,java.util.Set<AbstractRaiderEntity>> raiders
private final java.util.Set<java.util.UUID> heroes
private long ticksActive
private BlockPos center
private final ServerWorld world
private boolean started
private final int id
private float totalHealth
private int badOmenLevel
private boolean active
private int groupsSpawned
private final ServerBossInfo bossInfo
private int postRaidTicks
private int preRaidTicks
private final java.util.Random random
private final int numGroups
private Raid.Status status
private int celebrationTicks
private java.util.Optional<BlockPos> waveSpawnPos
public Raid(int p_i50144_1_, ServerWorld p_i50144_2_, BlockPos p_i50144_3_)
public Raid(ServerWorld p_i50145_1_, CompoundNBT p_i50145_2_)
public boolean isOver()
public boolean isBetweenWaves()
public boolean func_221297_c()
public boolean isStopped()
public boolean isVictory()
public boolean isLoss()
public World getWorld()
public boolean isStarted()
public int getGroupsSpawned()
private java.util.function.Predicate<ServerPlayerEntity> getParticipantsPredicate()
private void updateBossInfoVisibility()
public int getMaxLevel()
public int getBadOmenLevel()
public void increaseLevel(PlayerEntity player)
public void stop()
public void tick()
private void moveRaidCenterToNearbyVillageSection()
private java.util.Optional<BlockPos> getValidSpawnPos(int p_221313_1_)
private boolean hasMoreWaves()
private boolean isFinalWave()
private boolean hasBonusWave()
private boolean hasSpawnedBonusWave()
private boolean shouldSpawnBonusGroup()
private void updateRaiders()
private void playWaveStartSound(BlockPos p_221293_1_)
private void spawnNextWave(BlockPos p_221294_1_)
public void joinRaid(int wave, AbstractRaiderEntity p_221317_2_, @Nullable BlockPos p_221317_3_, boolean p_221317_4_)
public void updateBarPercentage()
public float getCurrentHealth()
private boolean shouldSpawnGroup()
public int getRaiderCount()
public void leaveRaid(AbstractRaiderEntity p_221322_1_, boolean p_221322_2_)
private void markDirty()
public static ItemStack createIllagerBanner()
@Nullable public AbstractRaiderEntity getLeader(int p_221332_1_)
@Nullable private BlockPos findRandomSpawnPos(int p_221298_1_, int p_221298_2_)
private boolean joinRaid(int p_221287_1_, AbstractRaiderEntity p_221287_2_)
public boolean joinRaid(int p_221300_1_, AbstractRaiderEntity p_221300_2_, boolean p_221300_3_)
public void setLeader(int raidId, AbstractRaiderEntity p_221324_2_)
public void removeLeader(int p_221296_1_)
public BlockPos getCenter()
private void setCenter(BlockPos p_223024_1_)
public int getId()
private int getDefaultNumSpawns(Raid.WaveMember p_221330_1_, int p_221330_2_, boolean p_221330_3_)
private int getPotentialBonusSpawns(Raid.WaveMember p_221335_1_, java.util.Random p_221335_2_, int wave, DifficultyInstance p_221335_4_, boolean p_221335_5_)
public boolean isActive()
public CompoundNBT write(CompoundNBT nbt)
public int getWaves(Difficulty difficultyIn)
public float getEnchantOdds()
public void addHero(Entity p_221311_1_)