WeatheringCopperFullBlock .java

net.minecraft.world.level.block.WeatheringCopperFullBlock (class): members: weatherState, getAge, isRandomlyTicking, randomTick. imports: BlockBehaviour.

net.minecraft.world.level.blockclass31 linescommonextends Block1.0 KB

Implements

API Surface (3)

void randomTick(final BlockState state, final ServerLevel level, final BlockPos pos, final RandomSource random)
boolean isRandomlyTicking(final BlockState state)
WeatheringCopper.WeatherState getAge()

Fields & Constants (1)

weatherState

Code Graph: Dependencies (7)

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

Full Source

WeatheringCopperFullBlock.java31 lines · Minecraft 26.3 · verbatim
1
package net.minecraft.world.level.block;
2
3
import net.minecraft.core.BlockPos;
4
import net.minecraft.server.level.ServerLevel;
5
import net.minecraft.util.RandomSource;
6
import net.minecraft.world.level.block.state.BlockBehaviour;
7
import net.minecraft.world.level.block.state.BlockState;
8
9
public class WeatheringCopperFullBlock extends Block implements WeatheringCopper {
10
	private final WeatheringCopper.WeatherState weatherState;
11
12
	public WeatheringCopperFullBlock(final WeatheringCopper.WeatherState weatherState, final BlockBehaviour.Properties properties) {
13
		super(properties);
14
		this.weatherState = weatherState;
15
	}
16
17
	@Override
18
	protected void randomTick(final BlockState state, final ServerLevel level, final BlockPos pos, final RandomSource random) {
19
		this.changeOverTime(state, level, pos, random);
20
	}
21
22
	@Override
23
	protected boolean isRandomlyTicking(final BlockState state) {
24
		return WeatheringCopper.getNext(state.getBlock()).isPresent();
25
	}
26
27
	public WeatheringCopper.WeatherState getAge() {
28
		return this.weatherState;
29
	}
30
}
31

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