Class BeltBlockEntity
java.lang.Object
net.neoforged.neoforge.attachment.AttachmentHolder
net.minecraft.world.level.block.entity.BlockEntity
com.simibubi.create.foundation.blockEntity.SyncedBlockEntity
com.simibubi.create.foundation.blockEntity.CachedRenderBBBlockEntity
com.simibubi.create.foundation.blockEntity.SmartBlockEntity
com.simibubi.create.content.kinetics.base.KineticBlockEntity
com.simibubi.create.content.kinetics.belt.BeltBlockEntity
- All Implemented Interfaces:
IHaveCustomOverlayIcon,IHaveGoggleInformation,IHaveHoveringInformation,PartialSafeNBT,SpecialBlockEntityItemRequirement,IInteractionChecker,net.createmod.ponder.api.VirtualBlockEntity,net.neoforged.neoforge.attachment.IAttachmentHolder,net.neoforged.neoforge.common.extensions.IBlockEntityExtension
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class net.minecraft.world.level.block.entity.BlockEntity
net.minecraft.world.level.block.entity.BlockEntity.DataComponentInputNested classes/interfaces inherited from class net.neoforged.neoforge.attachment.AttachmentHolder
net.neoforged.neoforge.attachment.AttachmentHolder.AsField -
Field Summary
FieldsModifier and TypeFieldDescriptionintOptional<net.minecraft.world.item.DyeColor> protected net.minecraft.core.BlockPosbooleanintprotected BeltInventoryprotected net.neoforged.neoforge.items.IItemHandlernet.minecraft.core.DirectionMap<net.minecraft.world.entity.Entity, BeltMovementHandler.TransportedEntityInfo> net.minecraft.nbt.CompoundTagFields inherited from class com.simibubi.create.content.kinetics.base.KineticBlockEntity
capacity, effects, lastCapacityProvided, lastStressApplied, network, networkDirty, overStressed, preventSpeedUpdate, sequenceContext, source, speed, stress, updateSpeed, wasMovedFields inherited from class com.simibubi.create.foundation.blockEntity.SmartBlockEntity
lazyTickCounter, lazyTickRateFields inherited from class net.minecraft.world.level.block.entity.BlockEntity
level, remove, worldPositionFields inherited from class net.neoforged.neoforge.attachment.AttachmentHolder
ATTACHMENTS_NBT_KEY -
Constructor Summary
ConstructorsConstructorDescriptionBeltBlockEntity(net.minecraft.world.level.block.entity.BlockEntityType<?> type, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddBehaviours(List<BlockEntityBehaviour> behaviours) booleanapplyColor(net.minecraft.world.item.DyeColor colorIn) floatprotected booleancanPropagateDiagonally(IRotate block, net.minecraft.world.level.block.state.BlockState state) voidnet.minecraft.world.phys.AABBvoiddestroy()Block destroyed or replaced.net.minecraft.core.Vec3iprotected net.minecraft.core.Directionfloatnet.minecraft.core.BlockPosfloatnet.neoforged.neoforge.client.model.data.ModelDatanet.minecraft.core.Vec3igetMovementDirection(boolean firstHalf) protected net.minecraft.core.Vec3igetMovementDirection(boolean firstHalf, boolean ignoreHalves) net.minecraft.core.Directionbooleanprotected voidvoidBlock destroyed or Chunk unloaded.voidbooleanprotected booleanfloatpropagateRotationTo(KineticBlockEntity target, net.minecraft.world.level.block.state.BlockState stateFrom, net.minecraft.world.level.block.state.BlockState stateTo, net.minecraft.core.BlockPos diff, boolean connectedViaAxes, boolean connectedViaCogs) Specify ratio of transferred rotation from this kinetic component to a specific other.protected voidread(net.minecraft.nbt.CompoundTag compound, net.minecraft.core.HolderLookup.Provider registries, boolean clientPacket) Hook only these in future subclasses of STEstatic voidregisterCapabilities(net.neoforged.neoforge.capabilities.RegisterCapabilitiesEvent event) voidvoidsetController(net.minecraft.core.BlockPos controller) voidsetCovered(boolean blockCoveringBelt) booleanvoidtick()voidwrite(net.minecraft.nbt.CompoundTag compound, net.minecraft.core.HolderLookup.Provider registries, boolean clientPacket) Hook only these in future subclasses of STEMethods inherited from class com.simibubi.create.content.kinetics.base.KineticBlockEntity
addPropagationLocations, addStressImpactStats, addToGoggleTooltip, addToTooltip, attachKinetics, calculateAddedStressCapacity, convertToAngular, convertToDirection, convertToLinear, copySequenceContextFrom, detachKinetics, getFlickerScore, getGeneratedSpeed, getOrCreateNetwork, getRotationAngleOffset, getSpeed, getStressConfigKey, getTheoreticalSpeed, hasNetwork, hasSource, initialize, isCustomConnection, isNoisy, isOverStressed, isSource, isSpeedRequirementFulfilled, needsSpeedUpdate, onSpeedChanged, remove, removeSource, requestModelDataUpdate, setNetwork, setSource, setSpeed, switchToBlockState, syncSequenceContext, tickAudio, updateFromNetwork, warnOfMovementMethods inherited from class com.simibubi.create.foundation.blockEntity.SmartBlockEntity
addBehavioursDeferred, attachBehaviourLate, award, awardIfNear, canPlayerUse, forEachBehaviour, getAllBehaviours, getBehaviour, getRequiredItems, isChunkUnloaded, isVirtual, lazyTick, loadAdditional, markVirtual, onChunkUnloaded, readClient, refreshBlockState, registerAwardables, removeBehaviour, saveAdditional, sendToMenu, setLazyTickRate, setRemoved, writeClient, writeSafeMethods inherited from class com.simibubi.create.foundation.blockEntity.CachedRenderBBBlockEntity
getRenderBoundingBox, invalidateRenderBoundingBoxMethods inherited from class com.simibubi.create.foundation.blockEntity.SyncedBlockEntity
blockHolderGetter, getUpdatePacket, getUpdateTag, handleUpdateTag, notifyUpdate, onDataPacket, sendDataMethods inherited from class net.minecraft.world.level.block.entity.BlockEntity
addEntityType, applyComponents, applyComponentsFromItemStack, applyImplicitComponents, clearRemoved, collectComponents, collectImplicitComponents, components, fillCrashReportCategory, getBlockPos, getBlockState, getLevel, getPersistentData, getPosFromTag, getType, hasLevel, isRemoved, isValidBlockState, loadCustomOnly, loadStatic, loadWithComponents, onlyOpCanSetNbt, parseCustomNameSafe, removeComponentsFromTag, removeData, saveCustomAndMetadata, saveCustomOnly, saveToItem, saveWithFullMetadata, saveWithId, saveWithoutMetadata, setBlockState, setChanged, setChanged, setComponents, setData, setLevel, triggerEventMethods inherited from class net.neoforged.neoforge.attachment.AttachmentHolder
deserializeAttachments, getData, getExistingData, hasAttachments, hasData, serializeAttachmentsMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.neoforged.neoforge.attachment.IAttachmentHolder
getData, getExistingData, hasData, removeData, setDataMethods inherited from interface net.neoforged.neoforge.common.extensions.IBlockEntityExtension
hasCustomOutlineRendering, invalidateCapabilities, onLoadMethods inherited from interface com.simibubi.create.api.equipment.goggles.IHaveCustomOverlayIcon
getIconMethods inherited from interface com.simibubi.create.api.equipment.goggles.IHaveGoggleInformation
containedFluidTooltip
-
Field Details
-
passengers
-
color
-
beltLength
public int beltLength -
index
public int index -
lastInsert
public net.minecraft.core.Direction lastInsert -
casing
-
covered
public boolean covered -
controller
protected net.minecraft.core.BlockPos controller -
inventory
-
itemHandler
protected net.neoforged.neoforge.items.IItemHandler itemHandler -
invVersionTracker
-
trackerUpdateTag
public net.minecraft.nbt.CompoundTag trackerUpdateTag
-
-
Constructor Details
-
BeltBlockEntity
public BeltBlockEntity(net.minecraft.world.level.block.entity.BlockEntityType<?> type, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state)
-
-
Method Details
-
registerCapabilities
public static void registerCapabilities(net.neoforged.neoforge.capabilities.RegisterCapabilitiesEvent event) -
addBehaviours
- Overrides:
addBehavioursin classKineticBlockEntity
-
tick
public void tick()- Overrides:
tickin classKineticBlockEntity
-
calculateStressApplied
public float calculateStressApplied()- Overrides:
calculateStressAppliedin classKineticBlockEntity
-
createRenderBoundingBox
public net.minecraft.world.phys.AABB createRenderBoundingBox()- Overrides:
createRenderBoundingBoxin classCachedRenderBBBlockEntity
-
initializeItemHandler
protected void initializeItemHandler() -
destroy
public void destroy()Description copied from class:SmartBlockEntityBlock destroyed or replaced. Requires Block to call IBE::onRemove- Overrides:
destroyin classSmartBlockEntity
-
invalidate
public void invalidate()Description copied from class:SmartBlockEntityBlock destroyed or Chunk unloaded. Usually invalidates capabilities- Overrides:
invalidatein classSmartBlockEntity
-
write
public void write(net.minecraft.nbt.CompoundTag compound, net.minecraft.core.HolderLookup.Provider registries, boolean clientPacket) Description copied from class:SmartBlockEntityHook only these in future subclasses of STE- Overrides:
writein classKineticBlockEntity
-
read
protected void read(net.minecraft.nbt.CompoundTag compound, net.minecraft.core.HolderLookup.Provider registries, boolean clientPacket) Description copied from class:SmartBlockEntityHook only these in future subclasses of STE- Overrides:
readin classKineticBlockEntity
-
clearKineticInformation
public void clearKineticInformation()- Overrides:
clearKineticInformationin classKineticBlockEntity
-
applyColor
public boolean applyColor(net.minecraft.world.item.DyeColor colorIn) -
getControllerBE
-
setController
public void setController(net.minecraft.core.BlockPos controller) -
getController
public net.minecraft.core.BlockPos getController() -
isController
public boolean isController() -
getBeltMovementSpeed
public float getBeltMovementSpeed() -
getDirectionAwareBeltMovementSpeed
public float getDirectionAwareBeltMovementSpeed() -
hasPulley
public boolean hasPulley() -
isLastBelt
protected boolean isLastBelt() -
getMovementDirection
public net.minecraft.core.Vec3i getMovementDirection(boolean firstHalf) -
getBeltChainDirection
public net.minecraft.core.Vec3i getBeltChainDirection() -
getMovementDirection
protected net.minecraft.core.Vec3i getMovementDirection(boolean firstHalf, boolean ignoreHalves) -
getMovementFacing
public net.minecraft.core.Direction getMovementFacing() -
getBeltFacing
protected net.minecraft.core.Direction getBeltFacing() -
getInventory
-
setCasingType
-
getModelData
public net.neoforged.neoforge.client.model.data.ModelData getModelData() -
canPropagateDiagonally
protected boolean canPropagateDiagonally(IRotate block, net.minecraft.world.level.block.state.BlockState state) - Overrides:
canPropagateDiagonallyin classKineticBlockEntity
-
propagateRotationTo
public float propagateRotationTo(KineticBlockEntity target, net.minecraft.world.level.block.state.BlockState stateFrom, net.minecraft.world.level.block.state.BlockState stateTo, net.minecraft.core.BlockPos diff, boolean connectedViaAxes, boolean connectedViaCogs) Description copied from class:KineticBlockEntitySpecify ratio of transferred rotation from this kinetic component to a specific other.- Overrides:
propagateRotationToin classKineticBlockEntity- Parameters:
target- other Kinetic BE to transfer tostateFrom- this BE's blockstatestateTo- other BE's blockstatediff- difference in position (to.pos - from.pos)connectedViaAxes- whether these kinetic blocks are connected via mutual IRotate.hasShaftTowards()connectedViaCogs- whether these kinetic blocks are connected via mutual IRotate.hasIntegratedCogwheel()- Returns:
- factor of rotation speed from this BE to other. 0 if no rotation is transferred, or the standard rules apply (integrated shafts/cogs)
-
invalidateItemHandler
public void invalidateItemHandler() -
shouldRenderNormally
public boolean shouldRenderNormally() -
setCovered
public void setCovered(boolean blockCoveringBelt)
-