Dartcraft/src/main/java/ley/modding/dartcraft/block/DartBlocks.java

52 lines
2.2 KiB
Java
Raw Normal View History

2021-04-07 12:45:02 +02:00
package ley.modding.dartcraft.block;
2024-04-20 16:01:30 +02:00
import java.util.stream.IntStream;
2021-04-07 12:45:02 +02:00
import ley.modding.tileralib.api.IRegistry;
import net.minecraft.block.Block;
2021-04-17 16:07:41 +02:00
import net.minecraftforge.fluids.Fluid;
import net.minecraftforge.fluids.FluidRegistry;
2021-04-07 12:45:02 +02:00
public class DartBlocks {
2021-04-17 16:07:41 +02:00
public static Block engine;
2024-04-20 16:01:30 +02:00
public static Block[] forcebrick;
public static Block forceleaves;
public static Block forcelog;
public static Block forceplanks;
public static Block forcesapling;
2024-04-20 16:01:30 +02:00
public static Block[] forceslab;
public static Block[] forcestairs;
public static Block forcetorch;
2021-04-17 16:07:41 +02:00
public static Block liquidforce;
public static Block powerore;
2021-04-07 12:45:02 +02:00
public static void register(IRegistry reg) {
2021-04-17 16:07:41 +02:00
FluidRegistry.registerFluid(new FluidLiquidForce());
if (!FluidRegistry.isFluidRegistered("milk")) {
Fluid milk = new Fluid("milk");
FluidRegistry.registerFluid(milk);
}
DartBlocks.engine = reg.registerBlock(new BlockForceEngine());
2024-04-20 16:01:30 +02:00
DartBlocks.forcebrick = IntStream.range(0, 16)
.mapToObj(BlockForceBrick::new)
.map(reg::registerBlock)
.toArray(Block[] ::new);
DartBlocks.forceleaves = reg.registerBlock(new BlockForceLeaves());
DartBlocks.forcelog = reg.registerBlock(new BlockForceLog());
DartBlocks.forceplanks = reg.registerBlock(new BlockForcePlanks());
2021-04-07 12:45:02 +02:00
DartBlocks.forcesapling = reg.registerBlock(new BlockForceSapling());
2024-04-20 16:01:30 +02:00
DartBlocks.forceslab = IntStream.range(0, 17)
.mapToObj(BlockForceSlab::new)
.map(reg::registerBlock)
.toArray(Block[] ::new);
DartBlocks.forcestairs = IntStream.range(0, 17)
.mapToObj(BlockForceStairs::new)
.map(reg::registerBlock)
.toArray(Block[] ::new);
DartBlocks.forcetorch = reg.registerBlock(new BlockForceTorch());
DartBlocks.liquidforce = reg.registerBlock(new BlockLiquidForce());
2021-04-07 12:45:02 +02:00
DartBlocks.powerore = reg.registerBlock(new BlockPowerOre());
}
}