Class EnvironmentAwareEntityMixin
java.lang.Object
net.minecraft.entity.Entity
com.github.thedeathlycow.thermoo.mixin.common.EnvironmentAwareEntityMixin
- All Implemented Interfaces:
Soakable,TemperatureAware,net.fabricmc.fabric.api.attachment.v1.AttachmentTarget,net.minecraft.component.ComponentsAccess,net.minecraft.entity.data.DataTracked,net.minecraft.scoreboard.ScoreHolder,net.minecraft.util.HeldItemContext,net.minecraft.util.Nameable,net.minecraft.world.debug.DebugTrackable,net.minecraft.world.entity.EntityLike,net.minecraft.world.entity.UniquelyIdentifiable,org.ladysnake.cca.api.v3.component.ComponentAccess
public abstract class EnvironmentAwareEntityMixin
extends net.minecraft.entity.Entity
implements TemperatureAware, Soakable
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.entity.Entity
net.minecraft.entity.Entity.MoveEffect, net.minecraft.entity.Entity.PositionUpdater, net.minecraft.entity.Entity.RemovalReasonNested classes/interfaces inherited from interface net.fabricmc.fabric.api.attachment.v1.AttachmentTarget
net.fabricmc.fabric.api.attachment.v1.AttachmentTarget.OnAttachedSet<A>Nested classes/interfaces inherited from interface net.minecraft.world.debug.DebugTrackable
net.minecraft.world.debug.DebugTrackable.DebugDataSupplier<T>, net.minecraft.world.debug.DebugTrackable.TrackerNested classes/interfaces inherited from interface net.minecraft.util.HeldItemContext
net.minecraft.util.HeldItemContext.Offset -
Field Summary
Fields inherited from class net.minecraft.entity.Entity
age, AIR_KEY, collidedSoftly, CUSTOM_DATA_KEY, CUSTOM_NAME_KEY, dataTracker, DEFAULT_FRICTION, DEFAULT_MIN_FREEZE_DAMAGE_TICKS, DEFAULT_PORTAL_COOLDOWN, distanceTraveled, FALL_DISTANCE_KEY, fallDistance, field_44870, field_44871, field_44872, field_49073, field_49791, FIRE_KEY, firstUpdate, FLAGS, fluidHeight, FREEZING_DAMAGE_INTERVAL, GLIDING_FLAG_INDEX, GLOWING_FLAG_INDEX, GLOWING_KEY, groundCollision, horizontalCollision, ID_KEY, inPowderSnow, intersectionChecked, INVULNERABLE_KEY, lastPitch, lastRenderX, lastRenderY, lastRenderZ, lastX, lastY, lastYaw, lastZ, MAX_COMMAND_TAGS, MAX_QUEUED_COLLISION_CHECKS, MAX_RIDING_COOLDOWN, MIN_RISING_BUBBLE_COLUMN_SPEED, MOTION_KEY, movementMultiplier, NO_GRAVITY_KEY, noClip, ON_FIRE_FLAG_INDEX, ON_GROUND_KEY, PASSENGERS_KEY, PORTAL_COOLDOWN_KEY, portalManager, POS_KEY, POSE, random, ridingCooldown, ROTATION_KEY, SILENT_KEY, speed, submergedInWater, supportingBlockPos, timeUntilRegen, touchingWater, uuid, UUID_KEY, uuidString, velocityDirty, velocityModified, verticalCollision, wasInPowderSnowFields inherited from interface net.fabricmc.fabric.api.attachment.v1.AttachmentTarget
NBT_ATTACHMENT_KEYFields inherited from interface net.minecraft.scoreboard.ScoreHolder
WILDCARD, WILDCARD_NAME -
Constructor Summary
ConstructorsConstructorDescriptionEnvironmentAwareEntityMixin(net.minecraft.entity.EntityType<?> type, net.minecraft.world.World world) -
Method Summary
Modifier and TypeMethodDescriptionabstract booleanabstract doublegetAttributeValue(net.minecraft.registry.entry.RegistryEntry<net.minecraft.entity.attribute.EntityAttribute> attribute) abstract booleanhasStatusEffect(net.minecraft.registry.entry.RegistryEntry<net.minecraft.entity.effect.StatusEffect> effect) voidthermoo$addTemperature(int temperatureChange, HeatingMode mode) Adds or removes some amount of temperature to the thermally aware object.booleanbooleandoubleSupplies the cold resistance of the temperature aware object.doubleSupplies the environmental cold resistance of a temperature aware object.doubleSupplies the environmental heat resistance of a temperature aware object.doubleSupplies the heat resistance of the temperature aware object.intintintnet.minecraft.util.math.random.RandomintintbooleanSoakables ignore frigid water if they can breathe in water.voidthermoo$setTemperature(int temperature) voidthermoo$setWetTicks(int amount) Sets the wet ticks of a soakable to an exact amount.Methods inherited from class net.minecraft.entity.Entity
addAirTravelEffects, addCommandTag, addFlapEffects, addPassenger, addPortalChunkTicketAt, addVelocity, addVelocity, addVelocityInternal, adjustMovementForCollisions, adjustMovementForPiston, adjustMovementForSneaking, animateDamage, applyBubbleColumnEffects, applyBubbleColumnSurfaceEffects, applyGravity, applyMirror, applyRotation, attemptTickInVoid, baseTick, bypassesLandingEffects, bypassesSteppingEffects, calcDistanceFromBottomCollision, calculateBoundingBox, calculateDefaultBoundingBox, calculateDimensions, calculateNextStepSoundDistance, canActVoluntarily, canAddPassenger, canAvoidTraps, canBeHitByProjectile, canBeSpectated, canExplosionDestroyBlock, canFreeze, canHit, canModifyAt, canMoveVoluntarily, canSprintAsVehicle, canStartRiding, canTeleportBetween, canUsePortals, castComponentValue, changeLookDirection, checkDespawn, clearQueuedCollisionChecks, clientDamage, collides, collidesWith, collidesWithFluid, collidesWithStateAtPos, copyComponentFrom, copyComponentsFrom, copyComponentsFrom, copyFrom, copyPositionAndRotation, couldAcceptPassenger, createSpawnPacket, damage, defrost, detach, detachAllHeldLeashes, discard, dismountVehicle, distanceTo, doesNotCollide, doesRenderOnFire, dropItem, dropStack, dropStack, dropStack, emitGameEvent, emitGameEvent, equals, extinguish, extinguishWithSound, fall, findCollisions, get, getAir, getAttachments, getBlockPos, getBlockStateAtPos, getBlockX, getBlockY, getBlockZ, getBodyX, getBodyY, getBodyYaw, getBodyZ, getBoundingBox, getBrightnessAtEyes, getBurningDuration, getCameraPosVec, getChunkPos, getClientCameraPosVec, getCommandSource, getCommandTags, getControllingPassenger, getControllingVehicle, getCustomName, getDamageSources, getDataTracker, getDefaultName, getDefaultPortalCooldown, getDimensions, getDisplayName, getEffectiveExplosionResistance, getEntityPos, getEntityWorld, getErrorReporterContext, getEyeHeight, getEyePos, getEyeY, getFacing, getFinalGravity, getFireTicks, getFirstPassenger, getFlag, getFluidHeight, getFreezingScale, getFrozenTicks, getGravity, getHandPosOffset, getHeadYaw, getHeight, getHeldQuadLeashOffsets, getHighSpeedSplashSound, getHorizontalFacing, getHoverEvent, getId, getInterpolator, getJumpVelocityMultiplier, getLandingBlockState, getLandingPos, getLastRenderPos, getLeashPos, getLerpedPitch, getLerpedPos, getLerpedYaw, getLootTableKey, getMaxAir, getMinFreezeDamageTicks, getMoveEffect, getMovement, getMovementDirection, getName, getNameForScoreboard, getOppositeRotationVector, getOppositeRotationVector, getParticleX, getParticleZ, getPassengerAttachmentPos, getPassengerAttachmentPos, getPassengerDismountOffset, getPassengerList, getPassengerRidingPos, getPassengersDeep, getPickBlockStack, getPistonBehavior, getPitch, getPitch, getPlayerPassengers, getPortalCooldown, getPose, getPosWithYOffset, getProjectileDeflection, getRandom, getRandomBodyY, getRegistryManager, getRemovalReason, getRenderDistanceMultiplier, getRootVehicle, getRotationClient, getRotationVec, getRotationVecClient, getRotationVector, getRotationVector, getSafeFallDistance, getSavedEntityId, getScoreboardTeam, getSoundCategory, getSplashSound, getStackReference, getStandingEyeHeight, getStepHeight, getSteppingBlockState, getSteppingPos, getStepSoundPos, getSwimHeight, getSwimSound, getSyncedPos, getTargetingMargin, getTeamColorValue, getTrackedPosition, getType, getUuid, getUuidAsString, getVehicle, getVehicleAttachmentPos, getVelocity, getVelocityAffectingPos, getVelocityMultiplier, getWeaponStack, getWidth, getWorldSpawnPos, getX, getY, getYaw, getYaw, getZ, handleAttack, handleFall, handleFallDamage, handleFallDamageForPassengers, handleStatus, hasCollidedSoftly, hasControllingPassenger, hasCustomName, hashCode, hasNoGravity, hasPassenger, hasPassenger, hasPassengerDeep, hasPassengers, hasPlayerRider, hasPortalCooldown, hasQuadLeashAttachmentPoints, hasVehicle, igniteByLava, initDataTracker, interact, interactAt, isAlive, isAlwaysInvulnerableTo, isAtCloudHeight, isAttackable, isCollidable, isConnectedThroughVehicle, isControlledByMainPlayer, isControlledByPlayer, isCrawling, isCustomNameVisible, isDescending, isFireImmune, isFlappingWings, isFlyingVehicle, isFrozen, isGlowing, isGlowingLocal, isImmuneToExplosion, isInFluid, isInLava, isInPose, isInRange, isInRange, isInSameTeam, isInsideWall, isInSneakingPose, isInSwimmingPose, isInteractable, isInterpolating, isInvisible, isInvisibleTo, isInvulnerable, isLiving, isLogicalSideForUpdatingMovement, isOnFire, isOnGround, isOnRail, isPartlyTouchingWater, isPartOf, isPlayer, isPushable, isPushedByFluids, isRegionUnloaded, isRemoved, isSilent, isSneaking, isSneaky, isSpectator, isSprinting, isSubmergedIn, isSubmergedInWater, isSupportedBy, isSwimming, isTeammate, isTeamPlayer, isTouchingWater, isTouchingWaterOrRain, kill, lerpPosAndRotation, lerpYaw, limitFallDistance, lookAt, move, movementInputToVelocity, occludeVibrationSignals, onBlockCollision, onBubbleColumnCollision, onBubbleColumnSurfaceCollision, onDamaged, onDataTrackerUpdate, onExplodedBy, onHeldLeashUpdate, onKilledOther, onLanding, onPassengerLookAround, onPlayerCollision, onRemove, onRemoved, onSpawnPacket, onStartedTrackingBy, onStoppedTrackingBy, onStruckByLightning, onSwimmingStart, onTrackedDataSet, playCombinationStepSounds, playExtinguishSound, playSecondaryStepSound, playSound, playSoundIfNotSilent, playStepSound, playSwimSound, playSwimSound, popQueuedCollisionCheck, populateCrashReport, positionInPortal, pushAwayFrom, pushOutOfBlocks, raycast, readCustomData, readData, recalculateDimensions, refreshPosition, refreshPositionAfterTeleport, refreshPositionAfterTeleport, refreshPositionAndAngles, refreshPositionAndAngles, refreshPositionAndAngles, registerTracking, reinitDimensions, remove, removeAllPassengers, removeCommandTag, removeFromDimension, removePassenger, requestTeleport, requestTeleportAndDismount, requestTeleportOffset, resetPortalCooldown, resetPosition, rotate, saveData, saveSelfData, scheduleVelocityUpdate, serverDamage, setAir, setAlwaysSyncAbsolute, setAngles, setApplicableComponent, setBodyYaw, setBoundingBox, setChangeListener, setComponent, setCustomName, setCustomNameVisible, setFireTicks, setFlag, setFrozenTicks, setGlowing, setHeadYaw, setId, setInPowderSnow, setInvisible, setInvulnerable, setLastPositionAndAngles, setMovement, setMovement, setNoGravity, setOnFire, setOnFireFor, setOnFireForTicks, setOnFireFromLava, setOnGround, setPitch, setPortalCooldown, setPos, setPose, setPosition, setPosition, setPosition, setPosition, setRemoved, setRenderDistanceMultiplier, setRotation, setSilent, setSneaking, setSprinting, setSwimming, setUuid, setVelocity, setVelocity, setVelocityClient, setWorld, setYaw, shouldAlwaysSyncAbsolute, shouldControlVehicles, shouldDismountUnderwater, shouldEscapePowderSnow, shouldPlayBurnSoundInLava, shouldRender, shouldRender, shouldRenderName, shouldSave, shouldSetPositionOnLoad, shouldSpawnSprintingParticles, shouldTickBlockCollision, sidedDamage, slowMovement, snipAllHeldLeashes, spawnBubbleColumnParticles, spawnSprintingParticles, squaredDistanceTo, squaredDistanceTo, squaredDistanceTo, startRiding, startRiding, stopRiding, streamPassengersAndSelf, streamSelfAndPassengers, teleport, teleportSpectatingPlayers, teleportTo, tick, tickBlockCollision, tickBlockCollision, tickHeldLeash, tickInVoid, tickPortalCooldown, tickPortalTeleportation, tickRiding, toString, tryUsePortal, unsetRemoved, updateEventHandler, updateKilledAdvancementCriterion, updateLastAngles, updateLastPosition, updateMovementInFluid, updatePassengerForDismount, updatePassengerPosition, updatePassengerPosition, updatePosition, updatePositionAndAngles, updateSupportingBlockPos, updateSwimming, updateTrackedAngles, updateTrackedHeadRotation, updateTrackedPosition, updateTrackedPosition, updateTrackedPositionAndAngles, updateTrackedPositionAndAngles, updateVelocity, updateWaterState, writeCustomData, writeDataMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface net.fabricmc.fabric.api.attachment.v1.AttachmentTarget
getAttached, getAttachedOrCreate, getAttachedOrCreate, getAttachedOrElse, getAttachedOrGet, getAttachedOrSet, getAttachedOrThrow, hasAttached, modifyAttached, onAttachedSet, removeAttached, setAttachedMethods inherited from interface org.ladysnake.cca.api.v3.component.ComponentAccess
asComponentProvider, getComponent, syncComponent, syncComponent, syncComponentMethods inherited from interface net.minecraft.component.ComponentsAccess
getOrDefault, getTypedMethods inherited from interface net.minecraft.util.HeldItemContext
getEntityMethods inherited from interface net.minecraft.util.Nameable
getStringifiedNameMethods inherited from interface net.minecraft.scoreboard.ScoreHolder
getStyledDisplayNameMethods inherited from interface com.github.thedeathlycow.thermoo.api.temperature.Soakable
thermoo$addWetTicks, thermoo$getSoakedScale, thermoo$isSoaked, thermoo$isWetMethods inherited from interface com.github.thedeathlycow.thermoo.api.temperature.TemperatureAware
thermoo$addTemperature, thermoo$getTemperatureScale, thermoo$isCold, thermoo$isWarm
-
Constructor Details
-
EnvironmentAwareEntityMixin
public EnvironmentAwareEntityMixin(net.minecraft.entity.EntityType<?> type, net.minecraft.world.World world)
-
-
Method Details
-
canBreatheInWater
public abstract boolean canBreatheInWater() -
getAttributeValue
public abstract double getAttributeValue(net.minecraft.registry.entry.RegistryEntry<net.minecraft.entity.attribute.EntityAttribute> attribute) -
hasStatusEffect
public abstract boolean hasStatusEffect(net.minecraft.registry.entry.RegistryEntry<net.minecraft.entity.effect.StatusEffect> effect) -
thermoo$setWetTicks
public void thermoo$setWetTicks(int amount) Description copied from interface:SoakableSets the wet ticks of a soakable to an exact amount.Clamps the amount between 0 and max wet ticks before setting.
- Specified by:
thermoo$setWetTicksin interfaceSoakable- Parameters:
amount- The amount of wet ticks
-
thermoo$getWetTicks
public int thermoo$getWetTicks()- Specified by:
thermoo$getWetTicksin interfaceSoakable- Returns:
- Returns the wet ticks of the soakable
-
thermoo$getMaxWetTicks
public int thermoo$getMaxWetTicks()- Specified by:
thermoo$getMaxWetTicksin interfaceSoakable- Returns:
- Returns the maximum wet ticks the soakable can have
-
thermoo$ignoresFrigidWater
public boolean thermoo$ignoresFrigidWater()Description copied from interface:SoakableSoakables ignore frigid water if they can breathe in water.- Specified by:
thermoo$ignoresFrigidWaterin interfaceSoakable- Returns:
- Returns if the soakable ignores the effects of frigid water
-
thermoo$getTemperature
public int thermoo$getTemperature()- Specified by:
thermoo$getTemperaturein interfaceTemperatureAware- Returns:
- Returns the current temperature of the temperature aware object
-
thermoo$setTemperature
public void thermoo$setTemperature(int temperature) - Specified by:
thermoo$setTemperaturein interfaceTemperatureAware- Parameters:
temperature- Sets the current temperature of the temperature aware object to an exact value
-
thermoo$getMinTemperature
public int thermoo$getMinTemperature()- Specified by:
thermoo$getMinTemperaturein interfaceTemperatureAware- Returns:
- Returns the minimum allowed temperature of the temperature aware object.
-
thermoo$getMaxTemperature
public int thermoo$getMaxTemperature()- Specified by:
thermoo$getMaxTemperaturein interfaceTemperatureAware- Returns:
- Returns the maximum allowed temperature of the temperature aware object
-
thermoo$getColdResistance
public double thermoo$getColdResistance()Description copied from interface:TemperatureAwareSupplies the cold resistance of the temperature aware object. Cold Resistance is a percentage on a scale from 0 to 10, where 0 cold resistance corresponds to 0%, and 10 cold resistance corresponds to 100%.- Specified by:
thermoo$getColdResistancein interfaceTemperatureAware- Returns:
- Returns the cold resistance of the temperature aware object
-
thermoo$getHeatResistance
public double thermoo$getHeatResistance()Description copied from interface:TemperatureAwareSupplies the heat resistance of the temperature aware object. Heat Resistance is a percentage on a scale from 0 to 10, where 0 heat resistance corresponds to 0%, and 10 heat resistance corresponds to 100%.- Specified by:
thermoo$getHeatResistancein interfaceTemperatureAware- Returns:
- Returns the heat resistance of the temperature aware object
-
thermoo$getEnvironmentColdResistance
public double thermoo$getEnvironmentColdResistance()Description copied from interface:TemperatureAwareSupplies the environmental cold resistance of a temperature aware object. Environmental cold resistance is a chance to dodge a strictly negativeenvironment temperature change.- Specified by:
thermoo$getEnvironmentColdResistancein interfaceTemperatureAware- Returns:
- Returns a double in the range [0, 1] that is the chance that a negative environment temperature change will be dodged
-
thermoo$getEnvironmentHeatResistance
public double thermoo$getEnvironmentHeatResistance()Description copied from interface:TemperatureAwareSupplies the environmental heat resistance of a temperature aware object. Environmental heat resistance is a chance to dodge a strictly positiveenvironment temperature change.- Specified by:
thermoo$getEnvironmentHeatResistancein interfaceTemperatureAware- Returns:
- Returns a double in the range [0, 1] that is the chance that a positive environment temperature change will be dodged
-
thermoo$canFreeze
public boolean thermoo$canFreeze()- Specified by:
thermoo$canFreezein interfaceTemperatureAware- Returns:
- Returns if the thermally aware object can be affected by cold
-
thermoo$canOverheat
public boolean thermoo$canOverheat()- Specified by:
thermoo$canOverheatin interfaceTemperatureAware- Returns:
- Returns if the thermally aware object can be affected by heat
-
thermoo$addTemperature
Description copied from interface:TemperatureAwareAdds or removes some amount of temperature to the thermally aware object. Resistance can be applied by specifying aHeatingMode. SeeHeatingModesfor some common modes.- Specified by:
thermoo$addTemperaturein interfaceTemperatureAware- Parameters:
temperatureChange- The amount of temperature to add/remove. Positive change adds, negative change removes.mode- The mode of resistance to apply to the change.
-
thermoo$getRandom
public net.minecraft.util.math.random.Random thermoo$getRandom()- Specified by:
thermoo$getRandomin interfaceTemperatureAware- Returns:
- Returns a random number generator object associated with this temperature aware
-