Interface SulfurCube
- All Superinterfaces:
Ageable, CubeMob, Entity, HoverEventSource<HoverEvent.ShowEntity>, LivingEntity, Mob, SchedulerSource, Shearable, Sound.Emitter, Sound.Source.Provider
A sulfur cube (
minecraft:sulfur_cube): a cube that hurts no one. It is born a baby of
size 1 that grows up into an adult of size 2, faster when fed slime balls; a baby follows the
players holding slime balls, an adult those holding a block it could swallow. Once dead, an adult
splits into two babies.
An adult swallows such a block when given one, or when it finds one lying around. It then stops moving by itself and becomes a ball that players push and kick around: the block sets how it bounces, slides and floats, how far a hit sends it, and whether touching it burns. Blows and shots no longer hurt it then, they only send it flying. Shears make it spit the block out.
- Since:
- 0.1.0
-
Field Summary
FieldsFields inherited from interface Ageable
BABY_START_AGE -
Method Summary
Modifier and TypeMethodDescriptionvoidsetSwallowedItem(ItemStack stack) Makes this cube hold one of an item, without a sound and without dropping what it held.Returns the block this cube swallowed.Methods inherited from interface Ageable
age, isAgeLocked, isBaby, setAge, setAgeLocked, setBabyMethods inherited from interface Entity
chunk, displayName, entityId, isRemoved, location, remove, server, teleport, teleport, teleport, type, uuid, worldMethods inherited from interface HoverEventSource
asHoverEvent, asHoverEventMethods inherited from interface LivingEntity
absorptionAmount, activeEffects, addEffect, armor, armorToughness, clearEffects, damage, effect, equipment, fireTicks, hasEffect, headYaw, heal, health, isAlive, isDead, kill, knockbackResistance, maxHealth, removeEffect, setAbsorptionAmount, setFireTicks, setHeadYaw, setHealthMethods inherited from interface Mob
attackDamage, behaviour, behaviours, definition, distanceSqTo, followRange, goals, hasLineOfSightTo, height, lookAt, lookAt, movementSpeed, navigateTo, navigation, nearestPlayer, onGround, playSound, setFollowRange, setMoveSpeed, setTarget, setVelocity, target, velocityX, velocityY, velocityZ, widthMethods inherited from interface SchedulerSource
execute, execute, executeDelayed, executeDelayed, isOwnedByCurrentThreadMethods inherited from interface Shearable
readyForShearing, shearMethods inherited from interface Sound.Source.Provider
soundSource
-
Field Details
-
ADULT_SIZE
static final int ADULT_SIZEThe size of an adult sulfur cube.- Since:
- 0.1.0
- See Also:
-
-
Method Details
-
swallowedItem
ItemStack swallowedItem()Returns the block this cube swallowed., an empty stack if it swallowed none- Returns:
- the block this cube swallowed
- Since:
- 0.1.0
-
setSwallowedItem
Makes this cube hold one of an item, without a sound and without dropping what it held.- Parameters:
stack- the item, one of which it keeps; an empty stack for none- Since:
- 0.1.0
-