diff --git a/src/main/java/com/minelittlepony/jumpingcastle/api/JumpingCastle.java b/src/main/java/com/minelittlepony/jumpingcastle/api/JumpingCastle.java index 26a41972..75dd86cc 100644 --- a/src/main/java/com/minelittlepony/jumpingcastle/api/JumpingCastle.java +++ b/src/main/java/com/minelittlepony/jumpingcastle/api/JumpingCastle.java @@ -18,7 +18,7 @@ public interface JumpingCastle { * @return An instance of IChannel. */ static Channel subscribeTo(String channelName, Client clientHandler) { - return null; + return null;// TODO: JumpingFabric } @FunctionalInterface diff --git a/src/main/java/com/minelittlepony/unicopia/TreeType.java b/src/main/java/com/minelittlepony/unicopia/TreeType.java index 114e9352..5ddf4500 100644 --- a/src/main/java/com/minelittlepony/unicopia/TreeType.java +++ b/src/main/java/com/minelittlepony/unicopia/TreeType.java @@ -18,7 +18,7 @@ import net.minecraft.util.Identifier; import net.minecraft.util.registry.Registry; public final class TreeType { - // TODO: Move this to a datapack + // TODO: move to datapack private static final Set REGISTRY = new HashSet<>(); public static final TreeType NONE = new TreeType("none", new Weighted>()); diff --git a/src/main/java/com/minelittlepony/unicopia/ability/UnicornCastingAbility.java b/src/main/java/com/minelittlepony/unicopia/ability/UnicornCastingAbility.java index df538668..b0610b65 100644 --- a/src/main/java/com/minelittlepony/unicopia/ability/UnicornCastingAbility.java +++ b/src/main/java/com/minelittlepony/unicopia/ability/UnicornCastingAbility.java @@ -50,7 +50,7 @@ public class UnicornCastingAbility implements Ability { @Override public void apply(Pony player, Hit data) { - // TODO: A way to pick the active effect + // TODO: A way for the player to select which effect they want if (player.getEffect() instanceof ShieldSpell) { player.setEffect(null); } else { diff --git a/src/main/java/com/minelittlepony/unicopia/block/BlockGrowingCuccoon.java b/src/main/java/com/minelittlepony/unicopia/block/BlockGrowingCuccoon.java index a2de679a..6427ed82 100644 --- a/src/main/java/com/minelittlepony/unicopia/block/BlockGrowingCuccoon.java +++ b/src/main/java/com/minelittlepony/unicopia/block/BlockGrowingCuccoon.java @@ -71,18 +71,6 @@ public class BlockGrowingCuccoon extends Block implements Climbable { .with(SHAPE, Shape.BULB)); } - // TODO: loot table - /* - @Override - public int quantityDropped(BlockState state, int fortune, Random random) { - return random.nextInt(3) == 0 ? state.get(AGE) : 0; - } - - @Override - public Item getItemDropped(BlockState state, Random rand, int fortune) { - return Items.SLIME_BALL; - }*/ - @Override public boolean isTranslucent(BlockState state, BlockView view, BlockPos pos) { return true; diff --git a/src/main/java/com/minelittlepony/unicopia/block/ChitinBlock.java b/src/main/java/com/minelittlepony/unicopia/block/ChitinBlock.java index 0ca60321..6b70140c 100644 --- a/src/main/java/com/minelittlepony/unicopia/block/ChitinBlock.java +++ b/src/main/java/com/minelittlepony/unicopia/block/ChitinBlock.java @@ -30,10 +30,6 @@ public class ChitinBlock extends Block { .build() ); setDefaultState(stateManager.getDefaultState().with(COVERING, Covering.UNCOVERED)); - - // TODO: loot table: - // UItems.chitin_shell x 3 - // setCreativeTab(CreativeTabs.BUILDING_BLOCKS); } @Deprecated @@ -55,7 +51,6 @@ public class ChitinBlock extends Block { return hardness; } - @Override @Deprecated public BlockState getStateForNeighborUpdate(BlockState state, Direction direction, BlockState other, IWorld world, BlockPos pos, BlockPos otherPos) { diff --git a/src/main/java/com/minelittlepony/unicopia/block/GlowingGemBlock.java b/src/main/java/com/minelittlepony/unicopia/block/GlowingGemBlock.java index 0c8bccb5..4bf4e397 100644 --- a/src/main/java/com/minelittlepony/unicopia/block/GlowingGemBlock.java +++ b/src/main/java/com/minelittlepony/unicopia/block/GlowingGemBlock.java @@ -172,21 +172,6 @@ public class GlowingGemBlock extends TorchBlock implements Gas { return CloudType.ENCHANTED; } - // TODO: loot table - /*@Override - public List getDroppedStacks(BlockState state, LootContext.Builder context) { - - Random rand = context.world instanceof World ? ((World)world).random : random; - - if (rand.nextInt(10) == 0) { - drops.add(new ItemStack(UItems.spell)); - } else { - drops.add(new ItemStack(UItems.curse)); - } - - return drops; - }*/ - @Override public int getLuminance(BlockState state) { if (state.get(ON)) { diff --git a/src/main/java/com/minelittlepony/unicopia/block/SlimeLayerBlock.java b/src/main/java/com/minelittlepony/unicopia/block/SlimeLayerBlock.java index cef8153e..347a1a7e 100644 --- a/src/main/java/com/minelittlepony/unicopia/block/SlimeLayerBlock.java +++ b/src/main/java/com/minelittlepony/unicopia/block/SlimeLayerBlock.java @@ -18,8 +18,6 @@ public class SlimeLayerBlock extends SnowBlock { .materialColor(MaterialColor.GRASS) .build() ); - - // TODO: drops Items.SLIME_BALL x1 } @Override diff --git a/src/main/java/com/minelittlepony/unicopia/block/StickBlock.java b/src/main/java/com/minelittlepony/unicopia/block/StickBlock.java index 2d268b9f..14df6728 100644 --- a/src/main/java/com/minelittlepony/unicopia/block/StickBlock.java +++ b/src/main/java/com/minelittlepony/unicopia/block/StickBlock.java @@ -39,8 +39,6 @@ public class StickBlock extends Block { .sounds(BlockSoundGroup.WOOD) .build() ); - - // TODO: loot table Items.STICK x1 } @Deprecated diff --git a/src/main/java/com/minelittlepony/unicopia/block/SugarBlock.java b/src/main/java/com/minelittlepony/unicopia/block/SugarBlock.java index 9c23254c..f435aa4c 100644 --- a/src/main/java/com/minelittlepony/unicopia/block/SugarBlock.java +++ b/src/main/java/com/minelittlepony/unicopia/block/SugarBlock.java @@ -13,6 +13,5 @@ public class SugarBlock extends FallingBlock { .sounds(BlockSoundGroup.SAND) .build() ); - //TODO: loot table SUGAR x 9; } } diff --git a/src/main/java/com/minelittlepony/unicopia/block/TomatoPlantBlock.java b/src/main/java/com/minelittlepony/unicopia/block/TomatoPlantBlock.java index 676f291c..9d84a396 100644 --- a/src/main/java/com/minelittlepony/unicopia/block/TomatoPlantBlock.java +++ b/src/main/java/com/minelittlepony/unicopia/block/TomatoPlantBlock.java @@ -1,7 +1,5 @@ package com.minelittlepony.unicopia.block; -import java.util.List; - import com.minelittlepony.unicopia.gas.CloudFarmlandBlock; import com.minelittlepony.unicopia.item.UItems; @@ -14,8 +12,6 @@ import net.minecraft.entity.EntityContext; import net.minecraft.entity.player.PlayerEntity; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; -import net.minecraft.item.Items; -import net.minecraft.loot.context.LootContext; import net.minecraft.sound.BlockSoundGroup; import net.minecraft.sound.SoundCategory; import net.minecraft.state.StateManager; @@ -45,9 +41,6 @@ public class TomatoPlantBlock extends CropBlock { .build() ); setDefaultState(getDefaultState().with(TYPE, Type.NORMAL)); - - // TODO: loot table UItems.tomato_seeds x1 - // if mature: UItems.tomato } @Override @@ -90,22 +83,6 @@ public class TomatoPlantBlock extends CropBlock { || state.getBlock() == UBlocks.stick; } - @Override - @Deprecated - public List getDroppedStacks(BlockState state, LootContext.Builder context) { - List drops = super.getDroppedStacks(state, context); - - drops.add(new ItemStack(Items.STICK, 1)); - - if (isMature(state)) { - drops.add(new ItemStack(state.get(TYPE).getCrop(), 1)); - } else { - drops.add(new ItemStack(getSeedsItem())); - } - - return drops; - } - @Override public ActionResult onUse(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockHitResult hit) { diff --git a/src/main/java/com/minelittlepony/unicopia/block/UBlocks.java b/src/main/java/com/minelittlepony/unicopia/block/UBlocks.java index 53b1f6fe..9f2abd95 100644 --- a/src/main/java/com/minelittlepony/unicopia/block/UBlocks.java +++ b/src/main/java/com/minelittlepony/unicopia/block/UBlocks.java @@ -53,7 +53,7 @@ public interface UBlocks { CloudFarmlandBlock cloud_farmland = register(new CloudFarmlandBlock(FabricBlockSettings.of(UMaterials.CLOUD).noCollision().ticksRandomly().breakInstantly().sounds(BlockSoundGroup.WOOL).build()), "cloud_farmland"); HiveWallBlock hive = register(new HiveWallBlock(), "hive"); - ChitinBlock chitin = register(new ChitinBlock(), "chitin_block"); + ChitinBlock chitin_block = register(new ChitinBlock(), "chitin_block"); Block chissled_chitin = register(new ChiselledChitinBlock(), "chissled_chitin"); BlockGrowingCuccoon cuccoon = register(new BlockGrowingCuccoon(), "cuccoon"); diff --git a/src/main/java/com/minelittlepony/unicopia/blockstate/BlockStateConverter.java b/src/main/java/com/minelittlepony/unicopia/blockstate/BlockStateConverter.java new file mode 100644 index 00000000..a644473d --- /dev/null +++ b/src/main/java/com/minelittlepony/unicopia/blockstate/BlockStateConverter.java @@ -0,0 +1,27 @@ +package com.minelittlepony.unicopia.blockstate; + +import javax.annotation.Nonnull; +import javax.annotation.Nullable; + +import net.minecraft.block.BlockState; + +public interface BlockStateConverter { + /** + * Checks if this collection contains a mapping capable of converting the given state. + * + * @param state State to check + * + * @return True if the state can be converted + */ + boolean canConvert(@Nullable BlockState state); + + /** + * Attempts to convert the given state based on the known mappings in this collection. + * + * @param state State to convert + * + * @return The converted state if there is one, otherwise null + */ + @Nonnull + BlockState getConverted(@Nonnull BlockState state); +} diff --git a/src/main/java/com/minelittlepony/unicopia/util/collection/BlockStateMap.java b/src/main/java/com/minelittlepony/unicopia/blockstate/BlockStateMap.java similarity index 70% rename from src/main/java/com/minelittlepony/unicopia/util/collection/BlockStateMap.java rename to src/main/java/com/minelittlepony/unicopia/blockstate/BlockStateMap.java index 1a9ac89c..98c7f4b5 100644 --- a/src/main/java/com/minelittlepony/unicopia/util/collection/BlockStateMap.java +++ b/src/main/java/com/minelittlepony/unicopia/blockstate/BlockStateMap.java @@ -1,4 +1,4 @@ -package com.minelittlepony.unicopia.util.collection; +package com.minelittlepony.unicopia.blockstate; import java.util.ArrayList; import java.util.function.Predicate; @@ -14,7 +14,7 @@ import net.minecraft.state.property.Property; * A collection of block-state mappings. * */ -public class BlockStateMap extends ArrayList { +class BlockStateMap extends ArrayList implements BlockStateConverter { private static final long serialVersionUID = 2602772651960588745L; public void removeBlock(Predicate mapper) { @@ -33,24 +33,12 @@ public class BlockStateMap extends ArrayList { add(StateMapping.setProperty(block, property, to)); } - /** - * Checks if this collection contains a mapping capable of converting the given state. - * - * @param state State to check - * - * @return True if the state can be converted - */ + @Override public boolean canConvert(@Nullable BlockState state) { return state != null && stream().anyMatch(i -> i.test(state)); } - /** - * Attempts to convert the given state based on the known mappings in this collection. - * - * @param state State to convert - * - * @return The converted state if there is one, otherwise null - */ + @Override @Nonnull public BlockState getConverted(@Nonnull BlockState state) { for (StateMapping i : this) { diff --git a/src/main/java/com/minelittlepony/unicopia/blockstate/ReversableBlockStateConverter.java b/src/main/java/com/minelittlepony/unicopia/blockstate/ReversableBlockStateConverter.java new file mode 100644 index 00000000..1a3719ce --- /dev/null +++ b/src/main/java/com/minelittlepony/unicopia/blockstate/ReversableBlockStateConverter.java @@ -0,0 +1,5 @@ +package com.minelittlepony.unicopia.blockstate; + +public interface ReversableBlockStateConverter extends BlockStateConverter { + BlockStateConverter getInverse(); +} diff --git a/src/main/java/com/minelittlepony/unicopia/util/collection/ReversableBlockStateMap.java b/src/main/java/com/minelittlepony/unicopia/blockstate/ReversableBlockStateMap.java similarity index 66% rename from src/main/java/com/minelittlepony/unicopia/util/collection/ReversableBlockStateMap.java rename to src/main/java/com/minelittlepony/unicopia/blockstate/ReversableBlockStateMap.java index bb993b10..848b514a 100644 --- a/src/main/java/com/minelittlepony/unicopia/util/collection/ReversableBlockStateMap.java +++ b/src/main/java/com/minelittlepony/unicopia/blockstate/ReversableBlockStateMap.java @@ -1,14 +1,16 @@ -package com.minelittlepony.unicopia.util.collection; +package com.minelittlepony.unicopia.blockstate; -public class ReversableBlockStateMap extends BlockStateMap { +class ReversableBlockStateMap extends BlockStateMap implements ReversableBlockStateConverter { private static final long serialVersionUID = 6154365988455383098L; private final BlockStateMap inverse = new BlockStateMap(); + @Override public BlockStateMap getInverse() { return inverse; } + @Override public boolean add(StateMapping mapping) { inverse.add(mapping.inverse()); return super.add(mapping); diff --git a/src/main/java/com/minelittlepony/unicopia/util/collection/StateMapping.java b/src/main/java/com/minelittlepony/unicopia/blockstate/StateMapping.java similarity index 95% rename from src/main/java/com/minelittlepony/unicopia/util/collection/StateMapping.java rename to src/main/java/com/minelittlepony/unicopia/blockstate/StateMapping.java index 821957e9..bda1eb2d 100644 --- a/src/main/java/com/minelittlepony/unicopia/util/collection/StateMapping.java +++ b/src/main/java/com/minelittlepony/unicopia/blockstate/StateMapping.java @@ -1,4 +1,4 @@ -package com.minelittlepony.unicopia.util.collection; +package com.minelittlepony.unicopia.blockstate; import java.util.function.Function; import java.util.function.Predicate; @@ -10,7 +10,7 @@ import net.minecraft.block.BlockState; import net.minecraft.block.Blocks; import net.minecraft.state.property.Property; -public interface StateMapping extends Predicate, Function { +interface StateMapping extends Predicate, Function { static StateMapping removeBlock(Predicate mapper) { return build( diff --git a/src/main/java/com/minelittlepony/unicopia/blockstate/StateMaps.java b/src/main/java/com/minelittlepony/unicopia/blockstate/StateMaps.java new file mode 100644 index 00000000..8d41c54c --- /dev/null +++ b/src/main/java/com/minelittlepony/unicopia/blockstate/StateMaps.java @@ -0,0 +1,83 @@ +package com.minelittlepony.unicopia.blockstate; + +import net.minecraft.block.Blocks; +import net.minecraft.block.FarmlandBlock; +import net.minecraft.block.Material; +import net.minecraft.block.OreBlock; +import net.minecraft.block.PlantBlock; +import net.minecraft.block.RedstoneWireBlock; +import net.minecraft.block.SnowBlock; +import net.minecraft.util.Util; + +public class StateMaps { + public static final BlockStateConverter ICE_AFFECTED = register(Util.make(new BlockStateMap(), a -> { + a.add(StateMapping.build( + s -> s.getMaterial() == Material.WATER, + s -> Blocks.ICE.getDefaultState())); + a.add(StateMapping.build( + s -> s.getMaterial() == Material.LAVA, + s -> Blocks.OBSIDIAN.getDefaultState())); + a.add(StateMapping.build( + s -> s.getBlock() == Blocks.SNOW, + s -> { + s = s.cycle(SnowBlock.LAYERS); + if (s.get(SnowBlock.LAYERS) >= 7) { + return Blocks.SNOW.getDefaultState(); + } + + return s; + })); + a.replaceBlock(Blocks.FIRE, Blocks.AIR); + a.setProperty(Blocks.REDSTONE_WIRE, RedstoneWireBlock.POWER, 0); + }), "ice"); + + public static final ReversableBlockStateConverter MOSS_AFFECTED = register(Util.make(new ReversableBlockStateMap(), a -> { + a.replaceBlock(Blocks.MOSSY_COBBLESTONE, Blocks.COBBLESTONE); + a.replaceBlock(Blocks.MOSSY_COBBLESTONE_SLAB, Blocks.COBBLESTONE_SLAB); + a.replaceBlock(Blocks.MOSSY_COBBLESTONE_STAIRS, Blocks.COBBLESTONE_STAIRS); + a.replaceBlock(Blocks.MOSSY_COBBLESTONE_WALL, Blocks.COBBLESTONE_WALL); + a.replaceBlock(Blocks.MOSSY_STONE_BRICK_SLAB, Blocks.STONE_BRICK_SLAB); + a.replaceBlock(Blocks.MOSSY_STONE_BRICK_STAIRS, Blocks.STONE_BRICK_STAIRS); + a.replaceBlock(Blocks.MOSSY_STONE_BRICK_WALL, Blocks.MOSSY_STONE_BRICK_WALL); + a.replaceBlock(Blocks.MOSSY_STONE_BRICKS, Blocks.STONE_BRICKS); + a.replaceBlock(Blocks.INFESTED_MOSSY_STONE_BRICKS, Blocks.INFESTED_STONE_BRICKS); + }), "moss"); + + public static final BlockStateConverter FIRE_AFFECTED = register(Util.make(new BlockStateMap(), a -> { + a.removeBlock(s -> s.getBlock() == Blocks.SNOW || s.getBlock() == Blocks.SNOW_BLOCK); + a.removeBlock(s -> s.getBlock() instanceof PlantBlock); + a.replaceBlock(Blocks.CLAY, Blocks.BROWN_CONCRETE); + a.replaceBlock(Blocks.OBSIDIAN, Blocks.LAVA); + a.replaceBlock(Blocks.GRASS, Blocks.DIRT); + a.replaceBlock(Blocks.MOSSY_COBBLESTONE, Blocks.COBBLESTONE); + a.replaceBlock(Blocks.MOSSY_COBBLESTONE_WALL, Blocks.COBBLESTONE_WALL); + a.replaceBlock(Blocks.MOSSY_STONE_BRICKS, Blocks.STONE_BRICKS); + a.replaceBlock(Blocks.INFESTED_MOSSY_STONE_BRICKS, Blocks.INFESTED_STONE_BRICKS); + a.replaceBlock(Blocks.PODZOL, Blocks.COARSE_DIRT); + a.setProperty(Blocks.FARMLAND, FarmlandBlock.MOISTURE, 0); + a.add(StateMapping.build( + s -> s.getBlock() == Blocks.DIRT, + s -> (Math.random() <= 0.15 ? Blocks.COARSE_DIRT.getDefaultState() : s))); + }), "fire"); + + public static final BlockStateConverter HELLFIRE_AFFECTED = register(Util.make(new BlockStateMap(), a -> { + a.add(StateMapping.build( + s -> s.getBlock() == Blocks.GRASS || s.getBlock() == Blocks.DIRT || s.getBlock() == Blocks.STONE, + s -> Blocks.NETHERRACK.getDefaultState())); + a.replaceBlock(Blocks.SAND, Blocks.SOUL_SAND); + a.replaceBlock(Blocks.GRAVEL, Blocks.SOUL_SAND); + a.add(StateMapping.build( + s -> s.getMaterial() == Material.WATER, + s -> Blocks.OBSIDIAN.getDefaultState())); + a.add(StateMapping.build( + s -> s.getBlock() instanceof PlantBlock, + s -> Blocks.NETHER_WART.getDefaultState())); + a.add(StateMapping.build( + s -> (s.getBlock() != Blocks.NETHER_QUARTZ_ORE) && (s.getBlock() instanceof OreBlock), + s -> Blocks.NETHER_QUARTZ_ORE.getDefaultState())); + }), "hellfire"); + + private static T register(T value, String name) { + return value; + } +} diff --git a/src/main/java/com/minelittlepony/unicopia/container/SpellbookResultSlot.java b/src/main/java/com/minelittlepony/unicopia/container/SpellbookResultSlot.java index 16ecb9cf..e0eb538a 100644 --- a/src/main/java/com/minelittlepony/unicopia/container/SpellbookResultSlot.java +++ b/src/main/java/com/minelittlepony/unicopia/container/SpellbookResultSlot.java @@ -17,10 +17,8 @@ import net.minecraft.util.DefaultedList; import net.minecraft.util.Identifier; public class SpellbookResultSlot extends SpellBookContainer.SpellbookSlot { - // TODO: need to register this public static final Identifier EMPTY_GEM_SLOT = new Identifier("unicopia", "empty_slot_gem"); - private final Pony player; private final SpellBookInventory craftMatrix; diff --git a/src/main/java/com/minelittlepony/unicopia/enchanting/recipe/SpecialRecipe.java b/src/main/java/com/minelittlepony/unicopia/enchanting/recipe/SpecialRecipe.java index 627bd781..73ead1bd 100644 --- a/src/main/java/com/minelittlepony/unicopia/enchanting/recipe/SpecialRecipe.java +++ b/src/main/java/com/minelittlepony/unicopia/enchanting/recipe/SpecialRecipe.java @@ -33,12 +33,6 @@ public class SpecialRecipe extends AbstractSpecialRecipe { return output.getStack(); } - @Override - public Identifier getId() { - // TODO Auto-generated method stub - return null; - } - @Override public RecipeSerializer getSerializer() { // TODO Auto-generated method stub diff --git a/src/main/java/com/minelittlepony/unicopia/entity/CloudEntity.java b/src/main/java/com/minelittlepony/unicopia/entity/CloudEntity.java index 76120747..947ebecd 100644 --- a/src/main/java/com/minelittlepony/unicopia/entity/CloudEntity.java +++ b/src/main/java/com/minelittlepony/unicopia/entity/CloudEntity.java @@ -75,7 +75,6 @@ public class CloudEntity extends FlyingEntity implements ICloudEntity, InAnimate super(type, world); ignoreCameraFrustum = true; targetAltitude = getRandomFlyingHeight(); - // TODO: drops cloud_matter x1 } @Override diff --git a/src/main/java/com/minelittlepony/unicopia/gas/CloudBlock.java b/src/main/java/com/minelittlepony/unicopia/gas/CloudBlock.java index c50335b5..67a193a6 100644 --- a/src/main/java/com/minelittlepony/unicopia/gas/CloudBlock.java +++ b/src/main/java/com/minelittlepony/unicopia/gas/CloudBlock.java @@ -3,8 +3,8 @@ package com.minelittlepony.unicopia.gas; import java.util.Random; import com.minelittlepony.unicopia.block.UBlocks; +import com.minelittlepony.unicopia.blockstate.StateMaps; import com.minelittlepony.unicopia.entity.player.Pony; -import com.minelittlepony.unicopia.item.MossItem; import com.minelittlepony.unicopia.util.HoeUtil; import net.minecraft.block.Block; @@ -42,7 +42,7 @@ public class CloudBlock extends Block implements Gas, HoeUtil.Tillable { pos = pos.offset(Direction.random(rand), 1 + rand.nextInt(2)); state = world.getBlockState(pos); - BlockState converted = MossItem.AFFECTED.getInverse().getConverted(state); + BlockState converted = StateMaps.MOSS_AFFECTED.getInverse().getConverted(state); if (!state.equals(converted)) { world.setBlockState(pos, converted); diff --git a/src/main/java/com/minelittlepony/unicopia/item/MossItem.java b/src/main/java/com/minelittlepony/unicopia/item/MossItem.java index 64b48481..36039759 100644 --- a/src/main/java/com/minelittlepony/unicopia/item/MossItem.java +++ b/src/main/java/com/minelittlepony/unicopia/item/MossItem.java @@ -2,45 +2,30 @@ package com.minelittlepony.unicopia.item; import javax.annotation.Nullable; +import com.minelittlepony.unicopia.blockstate.StateMaps; import com.minelittlepony.unicopia.entity.player.Pony; import com.minelittlepony.unicopia.toxin.ToxicItem; import com.minelittlepony.unicopia.toxin.Toxicity; -import com.minelittlepony.unicopia.util.collection.ReversableBlockStateMap; import net.minecraft.block.Block; import net.minecraft.block.BlockState; -import net.minecraft.block.Blocks; import net.minecraft.entity.player.PlayerEntity; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.sound.SoundCategory; import net.minecraft.sound.SoundEvents; import net.minecraft.util.UseAction; -import net.minecraft.util.Util; import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; public class MossItem extends ToxicItem { - public static final ReversableBlockStateMap AFFECTED = Util.make(new ReversableBlockStateMap(), a -> { - // TODO: move to resourcepack - a.replaceBlock(Blocks.MOSSY_COBBLESTONE, Blocks.COBBLESTONE); - a.replaceBlock(Blocks.MOSSY_COBBLESTONE_SLAB, Blocks.COBBLESTONE_SLAB); - a.replaceBlock(Blocks.MOSSY_COBBLESTONE_STAIRS, Blocks.COBBLESTONE_STAIRS); - a.replaceBlock(Blocks.MOSSY_COBBLESTONE_WALL, Blocks.COBBLESTONE_WALL); - a.replaceBlock(Blocks.MOSSY_STONE_BRICK_SLAB, Blocks.STONE_BRICK_SLAB); - a.replaceBlock(Blocks.MOSSY_STONE_BRICK_STAIRS, Blocks.STONE_BRICK_STAIRS); - a.replaceBlock(Blocks.MOSSY_STONE_BRICK_WALL, Blocks.MOSSY_STONE_BRICK_WALL); - a.replaceBlock(Blocks.MOSSY_STONE_BRICKS, Blocks.STONE_BRICKS); - a.replaceBlock(Blocks.INFESTED_MOSSY_STONE_BRICKS, Blocks.INFESTED_STONE_BRICKS); - }); - public MossItem(Item.Settings settings) { super(settings, 2, 1, UseAction.EAT, Toxicity.FAIR); } public boolean tryConvert(World world, BlockState state, BlockPos pos, @Nullable PlayerEntity player) { - BlockState converted = AFFECTED.getConverted(state); + BlockState converted = StateMaps.MOSS_AFFECTED.getConverted(state); if (!state.equals(converted)) { world.setBlockState(pos, converted, 3); diff --git a/src/main/java/com/minelittlepony/unicopia/item/UItems.java b/src/main/java/com/minelittlepony/unicopia/item/UItems.java index 2ff14605..57519eb4 100644 --- a/src/main/java/com/minelittlepony/unicopia/item/UItems.java +++ b/src/main/java/com/minelittlepony/unicopia/item/UItems.java @@ -63,7 +63,7 @@ public interface UItems { Item hive = register(new BlockItem(UBlocks.hive, new Item.Settings().group(ItemGroup.BUILDING_BLOCKS)), "hive"); Item chitin_shell = register(new Item(new Item.Settings().group(ItemGroup.MATERIALS)), "chitin_shell"); - Item chitin = register(new BlockItem(UBlocks.chitin, new Item.Settings().group(ItemGroup.BUILDING_BLOCKS)), "chitin_block"); + Item chitin = register(new BlockItem(UBlocks.chitin_block, new Item.Settings().group(ItemGroup.BUILDING_BLOCKS)), "chitin_block"); Item chissled_chitin = register(new BlockItem(UBlocks.chissled_chitin, new Item.Settings().group(ItemGroup.BUILDING_BLOCKS)), "chissled_chitin"); Item cuccoon = register(new BlockItem(UBlocks.cuccoon, new Item.Settings().group(ItemGroup.MATERIALS)), "cuccoon"); Item slime_layer = register(new BlockItem(UBlocks.slime_layer, new Item.Settings().group(ItemGroup.DECORATIONS)), "slime_layer"); diff --git a/src/main/java/com/minelittlepony/unicopia/magic/spell/FireSpell.java b/src/main/java/com/minelittlepony/unicopia/magic/spell/FireSpell.java index 4da4c453..619268f2 100644 --- a/src/main/java/com/minelittlepony/unicopia/magic/spell/FireSpell.java +++ b/src/main/java/com/minelittlepony/unicopia/magic/spell/FireSpell.java @@ -3,6 +3,7 @@ package com.minelittlepony.unicopia.magic.spell; import javax.annotation.Nullable; import com.minelittlepony.unicopia.EquinePredicates; +import com.minelittlepony.unicopia.blockstate.StateMaps; import com.minelittlepony.unicopia.entity.IMagicals; import com.minelittlepony.unicopia.magic.Affinity; import com.minelittlepony.unicopia.magic.CastResult; @@ -12,17 +13,13 @@ import com.minelittlepony.unicopia.magic.Useable; import com.minelittlepony.unicopia.util.MagicalDamageSource; import com.minelittlepony.unicopia.util.PosHelper; import com.minelittlepony.unicopia.util.VecHelper; -import com.minelittlepony.unicopia.util.collection.StateMapping; -import com.minelittlepony.unicopia.util.collection.BlockStateMap; import com.minelittlepony.unicopia.util.shape.Shape; import com.minelittlepony.unicopia.util.shape.Sphere; import net.minecraft.block.Block; import net.minecraft.block.BlockState; import net.minecraft.block.Blocks; -import net.minecraft.block.FarmlandBlock; import net.minecraft.block.Material; -import net.minecraft.block.PlantBlock; import net.minecraft.block.RedstoneWireBlock; import net.minecraft.entity.Entity; import net.minecraft.entity.ItemEntity; @@ -43,26 +40,11 @@ import net.minecraft.world.World; public class FireSpell extends AbstractSpell.RangedAreaSpell implements Useable, DispenceableMagicEffect { - public final BlockStateMap affected = new BlockStateMap(); - private static final Shape visual_effect_region = new Sphere(false, 0.5); private static final Shape effect_range = new Sphere(false, 4); public FireSpell() { - affected.removeBlock(s -> s.getBlock() == Blocks.SNOW || s.getBlock() == Blocks.SNOW_BLOCK); - affected.removeBlock(s -> s.getBlock() instanceof PlantBlock); - affected.replaceBlock(Blocks.CLAY, Blocks.BROWN_CONCRETE); - affected.replaceBlock(Blocks.OBSIDIAN, Blocks.LAVA); - affected.replaceBlock(Blocks.GRASS, Blocks.DIRT); - affected.replaceBlock(Blocks.MOSSY_COBBLESTONE, Blocks.COBBLESTONE); - affected.replaceBlock(Blocks.MOSSY_COBBLESTONE_WALL, Blocks.COBBLESTONE_WALL); - affected.replaceBlock(Blocks.MOSSY_STONE_BRICKS, Blocks.STONE_BRICKS); - affected.replaceBlock(Blocks.INFESTED_MOSSY_STONE_BRICKS, Blocks.INFESTED_STONE_BRICKS); - affected.replaceBlock(Blocks.PODZOL, Blocks.COARSE_DIRT); - affected.setProperty(Blocks.FARMLAND, FarmlandBlock.MOISTURE, 0); - affected.add(StateMapping.build( - s -> s.getBlock() == Blocks.DIRT, - s -> (Math.random() <= 0.15 ? Blocks.COARSE_DIRT.getDefaultState() : s))); + } @Override @@ -182,7 +164,7 @@ public class FireSpell extends AbstractSpell.RangedAreaSpell implements Useable, return true; } } else { - BlockState newState = affected.getConverted(state); + BlockState newState = StateMaps.FIRE_AFFECTED.getConverted(state); if (!state.equals(newState)) { world.setBlockState(pos, newState, 3); diff --git a/src/main/java/com/minelittlepony/unicopia/magic/spell/IceSpell.java b/src/main/java/com/minelittlepony/unicopia/magic/spell/IceSpell.java index 282bbf22..d2702d10 100644 --- a/src/main/java/com/minelittlepony/unicopia/magic/spell/IceSpell.java +++ b/src/main/java/com/minelittlepony/unicopia/magic/spell/IceSpell.java @@ -3,6 +3,7 @@ package com.minelittlepony.unicopia.magic.spell; import javax.annotation.Nullable; import com.minelittlepony.unicopia.block.UMaterials; +import com.minelittlepony.unicopia.blockstate.StateMaps; import com.minelittlepony.unicopia.magic.Affinity; import com.minelittlepony.unicopia.magic.CastResult; import com.minelittlepony.unicopia.magic.Caster; @@ -11,8 +12,6 @@ import com.minelittlepony.unicopia.magic.Useable; import com.minelittlepony.unicopia.util.MagicalDamageSource; import com.minelittlepony.unicopia.util.PosHelper; import com.minelittlepony.unicopia.util.VecHelper; -import com.minelittlepony.unicopia.util.collection.StateMapping; -import com.minelittlepony.unicopia.util.collection.BlockStateMap; import com.minelittlepony.unicopia.util.shape.Shape; import com.minelittlepony.unicopia.util.shape.Sphere; @@ -21,8 +20,6 @@ import net.minecraft.block.BlockState; import net.minecraft.block.Blocks; import net.minecraft.block.Material; import net.minecraft.block.PlantBlock; -import net.minecraft.block.RedstoneWireBlock; -import net.minecraft.block.SnowBlock; import net.minecraft.entity.Entity; import net.minecraft.entity.TntEntity; import net.minecraft.entity.player.PlayerEntity; @@ -37,29 +34,6 @@ import net.minecraft.world.World; public class IceSpell extends AbstractSpell.RangedAreaSpell implements Useable, DispenceableMagicEffect { - public final BlockStateMap affected = new BlockStateMap(); - - public IceSpell() { - affected.add(StateMapping.build( - s -> s.getMaterial() == Material.WATER, - s -> Blocks.ICE.getDefaultState())); - affected.add(StateMapping.build( - s -> s.getMaterial() == Material.LAVA, - s -> Blocks.OBSIDIAN.getDefaultState())); - affected.add(StateMapping.build( - s -> s.getBlock() == Blocks.SNOW, - s -> { - s = s.cycle(SnowBlock.LAYERS); - if (s.get(SnowBlock.LAYERS) >= 7) { - return Blocks.SNOW.getDefaultState(); - } - - return s; - })); - affected.replaceBlock(Blocks.FIRE, Blocks.AIR); - affected.setProperty(Blocks.REDSTONE_WIRE, RedstoneWireBlock.POWER, 0); - } - private final int rad = 3; private final Shape effect_range = new Sphere(false, rad); @@ -144,7 +118,7 @@ public class IceSpell extends AbstractSpell.RangedAreaSpell implements Useable, BlockState state = world.getBlockState(pos); Block id = state.getBlock(); - BlockState converted = affected.getConverted(state); + BlockState converted = StateMaps.ICE_AFFECTED.getConverted(state); if (!state.equals(converted)) { world.setBlockState(pos, converted, 3); diff --git a/src/main/java/com/minelittlepony/unicopia/magic/spell/InfernoSpell.java b/src/main/java/com/minelittlepony/unicopia/magic/spell/InfernoSpell.java index f2da325f..15439f5d 100644 --- a/src/main/java/com/minelittlepony/unicopia/magic/spell/InfernoSpell.java +++ b/src/main/java/com/minelittlepony/unicopia/magic/spell/InfernoSpell.java @@ -1,19 +1,14 @@ package com.minelittlepony.unicopia.magic.spell; +import com.minelittlepony.unicopia.blockstate.StateMaps; import com.minelittlepony.unicopia.magic.Affinity; import com.minelittlepony.unicopia.magic.CastResult; import com.minelittlepony.unicopia.magic.Caster; import com.minelittlepony.unicopia.util.MagicalDamageSource; -import com.minelittlepony.unicopia.util.collection.StateMapping; -import com.minelittlepony.unicopia.util.collection.BlockStateMap; import com.minelittlepony.unicopia.util.shape.Shape; import com.minelittlepony.unicopia.util.shape.Sphere; import net.minecraft.block.BlockState; -import net.minecraft.block.Blocks; -import net.minecraft.block.Material; -import net.minecraft.block.OreBlock; -import net.minecraft.block.PlantBlock; import net.minecraft.entity.Entity; import net.minecraft.entity.LivingEntity; import net.minecraft.entity.damage.DamageSource; @@ -23,30 +18,6 @@ import net.minecraft.util.math.Vec3d; import net.minecraft.world.World; public class InfernoSpell extends FireSpell { - - public final BlockStateMap hellFireAffected = new BlockStateMap(); - - public InfernoSpell() { - hellFireAffected.add(StateMapping.build( - s -> s.getBlock() == Blocks.GRASS || s.getBlock() == Blocks.DIRT || s.getBlock() == Blocks.STONE, - s -> Blocks.NETHERRACK.getDefaultState())); - - hellFireAffected.replaceBlock(Blocks.SAND, Blocks.SOUL_SAND); - hellFireAffected.replaceBlock(Blocks.GRAVEL, Blocks.SOUL_SAND); - - hellFireAffected.add(StateMapping.build( - s -> s.getMaterial() == Material.WATER, - s -> Blocks.OBSIDIAN.getDefaultState())); - - hellFireAffected.add(StateMapping.build( - s -> s.getBlock() instanceof PlantBlock, - s -> Blocks.NETHER_WART.getDefaultState())); - - hellFireAffected.add(StateMapping.build( - s -> (s.getBlock() != Blocks.NETHER_QUARTZ_ORE) && (s.getBlock() instanceof OreBlock), - s -> Blocks.NETHER_QUARTZ_ORE.getDefaultState())); - } - @Override public String getName() { return "inferno"; @@ -81,7 +52,7 @@ public class InfernoSpell extends FireSpell { BlockPos pos = new BlockPos(shape.computePoint(w.random).add(origin)); BlockState state = w.getBlockState(pos); - BlockState newState = hellFireAffected.getConverted(state); + BlockState newState = StateMaps.HELLFIRE_AFFECTED.getConverted(state); if (!state.equals(newState)) { w.setBlockState(pos, newState, 3); diff --git a/src/main/java/com/minelittlepony/unicopia/magic/spell/ScorchSpell.java b/src/main/java/com/minelittlepony/unicopia/magic/spell/ScorchSpell.java index 88f9a975..2993f912 100644 --- a/src/main/java/com/minelittlepony/unicopia/magic/spell/ScorchSpell.java +++ b/src/main/java/com/minelittlepony/unicopia/magic/spell/ScorchSpell.java @@ -2,6 +2,7 @@ package com.minelittlepony.unicopia.magic.spell; import javax.annotation.Nullable; +import com.minelittlepony.unicopia.blockstate.StateMaps; import com.minelittlepony.unicopia.magic.Affinity; import com.minelittlepony.unicopia.magic.Caster; import com.minelittlepony.unicopia.magic.TossedMagicEffect; @@ -40,7 +41,7 @@ public class ScorchSpell extends FireSpell implements TossedMagicEffect { BlockState state = source.getWorld().getBlockState(pos); - BlockState newState = affected.getConverted(state); + BlockState newState = StateMaps.FIRE_AFFECTED.getConverted(state); if (!state.equals(newState)) { source.getWorld().setBlockState(pos, newState, 3); diff --git a/src/main/resources/data/unicopia/loot_tables/blocks/chitin_block.json b/src/main/resources/data/unicopia/loot_tables/blocks/chitin_block.json new file mode 100644 index 00000000..c564b4df --- /dev/null +++ b/src/main/resources/data/unicopia/loot_tables/blocks/chitin_block.json @@ -0,0 +1,38 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "rolls": 1, + "entries": [ + { + "type": "minecraft:item", + "name": "unicopia:chitin_shell", + "functions": [ + { + "function": "minecraft:set_count", + "count": 3 + }, + { + "function": "minecraft:apply_bonus", + "enchantment": "minecraft:fortune", + "formula": "minecraft:uniform_bonus_count", + "parameters": { + "bonusMultiplier": 1 + } + }, + { + "function": "minecraft:limit_count", + "limit": { + "max": 3, + "min": 1 + } + }, + { + "function": "minecraft:explosion_decay" + } + ] + } + ] + } + ] +} diff --git a/src/main/resources/data/unicopia/loot_tables/blocks/cuccoon.json b/src/main/resources/data/unicopia/loot_tables/blocks/cuccoon.json new file mode 100644 index 00000000..654a3b75 --- /dev/null +++ b/src/main/resources/data/unicopia/loot_tables/blocks/cuccoon.json @@ -0,0 +1,23 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "rolls": 1, + "entries": [ + { + "type": "minecraft:item", + "name": "minecraft:slime_ball", + "functions": [ + { + "function": "minecraft:set_count", + "count": { + "min": 3, + "max": 5 + } + } + ] + } + ] + } + ] +} diff --git a/src/main/resources/data/unicopia/loot_tables/blocks/enchanted_torch.json b/src/main/resources/data/unicopia/loot_tables/blocks/enchanted_torch.json new file mode 100644 index 00000000..160cff70 --- /dev/null +++ b/src/main/resources/data/unicopia/loot_tables/blocks/enchanted_torch.json @@ -0,0 +1,18 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "rolls": 1, + "entries": [ + { + "type": "minecraft:item", + "name": "unicopia:spell" + }, + { + "type": "minecraft:item", + "name": "unicopia:curse" + } + ] + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/unicopia/loot_tables/blocks/slime_layer.json b/src/main/resources/data/unicopia/loot_tables/blocks/slime_layer.json new file mode 100644 index 00000000..654a3b75 --- /dev/null +++ b/src/main/resources/data/unicopia/loot_tables/blocks/slime_layer.json @@ -0,0 +1,23 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "rolls": 1, + "entries": [ + { + "type": "minecraft:item", + "name": "minecraft:slime_ball", + "functions": [ + { + "function": "minecraft:set_count", + "count": { + "min": 3, + "max": 5 + } + } + ] + } + ] + } + ] +} diff --git a/src/main/resources/data/unicopia/loot_tables/blocks/stick.json b/src/main/resources/data/unicopia/loot_tables/blocks/stick.json new file mode 100644 index 00000000..79c5974f --- /dev/null +++ b/src/main/resources/data/unicopia/loot_tables/blocks/stick.json @@ -0,0 +1,11 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "rolls": 1, + "entries": [ + { "type": "minecraft:item", "name": "minecraft:stick" } + ] + } + ] +} diff --git a/src/main/resources/data/unicopia/loot_tables/blocks/sugar_block.json b/src/main/resources/data/unicopia/loot_tables/blocks/sugar_block.json new file mode 100644 index 00000000..bd44a051 --- /dev/null +++ b/src/main/resources/data/unicopia/loot_tables/blocks/sugar_block.json @@ -0,0 +1,38 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "rolls": 1, + "entries": [ + { + "type": "minecraft:item", + "name": "minecraft:sugar", + "functions": [ + { + "function": "minecraft:set_count", + "count": 4 + }, + { + "function": "minecraft:apply_bonus", + "enchantment": "minecraft:fortune", + "formula": "minecraft:uniform_bonus_count", + "parameters": { + "bonusMultiplier": 1 + } + }, + { + "function": "minecraft:limit_count", + "limit": { + "max": 6, + "min": 1 + } + }, + { + "function": "minecraft:explosion_decay" + } + ] + } + ] + } + ] +} diff --git a/src/main/resources/data/unicopia/loot_tables/blocks/tomato_plant.json b/src/main/resources/data/unicopia/loot_tables/blocks/tomato_plant.json new file mode 100644 index 00000000..9fb3faea --- /dev/null +++ b/src/main/resources/data/unicopia/loot_tables/blocks/tomato_plant.json @@ -0,0 +1,138 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "rolls": 1.0, + "entries": [ + { + "type": "minecraft:item", + "name": "unicopia:stick" + } + ] + }, + { + "rolls": 1.0, + "entries": [ + { + "type": "minecraft:alternatives", + "children": [ + { + "type": "minecraft:item", + "name": "unicopia:tomato", + "conditions": [ + { + "condition": "minecraft:block_state_property", + "block": "unicopia:tomato_plant", + "properties": { + "age": "7", + "type": "normal" + } + } + ], + "functions": [ + { + "function": "minecraft:set_count", + "count": { + "min": 1, + "max": 5 + } + }, + { + "function": "minecraft:apply_bonus", + "enchantment": "minecraft:fortune", + "formula": "minecraft:uniform_bonus_count", + "parameters": { + "bonusMultiplier": 1 + } + }, + { + "function": "minecraft:limit_count", + "limit": { + "max": 9, + "min": 1 + } + } + ] + }, + { + "type": "minecraft:item", + "name": "unicopia:cloudsdale_tomato", + "conditions": [ + { + "condition": "minecraft:block_state_property", + "block": "unicopia:tomato_plant", + "properties": { + "age": "7", + "type": "cloudsdale" + } + } + ], + "functions": [ + { + "function": "minecraft:set_count", + "count": { + "min": 1, + "max": 5 + } + }, + { + "function": "minecraft:apply_bonus", + "enchantment": "minecraft:fortune", + "formula": "minecraft:uniform_bonus_count", + "parameters": { + "bonusMultiplier": 1 + } + }, + { + "function": "minecraft:limit_count", + "limit": { + "max": 9, + "min": 1 + } + } + ] + }, + { + "type": "minecraft:item", + "name": "minecraft:tomato_seeds" + } + ] + } + ] + }, + { + "rolls": 1.0, + "entries": [ + { + "type": "minecraft:item", + "functions": [ + { + "function": "minecraft:apply_bonus", + "enchantment": "minecraft:fortune", + "formula": "minecraft:binomial_with_bonus_count", + "parameters": { + "extra": 3, + "probability": 0.5714286 + } + } + ], + "name": "unicopia:tomato_seeds" + } + ], + "conditions": [ + { + "condition": "minecraft:block_state_property", + "block": "unicopia:tomato_plant", + "properties": { + "age": "7" + } + } + ] + } + ], + "functions": [ + { + "function": "minecraft:explosion_decay" + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/unicopia/loot_tables/entities/cloud.json b/src/main/resources/data/unicopia/loot_tables/entities/cloud.json new file mode 100644 index 00000000..5378acf9 --- /dev/null +++ b/src/main/resources/data/unicopia/loot_tables/entities/cloud.json @@ -0,0 +1,31 @@ +{ + "type": "minecraft:entity", + "pools": [ + { + "rolls": 1, + "entries": [ + { + "type": "minecraft:item", + "functions": [ + { + "function": "minecraft:set_count", + "count": { + "min": 2, + "max": 5, + "type": "minecraft:uniform" + } + }, + { + "function": "minecraft:looting_enchant", + "count": { + "min": 0, + "max": 6 + } + } + ], + "name": "unicopia:cloud_matter" + } + ] + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/unicopia/loot_tables/entities/racing_cloud.json b/src/main/resources/data/unicopia/loot_tables/entities/racing_cloud.json new file mode 100644 index 00000000..782934c9 --- /dev/null +++ b/src/main/resources/data/unicopia/loot_tables/entities/racing_cloud.json @@ -0,0 +1,31 @@ +{ + "type": "minecraft:entity", + "pools": [ + { + "rolls": 1, + "entries": [ + { + "type": "minecraft:item", + "functions": [ + { + "function": "minecraft:set_count", + "count": { + "min": 0.0, + "max": 2.0, + "type": "minecraft:uniform" + } + }, + { + "function": "minecraft:looting_enchant", + "count": { + "min": 0.0, + "max": 1.0 + } + } + ], + "name": "unicopia:cloud_matter" + } + ] + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/unicopia/loot_tables/entities/wild_cloud.json b/src/main/resources/data/unicopia/loot_tables/entities/wild_cloud.json new file mode 100644 index 00000000..782934c9 --- /dev/null +++ b/src/main/resources/data/unicopia/loot_tables/entities/wild_cloud.json @@ -0,0 +1,31 @@ +{ + "type": "minecraft:entity", + "pools": [ + { + "rolls": 1, + "entries": [ + { + "type": "minecraft:item", + "functions": [ + { + "function": "minecraft:set_count", + "count": { + "min": 0.0, + "max": 2.0, + "type": "minecraft:uniform" + } + }, + { + "function": "minecraft:looting_enchant", + "count": { + "min": 0.0, + "max": 1.0 + } + } + ], + "name": "unicopia:cloud_matter" + } + ] + } + ] +} \ No newline at end of file