Package net.minecraft.world.raid
Class Raid
- java.lang.Object
-
- net.minecraft.world.raid.Raid
-
public class Raid extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) static class
Raid.Status
static class
Raid.WaveMember
-
Field Summary
Fields Modifier and Type Field Description private boolean
active
private int
badOmenLevel
private int
celebrationTicks
private BlockPos
center
private static ITextComponent
DEFEAT
private java.util.Map<java.lang.Integer,java.util.Set<AbstractRaiderEntity>>
groupRaiderMap
private int
groupsSpawned
private java.util.Map<java.lang.Integer,AbstractRaiderEntity>
groupToLeaderMap
private java.util.Set<java.util.UUID>
heroesOfTheVillage
private int
id
private ServerWorld
level
private int
numGroups
private int
postRaidTicks
private static ITextComponent
RAID_BAR_DEFEAT_COMPONENT
private static ITextComponent
RAID_BAR_VICTORY_COMPONENT
private static ITextComponent
RAID_NAME_COMPONENT
private int
raidCooldownTicks
private ServerBossInfo
raidEvent
private java.util.Random
random
private boolean
started
private Raid.Status
status
private long
ticksActive
private float
totalHealth
private static ITextComponent
VICTORY
private java.util.Optional<BlockPos>
waveSpawnPos
-
Constructor Summary
Constructors Constructor Description Raid(int p_i50144_1_, ServerWorld p_i50144_2_, BlockPos p_i50144_3_)
Raid(ServerWorld p_i50145_1_, CompoundNBT p_i50145_2_)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
absorbBadOmen(PlayerEntity p_221309_1_)
void
addHeroOfTheVillage(Entity p_221311_1_)
private boolean
addWaveMob(int p_221287_1_, AbstractRaiderEntity p_221287_2_)
boolean
addWaveMob(int p_221300_1_, AbstractRaiderEntity p_221300_2_, boolean p_221300_3_)
private BlockPos
findRandomSpawnPos(int p_221298_1_, int p_221298_2_)
int
getBadOmenLevel()
BlockPos
getCenter()
private int
getDefaultNumSpawns(Raid.WaveMember p_221330_1_, int p_221330_2_, boolean p_221330_3_)
float
getEnchantOdds()
int
getGroupsSpawned()
float
getHealthOfLivingRaiders()
int
getId()
AbstractRaiderEntity
getLeader(int p_221332_1_)
static ItemStack
getLeaderBannerInstance()
World
getLevel()
int
getMaxBadOmenLevel()
int
getNumGroups(Difficulty p_221306_1_)
private int
getPotentialBonusSpawns(Raid.WaveMember p_221335_1_, java.util.Random p_221335_2_, int p_221335_3_, DifficultyInstance p_221335_4_, boolean p_221335_5_)
int
getTotalRaidersAlive()
private java.util.Optional<BlockPos>
getValidSpawnPos(int p_221313_1_)
private boolean
hasBonusWave()
boolean
hasFirstWaveSpawned()
private boolean
hasMoreWaves()
private boolean
hasSpawnedBonusWave()
boolean
isActive()
boolean
isBetweenWaves()
private boolean
isFinalWave()
boolean
isLoss()
boolean
isOver()
boolean
isStarted()
boolean
isStopped()
boolean
isVictory()
void
joinRaid(int p_221317_1_, AbstractRaiderEntity p_221317_2_, BlockPos p_221317_3_, boolean p_221317_4_)
private void
moveRaidCenterToNearbyVillageSection()
private void
playSound(BlockPos p_221293_1_)
void
removeFromRaid(AbstractRaiderEntity p_221322_1_, boolean p_221322_2_)
void
removeLeader(int p_221296_1_)
CompoundNBT
save(CompoundNBT p_221326_1_)
private void
setCenter(BlockPos p_223024_1_)
private void
setDirty()
void
setLeader(int p_221324_1_, AbstractRaiderEntity p_221324_2_)
private boolean
shouldSpawnBonusGroup()
private boolean
shouldSpawnGroup()
private void
spawnGroup(BlockPos p_221294_1_)
void
stop()
void
tick()
void
updateBossbar()
private void
updatePlayers()
private void
updateRaiders()
private java.util.function.Predicate<ServerPlayerEntity>
validPlayer()
-
-
-
Field Detail
-
RAID_NAME_COMPONENT
private static final ITextComponent RAID_NAME_COMPONENT
-
VICTORY
private static final ITextComponent VICTORY
-
DEFEAT
private static final ITextComponent DEFEAT
-
RAID_BAR_VICTORY_COMPONENT
private static final ITextComponent RAID_BAR_VICTORY_COMPONENT
-
RAID_BAR_DEFEAT_COMPONENT
private static final ITextComponent RAID_BAR_DEFEAT_COMPONENT
-
groupToLeaderMap
private final java.util.Map<java.lang.Integer,AbstractRaiderEntity> groupToLeaderMap
-
groupRaiderMap
private final java.util.Map<java.lang.Integer,java.util.Set<AbstractRaiderEntity>> groupRaiderMap
-
heroesOfTheVillage
private final java.util.Set<java.util.UUID> heroesOfTheVillage
-
ticksActive
private long ticksActive
-
center
private BlockPos center
-
level
private final ServerWorld level
-
started
private boolean started
-
id
private final int id
-
totalHealth
private float totalHealth
-
badOmenLevel
private int badOmenLevel
-
active
private boolean active
-
groupsSpawned
private int groupsSpawned
-
raidEvent
private final ServerBossInfo raidEvent
-
postRaidTicks
private int postRaidTicks
-
raidCooldownTicks
private int raidCooldownTicks
-
random
private final java.util.Random random
-
numGroups
private final int numGroups
-
status
private Raid.Status status
-
celebrationTicks
private int celebrationTicks
-
waveSpawnPos
private java.util.Optional<BlockPos> waveSpawnPos
-
-
Constructor Detail
-
Raid
public Raid(int p_i50144_1_, ServerWorld p_i50144_2_, BlockPos p_i50144_3_)
-
Raid
public Raid(ServerWorld p_i50145_1_, CompoundNBT p_i50145_2_)
-
-
Method Detail
-
isOver
public boolean isOver()
-
isBetweenWaves
public boolean isBetweenWaves()
-
hasFirstWaveSpawned
public boolean hasFirstWaveSpawned()
-
isStopped
public boolean isStopped()
-
isVictory
public boolean isVictory()
-
isLoss
public boolean isLoss()
-
getLevel
public World getLevel()
-
isStarted
public boolean isStarted()
-
getGroupsSpawned
public int getGroupsSpawned()
-
validPlayer
private java.util.function.Predicate<ServerPlayerEntity> validPlayer()
-
updatePlayers
private void updatePlayers()
-
getMaxBadOmenLevel
public int getMaxBadOmenLevel()
-
getBadOmenLevel
public int getBadOmenLevel()
-
absorbBadOmen
public void absorbBadOmen(PlayerEntity p_221309_1_)
-
stop
public void stop()
-
tick
public void tick()
-
moveRaidCenterToNearbyVillageSection
private void moveRaidCenterToNearbyVillageSection()
-
getValidSpawnPos
private java.util.Optional<BlockPos> getValidSpawnPos(int p_221313_1_)
-
hasMoreWaves
private boolean hasMoreWaves()
-
isFinalWave
private boolean isFinalWave()
-
hasBonusWave
private boolean hasBonusWave()
-
hasSpawnedBonusWave
private boolean hasSpawnedBonusWave()
-
shouldSpawnBonusGroup
private boolean shouldSpawnBonusGroup()
-
updateRaiders
private void updateRaiders()
-
playSound
private void playSound(BlockPos p_221293_1_)
-
spawnGroup
private void spawnGroup(BlockPos p_221294_1_)
-
joinRaid
public void joinRaid(int p_221317_1_, AbstractRaiderEntity p_221317_2_, @Nullable BlockPos p_221317_3_, boolean p_221317_4_)
-
updateBossbar
public void updateBossbar()
-
getHealthOfLivingRaiders
public float getHealthOfLivingRaiders()
-
shouldSpawnGroup
private boolean shouldSpawnGroup()
-
getTotalRaidersAlive
public int getTotalRaidersAlive()
-
removeFromRaid
public void removeFromRaid(AbstractRaiderEntity p_221322_1_, boolean p_221322_2_)
-
setDirty
private void setDirty()
-
getLeaderBannerInstance
public static ItemStack getLeaderBannerInstance()
-
getLeader
@Nullable public AbstractRaiderEntity getLeader(int p_221332_1_)
-
findRandomSpawnPos
@Nullable private BlockPos findRandomSpawnPos(int p_221298_1_, int p_221298_2_)
-
addWaveMob
private boolean addWaveMob(int p_221287_1_, AbstractRaiderEntity p_221287_2_)
-
addWaveMob
public boolean addWaveMob(int p_221300_1_, AbstractRaiderEntity p_221300_2_, boolean p_221300_3_)
-
setLeader
public void setLeader(int p_221324_1_, AbstractRaiderEntity p_221324_2_)
-
removeLeader
public void removeLeader(int p_221296_1_)
-
getCenter
public BlockPos getCenter()
-
setCenter
private void setCenter(BlockPos p_223024_1_)
-
getId
public int getId()
-
getDefaultNumSpawns
private int getDefaultNumSpawns(Raid.WaveMember p_221330_1_, int p_221330_2_, boolean p_221330_3_)
-
getPotentialBonusSpawns
private int getPotentialBonusSpawns(Raid.WaveMember p_221335_1_, java.util.Random p_221335_2_, int p_221335_3_, DifficultyInstance p_221335_4_, boolean p_221335_5_)
-
isActive
public boolean isActive()
-
save
public CompoundNBT save(CompoundNBT p_221326_1_)
-
getNumGroups
public int getNumGroups(Difficulty p_221306_1_)
-
getEnchantOdds
public float getEnchantOdds()
-
addHeroOfTheVillage
public void addHeroOfTheVillage(Entity p_221311_1_)
-
-