public abstract class KineticTileEntity extends SmartTileEntity implements net.minecraft.tileentity.ITickableTileEntity, IHaveGoggleInformation, IHaveHoveringInformation, com.jozufozu.flywheel.backend.instancing.IInstanceRendered
IHaveGoggleInformation.Format| Modifier and Type | Field and Description |
|---|---|
protected net.minecraft.util.math.AxisAlignedBB |
cachedBoundingBox |
protected float |
capacity |
protected KineticEffectHandler |
effects |
protected float |
lastCapacityProvided |
protected float |
lastStressApplied |
java.lang.Long |
network |
boolean |
networkDirty |
protected boolean |
overStressed |
int |
preventSpeedUpdate |
net.minecraft.util.math.BlockPos |
source |
protected float |
speed |
protected float |
stress |
boolean |
updateSpeed |
protected boolean |
wasMoved |
componentSpacing, numberFormat, spacing| Constructor and Description |
|---|
KineticTileEntity(net.minecraft.tileentity.TileEntityType<?> typeIn) |
| Modifier and Type | Method and Description |
|---|---|
void |
addBehaviours(java.util.List<TileEntityBehaviour> behaviours) |
java.util.List<net.minecraft.util.math.BlockPos> |
addPropagationLocations(IRotate block,
net.minecraft.block.BlockState state,
java.util.List<net.minecraft.util.math.BlockPos> neighbours)
Specify additional locations the rotation propagator should look for
potentially connected components.
|
boolean |
addToGoggleTooltip(java.util.List<net.minecraft.util.text.ITextComponent> tooltip,
boolean isPlayerSneaking)
this method will be called when looking at a TileEntity that implemented this
interface
|
boolean |
addToTooltip(java.util.List<net.minecraft.util.text.ITextComponent> tooltip,
boolean isPlayerSneaking) |
void |
attachKinetics() |
float |
calculateAddedStressCapacity() |
float |
calculateStressApplied() |
protected boolean |
canPropagateDiagonally(IRotate block,
net.minecraft.block.BlockState state) |
void |
clearKineticInformation() |
static float |
convertToAngular(float speed) |
static float |
convertToDirection(float axisSpeed,
net.minecraft.util.Direction d) |
static float |
convertToLinear(float speed) |
void |
detachKinetics() |
protected void |
fromTag(net.minecraft.block.BlockState state,
net.minecraft.nbt.CompoundNBT compound,
boolean clientPacket)
Hook only these in future subclasses of STE
|
int |
getFlickerScore() |
float |
getGeneratedSpeed() |
KineticNetwork |
getOrCreateNetwork() |
net.minecraft.util.math.AxisAlignedBB |
getRenderBoundingBox() |
float |
getSpeed() |
protected net.minecraft.block.Block |
getStressConfigKey() |
float |
getTheoreticalSpeed() |
boolean |
hasNetwork() |
boolean |
hasSource() |
void |
initialize() |
boolean |
isCustomConnection(KineticTileEntity other,
net.minecraft.block.BlockState state,
net.minecraft.block.BlockState otherState)
Specify whether this component can propagate speed to the other in any
circumstance.
|
protected boolean |
isNoisy() |
boolean |
isOverStressed() |
boolean |
isSource() |
boolean |
isSpeedRequirementFulfilled() |
protected net.minecraft.util.math.AxisAlignedBB |
makeRenderBoundingBox() |
boolean |
needsSpeedUpdate() |
void |
onSpeedChanged(float previousSpeed) |
float |
propagateRotationTo(KineticTileEntity target,
net.minecraft.block.BlockState stateFrom,
net.minecraft.block.BlockState stateTo,
net.minecraft.util.math.BlockPos diff,
boolean connectedViaAxes,
boolean connectedViaCogs)
Specify ratio of transferred rotation from this kinetic component to a
specific other.
|
void |
removeSource() |
void |
requestModelDataUpdate() |
void |
setNetwork(java.lang.Long networkIn) |
void |
setRemoved() |
void |
setSource(net.minecraft.util.math.BlockPos source) |
void |
setSpeed(float speed) |
static void |
switchToBlockState(net.minecraft.world.World world,
net.minecraft.util.math.BlockPos pos,
net.minecraft.block.BlockState state) |
void |
tick() |
void |
tickAudio() |
void |
updateFromNetwork(float maxStress,
float currentStress,
int networkSize) |
void |
warnOfMovement() |
protected void |
write(net.minecraft.nbt.CompoundNBT compound,
boolean clientPacket)
Hook only these in future subclasses of STE
|
addBehavioursDeferred, attachBehaviourLate, canPlayerUse, forEachBehaviour, getBehaviour, getRequiredItems, getWorld, isFluidHandlerCap, isItemHandlerCap, isVirtual, lazyTick, load, markVirtual, readClientUpdate, removeBehaviour, save, setLazyTickRate, writeSafe, writeToClientcauseBlockUpdate, containedChunk, getTileData, getUpdatePacket, getUpdateTag, handleUpdateTag, notifyUpdate, onDataPacket, packetTarget, sendDataclearCache, clearRemoved, fillCrashReportCategory, getBlockPos, getBlockState, getLevel, getType, getViewDistance, hasLevel, isRemoved, loadStatic, logInvalidState, mirror, onChunkUnloaded, onlyOpCanSetNbt, rotate, setChanged, setLevelAndPosition, setPosition, triggerEventareCapsCompatible, areCapsCompatible, deserializeCaps, gatherCapabilities, gatherCapabilities, getCapabilities, getCapability, invalidateCaps, reviveCaps, serializeCapsclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcontainedFluidTooltip, formatgetWorld, shouldRenderNormally@Nullable public java.lang.Long network
@Nullable public net.minecraft.util.math.BlockPos source
public boolean networkDirty
public boolean updateSpeed
public int preventSpeedUpdate
protected KineticEffectHandler effects
protected float speed
protected float capacity
protected float stress
protected boolean overStressed
protected boolean wasMoved
protected float lastStressApplied
protected float lastCapacityProvided
protected net.minecraft.util.math.AxisAlignedBB cachedBoundingBox
public KineticTileEntity(net.minecraft.tileentity.TileEntityType<?> typeIn)
public void initialize()
initialize in class SmartTileEntitypublic void tick()
tick in interface net.minecraft.tileentity.ITickableTileEntitytick in class SmartTileEntitypublic void updateFromNetwork(float maxStress,
float currentStress,
int networkSize)
protected net.minecraft.block.Block getStressConfigKey()
public float calculateStressApplied()
public float calculateAddedStressCapacity()
public void onSpeedChanged(float previousSpeed)
public void setRemoved()
setRemoved in class SmartTileEntityprotected void write(net.minecraft.nbt.CompoundNBT compound,
boolean clientPacket)
SmartTileEntitywrite in class SmartTileEntitypublic boolean needsSpeedUpdate()
protected void fromTag(net.minecraft.block.BlockState state,
net.minecraft.nbt.CompoundNBT compound,
boolean clientPacket)
SmartTileEntityfromTag in class SmartTileEntitypublic float getGeneratedSpeed()
public boolean isSource()
public float getSpeed()
public float getTheoreticalSpeed()
public void setSpeed(float speed)
public boolean hasSource()
public void setSource(net.minecraft.util.math.BlockPos source)
public void removeSource()
public void setNetwork(@Nullable
java.lang.Long networkIn)
public KineticNetwork getOrCreateNetwork()
public boolean hasNetwork()
public void attachKinetics()
public void detachKinetics()
public boolean isSpeedRequirementFulfilled()
public static void switchToBlockState(net.minecraft.world.World world,
net.minecraft.util.math.BlockPos pos,
net.minecraft.block.BlockState state)
public void addBehaviours(java.util.List<TileEntityBehaviour> behaviours)
addBehaviours in class SmartTileEntitypublic boolean addToTooltip(java.util.List<net.minecraft.util.text.ITextComponent> tooltip,
boolean isPlayerSneaking)
addToTooltip in interface IHaveHoveringInformationpublic boolean addToGoggleTooltip(java.util.List<net.minecraft.util.text.ITextComponent> tooltip,
boolean isPlayerSneaking)
IHaveGoggleInformationaddToGoggleTooltip in interface IHaveGoggleInformationtrue if the tooltip creation was successful and should be displayed,
or false if the overlay should not be displayedpublic void clearKineticInformation()
public void warnOfMovement()
public int getFlickerScore()
public static float convertToDirection(float axisSpeed,
net.minecraft.util.Direction d)
public static float convertToLinear(float speed)
public static float convertToAngular(float speed)
public boolean isOverStressed()
public float propagateRotationTo(KineticTileEntity target, net.minecraft.block.BlockState stateFrom, net.minecraft.block.BlockState stateTo, net.minecraft.util.math.BlockPos diff, boolean connectedViaAxes, boolean connectedViaCogs)
target - other Kinetic TE to transfer tostateFrom - this TE's blockstatestateTo - other TE'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()public java.util.List<net.minecraft.util.math.BlockPos> addPropagationLocations(IRotate block, net.minecraft.block.BlockState state, java.util.List<net.minecraft.util.math.BlockPos> neighbours)
block - state - neighbours - public boolean isCustomConnection(KineticTileEntity other, net.minecraft.block.BlockState state, net.minecraft.block.BlockState otherState)
other - state - otherState - protected boolean canPropagateDiagonally(IRotate block, net.minecraft.block.BlockState state)
public void requestModelDataUpdate()
requestModelDataUpdate in interface net.minecraftforge.common.extensions.IForgeTileEntitypublic net.minecraft.util.math.AxisAlignedBB getRenderBoundingBox()
getRenderBoundingBox in interface net.minecraftforge.common.extensions.IForgeTileEntityprotected net.minecraft.util.math.AxisAlignedBB makeRenderBoundingBox()
public void tickAudio()
protected boolean isNoisy()