2020-04-15 19:06:45 +02:00
|
|
|
package com.minelittlepony.unicopia.block;
|
2020-04-15 12:37:14 +02:00
|
|
|
|
2020-04-22 20:23:54 +02:00
|
|
|
import com.minelittlepony.unicopia.TreeType;
|
2020-04-15 17:11:37 +02:00
|
|
|
import com.minelittlepony.unicopia.gas.CloudAnvilBlock;
|
|
|
|
import com.minelittlepony.unicopia.gas.CloudBlock;
|
|
|
|
import com.minelittlepony.unicopia.gas.CloudDoorBlock;
|
|
|
|
import com.minelittlepony.unicopia.gas.CloudFarmlandBlock;
|
|
|
|
import com.minelittlepony.unicopia.gas.CloudFenceBlock;
|
|
|
|
import com.minelittlepony.unicopia.gas.CloudSlabBlock;
|
|
|
|
import com.minelittlepony.unicopia.gas.CloudStairsBlock;
|
2020-04-26 19:33:47 +02:00
|
|
|
import com.minelittlepony.unicopia.gas.GasState;
|
2020-04-15 14:22:03 +02:00
|
|
|
import com.minelittlepony.unicopia.item.UItems;
|
|
|
|
import com.minelittlepony.unicopia.structure.CustomSaplingGenerator;
|
2020-04-15 12:37:14 +02:00
|
|
|
|
|
|
|
import net.fabricmc.fabric.api.block.FabricBlockSettings;
|
|
|
|
import net.minecraft.block.Block;
|
|
|
|
import net.minecraft.block.Blocks;
|
|
|
|
import net.minecraft.block.Material;
|
|
|
|
import net.minecraft.block.SaplingBlock;
|
|
|
|
import net.minecraft.item.ItemStack;
|
|
|
|
import net.minecraft.sound.BlockSoundGroup;
|
|
|
|
import net.minecraft.util.Identifier;
|
|
|
|
import net.minecraft.util.registry.Registry;
|
|
|
|
|
|
|
|
public interface UBlocks {
|
2020-04-26 22:39:44 +02:00
|
|
|
CloudFarmlandBlock CLOUD_FARMLAND = register(new CloudFarmlandBlock(GasState.NORMAL.configure().build()), "cloud_farmland");
|
2020-04-26 19:33:47 +02:00
|
|
|
CloudBlock CLOUD_BLOCK = register(new CloudBlock(GasState.NORMAL), "cloud_block");
|
|
|
|
CloudBlock ENCHANTED_CLOUD_BLOCK = register(new CloudBlock(GasState.ENCHANTED), "enchanted_cloud_block");
|
|
|
|
CloudBlock DENSE_CLOUD_BLOCK = register(new CloudBlock(GasState.DENSE), "dense_cloud_block");
|
2020-04-15 12:37:14 +02:00
|
|
|
|
2020-04-26 19:33:47 +02:00
|
|
|
CloudStairsBlock<CloudBlock> CLOUD_STAIRS = register(new CloudStairsBlock<>(CLOUD_BLOCK.getDefaultState(), GasState.NORMAL.configure().build()), "cloud_stairs");
|
2020-04-15 12:37:14 +02:00
|
|
|
|
2020-04-26 19:33:47 +02:00
|
|
|
CloudSlabBlock<CloudBlock> CLOUD_SLAB = register(new CloudSlabBlock<>(CLOUD_BLOCK.getDefaultState(), GasState.NORMAL.configure().build()), "cloud_slab");
|
|
|
|
CloudSlabBlock<CloudBlock> ENCHANTED_CLOUD_SLAB = register(new CloudSlabBlock<>(ENCHANTED_CLOUD_BLOCK.getDefaultState(), GasState.ENCHANTED.configure().build()), "enchanted_cloud_slab");
|
|
|
|
CloudSlabBlock<CloudBlock> DENSE_CLOUD_SLAB = register(new CloudSlabBlock<>(ENCHANTED_CLOUD_BLOCK.getDefaultState(), GasState.DENSE.configure().build()), "dense_cloud_slab");
|
2020-04-15 12:37:14 +02:00
|
|
|
|
2020-04-24 15:23:36 +02:00
|
|
|
CloudDoorBlock MISTED_GLASS_DOOR = register(new CloudDoorBlock(), "misted_glass_door");
|
|
|
|
DutchDoorBlock LIBRARY_DOOR = register(new DutchDoorBlock(FabricBlockSettings.of(Material.WOOD).sounds(BlockSoundGroup.WOOD).hardness(3).build()), "library_door");
|
|
|
|
DutchDoorBlock BAKERY_DOOR = register(new DutchDoorBlock(FabricBlockSettings.of(Material.WOOD).sounds(BlockSoundGroup.WOOD).hardness(3).build()), "bakery_door");
|
|
|
|
DiamondDoorBlock DIAMOND_DOOR = register(new DiamondDoorBlock(), "diamond_door");
|
2020-04-15 12:37:14 +02:00
|
|
|
|
2020-04-26 20:26:00 +02:00
|
|
|
GemTorchBlock ENCHANTED_TORCH = register(new GemTorchBlock(FabricBlockSettings.of(Material.PART)
|
|
|
|
.noCollision()
|
|
|
|
.breakInstantly()
|
|
|
|
.ticksRandomly()
|
|
|
|
.lightLevel(1).sounds(BlockSoundGroup.GLASS).build()), "enchanted_torch");
|
|
|
|
GemTorchBlock ENCHANTED_WALL_TORCH = register(new WallGemTorchBlock(FabricBlockSettings.of(Material.PART)
|
|
|
|
.noCollision()
|
|
|
|
.breakInstantly()
|
|
|
|
.ticksRandomly()
|
|
|
|
.lightLevel(1).sounds(BlockSoundGroup.GLASS).build()), "enchanted_wall_torch");
|
2020-04-15 12:37:14 +02:00
|
|
|
|
2020-04-24 15:23:36 +02:00
|
|
|
CloudAnvilBlock CLOUD_ANVIL = register(new CloudAnvilBlock(), "cloud_anvil");
|
2020-04-15 12:37:14 +02:00
|
|
|
|
2020-04-26 19:33:47 +02:00
|
|
|
CloudFenceBlock CLOUD_FENCE = register(new CloudFenceBlock(GasState.NORMAL), "cloud_fence");
|
2020-04-15 12:37:14 +02:00
|
|
|
|
2020-04-24 15:23:36 +02:00
|
|
|
TallCropBlock ALFALFA_CROPS = register(new TallCropBlock(FabricBlockSettings.of(Material.PLANT).noCollision().ticksRandomly().breakInstantly().sounds(BlockSoundGroup.CROP).build()), "alfalfa_crops");
|
2020-04-15 12:37:14 +02:00
|
|
|
|
2020-04-24 15:23:36 +02:00
|
|
|
StickBlock STICK = register(new StickBlock(), "stick");
|
|
|
|
TomatoPlantBlock TOMATO_PLANT = register(new TomatoPlantBlock(), "tomato_plant");
|
2020-04-15 12:37:14 +02:00
|
|
|
|
2020-04-24 15:23:36 +02:00
|
|
|
HiveWallBlock HIVE_WALL_BLOCK = register(new HiveWallBlock(), "hive_wall_block");
|
|
|
|
ChitinBlock CHITIN_SHELL_BLOCK = register(new ChitinBlock(), "chitin_shell_block");
|
|
|
|
Block CHISELED_CHITIN_SHELL_BLOCK = register(new ChiselledChitinBlock(), "chiseled_chitin_shell_block");
|
2020-04-15 12:37:14 +02:00
|
|
|
|
2020-04-26 13:46:49 +02:00
|
|
|
SlimeDropBlock SLIME_DROP = register(new SlimeDropBlock(), "slime_drop");
|
2020-04-24 15:23:36 +02:00
|
|
|
SlimeLayerBlock SLIME_LAYER = register(new SlimeLayerBlock(), "slime_layer");
|
2020-04-15 12:37:14 +02:00
|
|
|
|
2020-04-24 15:23:36 +02:00
|
|
|
Block SUGAR_BLOCK = register(new SugarBlock(), "sugar_block");
|
|
|
|
Block APPLE_LEAVES = register(new FruitLeavesBlock()
|
2020-04-15 12:37:14 +02:00
|
|
|
.growthChance(1200)
|
|
|
|
.tint(0xFFEE81)
|
2020-04-22 20:23:54 +02:00
|
|
|
.fruit(W -> TreeType.OAK.pickRandomStack())
|
2020-04-24 15:23:36 +02:00
|
|
|
.compost(w -> new ItemStack(UItems.ROTTEN_APPLE)), "apple_leaves");
|
2020-04-15 12:37:14 +02:00
|
|
|
|
2020-04-24 15:23:36 +02:00
|
|
|
SaplingBlock APPLE_SAPLING = register(new SaplingBlock(
|
|
|
|
new CustomSaplingGenerator(5, Blocks.OAK_LOG.getDefaultState(), APPLE_LEAVES.getDefaultState()),
|
2020-04-24 14:14:25 +02:00
|
|
|
FabricBlockSettings.of(Material.WOOD).build()
|
|
|
|
) {}, "apple_sapling");
|
|
|
|
|
2020-04-15 12:37:14 +02:00
|
|
|
|
|
|
|
static <T extends Block> T register(T block, String name) {
|
2020-04-25 13:32:33 +02:00
|
|
|
return Registry.BLOCK.add(new Identifier("unicopia", name), block);
|
2020-04-15 12:37:14 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
static void bootstrap() { }
|
|
|
|
}
|