Added a window block and working on portal stuff.

Signed-off-by: dragonruler1000 <github@me.minecraftchest2.us>
This commit is contained in:
dragonruler1000 2025-05-13 16:58:44 -05:00 committed by dragonruler1000
parent c7269ce21c
commit a195450501
5 changed files with 230 additions and 76 deletions

View file

@ -19,6 +19,7 @@ import java.util.function.ToIntFunction;
public class ModBlocks {
public static ToIntFunction<BlockState> dustLightLevel = BlockState -> 10; // Dust Light Level
public static ToIntFunction<BlockState> PORTAL_LIGHT_LEVEL = BlockState ->15;
public static final DeferredRegister<Block> BLOCKS = DeferredRegister.create(ForgeRegistries.BLOCKS, Hdm_mod.MOD_ID);
@ -26,6 +27,10 @@ public class ModBlocks {
() -> new Block(AbstractBlock.Properties.create(Material.ROCK).doesNotBlockMovement().harvestLevel(0)
.hardnessAndResistance(500f, 100f).setLightLevel(dustLightLevel)));
public static final RegistryObject<Block> PORTAL_BLOCK = registerBlock("window",
() -> new Block(AbstractBlock.Properties.create(Material.PORTAL).doesNotBlockMovement().harvestLevel(10)
.hardnessAndResistance(1000f, 1000f).setLightLevel(PORTAL_LIGHT_LEVEL)));
private static <T extends Block>RegistryObject<T> registerBlock(String name, Supplier<T> block) {
RegistryObject<T> toReturn = BLOCKS.register(name, block);