Class MechanicalCrafterBlockEntity
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.crafter.MechanicalCrafterBlockEntity
- All Implemented Interfaces:
TransformableBlockEntity,IHaveCustomOverlayIcon,IHaveGoggleInformation,IHaveHoveringInformation,PartialSafeNBT,SpecialBlockEntityItemRequirement,IInteractionChecker,net.createmod.ponder.api.VirtualBlockEntity,net.neoforged.neoforge.attachment.IAttachmentHolder,net.neoforged.neoforge.common.extensions.IBlockEntityExtension
public class MechanicalCrafterBlockEntity
extends KineticBlockEntity
implements TransformableBlockEntity
-
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 TypeFieldDescriptionprotected intprotected booleanprotected RecipeGridHandler.GroupedItemsprotected RecipeGridHandler.GroupedItemsprotected ConnectedInputHandler.ConnectedInputprotected @Nullable net.neoforged.neoforge.items.IItemHandlerprotected MechanicalCrafterBlockEntity.Inventoryprotected com.simibubi.create.content.kinetics.crafter.MechanicalCrafterBlockEntity.Phaseprotected booleanprotected booleanFields 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
ConstructorsConstructorDescriptionMechanicalCrafterBlockEntity(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) protected voidbegin()voidvoidcheckCompletedRecipe(boolean poweredStart) voidprotected voidbooleanbooleanvoiddropItem(net.minecraft.world.phys.Vec3 ejectPos, net.minecraft.world.item.ItemStack stack) voideject()voidintgetInput()protected net.neoforged.neoforge.items.IItemHandlernet.minecraft.core.Directionnet.createmod.catnip.math.BlockFacegetTargetFace(net.minecraft.world.level.Level world, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state) protected DirectBeltInputBehaviourvoidBlock destroyed or Chunk unloaded.protected booleanvoidlazyTick()voidonSpeedChanged(float previousSpeed) 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) voidsetScriptedResult(net.minecraft.world.item.ItemStack scriptedResult) voidtick()voidtransform(net.minecraft.world.level.block.entity.BlockEntity be, StructureTransform transform) voidvoidwrite(net.minecraft.nbt.CompoundTag compound, net.minecraft.core.HolderLookup.Provider registries, boolean clientPacket) Hook only these in future subclasses of STEvoidwriteSafe(net.minecraft.nbt.CompoundTag tag, net.minecraft.core.HolderLookup.Provider registries) This will always be called from the logical serverMethods inherited from class com.simibubi.create.content.kinetics.base.KineticBlockEntity
addPropagationLocations, addStressImpactStats, addToGoggleTooltip, addToTooltip, attachKinetics, calculateAddedStressCapacity, calculateStressApplied, canPropagateDiagonally, clearKineticInformation, convertToAngular, convertToDirection, convertToLinear, copySequenceContextFrom, detachKinetics, getFlickerScore, getGeneratedSpeed, getOrCreateNetwork, getRotationAngleOffset, getSpeed, getStressConfigKey, getTheoreticalSpeed, hasNetwork, hasSource, initialize, isCustomConnection, isNoisy, isOverStressed, isSource, isSpeedRequirementFulfilled, makeComputerKineticsChangeEvent, needsSpeedUpdate, propagateRotationTo, 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, destroy, forEachBehaviour, getAllBehaviours, getBehaviour, getRequiredItems, isChunkUnloaded, isVirtual, loadAdditional, markVirtual, onChunkUnloaded, readClient, refreshBlockState, registerAwardables, removeBehaviour, saveAdditional, sendToMenu, setLazyTickRate, setRemoved, writeClientMethods inherited from class com.simibubi.create.foundation.blockEntity.CachedRenderBBBlockEntity
createRenderBoundingBox, 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, syncData, triggerEventMethods inherited from class net.neoforged.neoforge.attachment.AttachmentHolder
deserializeAttachments, getData, getExistingDataOrNull, 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, getExistingData, getExistingDataOrNull, hasData, removeData, setData, syncDataMethods inherited from interface net.neoforged.neoforge.common.extensions.IBlockEntityExtension
getModelData, 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
-
inventory
-
groupedItems
-
input
-
invCap
@Nullable protected @Nullable net.neoforged.neoforge.items.IItemHandler invCap -
reRender
protected boolean reRender -
phase
protected com.simibubi.create.content.kinetics.crafter.MechanicalCrafterBlockEntity.Phase phase -
countDown
protected int countDown -
covered
protected boolean covered -
wasPoweredBefore
protected boolean wasPoweredBefore -
groupedItemsBeforeCraft
-
-
Constructor Details
-
MechanicalCrafterBlockEntity
public MechanicalCrafterBlockEntity(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) -
getInvCapability
protected net.neoforged.neoforge.items.IItemHandler getInvCapability() -
addBehaviours
- Overrides:
addBehavioursin classKineticBlockEntity
-
onSpeedChanged
public void onSpeedChanged(float previousSpeed) - Overrides:
onSpeedChangedin classKineticBlockEntity
-
blockChanged
public void blockChanged() -
getTargetFace
public net.createmod.catnip.math.BlockFace getTargetFace(net.minecraft.world.level.Level world, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state) -
getTargetDirection
public net.minecraft.core.Direction getTargetDirection() -
writeSafe
public void writeSafe(net.minecraft.nbt.CompoundTag tag, net.minecraft.core.HolderLookup.Provider registries) Description copied from interface:PartialSafeNBTThis will always be called from the logical server- Specified by:
writeSafein interfacePartialSafeNBT- Overrides:
writeSafein 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
-
invalidate
public void invalidate()Description copied from class:SmartBlockEntityBlock destroyed or Chunk unloaded. Usually invalidates capabilities- Overrides:
invalidatein classSmartBlockEntity
-
getCountDownSpeed
public int getCountDownSpeed() -
tick
public void tick()- Overrides:
tickin classKineticBlockEntity
-
isTargetingBelt
protected boolean isTargetingBelt() -
getTargetingBelt
-
tryInsert
public void tryInsert() -
ejectWholeGrid
public void ejectWholeGrid() -
eject
public void eject() -
dropItem
public void dropItem(net.minecraft.world.phys.Vec3 ejectPos, net.minecraft.world.item.ItemStack stack) -
lazyTick
public void lazyTick()- Overrides:
lazyTickin classSmartBlockEntity
-
craftingItemPresent
public boolean craftingItemPresent() -
craftingItemOrCoverPresent
public boolean craftingItemOrCoverPresent() -
checkCompletedRecipe
public void checkCompletedRecipe(boolean poweredStart) -
begin
protected void begin() -
continueIfAllPrecedingFinished
protected void continueIfAllPrecedingFinished() -
connectivityChanged
public void connectivityChanged() -
getInventory
-
setScriptedResult
public void setScriptedResult(net.minecraft.world.item.ItemStack scriptedResult) -
getInput
-
transform
public void transform(net.minecraft.world.level.block.entity.BlockEntity be, StructureTransform transform) - Specified by:
transformin interfaceTransformableBlockEntity
-