1.2
Compatibility
Changes
New Events
blockPlace
fires when a block is placed
getType()
returns the block that is being placed
getX(), getY(), getZ()
returns position
getPlayerName()
returns the name of the player who placed the block.
getPlayerUUID()
returns the UUID of the player who placed the block.
cancel()
stops the block from being placed
entityDamage
fires when an entity takes damage
getEntityType()
returns the damaged entity
isPlayer()
returns a boolean value
getPlayerName()
returns players name if it was a player that was damaged
getCause()
returns the cause of damage such as: "FALL", "ENTITY_ATTACK", "LAVA"
getDamage()
returns damage amount
setDamage(amount)
replaces the original damage with a new amount
cancel()
cancels the damage entirely
Complete List of Damage Types
BLOCK_EXPLOSION, CONTACT, CRAMMING, CUSTOM, DRAGON_BREATH, DROWNING, DRYOUT, ENTITY_ATTACK, ENTITY_EXPLOSION, ENTITY_SWEEP_ATTACK, FALL, FALLING_BLOCK, FIRE, FIRE_TICK, FLY_INTO_WALL, FREEZE, HOT_FLOOR, KILL, LAVA, LIGHTNING, MAGIC, MELTING, POISON, PROJECTILE, SONIC_BOOM, STARVATION, SUFFOCATION, THORNS, VOID, WITHER, WORLD_BORDER
Projects on Modrinth are automatically available through a Maven repository for use with JVM build tools such as Gradle. To learn more about the Modrinth Maven API, click here.
Note: When available, you should use the creator's maven repo instead as it will have transitive dependency information that the Modrinth Maven API does not. You may also end up with duplicate dependencies if you use a mix of Modrinth and non-Modrinth Maven repositories for your dependencies, because the group identifier will be different when served through the Modrinth Maven API.
Maven coordinates:
Version ID:
build.gradle:
repositories {
exclusiveContent {
forRepository {
maven {
name = "Modrinth"
url = "https://api.modrinth.com/maven"
}
}
// forRepositories(fg.repository) // Uncomment when using ForgeGradle
filter {
includeGroup "maven.modrinth"
}
}
}
// Standard Gradle dependency
dependencies {
implementation "maven.modrinth:gcqjSE77:u5EoQcnZ"
}
// Legacy Loom dependency
dependencies {
modImplementation "maven.modrinth:gcqjSE77:u5EoQcnZ"
}

