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,ColoredFloor,EmptyFloor,OverlayFloor,ShallowLiquid,SteamVent
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class mindustry.ctype.Content
Content.ModContentInfo -
Field Summary
FieldsModifier and TypeFieldDescriptionbooleanIf true, cores can be placed on this floor.booleanIf true, this floor uses autotiling; variants are not supported.protected arc.graphics.g2d.TextureRegion[]intIf >1, the middle region of the autotile has random variants.protected arc.graphics.g2d.TextureRegion[]protected arc.graphics.g2d.TextureRegion[][]intVariants of the main autotile sprite.protected arc.struct.Bitsprotected arc.struct.Seq<Floor>Group of blocks that this block does not draw edges on.intActual ID used for blend groups.booleanWhether units can draw shadows over this.floatDamage taken per tick on this tile.Decoration block.protected int[]floatMultiplies unit drag by this when walked on.booleanIf true (default), this floor will draw edges of other floors on itself.booleanIf true (default), this floor will draw its edges onto other floors.floatHow many ticks it takes to drown on this.Effect displayed when drowning on this floor.edge fallback, used mainly for oresprotected arc.graphics.g2d.TextureRegionprotected arc.graphics.g2d.TextureRegion[][]booleanwhether this block is liquid.liquids that drop from this block, used for pumps.floatMultiplier for pumped liquids, used for deep water.booleanWhether this overlay needs a surface to be on.booleanWhether this ore generates in maps by default.floatOre generation params.floatOre generation params.floatfor liquid floors, this is the opacity of the overlay drawn on top.booleanshallow water flag used for generationfloatMultiplies unit velocity by this when walked on.Status effect applied when walking on.floatIntensity of applied status effect.booleanwhether this floor supports an overlay floorprotected arc.graphics.g2d.TextureRegion[][][]protected intintIf >0, this floor is drawn as parts of a large texture.Effect when walking on this floor.arc.audio.SoundSound made when walking.floatVolume of sound made when walking.floatVolume of sound made when walking.floatVolume of sound made when walking.Wall variant of this block.booleanIf true, this ore is allowed on walls.Fields inherited from class mindustry.world.Block
absorbLasers, acceptsItems, acceptsPayload, acceptsUnitPayloads, albedo, allowConfigInventory, allowDerelictRepair, allowDiagonal, allowRectanglePlacement, allowResupply, alwaysReplace, alwaysUpdateInUnits, ambientSound, ambientSoundVolume, armor, attacks, attributes, autoResetEnabled, barMap, baseExplosiveness, baseShake, breakable, breakEffect, breakPitchChange, breakSound, buildCostMultiplier, buildTime, buildType, buildVisibility, cacheLayer, canOverdrive, canPickup, category, clearOnDoubleTap, clipSize, commandable, conductivePower, configurable, configurations, connectedPower, consPower, consumeBuilder, consumers, consumesPower, consumesTap, conveyorPlacement, copyConfig, createRubble, crushDamageMultiplier, customShadow, customShadowRegion, deconstructDropAllLiquid, deconstructThreshold, destroyBullet, destroyBulletSameTeam, destroyEffect, destroyPitchMax, destroyPitchMin, destroySound, destructible, displayFlow, drawArrow, drawCracks, drawDisabled, drawLiquidLight, drawTeamOverlay, dumpTime, editorConfigurable, emitLight, enableDrawStatus, envDisabled, envEnabled, envRequired, explosivenessScale, fillsTile, flags, flammabilityScale, floating, fogRadius, forceDark, forceTeam, generatedIcons, group, hasColor, hasConsumers, hasItems, hasLiquids, hasPower, hasShadow, health, ignoreBuildDarkness, ignoreResizeConfig, inEditor, instantBuild, instantDeconstruct, instantTransfer, insulated, invertFlip, isDuct, itemCapacity, itemDrop, itemFilter, lastConfig, lightClipSize, lightColor, lightLiquid, lightRadius, liquidCapacity, liquidFilter, liquidPressure, lockRotation, logicConfigurable, 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, rotateDrawEditor, 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, unitMoveBreakable, unloadable, update, updateConsumers, updateInUnits, useColor, variantRegions, variants, variantShadowRegions, visualRotationOffsetFields inherited from class mindustry.ctype.UnlockableContent
allDatabaseTabs, alwaysUnlocked, databaseTabs, description, details, fullIcon, fullOverride, generateIcons, hideDatabase, hideDetails, inlineDescription, localizedName, selectionSize, shownPlanets, stats, techNode, techNodes, uiIcon, unlockedFields inherited from class mindustry.ctype.MappableContent
name -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleancheckAutotileSame(Tile tile, Tile other) voidcreateIcons(MultiPacker packer) Generate any special icons for this content.booleandamages()protected booleanvoidprotected voiddrawBlended(Tile tile, boolean checkId) protected voidvoidvoiddrawNonLayer(Tile tile, CacheLayer layer) voiddrawOverlay(Tile tile) protected arc.graphics.g2d.TextureRegionedge(int x, int y, int rx, int ry) protected arc.graphics.g2d.TextureRegion[][]edges(int x, int y) Returns the edge array that should be used to draw at the specified tile position.voidfloorChanged(Tile tile) Called when this floor is set on the specified tile.arc.graphics.g2d.TextureRegiongetDisplayIcon(Tile tile) getDisplayName(Tile tile) booleanarc.graphics.g2d.TextureRegion[]icons()voidinit()Called after all blocks are created.booleanisDeep()voidload()Called after all content is created, only on non-headless versions.intrealBlendId(Tile tile) voidbooleanshouldIndex(Tile tile) booleanupdateRender(Tile tile) intvariant(int x, int y) intvariant(int x, int y, int max) Methods inherited from class mindustry.world.Block
addBar, addLiquidBar, addLiquidBar, asFloor, beforePlaceBegan, blockChanged, bounds, buildEditorConfig, canBeBuilt, canBreak, canPlaceOn, canReplace, changePlacementPath, changePlacementPath, checkForceDark, config, configClear, configSenseable, consume, consumeCoolant, consumeCoolant, consumeItem, consumeItem, consumeItems, consumeLiquid, consumeLiquids, consumePower, consumePowerBuffered, consumePowerCond, consumePowerDynamic, consumePowerDynamic, consumesItem, consumesLiquid, displayShadow, drawDefaultPlanRegion, drawEnvironmentLight, drawOverlay, drawPlace, drawPlaceText, drawPlan, drawPlan, drawPlanConfig, drawPlanConfigCenter, drawPlanConfigCenter, drawPlanConfigTop, drawPlanRegion, drawPotentialLinks, drawShadow, drawSideRegion, editorPicked, environmentBuildable, findConsumer, flipRotation, getConfig, getContentType, getDependencies, getEdges, getGeneratedIcons, getInsideEdges, getPlanConfigs, getPlanRegion, getRegionsToOutline, getReplacement, handlePlacementLine, hasBuilding, hasConsumer, initBuilding, isAccessible, isAir, isBanned, isDarkened, isFloor, isHidden, isMultiblock, isOverlay, isPlaceable, isStatic, isVisible, iterateTaken, listBars, logicVisible, makeIconRegions, minimapColor, nearbySide, newBuilding, nextConfig, onNewPlan, onPicked, outputsItems, percentSolid, placeBegan, placeBegan, placeEnded, planRotation, pointConfig, postInit, removeBar, removeConsumer, removeConsumers, requirements, requirements, requirements, researchRequirements, resetGeneratedIcons, rotatedOutput, rotatedOutput, sense, sense, senseObject, setBars, setStats, setupRequirements, setupRequirements, sumAttribute, supportsEnv, synthetic, updateClipRadius, variantRegionsMethods inherited from class mindustry.ctype.UnlockableContent
checkStats, clearUnlock, displayDescription, displayExtra, emoji, emojiChar, getLogicId, hasEmoji, isOnPlanet, loadIcon, locked, makeOutline, makeOutline, makeOutline, onUnlock, quietUnlock, showUnlock, unlock, unlocked, unlockedHost, unlockedNow, unlockedNowHostMethods inherited from class mindustry.ctype.MappableContent
toStringMethods 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
public arc.audio.Sound walkSoundSound 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. -
tilingVariants
public int tilingVariantsIf >0, this floor is drawn as parts of a large texture. -
autotile
public boolean autotileIf true, this floor uses autotiling; variants are not supported. See https://github.com/GglLfr/tile-gen -
autotileMidVariants
public int autotileMidVariantsIf >1, the middle region of the autotile has random variants. -
autotileVariants
public int autotileVariantsVariants of the main autotile sprite. -
drawEdgeIn
public boolean drawEdgeInIf true (default), this floor will draw edges of other floors on itself. -
drawEdgeOut
public boolean drawEdgeOutIf true (default), this floor will draw its edges onto other floors. -
tilingRegions
protected arc.graphics.g2d.TextureRegion[][][] tilingRegions -
autotileRegions
protected arc.graphics.g2d.TextureRegion[] autotileRegions -
autotileMidRegions
protected arc.graphics.g2d.TextureRegion[] autotileMidRegions -
autotileVariantRegions
protected arc.graphics.g2d.TextureRegion[][] autotileVariantRegions -
tilingSize
protected int tilingSize -
edges
protected arc.graphics.g2d.TextureRegion[][] edges -
blenders
-
blended
protected arc.struct.Bits blended -
dirs
protected int[] dirs -
edgeRegion
protected arc.graphics.g2d.TextureRegion edgeRegion
-
-
Constructor Details
-
Floor
-
Floor
-
-
Method Details
-
load
public void load()Description copied from class:ContentCalled 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:BlockCalled after all blocks are created. -
getDisplayIcon
- Overrides:
getDisplayIconin classBlock
-
getDisplayName
- Overrides:
getDisplayNamein classBlock
-
createIcons
Description copied from class:UnlockableContentGenerate any special icons for this content. Called synchronously. No regions are loaded at this point; grab pixmaps from the packer.- Overrides:
createIconsin classBlock
-
drawBase
-
drawMain
-
checkAutotileSame
-
variant
public int variant(int x, int y) -
variant
public int variant(int x, int y, int max) -
drawOverlay
-
icons
public arc.graphics.g2d.TextureRegion[] icons() -
floorChanged
Called when this floor is set on the specified tile. -
shouldIndex
- Returns:
- whether to index this floor by flag
-
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
-
realBlendId
-
edges
protected arc.graphics.g2d.TextureRegion[][] edges(int x, int y) Returns the edge array that should be used to draw at the specified tile position. -
edge
protected arc.graphics.g2d.TextureRegion edge(int x, int y, int rx, int ry) -
doEdge
- Returns:
- whether the edges from should be drawn onto this tile
-
damages
public boolean damages()- Returns:
- whether being on this floor can damage a unit
-