Package net.minecraft.village.raid
Class Raid
java.lang.Object
net.minecraft.village.raid.Raid
public class Raid extends Object
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) static class
Raid.Member
(package private) static class
Raid.Status
-
Field Summary
Fields Modifier and Type Field Description private boolean
active
private int
badOmenLevel
private ServerBossBar
bar
private BlockPos
center
private static Text
DEFEAT_SUFFIX_TEXT
private static Text
DEFEAT_TITLE
private static Text
EVENT_TEXT
private int
finishCooldown
private Set<UUID>
heroesOfTheVillage
private int
id
private int
postRaidTicks
private Optional<BlockPos>
preCalculatedRavagerSpawnLocation
private int
preRaidTicks
private Random
random
private boolean
started
private Raid.Status
status
private long
ticksActive
private float
totalHealth
private static Text
VICTORY_SUFFIX_TEXT
private static Text
VICTORY_TITLE
private int
waveCount
private int
wavesSpawned
private Map<Integer,RaiderEntity>
waveToCaptain
private Map<Integer,Set<RaiderEntity>>
waveToRaiders
private ServerWorld
world
-
Constructor Summary
Constructors Constructor Description Raid(int id, ServerWorld world, BlockPos pos)
Raid(ServerWorld world, CompoundTag tag)
-
Method Summary
Modifier and Type Method Description void
addHero(Entity entity)
void
addRaider(int wave, RaiderEntity raider, BlockPos pos, boolean existing)
private boolean
addToWave(int wave, RaiderEntity entity)
boolean
addToWave(int wave, RaiderEntity entity, boolean countHealth)
private boolean
canSpawnRaiders()
int
getBadOmenLevel()
private int
getBonusCount(Raid.Member member, Random random, int wave, LocalDifficulty localDifficulty, boolean extra)
RaiderEntity
getCaptain(int wave)
BlockPos
getCenter()
private int
getCount(Raid.Member member, int wave, boolean extra)
float
getCurrentRaiderHealth()
float
getEnchantmentChance()
int
getGroupsSpawned()
int
getMaxAcceptableBadOmenLevel()
int
getMaxWaves(Difficulty difficulty)
static ItemStack
getOminousBanner()
int
getRaiderCount()
int
getRaidId()
private BlockPos
getRavagerSpawnLocation(int proximity, int tries)
World
getWorld()
private boolean
hasExtraWave()
boolean
hasLost()
boolean
hasSpawned()
private boolean
hasSpawnedExtraWave()
private boolean
hasSpawnedFinalWave()
boolean
hasStarted()
boolean
hasStopped()
boolean
hasWon()
void
invalidate()
boolean
isActive()
boolean
isFinished()
private Predicate<ServerPlayerEntity>
isInRaidDistance()
boolean
isPreRaid()
private boolean
isSpawningExtraWave()
private void
markDirty()
private void
moveRaidCenter()
private void
playRaidHorn(BlockPos pos)
private Optional<BlockPos>
preCalculateRavagerSpawnLocation(int proximity)
void
removeFromWave(RaiderEntity entity, boolean countHealth)
void
removeLeader(int wave)
private void
removeObsoleteRaiders()
private void
setCenter(BlockPos center)
void
setWaveCaptain(int wave, RaiderEntity entity)
private boolean
shouldSpawnMoreGroups()
private void
spawnNextWave(BlockPos pos)
void
start(PlayerEntity player)
void
tick()
CompoundTag
toTag(CompoundTag tag)
void
updateBar()
private void
updateBarToPlayers()
-
Field Details
-
EVENT_TEXT
-
VICTORY_SUFFIX_TEXT
-
DEFEAT_SUFFIX_TEXT
-
VICTORY_TITLE
-
DEFEAT_TITLE
-
waveToCaptain
-
waveToRaiders
-
heroesOfTheVillage
-
ticksActive
private long ticksActive -
center
-
world
-
started
private boolean started -
id
private final int id -
totalHealth
private float totalHealth -
badOmenLevel
private int badOmenLevel -
active
private boolean active -
wavesSpawned
private int wavesSpawned -
bar
-
postRaidTicks
private int postRaidTicks -
preRaidTicks
private int preRaidTicks -
random
-
waveCount
private final int waveCount -
status
-
finishCooldown
private int finishCooldown -
preCalculatedRavagerSpawnLocation
-
-
Constructor Details
-
Raid
-
Raid
-
-
Method Details
-
isFinished
public boolean isFinished() -
isPreRaid
public boolean isPreRaid() -
hasSpawned
public boolean hasSpawned() -
hasStopped
public boolean hasStopped() -
hasWon
public boolean hasWon() -
hasLost
public boolean hasLost() -
getWorld
-
hasStarted
public boolean hasStarted() -
getGroupsSpawned
public int getGroupsSpawned() -
isInRaidDistance
-
updateBarToPlayers
private void updateBarToPlayers() -
getMaxAcceptableBadOmenLevel
public int getMaxAcceptableBadOmenLevel() -
getBadOmenLevel
public int getBadOmenLevel() -
start
-
invalidate
public void invalidate() -
tick
public void tick() -
moveRaidCenter
private void moveRaidCenter() -
preCalculateRavagerSpawnLocation
-
shouldSpawnMoreGroups
private boolean shouldSpawnMoreGroups() -
hasSpawnedFinalWave
private boolean hasSpawnedFinalWave() -
hasExtraWave
private boolean hasExtraWave() -
hasSpawnedExtraWave
private boolean hasSpawnedExtraWave() -
isSpawningExtraWave
private boolean isSpawningExtraWave() -
removeObsoleteRaiders
private void removeObsoleteRaiders() -
playRaidHorn
-
spawnNextWave
-
addRaider
-
updateBar
public void updateBar() -
getCurrentRaiderHealth
public float getCurrentRaiderHealth() -
canSpawnRaiders
private boolean canSpawnRaiders() -
getRaiderCount
public int getRaiderCount() -
removeFromWave
-
markDirty
private void markDirty() -
getOminousBanner
-
getCaptain
-
getRavagerSpawnLocation
-
addToWave
-
addToWave
-
setWaveCaptain
-
removeLeader
public void removeLeader(int wave) -
getCenter
-
setCenter
-
getRaidId
public int getRaidId() -
getCount
-
getBonusCount
private int getBonusCount(Raid.Member member, Random random, int wave, LocalDifficulty localDifficulty, boolean extra) -
isActive
public boolean isActive() -
toTag
-
getMaxWaves
-
getEnchantmentChance
public float getEnchantmentChance() -
addHero
-