public abstract class PokeBallEntity
extends net.minecraft.entity.projectile.ThrowableEntity
Modifier and Type | Field and Description |
---|---|
protected boolean |
canCatch
Whether the Poké Ball will catch the Pokémon.
|
float |
clientRotation |
protected EntityDataSyncManager |
dataSyncManager |
protected boolean |
dropItem
Whether to drop an item when the Poké Ball makes contact with something.
|
protected float |
endRotationYaw
The yaw of the Poké Ball at the end of its travel.
|
IncrementingVariable |
inc
Variable used to increment animation.
|
protected float |
initialScale
The initial scale of the Poké Ball.
|
AnimationType |
lastAnim
The previous animation of the Poké Ball.
|
protected float |
openAngle
The angle between the Poké Ball's lids when it opens.
|
protected PixelmonEntity |
pixelmon
The Pokémon being caught by the Poké Ball.
|
static float |
SCALE
The model scale of the Poké Ball.
|
protected int |
slot |
static DataSync<PokeBallEntity,AnimationType> |
SYNC_ANIMATION |
static DataSync<PokeBallEntity,java.lang.Boolean> |
SYNC_CRITICAL |
static DataSync<PokeBallEntity,java.lang.Integer> |
SYNC_ID |
static DataSync<PokeBallEntity,java.lang.Float> |
SYNC_INITIAL_PITCH |
static DataSync<PokeBallEntity,java.lang.Float> |
SYNC_INITIAL_YAW |
static DataSync<PokeBallEntity,java.lang.Boolean> |
SYNC_IS_ON_GROUND |
static DataSync<PokeBallEntity,java.lang.Boolean> |
SYNC_IS_WAITING |
static DataSync<PokeBallEntity,PokeBallMode> |
SYNC_MODE |
protected static DataSync<PokeBallEntity,java.util.Optional<java.util.UUID>> |
SYNC_OWNER |
static DataSync<PokeBallEntity,java.lang.Integer> |
SYNC_PAIRED_ENTITY |
protected static DataSync<PokeBallEntity,java.util.Optional<java.util.UUID>> |
SYNC_POKE_UUID |
static DataSync<PokeBallEntity,PokeBall> |
SYNC_POKEBALL_TYPE |
protected static DataSync<PokeBallEntity,java.lang.Byte> |
SYNC_SLOT |
protected net.minecraft.entity.LivingEntity |
thrower
The player who threw the Poké Ball.
|
protected int |
ticksPerShake
The number of ticks required for a single shake of the Poké Ball.
|
protected int |
waitTimer
The Poké Ball's animation timer.
|
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, portalEntrancePos, portalTime, pushthrough, random, removed, stringUUID, stuckSpeedMultiplier, tickCount, type, uuid, verticalCollision, walkDist, walkDistO, wasEyeInWater, wasTouchingWater, xChunk, xo, xOld, xRot, xRotO, yChunk, yo, yOld, yRot, yRotO, zChunk, zo, zOld
Constructor and Description |
---|
PokeBallEntity(net.minecraft.entity.EntityType<? extends PokeBallEntity> entityType,
PokeBall type,
net.minecraft.world.World world,
net.minecraft.entity.LivingEntity thrower,
PokeBallMode mode)
Initializes the specified Poké Ball and its data watcher attributes.
|
PokeBallEntity(net.minecraft.entity.EntityType<? extends PokeBallEntity> type,
net.minecraft.world.World world)
Initializes an ordinary Poké Ball and its data watcher attributes.
|
Modifier and Type | Method and Description |
---|---|
void |
baseTick() |
protected <A> void |
define(DataSync<?,A> sync,
A value) |
protected void |
defineSynchedData() |
protected void |
doCaptureCalc(PixelmonEntity p2)
Calculates whether the Pokémon will be caught and the number of shakes the Poké Ball will execute.
|
net.minecraft.network.IPacket<?> |
getAddEntityPacket() |
AnimationType |
getAnimation()
Gets the animation the Poké Ball is currently in.
|
PokeBall |
getBallType()
Gets the Poké Ball's type.
|
net.minecraft.item.ItemStack[] |
getComponentItems() |
boolean |
getCritical()
Gets whether the Poké Ball is critical.
|
float |
getInitialPitch()
Gets the initial pitch of the Poké Ball.
|
float |
getInitialYaw()
Gets the initial yaw of the Poké Ball.
|
protected boolean |
getIsOnGround()
Gets whether the Poké Ball is on the ground.
|
boolean |
getIsWaiting()
Gets whether the Poké Ball is in an animation.
|
PokeBallMode |
getMode()
Gets the current mode of the Poké Ball.
|
ModelPokeballs |
getModel()
Gets the Poké Ball's model.
|
net.minecraft.util.text.ITextComponent |
getName() |
java.util.UUID |
getOwnerId() |
int |
getPairedEntity() |
int |
getPokeballID()
Gets the Poké Ball's entity ID.
|
java.util.UUID |
getPokeUUID() |
int |
getShakeCount() |
int |
getWaitTimer() |
protected void |
moveCloser(float percent)
Moves the Pokémon closer to the Poké Ball upon attempting capture.
|
void |
onCaptureAttemptEffect()
Spawns particles from certain Poké Balls when the capture attempt starts.
|
protected void |
onHit(net.minecraft.util.math.RayTraceResult movingobjectposition) |
void |
onSyncedDataUpdated(net.minecraft.network.datasync.DataParameter<?> key) |
void |
premierFlash()
Spawns a particle if the Poké Ball is a Premier Ball.
|
void |
releaseEffect()
Spawns particles when a pokemon is sent out
|
void |
setAnimation(AnimationType animation)
Sets the animation the Poké Ball is currently in.
|
protected void |
setCritical(boolean value)
Sets whether the Poké Ball is critical.
|
void |
setInitialPitch(float pitch)
Sets the initial pitch of the Poké Ball.
|
void |
setInitialYaw(float yaw)
Sets the initial yaw of the Poké Ball.
|
protected void |
setIsOnGround(boolean value)
Sets whether the Poké Ball is on the ground.
|
protected void |
setIsWaiting(boolean value)
Sets whether the Poké Ball is in an animation.
|
void |
setModel(ModelPokeballs model) |
void |
setOwnerId(java.util.UUID ownerUuid) |
void |
setPairedEntity(net.minecraft.entity.Entity entity) |
void |
setPokeballID(int id)
Sets the Poké Ball's entity ID.s
|
void |
setPokeUUID(java.util.UUID pokeUUID) |
abstract void |
spawnRedBeam() |
void |
successfulCaptureEffect()
Spawns particles and plays a success sound when the capture succeeds.
|
void |
tick() |
getGravity, shouldRenderAtSqrDistance
addAdditionalSaveData, canHitEntity, getOwner, lerpMotion, lerpRotation, onHitBlock, onHitEntity, readAdditionalSaveData, setOwner, shoot, shootFromRotation, updateRotation
absMoveTo, absMoveTo, acceptsFailure, acceptsSuccess, addPassenger, addTag, animateHurt, awardKillScore, 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, 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, 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, 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, isMovementNoisy, isNoGravity, isOnFire, isOnGround, isOnPortalCooldown, isPassenger, isPassengerOfSameVehicle, isPickable, isPushable, isPushedByFluid, isShiftKeyDown, isSilent, isSpectator, isSprinting, isSteppingCarefully, isSuppressingBounce, isSwimming, isUnderWater, isVehicle, isVisuallyCrawling, isVisuallySwimming, kill, killed, lavaHurt, lerpHeadTo, lerpTo, 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, 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
areCapsCompatible, areCapsCompatible, deserializeCaps, gatherCapabilities, gatherCapabilities, gatherCapabilities, getCapabilities, getCapability, invalidateCaps, reviveCaps, serializeCaps
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
public static final DataSync<PokeBallEntity,PokeBall> SYNC_POKEBALL_TYPE
public static final DataSync<PokeBallEntity,java.lang.Boolean> SYNC_IS_WAITING
public static final DataSync<PokeBallEntity,java.lang.Boolean> SYNC_IS_ON_GROUND
public static final DataSync<PokeBallEntity,java.lang.Float> SYNC_INITIAL_YAW
public static final DataSync<PokeBallEntity,AnimationType> SYNC_ANIMATION
public static final DataSync<PokeBallEntity,java.lang.Integer> SYNC_ID
public static final DataSync<PokeBallEntity,java.lang.Float> SYNC_INITIAL_PITCH
public static final DataSync<PokeBallEntity,PokeBallMode> SYNC_MODE
protected static final DataSync<PokeBallEntity,java.util.Optional<java.util.UUID>> SYNC_OWNER
protected static final DataSync<PokeBallEntity,java.util.Optional<java.util.UUID>> SYNC_POKE_UUID
protected static final DataSync<PokeBallEntity,java.lang.Byte> SYNC_SLOT
public static final DataSync<PokeBallEntity,java.lang.Boolean> SYNC_CRITICAL
public static final DataSync<PokeBallEntity,java.lang.Integer> SYNC_PAIRED_ENTITY
protected final int ticksPerShake
protected int waitTimer
public static final float SCALE
protected net.minecraft.entity.LivingEntity thrower
protected PixelmonEntity pixelmon
protected float endRotationYaw
protected boolean dropItem
protected boolean canCatch
protected float openAngle
protected float initialScale
public IncrementingVariable inc
public AnimationType lastAnim
public float clientRotation
protected int slot
protected EntityDataSyncManager dataSyncManager
public PokeBallEntity(net.minecraft.entity.EntityType<? extends PokeBallEntity> type, net.minecraft.world.World world)
world
- The world the Poké Ball is in.public PokeBallEntity(net.minecraft.entity.EntityType<? extends PokeBallEntity> entityType, PokeBall type, net.minecraft.world.World world, net.minecraft.entity.LivingEntity thrower, PokeBallMode mode)
type
- The Poké Ball's type.world
- The world the Poké Ball is in.thrower
- The player who threw the Poké Ball.mode
- The mode the Poké Ball is in.public net.minecraft.util.text.ITextComponent getName()
getName
in interface net.minecraft.util.INameable
getName
in class net.minecraft.entity.Entity
protected void onHit(net.minecraft.util.math.RayTraceResult movingobjectposition)
onHit
in class net.minecraft.entity.projectile.ProjectileEntity
public abstract void spawnRedBeam()
public net.minecraft.item.ItemStack[] getComponentItems()
protected void defineSynchedData()
defineSynchedData
in class net.minecraft.entity.Entity
protected <A> void define(DataSync<?,A> sync, A value)
public void tick()
tick
in class net.minecraft.entity.projectile.ThrowableEntity
protected void moveCloser(float percent)
percent
- How close to move the Pokémon.public void baseTick()
baseTick
in class net.minecraft.entity.Entity
public void premierFlash()
public void onCaptureAttemptEffect()
public void successfulCaptureEffect()
public void releaseEffect()
protected void doCaptureCalc(PixelmonEntity p2)
p2
- The Pokémon being captured.public PokeBall getBallType()
protected void setIsWaiting(boolean value)
value
- Whether the Poké Ball is in an animation.public boolean getIsWaiting()
protected void setIsOnGround(boolean value)
value
- Whether the Poké Ball is on the ground.protected boolean getIsOnGround()
public void setAnimation(AnimationType animation)
animation
- The animation the Poké Ball is currently in.public AnimationType getAnimation()
public int getPokeballID()
public void setPokeballID(int id)
id
- The Poké Ball's entity ID.public float getInitialYaw()
public void setInitialYaw(float yaw)
yaw
- The initial yaw of the Poké Ball.public float getInitialPitch()
public void setInitialPitch(float pitch)
pitch
- The initial pitch of the Poké Ball.protected void setCritical(boolean value)
value
- Whether the Poké Ball is critical.public boolean getCritical()
public PokeBallMode getMode()
public ModelPokeballs getModel()
public void setModel(ModelPokeballs model)
public int getShakeCount()
public int getWaitTimer()
public java.util.UUID getOwnerId()
public void setOwnerId(java.util.UUID ownerUuid)
public java.util.UUID getPokeUUID()
public void setPokeUUID(java.util.UUID pokeUUID)
public int getPairedEntity()
public void setPairedEntity(net.minecraft.entity.Entity entity)
public net.minecraft.network.IPacket<?> getAddEntityPacket()
getAddEntityPacket
in class net.minecraft.entity.projectile.ThrowableEntity
public void onSyncedDataUpdated(net.minecraft.network.datasync.DataParameter<?> key)
onSyncedDataUpdated
in class net.minecraft.entity.Entity