From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: MrPowerGamerBR Date: Wed, 12 Jun 2024 11:53:09 -0300 Subject: [PATCH] SPARKLYPOWER Add custom blocks diff --git a/net/minecraft/world/level/block/Blocks.java b/net/minecraft/world/level/block/Blocks.java index 0401a5e88fe7840ae667748409411ab73888799c..d83e8b92b77f6b8179b24f07eae528dda5f12ed2 100644 --- a/net/minecraft/world/level/block/Blocks.java +++ b/net/minecraft/world/level/block/Blocks.java @@ -6775,6 +6775,52 @@ public class Blocks { public static final Block POTTED_CLOSED_EYEBLOSSOM = register( "potted_closed_eyeblossom", properties -> new FlowerPotBlock(CLOSED_EYEBLOSSOM, properties), flowerPotProperties().randomTicks() ); + // SparklyPaper start - SparklyPower Survival custom blocks + // Blocks' strength should be synced with the replaced block on the client side! + public static final Block SPARKLYPOWER_RAINBOW_WOOL = register( + "sparklypower_rainbow_wool", + Block::new, + BlockBehaviour.Properties.of().mapColor(MapColor.TERRACOTTA_RED).strength(0.5F).sound(SoundType.GRASS) + ); + public static final Block SPARKLYPOWER_RAINBOW_CONCRETE = register( + "sparklypower_rainbow_concrete", + Block::new, + BlockBehaviour.Properties.of().mapColor(MapColor.TERRACOTTA_RED).strength(0.5F).sound(SoundType.GRASS) + ); + public static final Block SPARKLYPOWER_RAINBOW_TERRACOTTA = register( + "sparklypower_rainbow_terracotta", + Block::new, + BlockBehaviour.Properties.of().mapColor(MapColor.TERRACOTTA_RED).strength(0.5F).sound(SoundType.GRASS) + ); + public static final Block SPARKLYPOWER_ASPHALT_SERVER = register( + "sparklypower_asphalt_server", + Block::new, + BlockBehaviour.Properties.of() + .mapColor(MapColor.COLOR_BLACK) + .instrument(NoteBlockInstrument.BASEDRUM) + .requiresCorrectToolForDrops() + .strength(1.5F, 6.0F) + ); + public static final Block SPARKLYPOWER_ASPHALT_SERVER_SLAB = register( + "sparklypower_asphalt_server_slab", + SlabBlock::new, + BlockBehaviour.Properties.of().mapColor(MapColor.COLOR_BLACK).instrument(NoteBlockInstrument.BASEDRUM).requiresCorrectToolForDrops().strength(2.0F, 6.0F) + ); + public static final Block SPARKLYPOWER_ASPHALT_PLAYER = register( + "sparklypower_asphalt_player", + Block::new, + BlockBehaviour.Properties.of() + .mapColor(MapColor.COLOR_BLACK) + .instrument(NoteBlockInstrument.BASEDRUM) + .requiresCorrectToolForDrops() + .strength(1.5F, 6.0F) + ); + public static final Block SPARKLYPOWER_ASPHALT_PLAYER_SLAB = register( + "sparklypower_asphalt_player_slab", + SlabBlock::new, + BlockBehaviour.Properties.of().mapColor(MapColor.COLOR_BLACK).instrument(NoteBlockInstrument.BASEDRUM).requiresCorrectToolForDrops().strength(2.0F, 6.0F) + ); + // SparklyPaper end private static ToIntFunction litBlockEmission(int lightValue) { return state -> state.getValue(BlockStateProperties.LIT) ? lightValue : 0;