Class Floor
java.lang.Object
mindustry.ctype.Content
mindustry.ctype.MappableContent
mindustry.ctype.UnlockableContent
mindustry.world.Block
mindustry.world.blocks.environment.Floor
- All Implemented Interfaces:
Comparable<Content>
,Senseable
- Direct Known Subclasses:
AirBlock
,EmptyFloor
,OverlayFloor
,ShallowLiquid
,SteamVent
-
Nested Class Summary
Nested classes/interfaces inherited from class mindustry.ctype.Content
Content.ModContentInfo
-
Field Summary
Modifier and TypeFieldDescriptionboolean
If true, cores can be placed on this floor.protected Bits
Group of blocks that this block does not draw edges on.int
Actual ID used for blend groups.boolean
Whether units can draw shadows over this.float
Damage taken per tick on this tile.Decoration block.protected int[]
float
Multiplies unit drag by this when walked on.float
How many ticks it takes to drown on this.Effect displayed when drowning on this floor.edge fallback, used mainly for oresprotected TextureRegion
protected TextureRegion[][]
boolean
whether this block is liquid.liquids that drop from this block, used for pumps.float
Multiplier for pumped liquids, used for deep water.boolean
Whether this overlay needs a surface to be on.boolean
Whether this ore generates in maps by default.float
Ore generation params.float
Ore generation params.float
for liquid floors, this is the opacity of the overlay drawn on top.boolean
shallow water flag used for generationfloat
Multiplies unit velocity by this when walked on.Status effect applied when walking on.float
Intensity of applied status effect.boolean
whether this floor supports an overlay floorEffect when walking on this floor.Sound made when walking.float
Volume of sound made when walking.float
Volume of sound made when walking.float
Volume of sound made when walking.Wall variant of this block.boolean
If true, this ore is allowed on walls.Fields inherited from class mindustry.world.Block
absorbLasers, acceptsItems, acceptsPayload, albedo, allowConfigInventory, allowDiagonal, allowResupply, alwaysReplace, alwaysUpdateInUnits, ambientSound, ambientSoundVolume, armor, attacks, attributes, autoResetEnabled, barMap, baseExplosiveness, breakable, breakEffect, breakPitchChange, breakSound, buildCost, buildCostMultiplier, buildType, buildVisibility, cacheLayer, canOverdrive, category, clearOnDoubleTap, clipSize, commandable, conductivePower, configurable, configurations, connectedPower, consPower, consumeBuilder, consumers, consumesPower, consumesTap, conveyorPlacement, copyConfig, createRubble, crushDamageMultiplier, customShadow, customShadowRegion, deconstructThreshold, destroyBullet, destroyBulletSameTeam, destroyEffect, destroySound, destructible, displayFlow, drawArrow, drawCracks, drawDisabled, drawLiquidLight, drawTeamOverlay, dumpTime, editorIcon, editorVariantRegions, emitLight, enableDrawStatus, envDisabled, envEnabled, envRequired, fillsTile, flags, floating, fogRadius, forceDark, generatedIcons, group, hasColor, hasConsumers, hasItems, hasLiquids, hasPower, hasShadow, health, inEditor, instantDeconstruct, instantTransfer, insulated, invertFlip, isDuct, itemCapacity, itemDrop, itemFilter, lastConfig, lightColor, lightLiquid, lightRadius, liquidCapacity, liquidFilter, liquidPressure, lockRotation, logicConfigurable, loopSound, loopSoundVolume, mapColor, nonOptionalConsumers, noSideBlend, noUpdateDisabled, offset, optionalConsumers, outlineColor, outlinedIcon, outlineIcon, outlineRadius, outputFacing, outputsLiquid, outputsPayload, outputsPower, placeableLiquid, placeableOn, placeablePlayer, placeEffect, placeOverlapRange, placePitchChange, placeSound, playerUnmineable, priority, privileged, quickRotate, rebuildable, region, regionRotated1, regionRotated2, replaceable, requirements, requiresWater, researchCost, researchCostMultiplier, researchCostMultipliers, rotate, rotateDraw, saveConfig, saveData, scaledHealth, schematicPriority, selectionColumns, selectionRows, selectScroll, separateItemCapacity, size, sizeOffset, solid, solidifes, squareSprite, subclass, suppressable, swapDiagonalPlacement, sync, targetable, teamPassable, teamRegion, teamRegions, tempBuilds, tempTiles, timerDump, timers, underBullets, unitCapModifier, unloadable, update, updateConsumers, updateInUnits, useColor, variantRegions, variants, variantShadowRegions
Fields 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.protected boolean
void
protected void
drawBlended
(Tile tile, boolean checkId) protected void
protected void
drawEdgesFlat
(Tile tile, boolean sameLayer) void
drawNonLayer
(Tile tile, CacheLayer layer) void
drawOverlay
(Tile tile) protected TextureRegion[][]
edges()
getDisplayIcon
(Tile tile) getDisplayName
(Tile tile) boolean
icons()
void
init()
Called after all blocks are created.boolean
isDeep()
void
load()
Called after all content is created, only on non-headless versions.int
realBlendId
(Tile tile) void
boolean
updateRender
(Tile tile) Methods inherited from class mindustry.world.Block
addBar, addLiquidBar, addLiquidBar, asFloor, beforePlaceBegan, bounds, canBeBuilt, canBreak, canPlaceOn, canReplace, changePlacementPath, changePlacementPath, checkForceDark, config, configClear, configSenseable, consume, consumeCoolant, consumeCoolant, consumeItem, consumeItem, consumeItems, consumeLiquid, consumeLiquids, consumePower, consumePowerBuffered, consumePowerCond, consumePowerDynamic, consumesItem, consumesLiquid, drawDefaultPlanRegion, drawEnvironmentLight, drawOverlay, drawPlace, drawPlaceText, drawPlan, drawPlan, drawPlanConfig, drawPlanConfigCenter, drawPlanConfigCenter, drawPlanConfigTop, drawPlanRegion, drawPotentialLinks, drawShadow, editorIcon, editorVariantRegions, environmentBuildable, findConsumer, flipRotation, getContentType, getDependencies, getEdges, getGeneratedIcons, getInsideEdges, getPlanRegion, getRegionsToOutline, getReplacement, handlePlacementLine, hasBuilding, hasConsumer, initBuilding, isAccessible, isAir, isFloor, isHidden, isMultiblock, isOverlay, isPlaceable, isStatic, isVisible, isVisibleOn, iterateTaken, listBars, logicVisible, makeIconRegions, minimapColor, nearbySide, newBuilding, nextConfig, onNewPlan, outputsItems, percentSolid, placeBegan, placeBegan, planRotation, pointConfig, removeBar, removeConsumer, requirements, requirements, requirements, researchRequirements, resetGeneratedIcons, rotatedOutput, sense, sense, senseObject, setBars, setStats, setupRequirements, setupRequirements, sumAttribute, supportsEnv, synthetic, updateClipRadius, variantRegions
Methods inherited from class mindustry.ctype.UnlockableContent
checkStats, clearUnlock, displayDescription, displayExtra, emoji, getLogicId, hasEmoji, loadIcon, locked, makeOutline, makeOutline, makeOutline, onUnlock, quietUnlock, showUnlock, unlock, unlocked, unlockedNow, unlockedNowHost
Methods inherited from class mindustry.ctype.MappableContent
toString
Methods inherited from class mindustry.ctype.Content
compareTo, hasErrored, isModded, isVanilla
-
Field Details
-
edge
edge fallback, used mainly for ores -
speedMultiplier
public float speedMultiplierMultiplies unit velocity by this when walked on. -
dragMultiplier
public float dragMultiplierMultiplies unit drag by this when walked on. -
damageTaken
public float damageTakenDamage taken per tick on this tile. -
drownTime
public float drownTimeHow many ticks it takes to drown on this. 0 to disable. -
walkEffect
Effect when walking on this floor. -
walkSound
Sound made when walking. -
walkSoundVolume
public float walkSoundVolumeVolume of sound made when walking. -
walkSoundPitchMin
public float walkSoundPitchMinVolume of sound made when walking. -
walkSoundPitchMax
public float walkSoundPitchMaxVolume of sound made when walking. -
drownUpdateEffect
Effect displayed when drowning on this floor. -
status
Status effect applied when walking on. -
statusDuration
public float statusDurationIntensity of applied status effect. -
liquidDrop
liquids that drop from this block, used for pumps. -
liquidMultiplier
public float liquidMultiplierMultiplier for pumped liquids, used for deep water. -
isLiquid
public boolean isLiquidwhether this block is liquid. -
overlayAlpha
public float overlayAlphafor liquid floors, this is the opacity of the overlay drawn on top. -
supportsOverlay
public boolean supportsOverlaywhether this floor supports an overlay floor -
shallow
public boolean shallowshallow water flag used for generation -
blendGroup
Group of blocks that this block does not draw edges on. -
oreDefault
public boolean oreDefaultWhether this ore generates in maps by default. -
oreScale
public float oreScaleOre generation params. -
oreThreshold
public float oreThresholdOre generation params. -
wall
Wall variant of this block. May be Blocks.air if not found. -
decoration
Decoration block. Usually a rock. May be air. -
canShadow
public boolean canShadowWhether units can draw shadows over this. -
needsSurface
public boolean needsSurfaceWhether this overlay needs a surface to be on. False for floating blocks, like spawns. -
allowCorePlacement
public boolean allowCorePlacementIf true, cores can be placed on this floor. -
wallOre
public boolean wallOreIf true, this ore is allowed on walls. -
blendId
public int blendIdActual ID used for blend groups. Internal. -
edges
-
blenders
-
blended
-
dirs
protected int[] dirs -
edgeRegion
-
-
Constructor Details
-
Floor
-
Floor
-
-
Method Details
-
load
public void load()Description copied from class:Content
Called after all content is created, only on non-headless versions. Use for loading regions or other image data. -
init
public void init()Description copied from class:Block
Called after all blocks are created. -
getDisplayIcon
- Overrides:
getDisplayIcon
in classBlock
-
getDisplayName
- Overrides:
getDisplayName
in classBlock
-
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 classBlock
-
drawBase
-
drawOverlay
-
icons
-
updateRender
- Returns:
- true if this floor should be updated in the render loop, e.g. for effects. Do NOT overuse this!
-
renderUpdate
-
hasSurface
public boolean hasSurface()- Returns:
- whether this floor has a valid surface on which to place things, e.g. scorch marks.
-
isDeep
public boolean isDeep() -
drawNonLayer
-
drawEdges
-
drawBlended
-
drawEdgesFlat
-
realBlendId
-
edges
-
doEdge
- Returns:
- whether the edges from should be drawn onto this tile
-