minecraft-source/src/net/minecraft/world/level/block/LogBlock.java

23 lines
836 B
Java

package net.minecraft.world.level.block;
import net.minecraft.world.level.block.state.properties.Property;
import net.minecraft.core.Direction;
import net.minecraft.core.BlockPos;
import net.minecraft.world.level.BlockGetter;
import net.minecraft.world.level.block.state.BlockState;
import net.minecraft.world.level.material.MaterialColor;
public class LogBlock extends RotatedPillarBlock {
private final MaterialColor woodMaterialColor;
public LogBlock(final MaterialColor col, final Properties c) {
super(c);
this.woodMaterialColor = col;
}
@Override
public MaterialColor getMapColor(final BlockState byg, final BlockGetter bjd, final BlockPos fk) {
return (byg.<Direction.Axis>getValue(LogBlock.AXIS) == Direction.Axis.Y) ? this.woodMaterialColor : this.materialColor;
}
}