+ glow glass
TODO: fix glow glass texture
This commit is contained in:
@@ -1,10 +1,17 @@
|
||||
package ovh.glitchlabs.ornamentum.blocks;
|
||||
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.Direction;
|
||||
import net.minecraft.world.item.BlockItem;
|
||||
import net.minecraft.world.item.Item;
|
||||
import net.minecraft.world.level.BlockGetter;
|
||||
import net.minecraft.world.level.block.Block;
|
||||
import net.minecraft.world.level.block.Blocks;
|
||||
import net.minecraft.world.level.block.state.BlockBehaviour;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
import net.minecraft.world.phys.shapes.CollisionContext;
|
||||
import net.minecraft.world.phys.shapes.Shapes;
|
||||
import net.minecraft.world.phys.shapes.VoxelShape;
|
||||
import net.neoforged.bus.api.IEventBus;
|
||||
import net.neoforged.neoforge.registries.DeferredBlock;
|
||||
import net.neoforged.neoforge.registries.DeferredRegister;
|
||||
@@ -17,10 +24,61 @@ public class ModBlocks {
|
||||
public static final DeferredRegister.Blocks BLOCKS =
|
||||
DeferredRegister.createBlocks(Ornamentum.MODID);
|
||||
|
||||
//public static final DeferredBlock<Block> OBSIDIAN_BRICKS = registerBlock("obsidian_bricks",
|
||||
// () -> new Block(BlockBehaviour.Properties.ofFullCopy(Blocks.OBSIDIAN)
|
||||
// ));
|
||||
//
|
||||
//GlowGlass
|
||||
public static final DeferredBlock<Block> LIME_GLOW_STAINED_GLASS = registerBlock("lime_glow_stained_glass",
|
||||
() -> new Block(BlockBehaviour.Properties.ofFullCopy(Blocks.GLASS)
|
||||
.emissiveRendering(((blockState, blockGetter, blockPos) -> true))
|
||||
.lightLevel(blockstate -> 10)
|
||||
.noOcclusion()
|
||||
.hasPostProcess((bs, br, bp) -> true))
|
||||
);
|
||||
|
||||
public static final DeferredBlock<Block> WHITE_GLOW_STAINED_GLASS = registerBlock("white_glow_stained_glass",
|
||||
() -> new Block(BlockBehaviour.Properties.ofFullCopy(LIME_GLOW_STAINED_GLASS.get())));
|
||||
|
||||
public static final DeferredBlock<Block> LIGHT_GRAY_GLOW_STAINED_GLASS = registerBlock("light_gray_glow_stained_glass",
|
||||
() -> new Block(BlockBehaviour.Properties.ofFullCopy(LIME_GLOW_STAINED_GLASS.get())));
|
||||
|
||||
public static final DeferredBlock<Block> GRAY_GLOW_STAINED_GLASS = registerBlock("gray_glow_stained_glass",
|
||||
() -> new Block(BlockBehaviour.Properties.ofFullCopy(LIME_GLOW_STAINED_GLASS.get())));
|
||||
|
||||
public static final DeferredBlock<Block> BLACK_GLOW_STAINED_GLASS = registerBlock("black_glow_stained_glass",
|
||||
() -> new Block(BlockBehaviour.Properties.ofFullCopy(LIME_GLOW_STAINED_GLASS.get())));
|
||||
|
||||
public static final DeferredBlock<Block> BROWN_GLOW_STAINED_GLASS = registerBlock("brown_glow_stained_glass",
|
||||
() -> new Block(BlockBehaviour.Properties.ofFullCopy(LIME_GLOW_STAINED_GLASS.get())));
|
||||
|
||||
public static final DeferredBlock<Block> RED_GLOW_STAINED_GLASS = registerBlock("red_glow_stained_glass",
|
||||
() -> new Block(BlockBehaviour.Properties.ofFullCopy(LIME_GLOW_STAINED_GLASS.get())));
|
||||
|
||||
public static final DeferredBlock<Block> ORANGE_GLOW_STAINED_GLASS = registerBlock("orange_glow_stained_glass",
|
||||
() -> new Block(BlockBehaviour.Properties.ofFullCopy(LIME_GLOW_STAINED_GLASS.get())));
|
||||
|
||||
public static final DeferredBlock<Block> YELLOW_GLOW_STAINED_GLASS = registerBlock("yellow_glow_stained_glass",
|
||||
() -> new Block(BlockBehaviour.Properties.ofFullCopy(LIME_GLOW_STAINED_GLASS.get())));
|
||||
|
||||
public static final DeferredBlock<Block> GREEN_GLOW_STAINED_GLASS = registerBlock("green_glow_stained_glass",
|
||||
() -> new Block(BlockBehaviour.Properties.ofFullCopy(LIME_GLOW_STAINED_GLASS.get())));
|
||||
|
||||
public static final DeferredBlock<Block> CYAN_GLOW_STAINED_GLASS = registerBlock("cyan_glow_stained_glass",
|
||||
() -> new Block(BlockBehaviour.Properties.ofFullCopy(LIME_GLOW_STAINED_GLASS.get())));
|
||||
|
||||
public static final DeferredBlock<Block> LIGHT_BLUE_GLOW_STAINED_GLASS = registerBlock("light_blue_glow_stained_glass",
|
||||
() -> new Block(BlockBehaviour.Properties.ofFullCopy(LIME_GLOW_STAINED_GLASS.get())));
|
||||
|
||||
public static final DeferredBlock<Block> BLUE_GLOW_STAINED_GLASS = registerBlock("blue_glow_stained_glass",
|
||||
() -> new Block(BlockBehaviour.Properties.ofFullCopy(LIME_GLOW_STAINED_GLASS.get())));
|
||||
|
||||
public static final DeferredBlock<Block> PURPLE_GLOW_STAINED_GLASS = registerBlock("purple_glow_stained_glass",
|
||||
() -> new Block(BlockBehaviour.Properties.ofFullCopy(LIME_GLOW_STAINED_GLASS.get())));
|
||||
|
||||
public static final DeferredBlock<Block> MAGENTA_GLOW_STAINED_GLASS = registerBlock("magenta_glow_stained_glass",
|
||||
() -> new Block(BlockBehaviour.Properties.ofFullCopy(LIME_GLOW_STAINED_GLASS.get())));
|
||||
|
||||
public static final DeferredBlock<Block> PINK_GLOW_STAINED_GLASS = registerBlock("pink_glow_stained_glass",
|
||||
() -> new Block(BlockBehaviour.Properties.ofFullCopy(LIME_GLOW_STAINED_GLASS.get())));
|
||||
|
||||
|
||||
private static <T extends Block> DeferredBlock<T> registerBlock(String name, Supplier<T> block) {
|
||||
DeferredBlock<T> toReturn = BLOCKS.register(name, block);
|
||||
registerBlockItem(name, toReturn);
|
||||
|
||||
Reference in New Issue
Block a user