MagmaBlock .java

net.minecraft.world.level.block.MagmaBlock (class, 24 lines): extends Block. members: stepOn. imports: BlockBehaviour.

net.minecraft.world.level.blockclass24 linescommonextends Block760 B

API Surface (1)

void stepOn(final Level level, final BlockPos pos, final BlockState onState, final Entity entity)

Code Graph: Dependencies (7)

Edges (calls / imports / inherits / references) resolved by graphify from the AST. Every chip opens the class source.

Full Source

MagmaBlock.java24 lines · Minecraft 26.3 · verbatim
1
package net.minecraft.world.level.block;
2
3
import net.minecraft.core.BlockPos;
4
import net.minecraft.world.entity.Entity;
5
import net.minecraft.world.entity.LivingEntity;
6
import net.minecraft.world.level.Level;
7
import net.minecraft.world.level.block.state.BlockBehaviour;
8
import net.minecraft.world.level.block.state.BlockState;
9
10
public class MagmaBlock extends Block {
11
	public MagmaBlock(final BlockBehaviour.Properties properties) {
12
		super(properties);
13
	}
14
15
	@Override
16
	public void stepOn(final Level level, final BlockPos pos, final BlockState onState, final Entity entity) {
17
		if (!entity.isSteppingCarefully() && entity instanceof LivingEntity) {
18
			entity.hurt(level.damageSources().hotFloor(), 1.0F);
19
		}
20
21
		super.stepOn(level, pos, onState, entity);
22
	}
23
}
24

Decompiled Minecraft 26.3 source of MagmaBlock (net/minecraft/world/level/block/MagmaBlock.java) with Mojang official mappings, stored verbatim on the site.