Package net.minecraft.entity.projectile
Class FishingBobberEntity
- java.lang.Object
-
- net.minecraftforge.common.capabilities.CapabilityProvider<Entity>
-
- net.minecraft.entity.Entity
-
- net.minecraft.entity.projectile.ProjectileEntity
-
- net.minecraft.entity.projectile.FishingBobberEntity
-
- All Implemented Interfaces:
ICommandSource
,INameable
,ICapabilityProvider
,ICapabilitySerializable<CompoundNBT>
,IForgeEntity
,INBTSerializable<CompoundNBT>
public class FishingBobberEntity extends ProjectileEntity
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) static class
FishingBobberEntity.State
(package private) static class
FishingBobberEntity.WaterType
-
Nested classes/interfaces inherited from class net.minecraft.entity.Entity
Entity.IMoveCallback
-
-
Field Summary
Fields Modifier and Type Field Description private boolean
biting
private FishingBobberEntity.State
currentState
private static DataParameter<java.lang.Boolean>
DATA_BITING
private static DataParameter<java.lang.Integer>
DATA_HOOKED_ENTITY
private float
fishAngle
private Entity
hookedIn
private int
life
private int
luck
private int
lureSpeed
private int
nibble
private boolean
openWater
private int
outOfWaterTime
private java.util.Random
syncronizedRandom
private int
timeUntilHooked
private int
timeUntilLured
-
Fields inherited from class net.minecraft.entity.Entity
blocksBuilding, boardingCooldown, DATA_POSE, DATA_SHARED_FLAGS_ID, ENTITY_COUNTER, 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
-
Fields inherited from interface net.minecraft.command.ICommandSource
NULL
-
-
Constructor Summary
Constructors Modifier Constructor Description FishingBobberEntity(PlayerEntity p_i50220_1_, World p_i50220_2_, int p_i50220_3_, int p_i50220_4_)
FishingBobberEntity(World p_i47290_1_, PlayerEntity p_i47290_2_, double p_i47290_3_, double p_i47290_5_, double p_i47290_7_)
private
FishingBobberEntity(World p_i50219_1_, PlayerEntity p_i50219_2_, int p_i50219_3_, int p_i50219_4_)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addAdditionalSaveData(CompoundNBT p_213281_1_)
protected void
bringInHookedEntity()
private boolean
calculateOpenWater(BlockPos p_234603_1_)
boolean
canChangeDimensions()
protected boolean
canHitEntity(Entity p_230298_1_)
private void
catchingFish(BlockPos p_190621_1_)
private void
checkCollision()
protected void
defineSynchedData()
IPacket<?>
getAddEntityPacket()
Entity
getHookedIn()
private FishingBobberEntity.WaterType
getOpenWaterTypeForArea(BlockPos p_234602_1_, BlockPos p_234602_2_)
private FishingBobberEntity.WaterType
getOpenWaterTypeForBlock(BlockPos p_234604_1_)
PlayerEntity
getPlayerOwner()
void
handleEntityEvent(byte p_70103_1_)
protected boolean
isMovementNoisy()
boolean
isOpenWaterFishing()
void
lerpTo(double p_180426_1_, double p_180426_3_, double p_180426_5_, float p_180426_7_, float p_180426_8_, int p_180426_9_, boolean p_180426_10_)
protected void
onHitBlock(BlockRayTraceResult p_230299_1_)
protected void
onHitEntity(EntityRayTraceResult p_213868_1_)
void
onSyncedDataUpdated(DataParameter<?> p_184206_1_)
void
readAdditionalSaveData(CompoundNBT p_70037_1_)
void
remove(boolean keepData)
int
retrieve(ItemStack p_146034_1_)
private void
setHookedEntity()
boolean
shouldRenderAtSqrDistance(double p_70112_1_)
private boolean
shouldStopFishing(PlayerEntity p_234600_1_)
void
tick()
-
Methods inherited from class net.minecraft.entity.projectile.ProjectileEntity
getOwner, lerpMotion, lerpRotation, onHit, setOwner, shoot, shootFromRotation, updateRotation
-
Methods inherited from class net.minecraft.entity.Entity
absMoveTo, absMoveTo, acceptsFailure, acceptsSuccess, addPassenger, addTag, animateHurt, awardKillScore, baseTick, blockPosition, broadcastToPlayer, calculateUpVector, calculateViewVector, canAddPassenger, canBeCollidedWith, 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, getBrightness, getCollisionHorizontalEscapeVector, getCommandSenderWorld, getControllingPassenger, getCustomName, getDeltaMovement, getDimensionChangingDelay, getDimensions, getDirection, getDismountLocationForPassenger, getDisplayName, 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, handleInsidePortal, handleNetherPortal, hasCustomName, hashCode, hasIndirectPassenger, hasOnePlayerPassenger, hasPassenger, hasPassenger, hasPermissions, hurt, ignoreExplosion, interact, interactAt, 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, isNoGravity, isOnFire, isOnGround, isOnPortalCooldown, isPassenger, isPassengerOfSameVehicle, isPickable, isPushable, isPushedByFluid, isShiftKeyDown, isSilent, isSpectator, isSprinting, isSteppingCarefully, isSuppressingBounce, isSwimming, isUnderWater, isVehicle, isVisuallyCrawling, isVisuallySwimming, kill, killed, lavaHurt, lerpHeadTo, limitPistonMovement, load, lookAt, makeFlySound, makeStuckInBlock, markHurt, maybeBackOffFromEdge, mirror, move, moveRelative, moveTo, moveTo, moveTo, moveTo, moveTowardsClosestSpace, newDoubleList, newFloatList, nextStep, onAboveBubbleCol, onAddedToWorld, onInsideBlock, onInsideBubbleColumn, onlyOpCanSetNbt, onPassengerTurned, onRemovedFromWorld, outOfWorld, pick, playerTouch, playFlySound, playSound, playStepSound, playSwimSound, position, positionRider, processPortalCooldown, push, push, reapplyPosition, refreshDimensions, 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, setPos, setPosAndOldPos, setPose, setPosRaw, setRemainingFireTicks, setRot, setSecondsOnFire, setSharedFlag, setShiftKeyDown, setSilent, setSlot, setSprinting, setSwimming, setUUID, setViewScale, setYBodyRot, setYHeadRot, shouldBlockExplode, shouldInformAdmins, shouldRender, shouldShowName, showVehicleHealth, skipAttackInteraction, spawnAtLocation, spawnAtLocation, spawnAtLocation, spawnAtLocation, spawnSprintParticle, startRiding, startRiding, startSeenByPlayer, stopRiding, stopSeenByPlayer, teleportTo, teleportToWithTicket, thunderHit, toString, turn, unRide, updateFluidHeightAndDoFluidPushing, updateInWaterStateAndDoFluidPushing, updateSwimming
-
Methods inherited from class net.minecraftforge.common.capabilities.CapabilityProvider
areCapsCompatible, areCapsCompatible, deserializeCaps, gatherCapabilities, gatherCapabilities, gatherCapabilities, getCapabilities, getCapability, invalidateCaps, reviveCaps, serializeCaps
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface net.minecraftforge.common.capabilities.ICapabilityProvider
getCapability, getCapability
-
Methods inherited from interface net.minecraftforge.common.extensions.IForgeEntity
canBeRiddenInWater, canRiderInteract, deserializeNBT, getClassification, getDimensionsForge, getEntity, getEyeHeightForge, getParts, getPickedResult, isMultipartEntity, serializeNBT, shouldRiderSit
-
-
-
-
Field Detail
-
syncronizedRandom
private final java.util.Random syncronizedRandom
-
biting
private boolean biting
-
outOfWaterTime
private int outOfWaterTime
-
DATA_HOOKED_ENTITY
private static final DataParameter<java.lang.Integer> DATA_HOOKED_ENTITY
-
DATA_BITING
private static final DataParameter<java.lang.Boolean> DATA_BITING
-
life
private int life
-
nibble
private int nibble
-
timeUntilLured
private int timeUntilLured
-
timeUntilHooked
private int timeUntilHooked
-
fishAngle
private float fishAngle
-
openWater
private boolean openWater
-
hookedIn
private Entity hookedIn
-
currentState
private FishingBobberEntity.State currentState
-
luck
private final int luck
-
lureSpeed
private final int lureSpeed
-
-
Constructor Detail
-
FishingBobberEntity
private FishingBobberEntity(World p_i50219_1_, PlayerEntity p_i50219_2_, int p_i50219_3_, int p_i50219_4_)
-
FishingBobberEntity
public FishingBobberEntity(World p_i47290_1_, PlayerEntity p_i47290_2_, double p_i47290_3_, double p_i47290_5_, double p_i47290_7_)
-
FishingBobberEntity
public FishingBobberEntity(PlayerEntity p_i50220_1_, World p_i50220_2_, int p_i50220_3_, int p_i50220_4_)
-
-
Method Detail
-
defineSynchedData
protected void defineSynchedData()
- Specified by:
defineSynchedData
in classEntity
-
onSyncedDataUpdated
public void onSyncedDataUpdated(DataParameter<?> p_184206_1_)
- Overrides:
onSyncedDataUpdated
in classEntity
-
shouldRenderAtSqrDistance
public boolean shouldRenderAtSqrDistance(double p_70112_1_)
- Overrides:
shouldRenderAtSqrDistance
in classEntity
-
lerpTo
public void lerpTo(double p_180426_1_, double p_180426_3_, double p_180426_5_, float p_180426_7_, float p_180426_8_, int p_180426_9_, boolean p_180426_10_)
-
tick
public void tick()
- Overrides:
tick
in classProjectileEntity
-
shouldStopFishing
private boolean shouldStopFishing(PlayerEntity p_234600_1_)
-
checkCollision
private void checkCollision()
-
canHitEntity
protected boolean canHitEntity(Entity p_230298_1_)
- Overrides:
canHitEntity
in classProjectileEntity
-
onHitEntity
protected void onHitEntity(EntityRayTraceResult p_213868_1_)
- Overrides:
onHitEntity
in classProjectileEntity
-
onHitBlock
protected void onHitBlock(BlockRayTraceResult p_230299_1_)
- Overrides:
onHitBlock
in classProjectileEntity
-
setHookedEntity
private void setHookedEntity()
-
catchingFish
private void catchingFish(BlockPos p_190621_1_)
-
calculateOpenWater
private boolean calculateOpenWater(BlockPos p_234603_1_)
-
getOpenWaterTypeForArea
private FishingBobberEntity.WaterType getOpenWaterTypeForArea(BlockPos p_234602_1_, BlockPos p_234602_2_)
-
getOpenWaterTypeForBlock
private FishingBobberEntity.WaterType getOpenWaterTypeForBlock(BlockPos p_234604_1_)
-
isOpenWaterFishing
public boolean isOpenWaterFishing()
-
addAdditionalSaveData
public void addAdditionalSaveData(CompoundNBT p_213281_1_)
- Overrides:
addAdditionalSaveData
in classProjectileEntity
-
readAdditionalSaveData
public void readAdditionalSaveData(CompoundNBT p_70037_1_)
- Overrides:
readAdditionalSaveData
in classProjectileEntity
-
retrieve
public int retrieve(ItemStack p_146034_1_)
-
handleEntityEvent
public void handleEntityEvent(byte p_70103_1_)
- Overrides:
handleEntityEvent
in classEntity
-
bringInHookedEntity
protected void bringInHookedEntity()
-
isMovementNoisy
protected boolean isMovementNoisy()
- Overrides:
isMovementNoisy
in classEntity
-
getPlayerOwner
@Nullable public PlayerEntity getPlayerOwner()
-
getHookedIn
@Nullable public Entity getHookedIn()
-
canChangeDimensions
public boolean canChangeDimensions()
- Overrides:
canChangeDimensions
in classEntity
-
getAddEntityPacket
public IPacket<?> getAddEntityPacket()
- Specified by:
getAddEntityPacket
in classEntity
-
-