MaterialColor -> MapColor

This commit is contained in:
Frank 2023-05-24 19:04:49 +02:00
parent d79885e15f
commit 295f9926bd
26 changed files with 101 additions and 101 deletions

View file

@ -8,14 +8,14 @@ import net.minecraft.world.item.BlockItem;
import net.minecraft.world.item.Item; import net.minecraft.world.item.Item;
import net.minecraft.world.level.block.SoundType; import net.minecraft.world.level.block.SoundType;
import net.minecraft.world.level.material.Material; import net.minecraft.world.level.material.Material;
import net.minecraft.world.level.material.MaterialColor; import net.minecraft.world.level.material.MapColor;
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings; import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
public class AeterniumBlock extends BaseBlock implements CustomItemProvider { public class AeterniumBlock extends BaseBlock implements CustomItemProvider {
public AeterniumBlock() { public AeterniumBlock() {
super(FabricBlockSettings super(FabricBlockSettings
.of(Material.METAL, MaterialColor.COLOR_GRAY) .of(Material.METAL, MapColor.COLOR_GRAY)
.hardness(65F) .hardness(65F)
.resistance(1200F) .resistance(1200F)
.requiresCorrectToolForDrops() .requiresCorrectToolForDrops()

View file

@ -3,12 +3,12 @@ package org.betterx.betterend.blocks;
import org.betterx.bclib.blocks.BaseRotatedPillarBlock; import org.betterx.bclib.blocks.BaseRotatedPillarBlock;
import net.minecraft.world.level.block.Blocks; import net.minecraft.world.level.block.Blocks;
import net.minecraft.world.level.material.MaterialColor; import net.minecraft.world.level.material.MapColor;
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings; import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
public class AmaranitaStemBlock extends BaseRotatedPillarBlock { public class AmaranitaStemBlock extends BaseRotatedPillarBlock {
public AmaranitaStemBlock() { public AmaranitaStemBlock() {
super(FabricBlockSettings.copyOf(Blocks.OAK_PLANKS).mapColor(MaterialColor.COLOR_LIGHT_GREEN)); super(FabricBlockSettings.copyOf(Blocks.OAK_PLANKS).mapColor(MapColor.COLOR_LIGHT_GREEN));
} }
} }

View file

@ -3,12 +3,12 @@ package org.betterx.betterend.blocks;
import org.betterx.bclib.blocks.BaseBlock; import org.betterx.bclib.blocks.BaseBlock;
import net.minecraft.world.level.block.Blocks; import net.minecraft.world.level.block.Blocks;
import net.minecraft.world.level.material.MaterialColor; import net.minecraft.world.level.material.MapColor;
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings; import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
public class AmberBlock extends BaseBlock { public class AmberBlock extends BaseBlock {
public AmberBlock() { public AmberBlock() {
super(FabricBlockSettings.copyOf(Blocks.DIAMOND_BLOCK).mapColor(MaterialColor.COLOR_YELLOW)); super(FabricBlockSettings.copyOf(Blocks.DIAMOND_BLOCK).mapColor(MapColor.COLOR_YELLOW));
} }
} }

View file

@ -20,7 +20,7 @@ import net.minecraft.world.level.block.state.BlockState;
import net.minecraft.world.level.block.state.StateDefinition; import net.minecraft.world.level.block.state.StateDefinition;
import net.minecraft.world.level.block.state.properties.BooleanProperty; import net.minecraft.world.level.block.state.properties.BooleanProperty;
import net.minecraft.world.level.material.Fluids; import net.minecraft.world.level.material.Fluids;
import net.minecraft.world.level.material.MaterialColor; import net.minecraft.world.level.material.MapColor;
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings; import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
@ -30,7 +30,7 @@ public class BrimstoneBlock extends BaseBlock {
public static final BooleanProperty ACTIVATED = BlockProperties.ACTIVE; public static final BooleanProperty ACTIVATED = BlockProperties.ACTIVE;
public BrimstoneBlock() { public BrimstoneBlock() {
super(FabricBlockSettings.copyOf(Blocks.END_STONE).mapColor(MaterialColor.COLOR_BROWN).randomTicks()); super(FabricBlockSettings.copyOf(Blocks.END_STONE).mapColor(MapColor.COLOR_BROWN).randomTicks());
registerDefaultState(stateDefinition.any().setValue(ACTIVATED, false)); registerDefaultState(stateDefinition.any().setValue(ACTIVATED, false));
} }

View file

@ -16,7 +16,7 @@ import net.minecraft.world.level.block.Block;
import net.minecraft.world.level.block.SoundType; import net.minecraft.world.level.block.SoundType;
import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.block.state.BlockState;
import net.minecraft.world.level.material.Material; import net.minecraft.world.level.material.Material;
import net.minecraft.world.level.material.MaterialColor; import net.minecraft.world.level.material.MapColor;
import net.minecraft.world.phys.shapes.CollisionContext; import net.minecraft.world.phys.shapes.CollisionContext;
import net.minecraft.world.phys.shapes.VoxelShape; import net.minecraft.world.phys.shapes.VoxelShape;
@ -38,7 +38,7 @@ public class BulbVineLanternBlock extends EndLanternBlock implements RenderLayer
this(FabricBlockSettings.of(Material.METAL) this(FabricBlockSettings.of(Material.METAL)
.hardness(1) .hardness(1)
.resistance(1) .resistance(1)
.mapColor(MaterialColor.COLOR_LIGHT_GRAY) .mapColor(MapColor.COLOR_LIGHT_GRAY)
.luminance(15) .luminance(15)
.requiresCorrectToolForDrops() .requiresCorrectToolForDrops()
.sound(SoundType.LANTERN)); .sound(SoundType.LANTERN));

View file

@ -21,7 +21,7 @@ import net.minecraft.world.level.block.state.properties.BooleanProperty;
import net.minecraft.world.level.material.FluidState; import net.minecraft.world.level.material.FluidState;
import net.minecraft.world.level.material.Fluids; import net.minecraft.world.level.material.Fluids;
import net.minecraft.world.level.material.Material; import net.minecraft.world.level.material.Material;
import net.minecraft.world.level.material.MaterialColor; import net.minecraft.world.level.material.MapColor;
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings; import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
@ -29,7 +29,7 @@ public class CrystalMossCoverBlock extends MultifaceBlock implements Bonemealabl
private static final BooleanProperty WATERLOGGED = BlockStateProperties.WATERLOGGED; private static final BooleanProperty WATERLOGGED = BlockStateProperties.WATERLOGGED;
private final MultifaceSpreader spreader = new MultifaceSpreader(this); private final MultifaceSpreader spreader = new MultifaceSpreader(this);
public CrystalMossCoverBlock(MaterialColor color) { public CrystalMossCoverBlock(MapColor color) {
super(FabricBlockSettings.of(Material.REPLACEABLE_PLANT, color) super(FabricBlockSettings.of(Material.REPLACEABLE_PLANT, color)
.noCollission() .noCollission()
.strength(0.2f) .strength(0.2f)

View file

@ -28,7 +28,7 @@ import net.minecraft.world.level.block.state.properties.BlockStateProperties;
import net.minecraft.world.level.block.state.properties.BooleanProperty; import net.minecraft.world.level.block.state.properties.BooleanProperty;
import net.minecraft.world.level.block.state.properties.DirectionProperty; import net.minecraft.world.level.block.state.properties.DirectionProperty;
import net.minecraft.world.level.material.Material; import net.minecraft.world.level.material.Material;
import net.minecraft.world.level.material.MaterialColor; import net.minecraft.world.level.material.MapColor;
import net.minecraft.world.level.storage.loot.LootContext; import net.minecraft.world.level.storage.loot.LootContext;
import net.minecraft.world.level.storage.loot.parameters.LootContextParams; import net.minecraft.world.level.storage.loot.parameters.LootContextParams;
import net.minecraft.world.phys.BlockHitResult; import net.minecraft.world.phys.BlockHitResult;
@ -48,7 +48,7 @@ public class EndStoneSmelter extends BaseBlockWithEntity implements AlloyingReci
public static final String ID = "end_stone_smelter"; public static final String ID = "end_stone_smelter";
public EndStoneSmelter() { public EndStoneSmelter() {
super(FabricBlockSettings.of(Material.STONE, MaterialColor.COLOR_GRAY) super(FabricBlockSettings.of(Material.STONE, MapColor.COLOR_GRAY)
.luminance(state -> state.getValue(LIT) ? 15 : 0) .luminance(state -> state.getValue(LIT) ? 15 : 0)
.hardness(4F) .hardness(4F)
.resistance(100F) .resistance(100F)

View file

@ -7,7 +7,7 @@ import net.minecraft.world.level.BlockGetter;
import net.minecraft.world.level.block.SoundType; import net.minecraft.world.level.block.SoundType;
import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.block.state.BlockState;
import net.minecraft.world.level.material.Material; import net.minecraft.world.level.material.Material;
import net.minecraft.world.level.material.MaterialColor; import net.minecraft.world.level.material.MapColor;
import net.fabricmc.api.EnvType; import net.fabricmc.api.EnvType;
import net.fabricmc.api.Environment; import net.fabricmc.api.Environment;
@ -16,7 +16,7 @@ import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
public class EnderBlock extends BaseBlock { public class EnderBlock extends BaseBlock {
public EnderBlock() { public EnderBlock() {
super(FabricBlockSettings.of(Material.STONE, MaterialColor.WARPED_WART_BLOCK) super(FabricBlockSettings.of(Material.STONE, MapColor.WARPED_WART_BLOCK)
.hardness(5F) .hardness(5F)
.resistance(6F) .resistance(6F)
.requiresCorrectToolForDrops() .requiresCorrectToolForDrops()

View file

@ -15,7 +15,7 @@ import net.minecraft.world.level.block.state.BlockState;
import net.minecraft.world.level.block.state.StateDefinition; import net.minecraft.world.level.block.state.StateDefinition;
import net.minecraft.world.level.block.state.properties.BooleanProperty; import net.minecraft.world.level.block.state.properties.BooleanProperty;
import net.minecraft.world.level.material.Material; import net.minecraft.world.level.material.Material;
import net.minecraft.world.level.material.MaterialColor; import net.minecraft.world.level.material.MapColor;
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings; import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
@ -24,7 +24,7 @@ public class GlowingPillarLuminophorBlock extends BaseBlock implements AddMineab
public GlowingPillarLuminophorBlock() { public GlowingPillarLuminophorBlock() {
super(FabricBlockSettings.of(Material.LEAVES) super(FabricBlockSettings.of(Material.LEAVES)
.mapColor(MaterialColor.COLOR_ORANGE) .mapColor(MapColor.COLOR_ORANGE)
.strength(0.2F) .strength(0.2F)
.luminance(15) .luminance(15)
.sound(SoundType.GRASS)); .sound(SoundType.GRASS));

View file

@ -22,7 +22,7 @@ import net.minecraft.world.level.block.state.BlockState;
import net.minecraft.world.level.block.state.StateDefinition; import net.minecraft.world.level.block.state.StateDefinition;
import net.minecraft.world.level.block.state.properties.IntegerProperty; import net.minecraft.world.level.block.state.properties.IntegerProperty;
import net.minecraft.world.level.material.Material; import net.minecraft.world.level.material.Material;
import net.minecraft.world.level.material.MaterialColor; import net.minecraft.world.level.material.MapColor;
import net.minecraft.world.level.storage.loot.LootContext; import net.minecraft.world.level.storage.loot.LootContext;
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings; import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
@ -36,7 +36,7 @@ public class HelixTreeLeavesBlock extends BaseBlock implements CustomColorProvid
public HelixTreeLeavesBlock() { public HelixTreeLeavesBlock() {
super(FabricBlockSettings super(FabricBlockSettings
.of(Material.LEAVES) .of(Material.LEAVES)
.mapColor(MaterialColor.COLOR_ORANGE) .mapColor(MapColor.COLOR_ORANGE)
.sound(SoundType.WART_BLOCK) .sound(SoundType.WART_BLOCK)
.sound(SoundType.GRASS) .sound(SoundType.GRASS)
.strength(0.2F) .strength(0.2F)

View file

@ -9,7 +9,7 @@ import net.minecraft.world.level.Level;
import net.minecraft.world.level.block.SoundType; import net.minecraft.world.level.block.SoundType;
import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.block.state.BlockState;
import net.minecraft.world.level.material.Material; import net.minecraft.world.level.material.Material;
import net.minecraft.world.level.material.MaterialColor; import net.minecraft.world.level.material.MapColor;
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings; import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
@ -20,7 +20,7 @@ public class HydraluxPetalBlock extends BaseBlock implements AddMineableAxe {
.of(Material.PLANT) .of(Material.PLANT)
.hardness(1) .hardness(1)
.resistance(1) .resistance(1)
.mapColor(MaterialColor.PODZOL) .mapColor(MapColor.PODZOL)
.sound(SoundType.WART_BLOCK) .sound(SoundType.WART_BLOCK)
); );
} }

View file

@ -15,7 +15,7 @@ import net.minecraft.world.item.Items;
import net.minecraft.world.level.Level; import net.minecraft.world.level.Level;
import net.minecraft.world.level.block.Block; import net.minecraft.world.level.block.Block;
import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.block.state.BlockState;
import net.minecraft.world.level.material.MaterialColor; import net.minecraft.world.level.material.MapColor;
import net.minecraft.world.phys.BlockHitResult; import net.minecraft.world.phys.BlockHitResult;
import net.fabricmc.api.EnvType; import net.fabricmc.api.EnvType;
@ -27,7 +27,7 @@ public class PallidiumBlock extends EndTerrainBlock {
private final Block nextLevel; private final Block nextLevel;
public PallidiumBlock(String thickness, Block nextLevel) { public PallidiumBlock(String thickness, Block nextLevel) {
super(MaterialColor.COLOR_LIGHT_GRAY); super(MapColor.COLOR_LIGHT_GRAY);
this.nextLevel = nextLevel; this.nextLevel = nextLevel;
} }

View file

@ -12,7 +12,7 @@ import net.minecraft.world.item.Item;
import net.minecraft.world.level.Level; import net.minecraft.world.level.Level;
import net.minecraft.world.level.block.Block; import net.minecraft.world.level.block.Block;
import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.block.state.BlockState;
import net.minecraft.world.level.material.MaterialColor; import net.minecraft.world.level.material.MapColor;
import net.fabricmc.api.EnvType; import net.fabricmc.api.EnvType;
import net.fabricmc.api.Environment; import net.fabricmc.api.Environment;
@ -21,7 +21,7 @@ import java.util.List;
public class ShadowGrassBlock extends EndTerrainBlock implements TagProvider { public class ShadowGrassBlock extends EndTerrainBlock implements TagProvider {
public ShadowGrassBlock() { public ShadowGrassBlock() {
super(MaterialColor.COLOR_BLACK); super(MapColor.COLOR_BLACK);
} }
@Environment(EnvType.CLIENT) @Environment(EnvType.CLIENT)

View file

@ -37,7 +37,7 @@ public class SmaragdantCrystalShardBlock extends BaseAttachedBlock implements Ad
public SmaragdantCrystalShardBlock() { public SmaragdantCrystalShardBlock() {
super(FabricBlockSettings.of(Material.STONE) super(FabricBlockSettings.of(Material.STONE)
.materialColor(MaterialColor.COLOR_GREEN) .materialColor(MapColor.COLOR_GREEN)
.luminance(15) .luminance(15)
.sound(SoundType.AMETHYST_CLUSTER) .sound(SoundType.AMETHYST_CLUSTER)
.requiresCorrectToolForDrops() .requiresCorrectToolForDrops()

View file

@ -47,7 +47,7 @@ public class SulphurCrystalBlock extends BaseAttachedBlock implements AddMineabl
public SulphurCrystalBlock() { public SulphurCrystalBlock() {
super(FabricBlockSettings.of(Material.STONE) super(FabricBlockSettings.of(Material.STONE)
.materialColor(MaterialColor.COLOR_YELLOW) .materialColor(MapColor.COLOR_YELLOW)
.sound(SoundType.GLASS) .sound(SoundType.GLASS)
.requiresCorrectToolForDrops() .requiresCorrectToolForDrops()
.noCollission()); .noCollission());

View file

@ -20,7 +20,7 @@ import net.minecraft.world.level.block.Blocks;
import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.block.state.BlockState;
import net.minecraft.world.level.block.state.StateDefinition; import net.minecraft.world.level.block.state.StateDefinition;
import net.minecraft.world.level.block.state.properties.BooleanProperty; import net.minecraft.world.level.block.state.properties.BooleanProperty;
import net.minecraft.world.level.material.MaterialColor; import net.minecraft.world.level.material.MapColor;
import net.minecraft.world.phys.BlockHitResult; import net.minecraft.world.phys.BlockHitResult;
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings; import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
@ -31,7 +31,7 @@ public class UmbrellaTreeClusterBlock extends BaseBlock {
public UmbrellaTreeClusterBlock() { public UmbrellaTreeClusterBlock() {
super(FabricBlockSettings super(FabricBlockSettings
.copyOf(Blocks.NETHER_WART_BLOCK) .copyOf(Blocks.NETHER_WART_BLOCK)
.mapColor(MaterialColor.COLOR_PURPLE) .mapColor(MapColor.COLOR_PURPLE)
.luminance(15) .luminance(15)
); );
registerDefaultState(stateDefinition.any().setValue(NATURAL, false)); registerDefaultState(stateDefinition.any().setValue(NATURAL, false));

View file

@ -12,7 +12,7 @@ import net.minecraft.world.level.block.Blocks;
import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.block.state.BlockState;
import net.minecraft.world.level.block.state.StateDefinition; import net.minecraft.world.level.block.state.StateDefinition;
import net.minecraft.world.level.block.state.properties.BooleanProperty; import net.minecraft.world.level.block.state.properties.BooleanProperty;
import net.minecraft.world.level.material.MaterialColor; import net.minecraft.world.level.material.MapColor;
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings; import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
@ -22,7 +22,7 @@ public class UmbrellaTreeClusterEmptyBlock extends BaseBlock {
public UmbrellaTreeClusterEmptyBlock() { public UmbrellaTreeClusterEmptyBlock() {
super(FabricBlockSettings super(FabricBlockSettings
.copyOf(Blocks.NETHER_WART_BLOCK) .copyOf(Blocks.NETHER_WART_BLOCK)
.mapColor(MaterialColor.COLOR_PURPLE) .mapColor(MapColor.COLOR_PURPLE)
.randomTicks() .randomTicks()
); );
registerDefaultState(stateDefinition.any().setValue(NATURAL, false)); registerDefaultState(stateDefinition.any().setValue(NATURAL, false));

View file

@ -3,16 +3,16 @@ package org.betterx.betterend.blocks.basis;
import org.betterx.bclib.blocks.LeveledAnvilBlock; import org.betterx.bclib.blocks.LeveledAnvilBlock;
import org.betterx.betterend.complexmaterials.MetalMaterial; import org.betterx.betterend.complexmaterials.MetalMaterial;
import net.minecraft.world.level.material.MaterialColor; import net.minecraft.world.level.material.MapColor;
public class EndAnvilBlock extends LeveledAnvilBlock { public class EndAnvilBlock extends LeveledAnvilBlock {
protected MetalMaterial metalMaterial; protected MetalMaterial metalMaterial;
public EndAnvilBlock(MaterialColor color, int level) { public EndAnvilBlock(MapColor color, int level) {
super(color, level); super(color, level);
} }
public EndAnvilBlock(MetalMaterial metalMaterial, MaterialColor color, int level) { public EndAnvilBlock(MetalMaterial metalMaterial, MapColor color, int level) {
super(color, level); super(color, level);
this.metalMaterial = metalMaterial; this.metalMaterial = metalMaterial;
} }

View file

@ -9,12 +9,12 @@ import net.minecraft.tags.TagKey;
import net.minecraft.world.item.Item; import net.minecraft.world.item.Item;
import net.minecraft.world.level.block.Block; import net.minecraft.world.level.block.Block;
import net.minecraft.world.level.block.Blocks; import net.minecraft.world.level.block.Blocks;
import net.minecraft.world.level.material.MaterialColor; import net.minecraft.world.level.material.MapColor;
import java.util.List; import java.util.List;
public class EndTerrainBlock extends BaseTerrainBlock implements PottableTerrain, TagProvider { public class EndTerrainBlock extends BaseTerrainBlock implements PottableTerrain, TagProvider {
public EndTerrainBlock(MaterialColor color) { public EndTerrainBlock(MapColor color) {
super(Blocks.END_STONE, color); super(Blocks.END_STONE, color);
} }

View file

@ -4,10 +4,10 @@ import org.betterx.bclib.blocks.TripleTerrainBlock;
import org.betterx.betterend.interfaces.PottableTerrain; import org.betterx.betterend.interfaces.PottableTerrain;
import net.minecraft.world.level.block.Blocks; import net.minecraft.world.level.block.Blocks;
import net.minecraft.world.level.material.MaterialColor; import net.minecraft.world.level.material.MapColor;
public class EndTripleTerrain extends TripleTerrainBlock implements PottableTerrain { public class EndTripleTerrain extends TripleTerrainBlock implements PottableTerrain {
public EndTripleTerrain(MaterialColor color) { public EndTripleTerrain(MapColor color) {
super(Blocks.END_STONE, color); super(Blocks.END_STONE, color);
} }
} }

View file

@ -4,15 +4,15 @@ import org.betterx.bclib.blocks.BaseLeavesBlock;
import org.betterx.betterend.interfaces.PottablePlant; import org.betterx.betterend.interfaces.PottablePlant;
import net.minecraft.world.level.block.Block; import net.minecraft.world.level.block.Block;
import net.minecraft.world.level.material.MaterialColor; import net.minecraft.world.level.material.MapColor;
public class PottableLeavesBlock extends BaseLeavesBlock implements PottablePlant { public class PottableLeavesBlock extends BaseLeavesBlock implements PottablePlant {
public PottableLeavesBlock(Block sapling, MaterialColor color) { public PottableLeavesBlock(Block sapling, MapColor color) {
super(sapling, color); super(sapling, color);
} }
public PottableLeavesBlock(Block sapling, MaterialColor color, int light) { public PottableLeavesBlock(Block sapling, MapColor color, int light) {
super(sapling, color, light); super(sapling, color, light);
} }

View file

@ -10,7 +10,7 @@ import net.minecraft.world.item.DyeColor;
import net.minecraft.world.item.DyeItem; import net.minecraft.world.item.DyeItem;
import net.minecraft.world.level.ItemLike; import net.minecraft.world.level.ItemLike;
import net.minecraft.world.level.block.Block; import net.minecraft.world.level.block.Block;
import net.minecraft.world.level.material.MaterialColor; import net.minecraft.world.level.material.MapColor;
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings; import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
@ -38,7 +38,7 @@ public class ColoredMaterial {
String id = BuiltInRegistries.BLOCK.getKey(source).getPath(); String id = BuiltInRegistries.BLOCK.getKey(source).getPath();
colors.forEach((color, name) -> { colors.forEach((color, name) -> {
String blockName = id + "_" + name; String blockName = id + "_" + name;
Block block = constructor.apply(FabricBlockSettings.copyOf(source).mapColor(MaterialColor.COLOR_BLACK)); Block block = constructor.apply(FabricBlockSettings.copyOf(source).mapColor(MapColor.COLOR_BLACK));
EndBlocks.registerBlock(blockName, block); EndBlocks.registerBlock(blockName, block);
if (craftEight) { if (craftEight) {
BCLRecipeBuilder.crafting(BetterEnd.makeID(blockName), block) BCLRecipeBuilder.crafting(BetterEnd.makeID(blockName), block)

View file

@ -7,13 +7,13 @@ import org.betterx.betterend.registry.EndItems;
import net.minecraft.world.level.block.Block; import net.minecraft.world.level.block.Block;
import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.block.state.BlockState;
import net.minecraft.world.level.material.MaterialColor; import net.minecraft.world.level.material.MapColor;
public class EndWoodenComplexMaterial extends WoodenComplexMaterial { public class EndWoodenComplexMaterial extends WoodenComplexMaterial {
private Block bark; private Block bark;
private Block log; private Block log;
public EndWoodenComplexMaterial(String name, MaterialColor woodColor, MaterialColor planksColor) { public EndWoodenComplexMaterial(String name, MapColor woodColor, MapColor planksColor) {
super(BetterEnd.MOD_ID, name, name, woodColor, planksColor); super(BetterEnd.MOD_ID, name, name, woodColor, planksColor);
} }

View file

@ -29,7 +29,7 @@ import net.minecraft.world.level.block.Blocks;
import net.minecraft.world.level.block.SoundType; import net.minecraft.world.level.block.SoundType;
import net.minecraft.world.level.block.state.BlockBehaviour; import net.minecraft.world.level.block.state.BlockBehaviour;
import net.minecraft.world.level.block.state.properties.BlockSetType; import net.minecraft.world.level.block.state.properties.BlockSetType;
import net.minecraft.world.level.material.MaterialColor; import net.minecraft.world.level.material.MapColor;
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings; import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
@ -79,7 +79,7 @@ public class MetalMaterial {
public static MetalMaterial makeNormal( public static MetalMaterial makeNormal(
String name, String name,
MaterialColor color, MapColor color,
Tier material, Tier material,
ArmorMaterial armor, ArmorMaterial armor,
int anvilAndToolLevel int anvilAndToolLevel
@ -97,7 +97,7 @@ public class MetalMaterial {
public static MetalMaterial makeNormal( public static MetalMaterial makeNormal(
String name, String name,
MaterialColor color, MapColor color,
float hardness, float hardness,
float resistance, float resistance,
Tier material, Tier material,
@ -120,7 +120,7 @@ public class MetalMaterial {
public static MetalMaterial makeOreless( public static MetalMaterial makeOreless(
String name, String name,
MaterialColor color, MapColor color,
Tier material, Tier material,
ArmorMaterial armor, ArmorMaterial armor,
int anvilAndToolLevel int anvilAndToolLevel
@ -138,7 +138,7 @@ public class MetalMaterial {
public static MetalMaterial makeOreless( public static MetalMaterial makeOreless(
String name, String name,
MaterialColor color, MapColor color,
float hardness, float hardness,
float resistance, float resistance,
Tier material, Tier material,

View file

@ -18,7 +18,7 @@ import net.minecraft.tags.ItemTags;
import net.minecraft.world.level.block.Block; import net.minecraft.world.level.block.Block;
import net.minecraft.world.level.block.Blocks; import net.minecraft.world.level.block.Blocks;
import net.minecraft.world.level.block.state.properties.BlockSetType; import net.minecraft.world.level.block.state.properties.BlockSetType;
import net.minecraft.world.level.material.MaterialColor; import net.minecraft.world.level.material.MapColor;
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings; import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
@ -44,11 +44,11 @@ public class StoneMaterial {
public final Block furnace; public final Block furnace;
public final Block flowerPot; public final Block flowerPot;
public static FabricBlockSettings createMaterial(MaterialColor color) { public static FabricBlockSettings createMaterial(MapColor color) {
return FabricBlockSettings.copyOf(Blocks.END_STONE).mapColor(color); return FabricBlockSettings.copyOf(Blocks.END_STONE).mapColor(color);
} }
public StoneMaterial(String name, MaterialColor color) { public StoneMaterial(String name, MapColor color) {
FabricBlockSettings material = createMaterial(color); FabricBlockSettings material = createMaterial(color);
this.baseName = name; this.baseName = name;

View file

@ -19,7 +19,7 @@ import net.minecraft.tags.TagKey;
import net.minecraft.world.item.Item; import net.minecraft.world.item.Item;
import net.minecraft.world.level.block.Block; import net.minecraft.world.level.block.Block;
import net.minecraft.world.level.block.Blocks; import net.minecraft.world.level.block.Blocks;
import net.minecraft.world.level.material.MaterialColor; import net.minecraft.world.level.material.MapColor;
import java.util.List; import java.util.List;
import org.jetbrains.annotations.ApiStatus; import org.jetbrains.annotations.ApiStatus;
@ -32,29 +32,29 @@ public class EndBlocks {
public static final Block ENDSTONE_DUST = registerBlock("endstone_dust", new EndstoneDustBlock()); public static final Block ENDSTONE_DUST = registerBlock("endstone_dust", new EndstoneDustBlock());
public static final Block END_MYCELIUM = registerBlock( public static final Block END_MYCELIUM = registerBlock(
"end_mycelium", "end_mycelium",
new EndTerrainBlock(MaterialColor.COLOR_LIGHT_BLUE) new EndTerrainBlock(MapColor.COLOR_LIGHT_BLUE)
); );
public static final Block END_MOSS = registerBlock( public static final Block END_MOSS = registerBlock(
"end_moss", "end_moss",
new EndTerrainBlock(MaterialColor.COLOR_CYAN), new EndTerrainBlock(MapColor.COLOR_CYAN),
BCLBlockTags.BONEMEAL_SOURCE_END_STONE, BCLBlockTags.BONEMEAL_SOURCE_END_STONE,
BlockTags.NYLIUM BlockTags.NYLIUM
); );
public static final Block CHORUS_NYLIUM = registerBlock( public static final Block CHORUS_NYLIUM = registerBlock(
"chorus_nylium", "chorus_nylium",
new EndTerrainBlock(MaterialColor.COLOR_MAGENTA), new EndTerrainBlock(MapColor.COLOR_MAGENTA),
BCLBlockTags.BONEMEAL_SOURCE_END_STONE, BCLBlockTags.BONEMEAL_SOURCE_END_STONE,
BlockTags.NYLIUM BlockTags.NYLIUM
); );
public static final Block CAVE_MOSS = registerBlock( public static final Block CAVE_MOSS = registerBlock(
"cave_moss", "cave_moss",
new EndTripleTerrain(MaterialColor.COLOR_PURPLE), new EndTripleTerrain(MapColor.COLOR_PURPLE),
BCLBlockTags.BONEMEAL_SOURCE_END_STONE, BCLBlockTags.BONEMEAL_SOURCE_END_STONE,
BlockTags.NYLIUM BlockTags.NYLIUM
); );
public static final Block CRYSTAL_MOSS = registerBlock( public static final Block CRYSTAL_MOSS = registerBlock(
"crystal_moss", "crystal_moss",
new EndTerrainBlock(MaterialColor.COLOR_PINK), new EndTerrainBlock(MapColor.COLOR_PINK),
BCLBlockTags.BONEMEAL_SOURCE_END_STONE, BCLBlockTags.BONEMEAL_SOURCE_END_STONE,
BlockTags.NYLIUM BlockTags.NYLIUM
); );
@ -66,31 +66,31 @@ public class EndBlocks {
); );
public static final Block PINK_MOSS = registerBlock( public static final Block PINK_MOSS = registerBlock(
"pink_moss", "pink_moss",
new EndTerrainBlock(MaterialColor.COLOR_PINK), new EndTerrainBlock(MapColor.COLOR_PINK),
BCLBlockTags.BONEMEAL_SOURCE_END_STONE, BCLBlockTags.BONEMEAL_SOURCE_END_STONE,
BlockTags.NYLIUM BlockTags.NYLIUM
); );
public static final Block AMBER_MOSS = registerBlock( public static final Block AMBER_MOSS = registerBlock(
"amber_moss", "amber_moss",
new EndTerrainBlock(MaterialColor.COLOR_ORANGE), new EndTerrainBlock(MapColor.COLOR_ORANGE),
BCLBlockTags.BONEMEAL_SOURCE_END_STONE, BCLBlockTags.BONEMEAL_SOURCE_END_STONE,
BlockTags.NYLIUM BlockTags.NYLIUM
); );
public static final Block JUNGLE_MOSS = registerBlock( public static final Block JUNGLE_MOSS = registerBlock(
"jungle_moss", "jungle_moss",
new EndTerrainBlock(MaterialColor.COLOR_GREEN), new EndTerrainBlock(MapColor.COLOR_GREEN),
BCLBlockTags.BONEMEAL_SOURCE_END_STONE, BCLBlockTags.BONEMEAL_SOURCE_END_STONE,
BlockTags.NYLIUM BlockTags.NYLIUM
); );
public static final Block SANGNUM = registerBlock( public static final Block SANGNUM = registerBlock(
"sangnum", "sangnum",
new EndTerrainBlock(MaterialColor.COLOR_RED), new EndTerrainBlock(MapColor.COLOR_RED),
BCLBlockTags.BONEMEAL_SOURCE_END_STONE, BCLBlockTags.BONEMEAL_SOURCE_END_STONE,
BlockTags.NYLIUM BlockTags.NYLIUM
); );
public static final Block RUTISCUS = registerBlock( public static final Block RUTISCUS = registerBlock(
"rutiscus", "rutiscus",
new EndTerrainBlock(MaterialColor.COLOR_ORANGE), new EndTerrainBlock(MapColor.COLOR_ORANGE),
BCLBlockTags.BONEMEAL_SOURCE_END_STONE, BCLBlockTags.BONEMEAL_SOURCE_END_STONE,
BlockTags.NYLIUM BlockTags.NYLIUM
); );
@ -160,19 +160,19 @@ public class EndBlocks {
); );
// Rocks // // Rocks //
public static final StoneMaterial FLAVOLITE = new StoneMaterial("flavolite", MaterialColor.SAND); public static final StoneMaterial FLAVOLITE = new StoneMaterial("flavolite", MapColor.SAND);
public static final StoneMaterial VIOLECITE = new StoneMaterial("violecite", MaterialColor.COLOR_PURPLE); public static final StoneMaterial VIOLECITE = new StoneMaterial("violecite", MapColor.COLOR_PURPLE);
public static final StoneMaterial SULPHURIC_ROCK = new StoneMaterial("sulphuric_rock", MaterialColor.COLOR_BROWN); public static final StoneMaterial SULPHURIC_ROCK = new StoneMaterial("sulphuric_rock", MapColor.COLOR_BROWN);
public static final StoneMaterial VIRID_JADESTONE = new StoneMaterial("virid_jadestone", MaterialColor.COLOR_GREEN); public static final StoneMaterial VIRID_JADESTONE = new StoneMaterial("virid_jadestone", MapColor.COLOR_GREEN);
public static final StoneMaterial AZURE_JADESTONE = new StoneMaterial( public static final StoneMaterial AZURE_JADESTONE = new StoneMaterial(
"azure_jadestone", "azure_jadestone",
MaterialColor.COLOR_LIGHT_BLUE MapColor.COLOR_LIGHT_BLUE
); );
public static final StoneMaterial SANDY_JADESTONE = new StoneMaterial( public static final StoneMaterial SANDY_JADESTONE = new StoneMaterial(
"sandy_jadestone", "sandy_jadestone",
MaterialColor.COLOR_YELLOW MapColor.COLOR_YELLOW
); );
public static final StoneMaterial UMBRALITH = new StoneMaterial("umbralith", MaterialColor.DEEPSLATE); public static final StoneMaterial UMBRALITH = new StoneMaterial("umbralith", MapColor.DEEPSLATE);
public static final Block BRIMSTONE = registerBlock("brimstone", new BrimstoneBlock()); public static final Block BRIMSTONE = registerBlock("brimstone", new BrimstoneBlock());
public static final Block SULPHUR_CRYSTAL = registerBlock("sulphur_crystal", new SulphurCrystalBlock()); public static final Block SULPHUR_CRYSTAL = registerBlock("sulphur_crystal", new SulphurCrystalBlock());
public static final Block MISSING_TILE = registerBlock("missing_tile", new MissingTileBlock()); public static final Block MISSING_TILE = registerBlock("missing_tile", new MissingTileBlock());
@ -246,8 +246,8 @@ public class EndBlocks {
); );
public static final EndWoodenComplexMaterial MOSSY_GLOWSHROOM = new EndWoodenComplexMaterial( public static final EndWoodenComplexMaterial MOSSY_GLOWSHROOM = new EndWoodenComplexMaterial(
"mossy_glowshroom", "mossy_glowshroom",
MaterialColor.COLOR_GRAY, MapColor.COLOR_GRAY,
MaterialColor.WOOD MapColor.WOOD
).init(); ).init();
public static final Block PYTHADENDRON_SAPLING = registerBlock( public static final Block PYTHADENDRON_SAPLING = registerBlock(
@ -258,13 +258,13 @@ public class EndBlocks {
"pythadendron_leaves", "pythadendron_leaves",
new PottableLeavesBlock( new PottableLeavesBlock(
PYTHADENDRON_SAPLING, PYTHADENDRON_SAPLING,
MaterialColor.COLOR_MAGENTA MapColor.COLOR_MAGENTA
) )
); );
public static final EndWoodenComplexMaterial PYTHADENDRON = new EndWoodenComplexMaterial( public static final EndWoodenComplexMaterial PYTHADENDRON = new EndWoodenComplexMaterial(
"pythadendron", "pythadendron",
MaterialColor.COLOR_MAGENTA, MapColor.COLOR_MAGENTA,
MaterialColor.COLOR_PURPLE MapColor.COLOR_PURPLE
).init(); ).init();
public static final Block END_LOTUS_SEED = registerBlock("end_lotus_seed", new EndLotusSeedBlock()); public static final Block END_LOTUS_SEED = registerBlock("end_lotus_seed", new EndLotusSeedBlock());
@ -273,8 +273,8 @@ public class EndBlocks {
public static final Block END_LOTUS_FLOWER = registerEndBlockOnly("end_lotus_flower", new EndLotusFlowerBlock()); public static final Block END_LOTUS_FLOWER = registerEndBlockOnly("end_lotus_flower", new EndLotusFlowerBlock());
public static final EndWoodenComplexMaterial END_LOTUS = new EndWoodenComplexMaterial( public static final EndWoodenComplexMaterial END_LOTUS = new EndWoodenComplexMaterial(
"end_lotus", "end_lotus",
MaterialColor.COLOR_LIGHT_BLUE, MapColor.COLOR_LIGHT_BLUE,
MaterialColor.COLOR_CYAN MapColor.COLOR_CYAN
).init(); ).init();
public static final Block LACUGROVE_SAPLING = registerBlock("lacugrove_sapling", new LacugroveSaplingBlock()); public static final Block LACUGROVE_SAPLING = registerBlock("lacugrove_sapling", new LacugroveSaplingBlock());
@ -282,13 +282,13 @@ public class EndBlocks {
"lacugrove_leaves", "lacugrove_leaves",
new PottableLeavesBlock( new PottableLeavesBlock(
LACUGROVE_SAPLING, LACUGROVE_SAPLING,
MaterialColor.COLOR_CYAN MapColor.COLOR_CYAN
) )
); );
public static final EndWoodenComplexMaterial LACUGROVE = new EndWoodenComplexMaterial( public static final EndWoodenComplexMaterial LACUGROVE = new EndWoodenComplexMaterial(
"lacugrove", "lacugrove",
MaterialColor.COLOR_BROWN, MapColor.COLOR_BROWN,
MaterialColor.COLOR_YELLOW MapColor.COLOR_YELLOW
).init(); ).init();
public static final Block DRAGON_TREE_SAPLING = registerBlock("dragon_tree_sapling", new DragonTreeSaplingBlock()); public static final Block DRAGON_TREE_SAPLING = registerBlock("dragon_tree_sapling", new DragonTreeSaplingBlock());
@ -296,13 +296,13 @@ public class EndBlocks {
"dragon_tree_leaves", "dragon_tree_leaves",
new PottableLeavesBlock( new PottableLeavesBlock(
DRAGON_TREE_SAPLING, DRAGON_TREE_SAPLING,
MaterialColor.COLOR_MAGENTA MapColor.COLOR_MAGENTA
) )
); );
public static final EndWoodenComplexMaterial DRAGON_TREE = new EndWoodenComplexMaterial( public static final EndWoodenComplexMaterial DRAGON_TREE = new EndWoodenComplexMaterial(
"dragon_tree", "dragon_tree",
MaterialColor.COLOR_BLACK, MapColor.COLOR_BLACK,
MaterialColor.COLOR_MAGENTA MapColor.COLOR_MAGENTA
).init(); ).init();
public static final Block TENANEA_SAPLING = registerBlock("tenanea_sapling", new TenaneaSaplingBlock()); public static final Block TENANEA_SAPLING = registerBlock("tenanea_sapling", new TenaneaSaplingBlock());
@ -310,7 +310,7 @@ public class EndBlocks {
"tenanea_leaves", "tenanea_leaves",
new PottableLeavesBlock( new PottableLeavesBlock(
TENANEA_SAPLING, TENANEA_SAPLING,
MaterialColor.COLOR_PINK MapColor.COLOR_PINK
) )
); );
public static final Block TENANEA_FLOWERS = registerBlock("tenanea_flowers", new TenaneaFlowersBlock()); public static final Block TENANEA_FLOWERS = registerBlock("tenanea_flowers", new TenaneaFlowersBlock());
@ -320,16 +320,16 @@ public class EndBlocks {
); );
public static final EndWoodenComplexMaterial TENANEA = new EndWoodenComplexMaterial( public static final EndWoodenComplexMaterial TENANEA = new EndWoodenComplexMaterial(
"tenanea", "tenanea",
MaterialColor.COLOR_BROWN, MapColor.COLOR_BROWN,
MaterialColor.COLOR_PINK MapColor.COLOR_PINK
).init(); ).init();
public static final Block HELIX_TREE_SAPLING = registerBlock("helix_tree_sapling", new HelixTreeSaplingBlock()); public static final Block HELIX_TREE_SAPLING = registerBlock("helix_tree_sapling", new HelixTreeSaplingBlock());
public static final Block HELIX_TREE_LEAVES = registerBlock("helix_tree_leaves", new HelixTreeLeavesBlock()); public static final Block HELIX_TREE_LEAVES = registerBlock("helix_tree_leaves", new HelixTreeLeavesBlock());
public static final EndWoodenComplexMaterial HELIX_TREE = new EndWoodenComplexMaterial( public static final EndWoodenComplexMaterial HELIX_TREE = new EndWoodenComplexMaterial(
"helix_tree", "helix_tree",
MaterialColor.COLOR_GRAY, MapColor.COLOR_GRAY,
MaterialColor.COLOR_ORANGE MapColor.COLOR_ORANGE
).init(); ).init();
public static final Block UMBRELLA_TREE_SAPLING = registerBlock( public static final Block UMBRELLA_TREE_SAPLING = registerBlock(
@ -350,8 +350,8 @@ public class EndBlocks {
); );
public static final EndWoodenComplexMaterial UMBRELLA_TREE = new EndWoodenComplexMaterial( public static final EndWoodenComplexMaterial UMBRELLA_TREE = new EndWoodenComplexMaterial(
"umbrella_tree", "umbrella_tree",
MaterialColor.COLOR_BLUE, MapColor.COLOR_BLUE,
MaterialColor.COLOR_GREEN MapColor.COLOR_GREEN
).init(); ).init();
public static final Block JELLYSHROOM_CAP_PURPLE = registerBlock( public static final Block JELLYSHROOM_CAP_PURPLE = registerBlock(
@ -367,8 +367,8 @@ public class EndBlocks {
); );
public static final EndWoodenComplexMaterial JELLYSHROOM = new EndWoodenComplexMaterial( public static final EndWoodenComplexMaterial JELLYSHROOM = new EndWoodenComplexMaterial(
"jellyshroom", "jellyshroom",
MaterialColor.COLOR_PURPLE, MapColor.COLOR_PURPLE,
MaterialColor.COLOR_LIGHT_BLUE MapColor.COLOR_LIGHT_BLUE
).init(); ).init();
public static final Block LUCERNIA_SAPLING = registerBlock("lucernia_sapling", new LucerniaSaplingBlock()); public static final Block LUCERNIA_SAPLING = registerBlock("lucernia_sapling", new LucerniaSaplingBlock());
@ -376,7 +376,7 @@ public class EndBlocks {
"lucernia_leaves", "lucernia_leaves",
new PottableLeavesBlock( new PottableLeavesBlock(
LUCERNIA_SAPLING, LUCERNIA_SAPLING,
MaterialColor.COLOR_ORANGE MapColor.COLOR_ORANGE
) )
); );
public static final Block LUCERNIA_OUTER_LEAVES = registerBlock( public static final Block LUCERNIA_OUTER_LEAVES = registerBlock(
@ -385,8 +385,8 @@ public class EndBlocks {
); );
public static final EndWoodenComplexMaterial LUCERNIA = new EndWoodenComplexMaterial( public static final EndWoodenComplexMaterial LUCERNIA = new EndWoodenComplexMaterial(
"lucernia", "lucernia",
MaterialColor.COLOR_ORANGE, MapColor.COLOR_ORANGE,
MaterialColor.COLOR_ORANGE MapColor.COLOR_ORANGE
).init(); ).init();
// Small Plants // // Small Plants //
@ -446,7 +446,7 @@ public class EndBlocks {
public static final Block CRYSTAL_MOSS_COVER = registerBlock( public static final Block CRYSTAL_MOSS_COVER = registerBlock(
"crystal_moss_cover", "crystal_moss_cover",
new CrystalMossCoverBlock(MaterialColor.COLOR_PINK) new CrystalMossCoverBlock(MapColor.COLOR_PINK)
); );
public static final Block BLUE_VINE_SEED = registerBlock("blue_vine_seed", new BlueVineSeedBlock()); public static final Block BLUE_VINE_SEED = registerBlock("blue_vine_seed", new BlueVineSeedBlock());
@ -562,7 +562,7 @@ public class EndBlocks {
public static final Block CAVE_BUSH = registerBlock( public static final Block CAVE_BUSH = registerBlock(
"cave_bush", "cave_bush",
new SimpleLeavesBlock(MaterialColor.COLOR_MAGENTA) new SimpleLeavesBlock(MapColor.COLOR_MAGENTA)
); );
public static final Block MURKWEED = registerBlock("murkweed", new MurkweedBlock()); public static final Block MURKWEED = registerBlock("murkweed", new MurkweedBlock());
@ -608,7 +608,7 @@ public class EndBlocks {
// Materials // // Materials //
public static final MetalMaterial THALLASIUM = MetalMaterial.makeNormal( public static final MetalMaterial THALLASIUM = MetalMaterial.makeNormal(
"thallasium", "thallasium",
MaterialColor.COLOR_BLUE, MapColor.COLOR_BLUE,
EndToolMaterial.THALLASIUM, EndToolMaterial.THALLASIUM,
EndArmorMaterial.THALLASIUM, EndArmorMaterial.THALLASIUM,
EndToolMaterial.THALLASIUM.getLevel() EndToolMaterial.THALLASIUM.getLevel()
@ -616,7 +616,7 @@ public class EndBlocks {
public static final MetalMaterial TERMINITE = MetalMaterial.makeOreless( public static final MetalMaterial TERMINITE = MetalMaterial.makeOreless(
"terminite", "terminite",
MaterialColor.WARPED_WART_BLOCK, MapColor.WARPED_WART_BLOCK,
7F, 7F,
9F, 9F,
EndToolMaterial.TERMINITE, EndToolMaterial.TERMINITE,