public final class InfraredPacketEntity extends net.minecraft.entity.Entity implements InfraredPacket
InfraredModule.age, applyMovementMultiplier, chunkX, chunkY, chunkZ, collided, dataTracker, dimension, ENTITY_FLAGS, fallDistance, field_5953, field_5954, field_5964, field_5973, field_5994, field_6000, field_6001, field_6008, field_6016, field_6020, field_6023, field_6028, field_6033, field_6039, fireImmune, glowing, horizontalCollision, ignoreCameraFrustum, inPortal, insideWater, invalid, lastPortalPosition, LOGGER, movementMultiplier, noClip, onGround, pitch, portalCooldown, portalTime, prevPitch, prevRenderX, prevRenderY, prevRenderZ, prevX, prevY, prevYaw, prevZ, pushSpeedReduction, random, ridingCooldown, stepHeight, teleporting, uuid, uuidString, velocityDirty, velocityModified, velocityX, velocityY, velocityZ, verticalCollision, world, x, y, yaw, z| Constructor and Description |
|---|
InfraredPacketEntity(net.minecraft.world.World world) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
canFly() |
void |
configure(net.minecraft.util.math.Vec3d start,
net.minecraft.util.math.Vec3d direction,
short value)
Sets up the packet's starting position, velocity and value carried.
|
net.minecraft.network.Packet<?> |
createSpawnPacket() |
net.minecraft.util.math.Vec3d |
getPacketDirection()
Get the normalized direction the packet is currently heading.
|
net.minecraft.util.math.Vec3d |
getPacketPosition()
Get the current position of the packet.
|
short |
getPacketValue()
Get the value carried by this packet.
|
protected void |
initDataTracker() |
void |
invalidate() |
boolean |
isImmuneToExplosion() |
boolean |
method_5713() |
protected void |
readCustomDataFromTag(net.minecraft.nbt.CompoundTag nbt) |
void |
redirectPacket(net.minecraft.util.math.Vec3d position,
net.minecraft.util.math.Vec3d direction,
int addedLifetime)
Instead of consuming the packet, this can be used to redirect the
packet into a new direction.
|
boolean |
shouldRenderAtDistance(double distance) |
void |
updateLifetime()
Called from our watchdog each server tick to update our lifetime.
|
void |
updateLogic() |
protected void |
writeCustomDataToTag(net.minecraft.nbt.CompoundTag nbt) |
addPassenger, addScoreboardTag, addVelocity, allowsPermissionLevel, appendCommandFeedback, applyMirror, applyRotation, attemptSprintingParticles, burn, canAddPassenger, canAvoidTraps, canExplosionDestroyBlock, canSeePlayer, canStartRiding, canUsePortals, changeDimension, checkBlockCollision, damage, destroy, distanceTo, distanceTo, doesCollide, doesRenderOnFire, dropItem, dropItem, dropStack, dropStack, equals, extinguish, fromTag, getBoundingBox, getBoundingBoxMarginForTargeting, getBreath, getCameraPosVec, getCommandSource, getComponentHoverEvent, getCustomName, getDataTracker, getDefaultPortalCooldown, getDisplayName, getEffectiveExplosionResistance, getEntityFlag, getEntityId, getEntityName, getEntityWorld, getEyeHeight, getHeadYaw, getHeight, getHeightOffset, getHorizontalFacing, getItemsArmor, getItemsEquipped, getItemsHand, getLightmapCoordinates, getMaxBreath, getMaxPortalTime, getMountedHeightOffset, getName, getParts, getPassengerList, getPermissionLevel, getPistonBehavior, getPitch, getPos, getPosVector, getPrimaryPassenger, getRenderDistanceMultiplier, getRiddenEntity, getRotationClient, getRotationVec, getRotationVecClient, getSafeFallDistance, getSavedEntityId, getScoreboardTags, getScoreboardTeam, getServer, getSoundCategory, getSoundSplash, getSoundSwim, getTopmostRiddenEntity, getType, getUuid, getUuidAsString, getVectorFromRotation, getWidth, getYaw, handleFallDamage, hasCustomName, hashCode, hasPassenger, hasPassengers, hasVehicle, interact, interactAt, isCustomNameVisible, isFireImmune, isGlowing, isInsideFluid, isInsideWall, isInsideWater, isInsideWaterOrBubbleColumn, isInsideWaterOrRain, isInvisible, isInvulnerable, isInvulnerableTo, isOnFire, isPartOf, isPushable, isSilent, isSneaking, isSprinting, isSwimming, isTeammate, isTeamPlayer, isTouchingLava, isTouchingWater, isUnaffectedByGravity, isValid, kill, lookAt, method_17833, method_18003, method_5623, method_5632, method_5644, method_5654, method_5656, method_5658, method_5672, method_5676, method_5680, method_5683, method_5698, method_5700, method_5703, method_5708, method_5709, method_5711, method_5716, method_5718, method_5720, method_5723, method_5724, method_5732, method_5734, method_5736, method_5744, method_5754, method_5755, method_5758, method_5764, method_5776, method_5777, method_5787, method_5788, method_5790, method_5794, method_5796, method_5801, method_5817, method_5821, method_5823, method_5827, method_5830, method_5833, method_5842, method_5843, method_5859, method_5861, method_5865, method_5867, method_5869, method_5872, method_5874, method_5878, method_5879, method_7325, move, moveToBoundingBoxCenter, onBlockCollision, onPlayerCollision, onStartedTrackingBy, onStoppedTrackingBy, onStruckByLightning, onSwimmingStart, onTrackedDataSet, playSound, playStepSound, populateCrashReport, pushAwayFrom, rayTrace, removeAllPassengers, removePassenger, removeScoreboardTag, saveSelfToTag, saveToTag, scheduleVelocityUpdate, sendCommandFeedback, setBoundingBox, setBreath, setCustomName, setCustomNameVisible, setEntityFlag, setEntityId, setEquippedStack, setGlowing, setHeadYaw, setInPortal, setInvisible, setInvulnerable, setInWorld, setOnFireFor, setOnFireFromLava, setPosition, setPositionAndAngles, setPositionAndAngles, setPositionAndAngles, setPositionAndRotations, setPositionAnglesAndUpdate, setRenderDistanceMultiplier, setRotation, setSilent, setSize, setSneaking, setSprinting, setUnaffectedByGravity, setUuid, setVelocityClient, setWorld, setYaw, shouldBroadcastConsoleToOps, shouldRenderFrom, shouldRenderName, shouldSetPositionOnLoad, shouldTrackOutput, slowMovement, spawnSprintingParticles, squaredDistanceTo, squaredDistanceTo, squaredDistanceTo, squaredDistanceTo, squaredDistanceToCenter, startRiding, startRiding, stopRiding, toListTag, toListTag, toString, toTag, update, updatePortalCooldownpublic InfraredPacketEntity(net.minecraft.world.World world)
public net.minecraft.network.Packet<?> createSpawnPacket()
createSpawnPacket in class net.minecraft.entity.Entitypublic void configure(net.minecraft.util.math.Vec3d start,
net.minecraft.util.math.Vec3d direction,
short value)
Called from InfraredModule directly
after instantiation of a new infrared packet entity.
start - the position of the block that spawned the packet.direction - the direction in which the packet was emitted.value - the value the packet carries.public void updateLifetime()
protected void initDataTracker()
initDataTracker in class net.minecraft.entity.Entitypublic void invalidate()
invalidate in class net.minecraft.entity.Entityprotected void readCustomDataFromTag(net.minecraft.nbt.CompoundTag nbt)
readCustomDataFromTag in class net.minecraft.entity.Entityprotected void writeCustomDataToTag(net.minecraft.nbt.CompoundTag nbt)
writeCustomDataToTag in class net.minecraft.entity.Entitypublic void updateLogic()
updateLogic in class net.minecraft.entity.Entitypublic boolean method_5713()
method_5713 in class net.minecraft.entity.Entitypublic boolean canFly()
canFly in class net.minecraft.entity.Entitypublic boolean isImmuneToExplosion()
isImmuneToExplosion in class net.minecraft.entity.Entitypublic boolean shouldRenderAtDistance(double distance)
shouldRenderAtDistance in class net.minecraft.entity.Entitypublic short getPacketValue()
InfraredPacketgetPacketValue in interface InfraredPacketpublic net.minecraft.util.math.Vec3d getPacketPosition()
InfraredPacketgetPacketPosition in interface InfraredPacketpublic net.minecraft.util.math.Vec3d getPacketDirection()
InfraredPacketgetPacketDirection in interface InfraredPacketpublic void redirectPacket(net.minecraft.util.math.Vec3d position,
net.minecraft.util.math.Vec3d direction,
int addedLifetime)
InfraredPacket
When changing the direction of a packet, you may want to set the new
position to the hit position (passed to InfraredReceiver.onInfraredPacket(InfraredPacket, HitResult)).
Any changes to the position will be taken into account automatically,
so that packets do not travel further due to this than they otherwise
would. Note that you cannot move a packet further than it would travel
in one tick anyway (4 blocks).
redirectPacket in interface InfraredPacketposition - the new current position of the packet.direction - the new direction the packet should be heading.addedLifetime - how many ticks to add to the packet's lifetime.