Skip to content

Commands (Datapacks)

TheDeathlyCow edited this page Mar 25, 2024 · 6 revisions

All commands in Thermoo are subcommands of /thermoo. Commands all print translated messages to chat, but come with fallbacks to US English.

Environment

The environment command is a simple command, mainly for mod developers to debug the passive temperature changes. It primarily works with the Environment Controller and thus is not likely to be of much interest to datapack developers. However, it is still included here.

Check Temperature

Check temperature is used to check the temperature at a specific location, which can be specified as either a block position or an entity position. It is used as follows:

thermoo environment checktemperature <location> [<unit>]

or

thermoo environment checktemperature <target> [<unit>]

Important: thermoo environment checktemperature <target> does not return the temperature of an entity, rather it returns the local temperature change from the environment at that target's position.

unit is an optional string, either celsius, fahrenheit, kelvin, or rankine. If specified, then the local temperature point change will be converted to a value in the given unit using the Temperature Unit API.

Print Controller

This is a pure debug command for mod makers. It prints the currently active Environment Controller to the server console.

Temperature

Get

thermoo temperature get <target> [<mode>]

The mode can be one of the following:

  • current: Result is the current temperature of the target entity. This is the default behavior if not specified.
  • max: Result is the maximum temperature of the target entity.
  • min: Result is the minimum temperature of the target entity.

If mode is set to scale, then an additional argument may be specified:

thermoo temperature get <target> scale [<scale>]

The scale argument is an integer multiplier of the temperature scale of the entity, which is a percentage of how cold/warm they are, where -100% is maxiumum cold, and +100% is maximum hot. The result is the floor of the temperature scale of the target entity multiplied by scale. If scale is not specified then it will default to 100.

Set

thermoo temperature set <targets> <amount>

Sets the temperature of each entity specified by targets to the specified amount, clamping between the target's minimum and maximum temperature.

Result: The sum of all amounts successfully added.

Add and remove

thermoo temperature (add|remove) <targets> <amount> [<mode>]

Adds or removes the specified amount of temperature to the target's current temperature, clamped between their min and max temperature. The change is applied in the specified mode.

The mode specified how and when thermal resistances should be applied. By default, if not specified it will be treated as absolute. The modes are as follows:

  • absolute: No resistance will be applied
  • active: Resistance will always be applied
  • passive: Only applies thermal resistance when the target is currently in the relevant temperature range. For example, cold resistance is only applied to targets that are cold; and heat resistance only to targets that are warm.

Result: The sum of the amounts successfully added or removed before resistance is applied. If removing, the result will be negative.

➡️ Next: Tags