SPIGOT-6903, #1311: Add BlockData#getMapColor
This commit is contained in:
parent
1dbdbbed49
commit
2ab4508c08
@ -25,6 +25,7 @@ import net.minecraft.world.level.block.state.properties.BlockStateBoolean;
|
|||||||
import net.minecraft.world.level.block.state.properties.BlockStateEnum;
|
import net.minecraft.world.level.block.state.properties.BlockStateEnum;
|
||||||
import net.minecraft.world.level.block.state.properties.BlockStateInteger;
|
import net.minecraft.world.level.block.state.properties.BlockStateInteger;
|
||||||
import net.minecraft.world.level.block.state.properties.IBlockState;
|
import net.minecraft.world.level.block.state.properties.IBlockState;
|
||||||
|
import org.bukkit.Color;
|
||||||
import org.bukkit.Location;
|
import org.bukkit.Location;
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
import org.bukkit.SoundGroup;
|
import org.bukkit.SoundGroup;
|
||||||
@ -638,6 +639,11 @@ public class CraftBlockData implements BlockData {
|
|||||||
return state.isFaceSturdy(BlockAccessAir.INSTANCE, BlockPosition.ZERO, CraftBlock.blockFaceToNotch(face), CraftBlockSupport.toNMS(support));
|
return state.isFaceSturdy(BlockAccessAir.INSTANCE, BlockPosition.ZERO, CraftBlock.blockFaceToNotch(face), CraftBlockSupport.toNMS(support));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Color getMapColor() {
|
||||||
|
return Color.fromRGB(state.getMapColor(null, null).col);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Material getPlacementMaterial() {
|
public Material getPlacementMaterial() {
|
||||||
return CraftMagicNumbers.getMaterial(state.getBlock().asItem());
|
return CraftMagicNumbers.getMaterial(state.getBlock().asItem());
|
||||||
|
Loading…
x
Reference in New Issue
Block a user