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 classRaid.Member(package private) static classRaid.Status -
Field Summary
Fields Modifier and Type Field Description private booleanactiveprivate intbadOmenLevelprivate ServerBossBarbarprivate BlockPoscenterprivate static TextDEFEAT_SUFFIX_TEXTprivate static TextDEFEAT_TITLEprivate static TextEVENT_TEXTprivate intfinishCooldownprivate Set<UUID>heroesOfTheVillageprivate intidprivate intpostRaidTicksprivate Optional<BlockPos>preCalculatedRavagerSpawnLocationprivate intpreRaidTicksprivate Randomrandomprivate booleanstartedprivate Raid.Statusstatusprivate longticksActiveprivate floattotalHealthprivate static TextVICTORY_SUFFIX_TEXTprivate static TextVICTORY_TITLEprivate intwaveCountprivate intwavesSpawnedprivate Map<Integer,RaiderEntity>waveToCaptainprivate Map<Integer,Set<RaiderEntity>>waveToRaidersprivate ServerWorldworld -
Constructor Summary
Constructors Constructor Description Raid(int id, ServerWorld world, BlockPos pos)Raid(ServerWorld world, CompoundTag tag) -
Method Summary
Modifier and Type Method Description voidaddHero(Entity entity)voidaddRaider(int wave, RaiderEntity raider, BlockPos pos, boolean existing)private booleanaddToWave(int wave, RaiderEntity entity)booleanaddToWave(int wave, RaiderEntity entity, boolean countHealth)private booleancanSpawnRaiders()intgetBadOmenLevel()private intgetBonusCount(Raid.Member member, Random random, int wave, LocalDifficulty localDifficulty, boolean extra)RaiderEntitygetCaptain(int wave)BlockPosgetCenter()private intgetCount(Raid.Member member, int wave, boolean extra)floatgetCurrentRaiderHealth()floatgetEnchantmentChance()intgetGroupsSpawned()intgetMaxAcceptableBadOmenLevel()intgetMaxWaves(Difficulty difficulty)static ItemStackgetOminousBanner()intgetRaiderCount()intgetRaidId()private BlockPosgetRavagerSpawnLocation(int proximity, int tries)WorldgetWorld()private booleanhasExtraWave()booleanhasLost()booleanhasSpawned()private booleanhasSpawnedExtraWave()private booleanhasSpawnedFinalWave()booleanhasStarted()booleanhasStopped()booleanhasWon()voidinvalidate()booleanisActive()booleanisFinished()private Predicate<ServerPlayerEntity>isInRaidDistance()booleanisPreRaid()private booleanisSpawningExtraWave()private voidmarkDirty()private voidmoveRaidCenter()private voidplayRaidHorn(BlockPos pos)private Optional<BlockPos>preCalculateRavagerSpawnLocation(int proximity)voidremoveFromWave(RaiderEntity entity, boolean countHealth)voidremoveLeader(int wave)private voidremoveObsoleteRaiders()private voidsetCenter(BlockPos center)voidsetWaveCaptain(int wave, RaiderEntity entity)private booleanshouldSpawnMoreGroups()private voidspawnNextWave(BlockPos pos)voidstart(PlayerEntity player)voidtick()CompoundTagtoTag(CompoundTag tag)voidupdateBar()private voidupdateBarToPlayers()
-
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
-