mirror of
https://github.com/dragonruler1000/hdm-mod.git
synced 2025-06-29 16:39:32 -05:00
Added a window block and working on portal stuff.
Signed-off-by: dragonruler1000 <github@me.minecraftchest2.us>
This commit is contained in:
parent
c7269ce21c
commit
a195450501
5 changed files with 230 additions and 76 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue