public class RaidManager extends PersistentState
| Modifier and Type | Field and Description |
|---|---|
private int |
currentTime |
private int |
nextAvailableId |
private Map<Integer,Raid> |
raids |
private ServerWorld |
world |
| Constructor and Description |
|---|
RaidManager(ServerWorld world) |
| Modifier and Type | Method and Description |
|---|---|
void |
fromTag(CompoundTag tag) |
private Raid |
getOrCreateRaid(ServerWorld world,
BlockPos pos) |
Raid |
getRaid(int id) |
Raid |
getRaidAt(BlockPos pos,
int int2) |
static boolean |
isValidRaiderFor(RaiderEntity raider,
Raid raid) |
static String |
nameFor(DimensionType dimensionType) |
private int |
nextId() |
Raid |
startRaid(ServerPlayerEntity player) |
void |
tick() |
CompoundTag |
toTag(CompoundTag tag) |
private final ServerWorld world
private int nextAvailableId
private int currentTime
public RaidManager(ServerWorld world)
public Raid getRaid(int id)
public void tick()
public static boolean isValidRaiderFor(RaiderEntity raider, Raid raid)
@Nullable public Raid startRaid(ServerPlayerEntity player)
private Raid getOrCreateRaid(ServerWorld world, BlockPos pos)
public void fromTag(CompoundTag tag)
fromTag in class PersistentStatepublic CompoundTag toTag(CompoundTag tag)
toTag in class PersistentStatepublic static String nameFor(DimensionType dimensionType)
private int nextId()