public abstract class EntitySemiblockBase extends net.minecraft.entity.Entity implements ISemiBlock, IGUIButtonSensitive
blocksBuilding, boardingCooldown, DATA_POSE, DATA_SHARED_FLAGS_ID, entityData, fallDistance, firstTick, fluidHeight, fluidOnEyes, forcedLoading, glowing, hasImpulse, horizontalCollision, hurtMarked, inChunk, invulnerableTime, isInsidePortal, level, LOGGER, maxUpStep, moveDist, noCulling, noPhysics, onGround, portalEntrancePos, portalTime, pushthrough, random, removed, stringUUID, stuckSpeedMultiplier, tickCount, uuid, verticalCollision, walkDist, walkDistO, wasEyeInWater, wasTouchingWater, xChunk, xo, xOld, xRot, xRotO, yChunk, yo, yOld, yRot, yRotO, zChunk, zo, zOld| Modifier and Type | Method and Description |
|---|---|
protected void |
addAdditionalSaveData(net.minecraft.nbt.CompoundNBT compound) |
protected net.minecraft.util.math.AxisAlignedBB |
calculateBlockBounds()
Get the bounding box for this entity, which by default is the bounding box of the block we're on.
|
boolean |
canCoexist(ISemiBlock otherSemiblock)
Check if this semiblock can coexist with the other semiblock, in the same block pos.
|
boolean |
canStay()
Check if this semiblock can remain here.
|
protected void |
defineSynchedData() |
net.minecraft.network.IPacket<?> |
getAddEntityPacket() |
net.minecraft.util.math.AxisAlignedBB |
getBlockBounds()
Get the bounding box for this entity.
|
net.minecraft.util.math.BlockPos |
getBlockPos()
Get the block position this entity occupies.
|
net.minecraft.block.BlockState |
getBlockState()
Get the blockstate at the semiblock's position
|
float |
getBrightness() |
net.minecraft.tileentity.TileEntity |
getCachedTileEntity()
Get the tile entity at the semiblock's position.
|
float |
getDamageTaken() |
net.minecraft.util.text.ITextComponent |
getDisplayName()
Get the displayed name for this semiblock.
|
protected net.minecraft.item.Item |
getDroppedItem()
Get the semiblock item which will be dropped when this semiblock is removed.
|
net.minecraft.util.NonNullList<net.minecraft.item.ItemStack> |
getDrops()
Add any dropped items from this semiblock to the given list.
|
net.minecraft.util.ResourceLocation |
getSemiblockId()
Get a unique ID for this semiblock, which should match the corresponding item's registry name.
|
int |
getTimeSinceHit() |
int |
getTrackingId()
Get the tracking for this semiblock; this should only be used for network sync purposes, and is subject to change
on a world reload.
|
net.minecraft.world.World |
getWorld()
Get the world this semiblock is in.
|
void |
handleGUIButtonPress(java.lang.String tag,
boolean shiftHeld,
net.minecraft.entity.player.ServerPlayerEntity player) |
boolean |
hurt(net.minecraft.util.DamageSource source,
float amount) |
net.minecraft.util.ActionResultType |
interactAt(net.minecraft.entity.player.PlayerEntity player,
net.minecraft.util.math.vector.Vector3d hitVec,
net.minecraft.util.Hand hand) |
boolean |
isAir() |
boolean |
isNoGravity() |
boolean |
isPickable() |
boolean |
isValid()
Check if this semiblock is still valid, i.e.
|
void |
onAddedToWorld() |
protected void |
onBroken()
Called by onRemovedFromWorld().
|
void |
onRemovedFromWorld() |
protected void |
readAdditionalSaveData(net.minecraft.nbt.CompoundNBT compound) |
void |
readFromBuf(net.minecraft.network.PacketBuffer payload)
Read this semiblock from network buffer for network sync purposes.
|
void |
removeSemiblock(net.minecraft.entity.player.PlayerEntity player)
Mark this semiblock for removal.
|
net.minecraft.nbt.CompoundNBT |
serializeNBT(net.minecraft.nbt.CompoundNBT tag)
Written to the dropped item (under the "EntityTag" subtag) when the semiblock is broken, to persisted entity
data by
Entity#writeAdditional(), and displayed by info mods such as TOP or Waila. |
void |
setPos(double x,
double y,
double z) |
void |
tick()
Implement tick logic here.
|
void |
writeToBuf(net.minecraft.network.PacketBuffer payload)
Write this semiblock to network buffer for network sync purposes.
|
absMoveTo, absMoveTo, acceptsFailure, acceptsSuccess, addPassenger, addTag, animateHurt, awardKillScore, baseTick, blockPosition, broadcastToPlayer, calculateUpVector, calculateViewVector, canAddPassenger, canBeCollidedWith, canChangeDimensions, canCollideWith, canEnterPose, canRide, canSpawnSprintParticle, canTrample, canUpdate, canUpdate, captureDrops, captureDrops, causeFallDamage, changeDimension, changeDimension, checkAndResetForcedChunkAdditionFlag, checkAndResetUpdateChunkPos, checkDespawn, checkFallDamage, checkInsideBlocks, clearFire, closerThan, collideBoundingBox, collideBoundingBoxHeuristically, collideBoundingBoxLegacy, copyPosition, createCommandSourceStack, createHoverEvent, displayFireAnimation, distanceTo, distanceToSqr, distanceToSqr, distanceToSqr, doEnchantDamageEffects, doWaterSplashEffect, ejectPassengers, equals, fillCrashReportCategory, findDimensionEntryPoint, fireImmune, getAirSupply, getAllSlots, getArmorSlots, getBbHeight, getBbWidth, getBlockExplosionResistance, getBlockJumpFactor, getBlockPosBelowThatAffectsMyMovement, getBlockSpeedFactor, getBlockStateOn, getBoundingBox, getBoundingBoxForCulling, getBoundingBoxForPose, getCollisionHorizontalEscapeVector, getCommandSenderWorld, getControllingPassenger, getCustomName, getDeltaMovement, getDimensionChangingDelay, getDimensions, getDirection, getDismountLocationForPassenger, getEncodeId, getEntityData, getExitPortal, getEyeHeight, getEyeHeight, getEyeHeight, getEyeHeightAccess, getEyePosition, getEyeY, getFireImmuneTicks, getFluidHeight, getFluidJumpThreshold, getForward, getHandSlots, getHorizontalDistanceSqr, getId, getIndirectPassengers, getLeashOffset, getLightProbePosition, getLookAngle, getMaxAirSupply, getMaxFallDistance, getMotionDirection, getMyRidingOffset, getName, getOnPos, getPacketCoordinates, getPassengers, getPassengersRidingOffset, getPermissionLevel, getPersistentData, getPickRadius, getPistonPushReaction, getPortalWaitTime, getPose, getPosition, getRandomX, getRandomY, getRandomZ, getRelativePortalPosition, getRemainingFireTicks, getRootVehicle, getRopeHoldPosition, getRotationVector, getScoreboardName, getSelfAndPassengers, getServer, getSharedFlag, getSoundSource, getStringUUID, getSwimHighSpeedSplashSound, getSwimSound, getSwimSplashSound, getTags, getTeam, getTeamColor, getType, getTypeName, getUpVector, getUUID, getVehicle, getViewScale, getViewVector, getViewXRot, getViewYRot, getX, getX, getY, getY, getYHeadRot, getZ, getZ, handleEntityEvent, handleInsidePortal, handleNetherPortal, hasCustomName, hashCode, hasIndirectPassenger, hasOnePlayerPassenger, hasPassenger, hasPassenger, hasPermissions, ignoreExplosion, interact, is, isAddedToWorld, isAlive, isAlliedTo, isAlliedTo, isAttackable, isColliding, isControlledByLocalInstance, isCrouching, isCustomNameVisible, isDescending, isDiscrete, isEyeInFluid, isFree, isGlowing, isIgnoringBlockTriggers, isInLava, isInvisible, isInvisibleTo, isInvulnerable, isInvulnerableTo, isInWall, isInWater, isInWaterOrBubble, isInWaterOrRain, isInWaterRainOrBubble, isMovementNoisy, isOnFire, isOnGround, isOnPortalCooldown, isPassenger, isPassengerOfSameVehicle, isPushable, isPushedByFluid, isShiftKeyDown, isSilent, isSpectator, isSprinting, isSteppingCarefully, isSuppressingBounce, isSwimming, isUnderWater, isVehicle, isVisuallyCrawling, isVisuallySwimming, kill, killed, lavaHurt, lerpHeadTo, lerpMotion, lerpTo, limitPistonMovement, load, lookAt, makeFlySound, makeStuckInBlock, markHurt, maybeBackOffFromEdge, mirror, move, moveRelative, moveTo, moveTo, moveTo, moveTo, moveTowardsClosestSpace, newDoubleList, newFloatList, nextStep, onAboveBubbleCol, onInsideBlock, onInsideBubbleColumn, onlyOpCanSetNbt, onPassengerTurned, onSyncedDataUpdated, outOfWorld, pick, playerTouch, playFlySound, playSound, playStepSound, playSwimSound, position, positionRider, processPortalCooldown, push, push, reapplyPosition, refreshDimensions, remove, remove, removeAfterChangingDimensions, removePassenger, removeTag, removeVehicle, repositionEntityAfterLoad, resetPos, restoreFrom, revive, rideableUnderWater, rideTick, rotate, save, saveAsPassenger, saveWithoutId, sendMessage, setAirSupply, setBoundingBox, setCustomName, setCustomNameVisible, setDeltaMovement, setDeltaMovement, setGlowing, setId, setInvisible, setInvulnerable, setItemSlot, setLevel, setLocationFromBoundingbox, setNoGravity, setOnGround, setPacketCoordinates, setPacketCoordinates, setPortalCooldown, setPosAndOldPos, setPose, setPosRaw, setRemainingFireTicks, setRot, setSecondsOnFire, setSharedFlag, setShiftKeyDown, setSilent, setSlot, setSprinting, setSwimming, setUUID, setViewScale, setYBodyRot, setYHeadRot, shouldBlockExplode, shouldInformAdmins, shouldRender, shouldRenderAtSqrDistance, shouldShowName, showVehicleHealth, skipAttackInteraction, spawnAtLocation, spawnAtLocation, spawnAtLocation, spawnAtLocation, spawnSprintParticle, startRiding, startRiding, startSeenByPlayer, stopRiding, stopSeenByPlayer, teleportTo, teleportToWithTicket, thunderHit, toString, turn, unRide, updateFluidHeightAndDoFluidPushing, updateInWaterStateAndDoFluidPushing, updateSwimmingareCapsCompatible, areCapsCompatible, deserializeCaps, gatherCapabilities, gatherCapabilities, gatherCapabilities, getCapabilities, getCapability, invalidateCaps, reviveCaps, serializeCapsclone, finalize, getClass, notify, notifyAll, wait, wait, waitaddTooltip, byTrackingId, canPlace, getColor, onPlaced, onRightClickWithConfiguratorprotected void onBroken()
public void tick()
ISemiBlocksuper.tick() in subclass overrides!tick in interface ISemiBlocktick in class net.minecraft.entity.Entitypublic net.minecraft.util.text.ITextComponent getDisplayName()
ISemiBlockgetDisplayName in interface ISemiBlockgetDisplayName in interface net.minecraft.util.INameablegetDisplayName in class net.minecraft.entity.Entitypublic net.minecraft.util.ActionResultType interactAt(net.minecraft.entity.player.PlayerEntity player,
net.minecraft.util.math.vector.Vector3d hitVec,
net.minecraft.util.Hand hand)
interactAt in class net.minecraft.entity.Entityprotected void defineSynchedData()
defineSynchedData in class net.minecraft.entity.Entitypublic net.minecraft.world.World getWorld()
ISemiBlockgetWorld in interface ISemiBlockpublic net.minecraft.util.math.BlockPos getBlockPos()
ISemiBlockgetBlockPos in interface ISemiBlockpublic void setPos(double x,
double y,
double z)
setPos in class net.minecraft.entity.Entitypublic float getBrightness()
getBrightness in class net.minecraft.entity.Entitypublic net.minecraft.block.BlockState getBlockState()
public net.minecraft.tileentity.TileEntity getCachedTileEntity()
ISemiBlockgetCachedTileEntity in interface ISemiBlockprotected net.minecraft.item.Item getDroppedItem()
public net.minecraft.util.NonNullList<net.minecraft.item.ItemStack> getDrops()
ISemiBlockgetDrops in interface ISemiBlockpublic final net.minecraft.util.math.AxisAlignedBB getBlockBounds()
calculateBlockBounds() if you need a custom bounding box.protected net.minecraft.util.math.AxisAlignedBB calculateBlockBounds()
Entity.getBoundingBox().public boolean canStay()
public net.minecraft.util.ResourceLocation getSemiblockId()
ISemiBlockgetSemiblockId in interface ISemiBlockpublic net.minecraft.network.IPacket<?> getAddEntityPacket()
getAddEntityPacket in class net.minecraft.entity.Entitypublic net.minecraft.nbt.CompoundNBT serializeNBT(net.minecraft.nbt.CompoundNBT tag)
ISemiBlockEntity#writeAdditional(), and displayed by info mods such as TOP or Waila. Use this method
rather than writeAdditional() for fields that either need to be serialized to the dropped item, or
displayed on TOP/Waila.
serializeNBT in interface ISemiBlocktag - NBT tag to write data toprotected void readAdditionalSaveData(net.minecraft.nbt.CompoundNBT compound)
readAdditionalSaveData in class net.minecraft.entity.Entityprotected void addAdditionalSaveData(net.minecraft.nbt.CompoundNBT compound)
addAdditionalSaveData in class net.minecraft.entity.Entitypublic boolean isValid()
ISemiBlockisValid in interface ISemiBlockpublic void onAddedToWorld()
onAddedToWorld in interface net.minecraftforge.common.extensions.IForgeEntityonAddedToWorld in class net.minecraft.entity.Entitypublic void onRemovedFromWorld()
onRemovedFromWorld in interface net.minecraftforge.common.extensions.IForgeEntityonRemovedFromWorld in class net.minecraft.entity.Entitypublic boolean isNoGravity()
isNoGravity in class net.minecraft.entity.Entitypublic boolean isPickable()
isPickable in class net.minecraft.entity.Entitypublic int getTrackingId()
ISemiBlockgetTrackingId in interface ISemiBlockISemiBlock.byTrackingId(World, int)public boolean canCoexist(ISemiBlock otherSemiblock)
ISemiBlockIDirectionalSemiblock and both semiblocks have a different
side.canCoexist in interface ISemiBlockotherSemiblock - the other semiblockpublic void removeSemiblock(net.minecraft.entity.player.PlayerEntity player)
ISemiBlockremoveSemiblock in interface ISemiBlockplayer - player who is removing the semiblockpublic boolean hurt(net.minecraft.util.DamageSource source,
float amount)
hurt in class net.minecraft.entity.Entitypublic float getDamageTaken()
public int getTimeSinceHit()
public boolean isAir()
public void handleGUIButtonPress(java.lang.String tag,
boolean shiftHeld,
net.minecraft.entity.player.ServerPlayerEntity player)
handleGUIButtonPress in interface IGUIButtonSensitivepublic void writeToBuf(net.minecraft.network.PacketBuffer payload)
ISemiBlockwriteToBuf in interface ISemiBlockpayload - the bufferpublic void readFromBuf(net.minecraft.network.PacketBuffer payload)
ISemiBlockreadFromBuf in interface ISemiBlockpayload - the buffer