Package mindustry.type
Class Item
java.lang.Object
mindustry.ctype.Content
mindustry.ctype.MappableContent
mindustry.ctype.UnlockableContent
mindustry.type.Item
- All Implemented Interfaces:
Comparable<Content>
,Senseable
-
Nested Class Summary
Nested classes/interfaces inherited from class mindustry.ctype.Content
Content.ModContentInfo
-
Field Summary
Modifier and TypeFieldDescriptionboolean
If true, this material is used by buildings.float
how electrically potent this item is.float
base material cost of this item, used for calculating place times 1 cost = 1 tick added to build timefloat
how explosive this item is.float
flammability above 0.3 makes this eligible for item burners.int
If >0, this item is animated.float
Ticks in-between animation frames.int
drill hardness of the itemfloat
When this item is present in the build cost, a block's default health is multiplied by 1 + scaling, where 'scaling' is summed together for all item requirement types.boolean
Planet[]
For mods.boolean
if true, this item is of the lowest priority to drills.float
how radioactive this item is.int
Number of generated transition frames between each frameFields inherited from class mindustry.ctype.UnlockableContent
alwaysUnlocked, description, details, fullIcon, generateIcons, hideDetails, iconId, inlineDescription, localizedName, selectionSize, stats, techNode, techNodes, uiIcon, unlocked
Fields inherited from class mindustry.ctype.MappableContent
name
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
createIcons
(MultiPacker packer) Generate any special icons for this content.Allocates a new array containing all items that generate ores.Returns the type name of this piece of content.void
init()
Called after all content and modules are created.boolean
isHidden()
Whether this content is always hidden in the content database dialog.void
loadIcon()
Called right before load().double
senseObject
(LAccess sensor) void
setStats()
Initializes stats on demand.toString()
Methods inherited from class mindustry.ctype.UnlockableContent
checkStats, clearUnlock, displayDescription, displayExtra, emoji, getDependencies, getLogicId, hasEmoji, locked, logicVisible, makeOutline, makeOutline, makeOutline, onUnlock, quietUnlock, researchRequirements, showUnlock, unlock, unlocked, unlockedNow, unlockedNowHost
Methods inherited from class mindustry.ctype.Content
compareTo, hasErrored, isModded, isVanilla, load
-
Field Details
-
color
-
explosiveness
public float explosivenesshow explosive this item is. -
flammability
public float flammabilityflammability above 0.3 makes this eligible for item burners. -
radioactivity
public float radioactivityhow radioactive this item is. -
charge
public float chargehow electrically potent this item is. -
hardness
public int hardnessdrill hardness of the item -
cost
public float costbase material cost of this item, used for calculating place times 1 cost = 1 tick added to build time -
healthScaling
public float healthScalingWhen this item is present in the build cost, a block's default health is multiplied by 1 + scaling, where 'scaling' is summed together for all item requirement types. -
lowPriority
public boolean lowPriorityif true, this item is of the lowest priority to drills. -
frames
public int framesIf >0, this item is animated. -
transitionFrames
public int transitionFramesNumber of generated transition frames between each frame -
frameTime
public float frameTimeTicks in-between animation frames. -
buildable
public boolean buildableIf true, this material is used by buildings. If false, this material will be incinerated in certain cores.
-
-
Constructor Details
-
Item
-
Item
-
-
Method Details
-
init
public void init()Description copied from class:Content
Called after all content and modules are created. Do not use to load regions or texture data! -
isHidden
public boolean isHidden()Description copied from class:UnlockableContent
Whether this content is always hidden in the content database dialog.- Overrides:
isHidden
in classUnlockableContent
-
loadIcon
public void loadIcon()Description copied from class:Content
Called right before load().- Overrides:
loadIcon
in classUnlockableContent
-
setStats
public void setStats()Description copied from class:UnlockableContent
Initializes stats on demand. Should only be called once. Only called before something is displayed.- Overrides:
setStats
in classUnlockableContent
-
toString
- Overrides:
toString
in classMappableContent
-
getContentType
Description copied from class:Content
Returns the type name of this piece of content. This should return the same value for all instances of this content type.- Specified by:
getContentType
in classContent
-
createIcons
Description copied from class:UnlockableContent
Generate any special icons for this content. Called synchronously. No regions are loaded at this point; grab pixmaps from the packer.- Overrides:
createIcons
in classUnlockableContent
-
sense
-
senseObject
- Specified by:
senseObject
in interfaceSenseable
-
getAllOres
Allocates a new array containing all items that generate ores.
-