mirror of
https://github.com/Sollace/Unicopia.git
synced 2025-02-07 22:16:44 +01:00
Added block of worms
This commit is contained in:
parent
f0c5cdb156
commit
2ac6970e04
8 changed files with 15 additions and 3 deletions
|
@ -36,6 +36,7 @@ import com.minelittlepony.unicopia.item.cloud.CloudBlockItem;
|
|||
import com.minelittlepony.unicopia.item.group.ItemGroupRegistry;
|
||||
import com.minelittlepony.unicopia.server.world.UTreeGen;
|
||||
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
|
||||
import net.fabricmc.fabric.api.registry.CompostingChanceRegistry;
|
||||
import net.fabricmc.fabric.api.registry.FlammableBlockRegistry;
|
||||
import net.fabricmc.fabric.api.registry.OxidizableBlocksRegistry;
|
||||
import net.fabricmc.fabric.api.registry.StrippableBlockRegistry;
|
||||
|
@ -253,6 +254,7 @@ public interface UBlocks {
|
|||
|
||||
Block SPECTRAL_FIRE = register("spectral_fire", new SpectralFireBlock(Settings.copy(Blocks.SOUL_FIRE)));
|
||||
|
||||
Block WORM_BLOCK = register("worm_block", new FallingBlock(Settings.create().hardness(0.1F).resistance(0).requiresTool().sounds(BlockSoundGroup.MUD)), ItemGroups.NATURAL);
|
||||
EdibleBlock HAY_BLOCK = register("hay_block", new EdibleBlock(new Identifier("hay_block"), new Identifier("wheat"), true));
|
||||
|
||||
private static <T extends Block> T register(String name, T item) {
|
||||
|
@ -328,6 +330,8 @@ public interface UBlocks {
|
|||
FlammableBlockRegistry.getDefaultInstance().add(BANANAS, 5, 20);
|
||||
FlammableBlockRegistry.getDefaultInstance().add(CURING_JOKE, 60, 100);
|
||||
|
||||
CompostingChanceRegistry.INSTANCE.add(WORM_BLOCK, 8F);
|
||||
|
||||
UBlockEntities.bootstrap();
|
||||
EdibleBlock.bootstrap();
|
||||
}
|
||||
|
|
|
@ -123,7 +123,7 @@ public class UBlockStateModelGenerator extends BlockStateModelGenerator {
|
|||
registerLog(UBlocks.STRIPPED_PALM_LOG).log(UBlocks.STRIPPED_PALM_LOG).wood(UBlocks.STRIPPED_PALM_WOOD);
|
||||
registerCubeAllModelTexturePool(UBlocks.PALM_PLANKS).family(UBlockFamilies.PALM);
|
||||
registerHangingSign(UBlocks.STRIPPED_PALM_LOG, UBlocks.PALM_HANGING_SIGN, UBlocks.PALM_WALL_HANGING_SIGN);
|
||||
registerSimpleCubeAll(UBlocks.PALM_LEAVES);
|
||||
registerSingleton(UBlocks.PALM_LEAVES, TexturedModel.LEAVES);
|
||||
|
||||
// zap wood
|
||||
registerLog(UBlocks.ZAP_LOG)
|
||||
|
@ -170,6 +170,7 @@ public class UBlockStateModelGenerator extends BlockStateModelGenerator {
|
|||
// shells
|
||||
registerAll(UBlockStateModelGenerator::registerShell, UBlocks.CLAM_SHELL, UBlocks.TURRET_SHELL, UBlocks.SCALLOP_SHELL);
|
||||
// other
|
||||
registerSimpleCubeAll(UBlocks.WORM_BLOCK);
|
||||
registerBuiltinWithParticle(UBlocks.WEATHER_VANE, UBlocks.WEATHER_VANE.asItem());
|
||||
registerWithStages(UBlocks.FROSTED_OBSIDIAN, Properties.AGE_3, BlockModels.CUBE_ALL, 0, 1, 2, 3);
|
||||
registerWithStagesBuiltinModels(UBlocks.ROCKS, Properties.AGE_7, 0, 1, 2, 3, 4, 5, 6, 7);
|
||||
|
|
|
@ -48,6 +48,7 @@ public class UBlockTagProvider extends FabricTagProvider.BlockTagProvider {
|
|||
getOrCreateTagBuilder(BlockTags.DRAGON_IMMUNE).add(UBlocks.FROSTED_OBSIDIAN, UBlocks.GOLDEN_OAK_LOG, UBlocks.GOLDEN_OAK_LEAVES);
|
||||
getOrCreateTagBuilder(BlockTags.FIRE).add(UBlocks.SPECTRAL_FIRE);
|
||||
getOrCreateTagBuilder(BlockTags.HOE_MINEABLE).add(UBlocks.HAY_BLOCK).addOptional(Unicopia.id("rice_block")).addOptional(Unicopia.id("straw_block"));
|
||||
getOrCreateTagBuilder(BlockTags.SHOVEL_MINEABLE).add(UBlocks.WORM_BLOCK);
|
||||
|
||||
addZapWoodset();
|
||||
addPalmWoodset();
|
||||
|
|
|
@ -54,7 +54,8 @@ public class UBlockLootTableProvider extends FabricBlockLootTableProvider {
|
|||
UBlocks.WEATHER_VANE,
|
||||
|
||||
UBlocks.ZAP_FENCE_GATE, UBlocks.ZAP_FENCE,
|
||||
UBlocks.ZAP_LOG, UBlocks.ZAP_PLANKS, UBlocks.ZAP_STAIRS, UBlocks.ZAP_WOOD
|
||||
UBlocks.ZAP_LOG, UBlocks.ZAP_PLANKS, UBlocks.ZAP_STAIRS, UBlocks.ZAP_WOOD,
|
||||
UBlocks.WORM_BLOCK
|
||||
).forEach(this::addDrop);
|
||||
|
||||
// slabs
|
||||
|
|
|
@ -67,6 +67,9 @@ public class URecipeProvider extends FabricRecipeProvider {
|
|||
createCustomBedRecipe(UItems.CLOTH_BED, Either.right(ItemTags.WOOL), Either.right(ItemTags.LOGS)).offerTo(exporter);
|
||||
offerBedSheetRecipes(exporter);
|
||||
|
||||
// worms
|
||||
offerReversibleCompactingRecipes(exporter, RecipeCategory.BUILDING_BLOCKS, UItems.WHEAT_WORMS, RecipeCategory.BUILDING_BLOCKS, UBlocks.WORM_BLOCK);
|
||||
|
||||
// sunglasses
|
||||
ShapedRecipeJsonBuilder.create(RecipeCategory.MISC, UItems.SUNGLASSES)
|
||||
.input('#', ConventionalItemTags.GLASS_BLOCKS).criterion("has_glass_block", conditionsFromTag(ConventionalItemTags.GLASS_BLOCKS))
|
||||
|
|
|
@ -280,6 +280,7 @@
|
|||
"block.unicopia.golden_oak_leaves": "Golden Oak Leaves",
|
||||
"block.unicopia.golden_oak_log": "Golden Oak Log",
|
||||
"block.unicopia.mango": "Mango",
|
||||
"block.unicopia.worm_block": "Block of Worms",
|
||||
"block.unicopia.mango_leaves": "Mango Leaves",
|
||||
"block.unicopia.mango_sapling": "Mango Sapling",
|
||||
"block.unicopia.potted_mango_sapling": "Potted Mango Sapling",
|
||||
|
|
BIN
src/main/resources/assets/unicopia/textures/block/worm_block.png
Normal file
BIN
src/main/resources/assets/unicopia/textures/block/worm_block.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 6.9 KiB |
|
@ -2,7 +2,8 @@
|
|||
"replace": false,
|
||||
"values": [
|
||||
"minecraft:spider_eye",
|
||||
"unicopia:butterfly",
|
||||
"unicopia:wheat_worms",
|
||||
"unicopia:butterfly"
|
||||
"unicopia:worm_block"
|
||||
]
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue