mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-20 07:34:48 +01:00
SPIGOT-6903, #1311: Add BlockData#getMapColor
By: Miles Holder <mwholder2005@gmail.com>
This commit is contained in:
parent
bbb64e5e0e
commit
3e5032caac
1 changed files with 6 additions and 0 deletions
|
@ -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…
Reference in a new issue