Class AbstractStatueBlockEntity<T extends net.minecraft.world.entity.LivingEntity>
java.lang.Object
net.minecraftforge.common.capabilities.CapabilityProvider<net.minecraft.world.level.block.entity.BlockEntity>
net.minecraft.world.level.block.entity.BlockEntity
tech.anonymoushacker1279.immersiveweapons.blockentity.AbstractStatueBlockEntity<T>
- All Implemented Interfaces:
net.minecraft.world.level.block.EntityBlock,net.minecraftforge.common.capabilities.ICapabilityProvider,net.minecraftforge.common.capabilities.ICapabilityProviderImpl<net.minecraft.world.level.block.entity.BlockEntity>,net.minecraftforge.common.capabilities.ICapabilitySerializable<net.minecraft.nbt.CompoundTag>,net.minecraftforge.common.extensions.IForgeBlockEntity,net.minecraftforge.common.util.INBTSerializable<net.minecraft.nbt.CompoundTag>
- Direct Known Subclasses:
MedicStatueBlockEntity,MinutemanStatueBlockEntity
public abstract class AbstractStatueBlockEntity<T extends net.minecraft.world.entity.LivingEntity>
extends net.minecraft.world.level.block.entity.BlockEntity
implements net.minecraft.world.level.block.EntityBlock
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraftforge.common.capabilities.CapabilityProvider
net.minecraftforge.common.capabilities.CapabilityProvider.AsField<B extends net.minecraftforge.common.capabilities.ICapabilityProviderImpl<B>> -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final net.minecraft.resources.ResourceKey<net.minecraft.world.level.biome.Biome>protected intprotected final intprotected intFields inherited from class net.minecraft.world.level.block.entity.BlockEntity
level, remove, worldPositionFields inherited from interface net.minecraftforge.common.extensions.IForgeBlockEntity
INFINITE_EXTENT_AABB -
Constructor Summary
ConstructorsConstructorDescriptionAbstractStatueBlockEntity(net.minecraft.world.level.block.entity.BlockEntityType<?> type, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState blockState, int maxNearbyEntities) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidattemptSpawnEntity(net.minecraft.world.entity.LivingEntity entity) protected abstract TcreateEntity(net.minecraft.world.level.Level level) protected @Nullable List<? extends net.minecraft.world.entity.LivingEntity>getEntitiesInArea(T entityClass) protected net.minecraft.core.BlockPosGet a random position in the nearby area.voidload(net.minecraft.nbt.CompoundTag nbt) protected voidsaveAdditional(net.minecraft.nbt.CompoundTag pTag) protected voidvoidtick(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos blockPos) Methods inherited from class net.minecraft.world.level.block.entity.BlockEntity
addEntityType, clearRemoved, fillCrashReportCategory, getBlockPos, getBlockState, getLevel, getPersistentData, getPosFromTag, getType, getUpdatePacket, getUpdateTag, hasLevel, isRemoved, loadStatic, onChunkUnloaded, onlyOpCanSetNbt, saveToItem, saveWithFullMetadata, saveWithId, saveWithoutMetadata, setBlockState, setChanged, setChanged, setLevel, setRemoved, triggerEventMethods inherited from class net.minecraftforge.common.capabilities.CapabilityProvider
areCapsCompatible, areCapsCompatible, deserializeCaps, gatherCapabilities, gatherCapabilities, gatherCapabilities, getCapabilities, getCapability, invalidateCaps, reviveCaps, serializeCapsMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.minecraft.world.level.block.EntityBlock
getListener, getTicker, newBlockEntityMethods inherited from interface net.minecraftforge.common.capabilities.ICapabilityProvider
getCapability, getCapabilityMethods inherited from interface net.minecraftforge.common.extensions.IForgeBlockEntity
deserializeNBT, getModelData, getRenderBoundingBox, handleUpdateTag, hasCustomOutlineRendering, onDataPacket, onLoad, requestModelDataUpdate, serializeNBT
-
Field Details
-
cooldown
protected int cooldown -
scannedEntities
protected int scannedEntities -
maxNearbyEntities
protected final int maxNearbyEntities -
BATTLEFIELD
protected static final net.minecraft.resources.ResourceKey<net.minecraft.world.level.biome.Biome> BATTLEFIELD
-
-
Constructor Details
-
AbstractStatueBlockEntity
public AbstractStatueBlockEntity(net.minecraft.world.level.block.entity.BlockEntityType<?> type, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState blockState, int maxNearbyEntities)
-
-
Method Details
-
tick
public void tick(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos blockPos) -
attemptSpawnEntity
protected void attemptSpawnEntity(net.minecraft.world.entity.LivingEntity entity) -
spawnParticles
protected void spawnParticles() -
getRandomPositionInArea
protected net.minecraft.core.BlockPos getRandomPositionInArea()Get a random position in the nearby area.- Returns:
- BlockPos
-
getEntitiesInArea
-
createEntity
-
saveAdditional
protected void saveAdditional(net.minecraft.nbt.CompoundTag pTag) - Overrides:
saveAdditionalin classnet.minecraft.world.level.block.entity.BlockEntity
-
load
public void load(net.minecraft.nbt.CompoundTag nbt) - Overrides:
loadin classnet.minecraft.world.level.block.entity.BlockEntity
-