public final class EntityInfraredPacket extends net.minecraft.entity.Entity implements InfraredPacket
ModuleInfrared.addedToChunk, capturedDrops, captureDrops, chunkCoordX, chunkCoordY, chunkCoordZ, dataWatcher, dimension, distanceWalkedModified, distanceWalkedOnStepModified, entityCollisionReduction, entityUniqueID, extendedProperties, fallDistance, field_181016_an, field_181017_ao, field_181018_ap, fireResistance, firstUpdate, forceSpawn, height, hurtResistantTime, ignoreFrustumCheck, inPortal, inWater, isAirBorne, isCollided, isCollidedHorizontally, isCollidedVertically, isDead, isImmuneToFire, isInWeb, lastTickPosX, lastTickPosY, lastTickPosZ, motionX, motionY, motionZ, noClip, onGround, portalCounter, posX, posY, posZ, prevDistanceWalkedModified, preventEntitySpawning, prevPosX, prevPosY, prevPosZ, prevRotationPitch, prevRotationYaw, rand, renderDistanceWeight, riddenByEntity, ridingEntity, rotationPitch, rotationYaw, serverPosX, serverPosY, serverPosZ, stepHeight, ticksExisted, timeUntilPortal, velocityChanged, width, worldObj| Constructor and Description |
|---|
EntityInfraredPacket(net.minecraft.world.World world) |
| Modifier and Type | Method and Description |
|---|---|
void |
configure(net.minecraft.util.Vec3 start,
net.minecraft.util.Vec3 direction,
short value)
Sets up the packet's starting position, velocity and value carried.
|
protected void |
entityInit() |
net.minecraft.util.Vec3 |
getPacketDirection()
Get the normalized direction the packet is currently heading.
|
net.minecraft.util.Vec3 |
getPacketPosition()
Get the current position of the packet.
|
short |
getPacketValue()
Get the value carried by this packet.
|
net.minecraft.item.ItemStack |
getPickedResult(net.minecraft.util.MovingObjectPosition hit) |
boolean |
handleWaterMovement() |
boolean |
isImmuneToExplosions() |
boolean |
isInRangeToRenderDist(double distance) |
boolean |
isPushedByWater() |
void |
onEntityUpdate() |
protected void |
readEntityFromNBT(net.minecraft.nbt.NBTTagCompound nbt) |
void |
redirectPacket(net.minecraft.util.Vec3 position,
net.minecraft.util.Vec3 direction,
int addedLifetime)
Instead of consuming the packet, this can be used to redirect the
packet into a new direction.
|
void |
setDead() |
boolean |
shouldRenderInPass(int pass) |
void |
updateLifetime()
Called from our watchdog each server tick to update our lifetime.
|
protected void |
writeEntityToNBT(net.minecraft.nbt.NBTTagCompound nbt) |
addChatMessage, addEntityCrashInfo, addToPlayerScore, addVelocity, applyEnchantments, applyEntityCollision, attackEntityFrom, canAttackWithItem, canBeCollidedWith, canBePushed, canCommandSenderUseCommand, canRenderOnFire, canRiderInteract, canTriggerWalking, clientUpdateEntityNBT, copyDataFromOld, copyLocationAndAnglesFrom, createRunningParticles, dealFireDamage, doBlockCollisions, doesEntityNotTriggerPressurePlate, dropItem, dropItemWithOffset, entityDropItem, equals, extinguish, fall, func_174817_o, func_181012_aH, func_181013_g, func_181014_aG, getAir, getAlwaysRenderNameTag, getAlwaysRenderNameTagForRender, getBrightness, getBrightnessForRender, getCollisionBorderSize, getCollisionBoundingBox, getCollisionBox, getCommandSenderEntity, getCommandStats, getCustomNameTag, getDataWatcher, getDisplayName, getDistance, getDistanceSq, getDistanceSq, getDistanceSqToCenter, getDistanceSqToEntity, getDistanceToEntity, getEntityBoundingBox, getEntityData, getEntityId, getEntityString, getEntityWorld, getExplosionResistance, getExtendedProperties, getEyeHeight, getFlag, getHorizontalFacing, getHoverEvent, getInventory, getLook, getLookVec, getMaxFallHeight, getMaxInPortalTime, getMountedYOffset, getName, getNBTTagCompound, getParts, getPersistentID, getPortalCooldown, getPosition, getPositionEyes, getPositionVector, getRotationYawHead, getSplashSound, getSwimSound, getUniqueID, getVectorForRotation, getYOffset, handleStatusUpdate, hasCustomName, hashCode, hitByEntity, interactAt, interactFirst, isBurning, isCreatureType, isEating, isEntityAlive, isEntityEqual, isEntityInsideOpaqueBlock, isEntityInvulnerable, isImmuneToFire, isInLava, isInRangeToRender3d, isInsideOfMaterial, isInvisible, isInvisibleToPlayer, isInWater, isOffsetPositionInLiquid, isOutsideBorder, isRiding, isSilent, isSneaking, isSpectatedByPlayer, isSprinting, isWet, kill, mountEntity, moveEntity, moveFlying, moveToBlockPosAndAngles, newDoubleNBTList, newFloatNBTList, onChunkLoad, onCollideWithPlayer, onDataWatcherUpdate, onKillCommand, onKillEntity, onStruckByLightning, onUpdate, performHurtAnimation, playSound, playStepSound, preparePlayerToSpawn, pushOutOfBlocks, rayTrace, readFromNBT, registerExtendedProperties, replaceItemInInventory, resetEntityId, resetHeight, sendCommandFeedback, setAir, setAlwaysRenderNameTag, setAngles, setBeenAttacked, setCommandStat, setCurrentItemOrArmor, setCustomNameTag, setEating, setEntityBoundingBox, setEntityId, setFire, setFlag, setInvisible, setInWeb, setLocationAndAngles, setOnFireFromLava, setOutsideBorder, setPortal, setPosition, setPositionAndRotation, setPositionAndRotation2, setPositionAndUpdate, setRotation, setRotationYawHead, setSilent, setSize, setSneaking, setSprinting, setVelocity, setWorld, shouldDismountInWater, shouldRiderSit, shouldSetPosAfterLoading, spawnRunningParticles, toString, travelToDimension, updateFallState, updateRidden, updateRiderPosition, verifyExplosion, writeMountToNBT, writeToNBT, writeToNBTOptionalpublic EntityInfraredPacket(net.minecraft.world.World world)
public void configure(net.minecraft.util.Vec3 start,
net.minecraft.util.Vec3 direction,
short value)
Called from ModuleInfrared 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 entityInit()
entityInit in class net.minecraft.entity.Entitypublic void setDead()
setDead in class net.minecraft.entity.Entityprotected void readEntityFromNBT(net.minecraft.nbt.NBTTagCompound nbt)
readEntityFromNBT in class net.minecraft.entity.Entityprotected void writeEntityToNBT(net.minecraft.nbt.NBTTagCompound nbt)
writeEntityToNBT in class net.minecraft.entity.Entitypublic void onEntityUpdate()
onEntityUpdate in class net.minecraft.entity.Entitypublic boolean handleWaterMovement()
handleWaterMovement in class net.minecraft.entity.Entitypublic boolean isPushedByWater()
isPushedByWater in class net.minecraft.entity.Entitypublic boolean isImmuneToExplosions()
isImmuneToExplosions in class net.minecraft.entity.Entitypublic net.minecraft.item.ItemStack getPickedResult(net.minecraft.util.MovingObjectPosition hit)
getPickedResult in class net.minecraft.entity.Entitypublic boolean isInRangeToRenderDist(double distance)
isInRangeToRenderDist in class net.minecraft.entity.Entitypublic boolean shouldRenderInPass(int pass)
shouldRenderInPass in class net.minecraft.entity.Entitypublic short getPacketValue()
InfraredPacketgetPacketValue in interface InfraredPacketpublic net.minecraft.util.Vec3 getPacketPosition()
InfraredPacketgetPacketPosition in interface InfraredPacketpublic net.minecraft.util.Vec3 getPacketDirection()
InfraredPacketgetPacketDirection in interface InfraredPacketpublic void redirectPacket(net.minecraft.util.Vec3 position,
net.minecraft.util.Vec3 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, MovingObjectPosition)).
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.