Class EntityBroom
java.lang.Object
net.minecraftforge.common.capabilities.CapabilityProvider<net.minecraft.world.entity.Entity>
net.minecraft.world.entity.Entity
org.cyclops.evilcraft.entity.item.EntityBroom
- All Implemented Interfaces:
net.minecraft.commands.CommandSource,net.minecraft.world.level.entity.EntityAccess,net.minecraft.world.Nameable,net.minecraftforge.common.capabilities.ICapabilityProvider,net.minecraftforge.common.capabilities.ICapabilityProviderImpl<net.minecraft.world.entity.Entity>,net.minecraftforge.common.capabilities.ICapabilitySerializable<net.minecraft.nbt.CompoundTag>,net.minecraftforge.common.extensions.IForgeEntity,net.minecraftforge.common.util.INBTSerializable<net.minecraft.nbt.CompoundTag>
public class EntityBroom
extends net.minecraft.world.entity.Entity
Entity for a broom
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.world.entity.Entity
net.minecraft.world.entity.Entity.MoveFunction, net.minecraft.world.entity.Entity.MovementEmission, net.minecraft.world.entity.Entity.RemovalReasonNested classes/interfaces inherited from class net.minecraftforge.common.capabilities.CapabilityProvider
net.minecraftforge.common.capabilities.CapabilityProvider.AsField<B extends net.minecraftforge.common.capabilities.ICapabilityProviderImpl<B>> -
Field Summary
FieldsModifier and TypeFieldDescriptionnet.minecraft.world.entity.LivingEntityThe player that last mounted this broom (used to detect dismounting)static final floatMaximum angle of the broom between the XZ-plane and the Y-axis (in degrees, -90 = completely up, +90 = completely down) This limits the angle under which the player can move up or downstatic final floatMinimum angle of the broom between the XZ-plane and the Y-axis (in degrees, -90 = completely up, +90 = completely down) This limits the angle under which the player can move up or downstatic final doubleSpeed for the broom (in all directions)Fields inherited from class net.minecraft.world.entity.Entity
BASE_TICKS_REQUIRED_TO_FREEZE, blocksBuilding, BOARDING_COOLDOWN, boardingCooldown, BREATHING_DISTANCE_BELOW_EYES, DATA_POSE, DATA_SHARED_FLAGS_ID, DEFAULT_BB_HEIGHT, DEFAULT_BB_WIDTH, DELTA_AFFECTED_BY_BLOCKS_BELOW, ENTITY_COUNTER, entityData, fallDistance, firstTick, FLAG_FALL_FLYING, FLAG_GLOWING, FLAG_ONFIRE, fluidHeight, flyDist, forgeFluidTypeHeight, FREEZE_HURT_FREQUENCY, hasImpulse, horizontalCollision, hurtMarked, ID_TAG, invulnerableTime, isInPowderSnow, isInsidePortal, level, MAX_ENTITY_TAG_COUNT, maxUpStep, minorHorizontalCollision, moveDist, noCulling, noPhysics, onGround, PASSENGERS_TAG, portalEntrancePos, portalTime, random, stringUUID, stuckSpeedMultiplier, tickCount, TOTAL_AIR_SUPPLY, uuid, UUID_TAG, verticalCollision, verticalCollisionBelow, walkDist, walkDistO, wasEyeInWater, wasInPowderSnow, wasOnFire, wasTouchingWater, xo, xOld, xRotO, yo, yOld, yRotO, zo, zOldFields inherited from interface net.minecraft.commands.CommandSource
NULL -
Constructor Summary
ConstructorsConstructorDescriptionEntityBroom(net.minecraft.world.entity.EntityType<? extends EntityBroom> type, net.minecraft.world.level.Level world) EntityBroom(net.minecraft.world.entity.EntityType<? extends EntityBroom> type, net.minecraft.world.level.Level world, double x, double y, double z) EntityBroom(net.minecraft.world.level.Level world, double x, double y, double z) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddAdditionalSaveData(net.minecraft.nbt.CompoundTag nbttagcompound) protected voidaddPassenger(net.minecraft.world.entity.Entity passenger) protected booleancanAddPassenger(net.minecraft.world.entity.Entity passenger) booleancanBeRiddenUnderFluidType(net.minecraftforge.fluids.FluidType type, net.minecraft.world.entity.Entity rider) booleancanConsume(int amount, net.minecraft.world.entity.LivingEntity entityLiving) booleancauseFallDamage(float distance, float damageMultiplier, net.minecraft.world.damagesource.DamageSource damageSource) protected voidvoidconsume(int amount, net.minecraft.world.entity.LivingEntity entityLiving) protected voidnet.minecraft.network.protocol.Packet<?>net.minecraft.world.item.ItemStacknet.minecraft.world.entity.Entitynet.minecraft.world.entity.EntityDimensionsgetDimensions(net.minecraft.world.entity.Pose poseIn) protected doubledoublefloatgetModifier(BroomModifier modifier) doublebooleanhurt(net.minecraft.world.damagesource.DamageSource source, float amount) protected voidnet.minecraft.world.InteractionResultinteract(net.minecraft.world.entity.player.Player player, net.minecraft.world.InteractionHand hand) booleanvoidlerpTo(double x, double y, double z, float yaw, float pitch, int posRotationIncrements, boolean isTeleport) voidload(net.minecraft.nbt.CompoundTag tagCompound) voidpush(net.minecraft.world.entity.Entity entityIn) protected voidreadAdditionalSaveData(net.minecraft.nbt.CompoundTag nbttagcompound) protected voidremovePassenger(net.minecraft.world.entity.Entity passenger) net.minecraft.nbt.CompoundTagsaveWithoutId(net.minecraft.nbt.CompoundTag tag) voidsetBroomStack(net.minecraft.world.item.ItemStack itemStack) voidsetLastPlayerSpeed(double lastPlayerSpeed) voidshowParticles(EntityBroom broom) voidstartAllowFlying(net.minecraft.world.entity.LivingEntity entity) voidstopAllowFlying(net.minecraft.world.entity.LivingEntity entity) voidtick()protected voidprotected voidCalled on the server side for all players or on the client side when the player mounted on the broom is the local player, so movement is as smooth as possible.protected voidMethods inherited from class net.minecraft.world.entity.Entity
absMoveTo, absMoveTo, acceptsFailure, acceptsSuccess, addTag, animateHurt, asChatSender, awardKillScore, baseTick, blockPosition, broadcastToPlayer, calculateUpVector, calculateViewVector, canBeCollidedWith, canChangeDimensions, canCollideWith, canEnterPose, canFreeze, canRide, canSpawnSprintParticle, canTrample, canUpdate, canUpdate, captureDrops, captureDrops, changeDimension, changeDimension, checkDespawn, checkFallDamage, checkInsideBlocks, checkOutOfWorld, chunkPosition, clearFire, closerThan, closerThan, collideBoundingBox, copyPosition, createCommandSourceStack, createHoverEvent, dampensVibrations, discard, dismountTo, displayFireAnimation, distanceTo, distanceToSqr, distanceToSqr, distanceToSqr, doEnchantDamageEffects, doWaterSplashEffect, ejectPassengers, equals, fillCrashReportCategory, findDimensionEntryPoint, fireImmune, gameEvent, gameEvent, getAirSupply, getAllSlots, getArmorSlots, getBbHeight, getBbWidth, getBlockExplosionResistance, getBlockJumpFactor, getBlockPosBelowThatAffectsMyMovement, getBlockSpeedFactor, getBlockStateOn, getBlockStateOnLegacy, getBlockX, getBlockY, getBlockZ, getBoundingBox, getBoundingBoxForCulling, getBoundingBoxForPose, getCollisionHorizontalEscapeVector, getCommandSenderWorld, getCustomName, getDeltaMovement, getDimensionChangingDelay, getDirection, getDismountLocationForPassenger, getDisplayName, getEncodeId, getEntityData, getExitPortal, getEyeHeight, getEyeHeight, getEyeHeight, getEyeHeightAccess, getEyeInFluidType, getEyePosition, getEyePosition, getEyeY, getFeetBlockState, getFireImmuneTicks, getFirstPassenger, getFluidHeight, getFluidJumpThreshold, getFluidTypeHeight, getForward, getHandHoldingItemAngle, getHandSlots, getId, getIndirectPassengers, getLeashOffset, getLevel, getLightLevelDependentMagicValue, getLightProbePosition, getLookAngle, getMaxAirSupply, getMaxFallDistance, getMaxHeightFluidType, getMotionDirection, getMovementEmission, getMyRidingOffset, getName, getOnPos, getOnPosLegacy, getPassengers, getPassengersAndSelf, getPercentFrozen, getPermissionLevel, getPersistentData, getPickRadius, getPickResult, getPistonPushReaction, getPortalWaitTime, getPose, getPosition, getPositionCodec, getRandomX, getRandomY, getRandomZ, getRelativePortalPosition, getRemainingFireTicks, getRemovalReason, getRootVehicle, getRopeHoldPosition, getRotationVector, getScoreboardName, getSelfAndPassengers, getServer, getSharedFlag, getSlot, getSoundSource, getStringUUID, getSwimHighSpeedSplashSound, getSwimSound, getSwimSplashSound, getTags, getTeam, getTeamColor, getTicksFrozen, getTicksRequiredToFreeze, getType, getTypeName, getUpVector, getUUID, getVehicle, getViewScale, getViewVector, getViewXRot, getViewYRot, getVisualRotationYInDegrees, getX, getX, getXRot, getY, getY, getYHeadRot, getYRot, getZ, getZ, handleEntityEvent, handleInsidePortal, handleNetherPortal, hasControllingPassenger, hasCustomName, hasExactlyOnePlayerPassenger, hasGlowingTag, hashCode, hasIndirectPassenger, hasPassenger, hasPassenger, hasPermissions, hasPose, ignoreExplosion, interactAt, is, isAddedToWorld, isAlive, isAlliedTo, isAlliedTo, isAlwaysTicking, isAttackable, isColliding, isControlledByLocalInstance, isCrouching, isCurrentlyGlowing, isCustomNameVisible, isDescending, isDiscrete, isEyeInFluid, isFlapping, isFree, isFreezing, isFullyFrozen, isHorizontalCollisionMinor, isIgnoringBlockTriggers, isInFluidType, isInFluidType, isInLava, isInvisible, isInvisibleTo, isInvulnerable, isInvulnerableTo, isInWall, isInWater, isInWaterOrBubble, isInWaterOrRain, isInWaterRainOrBubble, isNoGravity, isOnFire, isOnGround, isOnPortalCooldown, isPassenger, isPassengerOfSameVehicle, isPushable, isPushedByFluid, isRemoved, isShiftKeyDown, isSilent, isSpectator, isSprinting, isSteppingCarefully, isSuppressingBounce, isSwimming, isUnderWater, isVehicle, isVisuallyCrawling, isVisuallySwimming, kill, lavaHurt, lerpHeadTo, lerpMotion, limitPistonMovement, lookAt, makeBoundingBox, makeStuckInBlock, markHurt, maybeBackOffFromEdge, mayInteract, mirror, move, moveRelative, moveTo, moveTo, moveTo, moveTo, moveTowardsClosestSpace, newDoubleList, newFloatList, nextStep, onAboveBubbleCol, onAddedToWorld, onClientRemoval, onFlap, onInsideBlock, onInsideBubbleColumn, onlyOpCanSetNbt, onPassengerTurned, onRemovedFromWorld, onSyncedDataUpdated, outOfWorld, pick, playEntityOnFireExtinguishedSound, playerTouch, playSound, playSound, playStepSound, playSwimSound, position, positionRider, processFlappingMovement, processPortalCooldown, push, reapplyPosition, recreateFromPacket, refreshDimensions, remove, removeAfterChangingDimensions, removeTag, removeVehicle, repositionEntityAfterLoad, resetFallDistance, restoreFrom, revive, rideableUnderWater, rideTick, rotate, save, saveAsPassenger, sendSystemMessage, setAirSupply, setBoundingBox, setCustomName, setCustomNameVisible, setDeltaMovement, setDeltaMovement, setFluidTypeHeight, setGlowingTag, setId, setInvisible, setInvulnerable, setIsInPowderSnow, setItemSlot, setLevelCallback, setNoGravity, setOldPosAndRot, setOnGround, setPortalCooldown, setPos, setPos, setPose, setPosRaw, setRemainingFireTicks, setRemoved, setRot, setSecondsOnFire, setSharedFlag, setSharedFlagOnFire, setShiftKeyDown, setSilent, setSprinting, setSwimming, setTicksFrozen, setUUID, setViewScale, setXRot, setYBodyRot, setYHeadRot, setYRot, shouldBeSaved, shouldBlockExplode, shouldInformAdmins, shouldRender, shouldRenderAtSqrDistance, shouldShowName, showVehicleHealth, skipAttackInteraction, spawnAtLocation, spawnAtLocation, spawnAtLocation, spawnAtLocation, spawnSprintParticle, startRiding, startRiding, startSeenByPlayer, stopRiding, stopSeenByPlayer, syncPacketPositionCodec, teleportTo, teleportToWithTicket, thunderHit, toString, touchingUnloadedChunk, trackingPosition, tryCheckInsideBlocks, turn, unRide, unsetRemoved, updateDynamicGameEventListener, updateFluidHeightAndDoFluidPushing, updateFluidHeightAndDoFluidPushing, updateInWaterStateAndDoFluidPushing, updateSwimming, wasKilledMethods inherited from class net.minecraftforge.common.capabilities.CapabilityProvider
areCapsCompatible, areCapsCompatible, deserializeCaps, gatherCapabilities, gatherCapabilities, gatherCapabilities, getCapabilities, getCapability, invalidateCaps, reviveCaps, serializeCapsMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface net.minecraft.commands.CommandSource
alwaysAcceptsMethods inherited from interface net.minecraftforge.common.capabilities.ICapabilityProvider
getCapability, getCapabilityMethods inherited from interface net.minecraftforge.common.extensions.IForgeEntity
canFluidExtinguish, canHydrateInFluidType, canRiderInteract, canStartSwimming, canSwimInFluidType, deserializeNBT, getClassification, getFluidFallDistanceModifier, getFluidMotionScale, getParts, getPickedResult, getSoundFromFluidType, getStepHeight, isEyeInFluidType, isInFluidType, isInFluidType, isInFluidType, isMultipartEntity, isPushedByFluid, serializeNBT, shouldRiderSit
-
Field Details
-
SPEED
public static final double SPEEDSpeed for the broom (in all directions)- See Also:
-
MAX_ANGLE
public static final float MAX_ANGLEMaximum angle of the broom between the XZ-plane and the Y-axis (in degrees, -90 = completely up, +90 = completely down) This limits the angle under which the player can move up or down- See Also:
-
MIN_ANGLE
public static final float MIN_ANGLEMinimum angle of the broom between the XZ-plane and the Y-axis (in degrees, -90 = completely up, +90 = completely down) This limits the angle under which the player can move up or down- See Also:
-
lastMounted
public net.minecraft.world.entity.LivingEntity lastMountedThe player that last mounted this broom (used to detect dismounting)
-
-
Constructor Details
-
EntityBroom
public EntityBroom(net.minecraft.world.entity.EntityType<? extends EntityBroom> type, net.minecraft.world.level.Level world) -
EntityBroom
public EntityBroom(net.minecraft.world.entity.EntityType<? extends EntityBroom> type, net.minecraft.world.level.Level world, double x, double y, double z) -
EntityBroom
public EntityBroom(net.minecraft.world.level.Level world, double x, double y, double z)
-
-
Method Details
-
getAddEntityPacket
@Nonnull public net.minecraft.network.protocol.Packet<?> getAddEntityPacket()- Specified by:
getAddEntityPacketin classnet.minecraft.world.entity.Entity
-
getDimensions
public net.minecraft.world.entity.EntityDimensions getDimensions(net.minecraft.world.entity.Pose poseIn) - Overrides:
getDimensionsin classnet.minecraft.world.entity.Entity
-
initBroomHoverTickOffset
protected void initBroomHoverTickOffset() -
getPassengersRidingOffset
public double getPassengersRidingOffset()- Overrides:
getPassengersRidingOffsetin classnet.minecraft.world.entity.Entity
-
isPickable
public boolean isPickable()- Overrides:
isPickablein classnet.minecraft.world.entity.Entity
-
interact
public net.minecraft.world.InteractionResult interact(net.minecraft.world.entity.player.Player player, net.minecraft.world.InteractionHand hand) - Overrides:
interactin classnet.minecraft.world.entity.Entity
-
push
public void push(net.minecraft.world.entity.Entity entityIn) - Overrides:
pushin classnet.minecraft.world.entity.Entity
-
lerpTo
public void lerpTo(double x, double y, double z, float yaw, float pitch, int posRotationIncrements, boolean isTeleport) - Overrides:
lerpToin classnet.minecraft.world.entity.Entity
-
getControllingPassenger
public net.minecraft.world.entity.Entity getControllingPassenger()- Overrides:
getControllingPassengerin classnet.minecraft.world.entity.Entity
-
hurt
public boolean hurt(net.minecraft.world.damagesource.DamageSource source, float amount) - Overrides:
hurtin classnet.minecraft.world.entity.Entity
-
startAllowFlying
public void startAllowFlying(net.minecraft.world.entity.LivingEntity entity) -
stopAllowFlying
public void stopAllowFlying(net.minecraft.world.entity.LivingEntity entity) -
addPassenger
protected void addPassenger(net.minecraft.world.entity.Entity passenger) - Overrides:
addPassengerin classnet.minecraft.world.entity.Entity
-
tick
public void tick()- Overrides:
tickin classnet.minecraft.world.entity.Entity
-
canAddPassenger
protected boolean canAddPassenger(net.minecraft.world.entity.Entity passenger) - Overrides:
canAddPassengerin classnet.minecraft.world.entity.Entity
-
removePassenger
protected void removePassenger(net.minecraft.world.entity.Entity passenger) - Overrides:
removePassengerin classnet.minecraft.world.entity.Entity
-
showParticles
-
collideWithNearbyEntities
protected void collideWithNearbyEntities() -
updateMountedClient
protected void updateMountedClient() -
canConsume
public boolean canConsume(int amount, net.minecraft.world.entity.LivingEntity entityLiving) -
consume
public void consume(int amount, net.minecraft.world.entity.LivingEntity entityLiving) -
updateMountedServer
protected void updateMountedServer()Called on the server side for all players or on the client side when the player mounted on the broom is the local player, so movement is as smooth as possible. -
getLastPlayerSpeed
public double getLastPlayerSpeed() -
setLastPlayerSpeed
public void setLastPlayerSpeed(double lastPlayerSpeed) -
updateUnmounted
protected void updateUnmounted() -
getHoverOffset
protected double getHoverOffset() -
causeFallDamage
public boolean causeFallDamage(float distance, float damageMultiplier, net.minecraft.world.damagesource.DamageSource damageSource) - Overrides:
causeFallDamagein classnet.minecraft.world.entity.Entity
-
canBeRiddenUnderFluidType
public boolean canBeRiddenUnderFluidType(net.minecraftforge.fluids.FluidType type, net.minecraft.world.entity.Entity rider) -
defineSynchedData
protected void defineSynchedData()- Specified by:
defineSynchedDatain classnet.minecraft.world.entity.Entity
-
readAdditionalSaveData
protected void readAdditionalSaveData(net.minecraft.nbt.CompoundTag nbttagcompound) - Specified by:
readAdditionalSaveDatain classnet.minecraft.world.entity.Entity
-
addAdditionalSaveData
protected void addAdditionalSaveData(net.minecraft.nbt.CompoundTag nbttagcompound) - Specified by:
addAdditionalSaveDatain classnet.minecraft.world.entity.Entity
-
setBroomStack
public void setBroomStack(net.minecraft.world.item.ItemStack itemStack) -
getBroomStack
public net.minecraft.world.item.ItemStack getBroomStack() -
getModifiers
-
getModifier
-
saveWithoutId
public net.minecraft.nbt.CompoundTag saveWithoutId(net.minecraft.nbt.CompoundTag tag) - Overrides:
saveWithoutIdin classnet.minecraft.world.entity.Entity
-
load
public void load(net.minecraft.nbt.CompoundTag tagCompound) - Overrides:
loadin classnet.minecraft.world.entity.Entity
-