Added pebbles, rocks, and rock stew

This commit is contained in:
Sollace 2021-09-02 19:11:51 +02:00
parent 27b14dc06f
commit 62a8aff4e0
27 changed files with 682 additions and 2 deletions

View file

@ -26,6 +26,7 @@ public interface EquinePredicates {
Predicate<Entity> PLAYER_CHANGELING = IS_PLAYER.and(ofRace(Race.CHANGELING)); Predicate<Entity> PLAYER_CHANGELING = IS_PLAYER.and(ofRace(Race.CHANGELING));
Predicate<Entity> PLAYER_PEGASUS = IS_PLAYER.and(e -> ((PlayerEntity)e).getAbilities().creativeMode || RACE_INTERACT_WITH_CLOUDS.test(e)); Predicate<Entity> PLAYER_PEGASUS = IS_PLAYER.and(e -> ((PlayerEntity)e).getAbilities().creativeMode || RACE_INTERACT_WITH_CLOUDS.test(e));
Predicate<Entity> PLAYER_CAN_USE_EARTH = IS_PLAYER.and(raceMatches(Race::canUseEarth));
Predicate<Entity> IS_CASTER = e -> !e.isRemoved() && (e instanceof Caster || PLAYER_UNICORN.test(e)); Predicate<Entity> IS_CASTER = e -> !e.isRemoved() && (e instanceof Caster || PLAYER_UNICORN.test(e));
Predicate<LivingEntity> HAS_WANT_IT_NEED_IT = e -> EnchantmentHelper.getEquipmentLevel(UEnchantments.WANT_IT_NEED_IT, e) > 0; Predicate<LivingEntity> HAS_WANT_IT_NEED_IT = e -> EnchantmentHelper.getEquipmentLevel(UEnchantments.WANT_IT_NEED_IT, e) > 0;

View file

@ -12,6 +12,7 @@ import org.apache.logging.log4j.Logger;
import com.minelittlepony.unicopia.ability.data.tree.TreeTypeLoader; import com.minelittlepony.unicopia.ability.data.tree.TreeTypeLoader;
import com.minelittlepony.unicopia.advancement.UCriteria; import com.minelittlepony.unicopia.advancement.UCriteria;
import com.minelittlepony.unicopia.block.UBlocks;
import com.minelittlepony.unicopia.command.Commands; import com.minelittlepony.unicopia.command.Commands;
import com.minelittlepony.unicopia.entity.UEntities; import com.minelittlepony.unicopia.entity.UEntities;
import com.minelittlepony.unicopia.entity.effect.UPotions; import com.minelittlepony.unicopia.entity.effect.UPotions;
@ -54,6 +55,7 @@ public class Unicopia implements ModInitializer {
ResourceManagerHelper.get(ResourceType.SERVER_DATA).registerReloadListener(TreeTypeLoader.INSTANCE); ResourceManagerHelper.get(ResourceType.SERVER_DATA).registerReloadListener(TreeTypeLoader.INSTANCE);
ResourceManagerHelper.get(ResourceType.SERVER_DATA).registerReloadListener(UEnchantments.POISONED_JOKE); ResourceManagerHelper.get(ResourceType.SERVER_DATA).registerReloadListener(UEnchantments.POISONED_JOKE);
UBlocks.bootstrap();
UItems.bootstrap(); UItems.bootstrap();
UPotions.bootstrap(); UPotions.bootstrap();
} }

View file

@ -6,6 +6,7 @@ import com.minelittlepony.unicopia.BlockDestructionManager;
import com.minelittlepony.unicopia.Race; import com.minelittlepony.unicopia.Race;
import com.minelittlepony.unicopia.ability.data.Hit; import com.minelittlepony.unicopia.ability.data.Hit;
import com.minelittlepony.unicopia.entity.player.Pony; import com.minelittlepony.unicopia.entity.player.Pony;
import com.minelittlepony.unicopia.item.UItems;
import com.minelittlepony.unicopia.item.enchantment.UEnchantments; import com.minelittlepony.unicopia.item.enchantment.UEnchantments;
import com.minelittlepony.unicopia.particle.ParticleUtils; import com.minelittlepony.unicopia.particle.ParticleUtils;
import com.minelittlepony.unicopia.particle.UParticles; import com.minelittlepony.unicopia.particle.UParticles;
@ -14,11 +15,14 @@ import com.minelittlepony.unicopia.util.PosHelper;
import net.minecraft.block.Block; import net.minecraft.block.Block;
import net.minecraft.block.BlockState; import net.minecraft.block.BlockState;
import net.minecraft.block.Material;
import net.minecraft.enchantment.EnchantmentHelper; import net.minecraft.enchantment.EnchantmentHelper;
import net.minecraft.entity.LivingEntity; import net.minecraft.entity.LivingEntity;
import net.minecraft.entity.attribute.EntityAttributes; import net.minecraft.entity.attribute.EntityAttributes;
import net.minecraft.entity.damage.DamageSource; import net.minecraft.entity.damage.DamageSource;
import net.minecraft.entity.player.PlayerEntity; import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.item.ItemStack;
import net.minecraft.server.world.ServerWorld;
import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.Box; import net.minecraft.util.math.Box;
import net.minecraft.util.math.MathHelper; import net.minecraft.util.math.MathHelper;
@ -163,6 +167,15 @@ public class EarthPonyStompAbility implements Ability<Hit> {
if (destr.damageBlock(pos, damage) >= BlockDestructionManager.MAX_DAMAGE) { if (destr.damageBlock(pos, damage) >= BlockDestructionManager.MAX_DAMAGE) {
w.breakBlock(pos, true); w.breakBlock(pos, true);
if (w instanceof ServerWorld) {
if (state.getMaterial() == Material.STONE && w.getRandom().nextInt(4) == 0) {
ItemStack stack = UItems.PEBBLES.getDefaultStack();
stack.setCount(1 + w.getRandom().nextInt(2));
Block.dropStack(w, pos, stack);
state.onStacksDropped((ServerWorld)w, pos, stack);
}
}
} else { } else {
w.syncWorldEvent(WorldEvents.BLOCK_BROKEN, pos, Block.getRawIdFromState(state)); w.syncWorldEvent(WorldEvents.BLOCK_BROKEN, pos, Block.getRawIdFromState(state));
} }

View file

@ -0,0 +1,100 @@
package com.minelittlepony.unicopia.block;
import java.util.Random;
import com.minelittlepony.unicopia.EquinePredicates;
import com.minelittlepony.unicopia.item.UItems;
import net.minecraft.block.BlockState;
import net.minecraft.block.CropBlock;
import net.minecraft.block.ShapeContext;
import net.minecraft.item.ItemConvertible;
import net.minecraft.server.world.ServerWorld;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.shape.VoxelShape;
import net.minecraft.util.shape.VoxelShapes;
import net.minecraft.world.BlockView;
import net.minecraft.world.World;
import net.minecraft.world.WorldEvents;
public class RockCropBlock extends CropBlock {
private static final VoxelShape[] AGE_TO_SHAPE = new VoxelShape[] {
VoxelShapes.union(
createCuboidShape(7, -1, 11, 8, 0, 12),
createCuboidShape(3.5F, -1, 3.5F, 5, 0, 5),
createCuboidShape(11.5F, -1, 5.5F, 13, 0, 7)
),
VoxelShapes.union(
createCuboidShape(6, -1, 10, 9, 1, 13),
createCuboidShape(2.5F, -1, 2.5F, 6.5F, 2, 6.5F),
createCuboidShape(10.5F, -1, 4.5F, 14.5F, 2, 8.5F)
),
VoxelShapes.union(
createCuboidShape(4, -1, 9, 10, 2, 14),
createCuboidShape(1.5F, -1, 1.5F, 7.5F, 3, 7.5F),
createCuboidShape(9, -1, 3.5F, 15.5F, 3, 9.5F)
),
VoxelShapes.union(
createCuboidShape(4, -1, 9, 10, 2, 14),
createCuboidShape(1.5F, -1, 1.5F, 7.5F, 4, 7.5F),
createCuboidShape(9, -1, 3.5F, 15.5F, 3, 9.5F)
),
VoxelShapes.union(
createCuboidShape(3, -1, 8, 11, 3, 15),
createCuboidShape(0.5F, -1, 0.5F, 8.5F, 5, 8.5F),
createCuboidShape(7.5F, -1, 2, 17, 5, 10.5F)
),
VoxelShapes.union(
createCuboidShape(3, -1, 8, 11, 4, 15),
createCuboidShape(0.5F, -1, 0.5F, 8.5F, 5, 8.5F),
createCuboidShape(7.5F, -1, 2, 17, 7, 10.5F)
),
VoxelShapes.union(
createCuboidShape(3, -1, 8, 11, 4, 15),
createCuboidShape(0.5F, -1, 0.5F, 8.5F, 7, 8.5F),
createCuboidShape(7.5F, -1, 2, 17, 9, 10.5F)
),
VoxelShapes.union(
createCuboidShape(3, -1, 8, 11, 4, 15),
createCuboidShape(0.5F, -1, 0.5F, 8.5F, 9, 8.5F),
createCuboidShape(7.5F, -1, 2, 17, 13, 10.5F)
)
};
protected RockCropBlock(Settings settings) {
super(settings);
}
@Override
public VoxelShape getOutlineShape(BlockState state, BlockView world, BlockPos pos, ShapeContext context) {
return AGE_TO_SHAPE[state.get(getAgeProperty())];
}
@Override
public void randomTick(BlockState state, ServerWorld world, BlockPos pos, Random random) {
if (canGrow(world, random, pos, state)) {
super.randomTick(state, world, pos, random);
}
}
@Override
@Deprecated
public void onStateReplaced(BlockState state, World world, BlockPos pos, BlockState newState, boolean moved) {
super.onStateReplaced(state, world, pos, newState, moved);
if (!moved && !(state.getBlock() == this && newState.getBlock() == this)) {
if (!world.isClient) {
world.syncWorldEvent(WorldEvents.BONE_MEAL_USED, pos, 0);
}
}
}
@Override
public boolean canGrow(World world, Random random, BlockPos pos, BlockState state) {
return world.getClosestPlayer(pos.getX(), pos.getY(), pos.getZ(), 20, EquinePredicates.PLAYER_CAN_USE_EARTH) != null;
}
@Override
protected ItemConvertible getSeedsItem() {
return UItems.PEBBLES;
}
}

View file

@ -0,0 +1,24 @@
package com.minelittlepony.unicopia.block;
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
import net.fabricmc.fabric.api.object.builder.v1.block.FabricMaterialBuilder;
import net.minecraft.block.Block;
import net.minecraft.block.MapColor;
import net.minecraft.sound.BlockSoundGroup;
import net.minecraft.util.Identifier;
import net.minecraft.util.registry.Registry;
public interface UBlocks {
Block ROCKS = register("rocks", new RockCropBlock(FabricBlockSettings.of(
new FabricMaterialBuilder(MapColor.STONE_GRAY).allowsMovement().lightPassesThrough().notSolid().destroyedByPiston().build()
)
.ticksRandomly()
.strength(2)
.sounds(BlockSoundGroup.STONE)));
private static <T extends Block> T register(String name, T item) {
return Registry.register(Registry.BLOCK, new Identifier("unicopia", name), item);
}
static void bootstrap() {}
}

View file

@ -0,0 +1,31 @@
package com.minelittlepony.unicopia.item;
import java.util.function.Predicate;
import com.minelittlepony.unicopia.Race;
import com.minelittlepony.unicopia.entity.player.Pony;
import net.minecraft.block.Block;
import net.minecraft.item.AliasedBlockItem;
import net.minecraft.item.ItemUsageContext;
import net.minecraft.util.ActionResult;
public class RacePredicatedAliasedBlockItem extends AliasedBlockItem {
private Predicate<Race> predicate;
public RacePredicatedAliasedBlockItem(Block block, Settings settings, Predicate<Race> predicate) {
super(block, settings);
this.predicate = predicate;
}
@Override
public ActionResult useOnBlock(ItemUsageContext context) {
Pony pony = Pony.of(context.getPlayer());
if (pony == null || !predicate.test(pony.getSpecies())) {
return ActionResult.FAIL;
}
return super.useOnBlock(context);
}
}

View file

@ -3,7 +3,9 @@ package com.minelittlepony.unicopia.item;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import com.minelittlepony.unicopia.Race;
import com.minelittlepony.unicopia.USounds; import com.minelittlepony.unicopia.USounds;
import com.minelittlepony.unicopia.block.UBlocks;
import com.minelittlepony.unicopia.entity.UEntities; import com.minelittlepony.unicopia.entity.UEntities;
import com.minelittlepony.unicopia.item.enchantment.UEnchantments; import com.minelittlepony.unicopia.item.enchantment.UEnchantments;
import com.minelittlepony.unicopia.item.toxin.UFoodComponents; import com.minelittlepony.unicopia.item.toxin.UFoodComponents;
@ -66,6 +68,10 @@ public interface UItems {
Item HAY_FRIES = register("hay_fries", new Item(new Item.Settings().group(ItemGroup.FOOD).maxCount(16).food(UFoodComponents.HAY_FRIES))); Item HAY_FRIES = register("hay_fries", new Item(new Item.Settings().group(ItemGroup.FOOD).maxCount(16).food(UFoodComponents.HAY_FRIES)));
Item WHEAT_WORMS = register("wheat_worms", new Item(new Item.Settings().group(ItemGroup.MISC).maxCount(16).food(UFoodComponents.INSECTS))); Item WHEAT_WORMS = register("wheat_worms", new Item(new Item.Settings().group(ItemGroup.MISC).maxCount(16).food(UFoodComponents.INSECTS)));
Item PEBBLES = register("pebbles", new RacePredicatedAliasedBlockItem(UBlocks.ROCKS, new Item.Settings().group(ItemGroup.MATERIALS), Race::canUseEarth));
Item ROCK = register("rock", new Item(new Item.Settings().group(ItemGroup.MATERIALS)));
Item ROCK_STEW = register("rock_stew", new Item(new Item.Settings().group(ItemGroup.FOOD)));
Item MUG = register("mug", new Item(new Settings().group(ItemGroup.MATERIALS).maxCount(16))); Item MUG = register("mug", new Item(new Settings().group(ItemGroup.MATERIALS).maxCount(16)));
Item CIDER = register("cider", new DrinkableItem(new Item.Settings().group(ItemGroup.FOOD).food(UFoodComponents.CIDER).maxCount(1).recipeRemainder(MUG))); Item CIDER = register("cider", new DrinkableItem(new Item.Settings().group(ItemGroup.FOOD).food(UFoodComponents.CIDER).maxCount(1).recipeRemainder(MUG)));
Item JUICE = register("juice", new DrinkableItem(new Item.Settings().group(ItemGroup.FOOD).recipeRemainder(Items.GLASS_BOTTLE).maxCount(1).food(UFoodComponents.JUICE))); Item JUICE = register("juice", new DrinkableItem(new Item.Settings().group(ItemGroup.FOOD).recipeRemainder(Items.GLASS_BOTTLE).maxCount(1).food(UFoodComponents.JUICE)));
@ -93,7 +99,6 @@ public interface UItems {
if (item instanceof BlockItem) { if (item instanceof BlockItem) {
((BlockItem)item).appendBlocks(Item.BLOCK_ITEMS, item); ((BlockItem)item).appendBlocks(Item.BLOCK_ITEMS, item);
} }
Items.MILK_BUCKET.appendStacks(null, null);
return Registry.register(Registry.ITEM, new Identifier("unicopia", name), item); return Registry.register(Registry.ITEM, new Identifier("unicopia", name), item);
} }

View file

@ -0,0 +1,28 @@
{
"variants": {
"age=0": {
"model": "unicopia:block/rocks_stage0"
},
"age=1": {
"model": "unicopia:block/rocks_stage1"
},
"age=2": {
"model": "unicopia:block/rocks_stage2"
},
"age=3": {
"model": "unicopia:block/rocks_stage3"
},
"age=4": {
"model": "unicopia:block/rocks_stage4"
},
"age=5": {
"model": "unicopia:block/rocks_stage5"
},
"age=6": {
"model": "unicopia:block/rocks_stage6"
},
"age=7": {
"model": "unicopia:block/rocks_stage7"
}
}
}

View file

@ -48,6 +48,10 @@
"item.unicopia.juice": "Juice", "item.unicopia.juice": "Juice",
"item.unicopia.burned_juice": "Burned Juice", "item.unicopia.burned_juice": "Burned Juice",
"item.unicopia.pebbles": "Pebbles",
"item.unicopia.rock": "Rock",
"item.unicopia.rock_stew": "Rock Stew",
"item.unicopia.daffodil_daisy_sandwich": "Daffodil Daisy Sandwich", "item.unicopia.daffodil_daisy_sandwich": "Daffodil Daisy Sandwich",
"item.unicopia.hay_burger": "Hay Burger", "item.unicopia.hay_burger": "Hay Burger",
"item.unicopia.hay_fries": "Hay Fries", "item.unicopia.hay_fries": "Hay Fries",
@ -69,6 +73,8 @@
"item.unicopia.music_disc_funk": "Music Disc", "item.unicopia.music_disc_funk": "Music Disc",
"item.unicopia.music_disc_funk.desc": "funk, just funk", "item.unicopia.music_disc_funk.desc": "funk, just funk",
"block.unicopia.rocks": "Rocks",
"entity.unicopia.butterfly": "Butterfly", "entity.unicopia.butterfly": "Butterfly",
"entity.unicopia.cast_spell": "Cast Spell", "entity.unicopia.cast_spell": "Cast Spell",
"entity.unicopia.cast_spell.by": "a spell cast by %s", "entity.unicopia.cast_spell.by": "a spell cast by %s",

View file

@ -0,0 +1,46 @@
{
"parent": "minecraft:block/cube_all",
"textures": {
"all": "block/stone"
},
"elements": [
{
"from": [4, -1, 4],
"to": [5, 0, 5],
"rotation": {"angle": -22.5, "axis": "y", "origin": [5, 0, 4]},
"faces": {
"north": {"uv": [11, 0, 12, 1], "texture": "#all"},
"east": {"uv": [11, 0, 12, 1], "texture": "#all"},
"south": {"uv": [4, 0, 5, 1], "texture": "#all"},
"west": {"uv": [4, 0, 5, 1], "texture": "#all"},
"up": {"uv": [4, 4, 5, 5], "texture": "#all"},
"down": {"uv": [4, 11, 5, 12], "texture": "#all"}
}
},
{
"from": [7, -1, 11],
"to": [8, 0, 12],
"faces": {
"north": {"uv": [8, 0, 9, 1], "texture": "#all"},
"east": {"uv": [4, 0, 5, 1], "texture": "#all"},
"south": {"uv": [7, 0, 8, 1], "texture": "#all"},
"west": {"uv": [11, 0, 12, 1], "texture": "#all"},
"up": {"uv": [7, 11, 8, 12], "texture": "#all"},
"down": {"uv": [7, 4, 8, 5], "texture": "#all"}
}
},
{
"from": [12, -1, 6],
"to": [13, 0, 7],
"rotation": {"angle": 22.5, "axis": "y", "origin": [12, 0, 7]},
"faces": {
"north": {"uv": [3, 0, 4, 1], "texture": "#all"},
"east": {"uv": [9, 0, 10, 1], "texture": "#all"},
"south": {"uv": [12, 0, 13, 1], "texture": "#all"},
"west": {"uv": [6, 0, 7, 1], "texture": "#all"},
"up": {"uv": [12, 6, 13, 7], "texture": "#all"},
"down": {"uv": [12, 9, 13, 10], "texture": "#all"}
}
}
]
}

View file

@ -0,0 +1,46 @@
{
"parent": "minecraft:block/cube_all",
"textures": {
"all": "block/stone"
},
"elements": [
{
"from": [3, -1, 3],
"to": [6, 2, 6],
"rotation": {"angle": -22.5, "axis": "y", "origin": [5, 0, 4]},
"faces": {
"north": {"uv": [10, 14, 13, 16], "texture": "#all"},
"east": {"uv": [10, 14, 13, 16], "texture": "#all"},
"south": {"uv": [3, 14, 6, 16], "texture": "#all"},
"west": {"uv": [3, 14, 6, 16], "texture": "#all"},
"up": {"uv": [3, 3, 6, 6], "texture": "#all"},
"down": {"uv": [3, 10, 6, 13], "texture": "#all"}
}
},
{
"from": [6, -2, 10],
"to": [9, 1, 13],
"faces": {
"north": {"uv": [7, 15, 10, 16], "texture": "#all"},
"east": {"uv": [3, 15, 6, 16], "texture": "#all"},
"south": {"uv": [6, 15, 9, 16], "texture": "#all"},
"west": {"uv": [10, 15, 13, 16], "texture": "#all"},
"up": {"uv": [6, 10, 9, 13], "texture": "#all"},
"down": {"uv": [6, 3, 9, 6], "texture": "#all"}
}
},
{
"from": [11, -1, 5],
"to": [14, 2, 8],
"rotation": {"angle": 22.5, "axis": "y", "origin": [12, 0, 7]},
"faces": {
"north": {"uv": [2, 14, 5, 16], "texture": "#all"},
"east": {"uv": [8, 14, 11, 16], "texture": "#all"},
"south": {"uv": [11, 14, 14, 16], "texture": "#all"},
"west": {"uv": [5, 14, 8, 16], "texture": "#all"},
"up": {"uv": [11, 5, 14, 8], "texture": "#all"},
"down": {"uv": [11, 8, 14, 11], "texture": "#all"}
}
}
]
}

View file

@ -0,0 +1,46 @@
{
"parent": "minecraft:block/cube_all",
"textures": {
"all": "block/stone"
},
"elements": [
{
"from": [2, -1, 2],
"to": [7, 3, 7],
"rotation": {"angle": -22.5, "axis": "y", "origin": [5, 0, 4]},
"faces": {
"north": {"uv": [9, 13, 14, 16], "texture": "#all"},
"east": {"uv": [9, 13, 14, 16], "texture": "#all"},
"south": {"uv": [2, 13, 7, 16], "texture": "#all"},
"west": {"uv": [2, 13, 7, 16], "texture": "#all"},
"up": {"uv": [2, 2, 7, 7], "texture": "#all"},
"down": {"uv": [2, 9, 7, 14], "texture": "#all"}
}
},
{
"from": [4, -2, 9],
"to": [10, 2, 14],
"faces": {
"north": {"uv": [6, 14, 12, 16], "texture": "#all"},
"east": {"uv": [2, 14, 7, 16], "texture": "#all"},
"south": {"uv": [4, 14, 10, 16], "texture": "#all"},
"west": {"uv": [9, 14, 14, 16], "texture": "#all"},
"up": {"uv": [4, 9, 10, 14], "texture": "#all"},
"down": {"uv": [4, 2, 10, 7], "texture": "#all"}
}
},
{
"from": [10, -1, 4],
"to": [15, 3, 9],
"rotation": {"angle": 22.5, "axis": "y", "origin": [12, 0, 7]},
"faces": {
"north": {"uv": [1, 13, 6, 16], "texture": "#all"},
"east": {"uv": [7, 13, 12, 16], "texture": "#all"},
"south": {"uv": [10, 13, 15, 16], "texture": "#all"},
"west": {"uv": [4, 13, 9, 16], "texture": "#all"},
"up": {"uv": [10, 4, 15, 9], "texture": "#all"},
"down": {"uv": [10, 7, 15, 12], "texture": "#all"}
}
}
]
}

View file

@ -0,0 +1,46 @@
{
"parent": "minecraft:block/cube_all",
"textures": {
"all": "block/stone"
},
"elements": [
{
"from": [2, -1, 2],
"to": [7, 4, 7],
"rotation": {"angle": -22.5, "axis": "y", "origin": [5, 0, 4]},
"faces": {
"north": {"uv": [9, 12, 14, 16], "texture": "#all"},
"east": {"uv": [9, 12, 14, 16], "texture": "#all"},
"south": {"uv": [2, 12, 7, 16], "texture": "#all"},
"west": {"uv": [2, 12, 7, 16], "texture": "#all"},
"up": {"uv": [2, 2, 7, 7], "texture": "#all"},
"down": {"uv": [2, 9, 7, 14], "texture": "#all"}
}
},
{
"from": [4, -2, 9],
"to": [10, 2, 14],
"faces": {
"north": {"uv": [6, 14, 12, 16], "texture": "#all"},
"east": {"uv": [2, 14, 7, 16], "texture": "#all"},
"south": {"uv": [4, 14, 10, 16], "texture": "#all"},
"west": {"uv": [9, 14, 14, 16], "texture": "#all"},
"up": {"uv": [4, 9, 10, 14], "texture": "#all"},
"down": {"uv": [4, 2, 10, 7], "texture": "#all"}
}
},
{
"from": [10, -1, 4],
"to": [15, 3, 9],
"rotation": {"angle": 22.5, "axis": "y", "origin": [12, 0, 7]},
"faces": {
"north": {"uv": [1, 13, 6, 16], "texture": "#all"},
"east": {"uv": [7, 13, 12, 16], "texture": "#all"},
"south": {"uv": [10, 13, 15, 16], "texture": "#all"},
"west": {"uv": [4, 13, 9, 16], "texture": "#all"},
"up": {"uv": [10, 4, 15, 9], "texture": "#all"},
"down": {"uv": [10, 7, 15, 12], "texture": "#all"}
}
}
]
}

View file

@ -0,0 +1,46 @@
{
"parent": "minecraft:block/cube_all",
"textures": {
"all": "block/stone"
},
"elements": [
{
"from": [1, -1, 1],
"to": [8, 5, 8],
"rotation": {"angle": -22.5, "axis": "y", "origin": [5, 0, 4]},
"faces": {
"north": {"uv": [8, 11, 15, 16], "texture": "#all"},
"east": {"uv": [8, 11, 15, 16], "texture": "#all"},
"south": {"uv": [1, 11, 8, 16], "texture": "#all"},
"west": {"uv": [1, 11, 8, 16], "texture": "#all"},
"up": {"uv": [1, 1, 8, 8], "texture": "#all"},
"down": {"uv": [1, 8, 8, 15], "texture": "#all"}
}
},
{
"from": [3, -2, 8],
"to": [11, 3, 15],
"faces": {
"north": {"uv": [5, 13, 13, 16], "texture": "#all"},
"east": {"uv": [1, 13, 8, 16], "texture": "#all"},
"south": {"uv": [3, 13, 11, 16], "texture": "#all"},
"west": {"uv": [8, 13, 15, 16], "texture": "#all"},
"up": {"uv": [3, 8, 11, 15], "texture": "#all"},
"down": {"uv": [3, 1, 11, 8], "texture": "#all"}
}
},
{
"from": [9, -1, 3],
"to": [16, 5, 10],
"rotation": {"angle": 22.5, "axis": "y", "origin": [12, 0, 7]},
"faces": {
"north": {"uv": [0, 11, 7, 16], "texture": "#all"},
"east": {"uv": [6, 11, 13, 16], "texture": "#all"},
"south": {"uv": [9, 11, 16, 16], "texture": "#all"},
"west": {"uv": [3, 11, 10, 16], "texture": "#all"},
"up": {"uv": [9, 3, 16, 10], "texture": "#all"},
"down": {"uv": [9, 6, 16, 13], "texture": "#all"}
}
}
]
}

View file

@ -0,0 +1,46 @@
{
"parent": "minecraft:block/cube_all",
"textures": {
"all": "block/stone"
},
"elements": [
{
"from": [1, -1, 1],
"to": [8, 5, 8],
"rotation": {"angle": -22.5, "axis": "y", "origin": [5, 0, 4]},
"faces": {
"north": {"uv": [8, 11, 15, 16], "texture": "#all"},
"east": {"uv": [8, 11, 15, 16], "texture": "#all"},
"south": {"uv": [1, 11, 8, 16], "texture": "#all"},
"west": {"uv": [1, 11, 8, 16], "texture": "#all"},
"up": {"uv": [1, 1, 8, 8], "texture": "#all"},
"down": {"uv": [1, 8, 8, 15], "texture": "#all"}
}
},
{
"from": [3, -2, 8],
"to": [11, 4, 15],
"faces": {
"north": {"uv": [5, 12, 13, 16], "texture": "#all"},
"east": {"uv": [1, 12, 8, 16], "texture": "#all"},
"south": {"uv": [3, 12, 11, 16], "texture": "#all"},
"west": {"uv": [8, 12, 15, 16], "texture": "#all"},
"up": {"uv": [3, 8, 11, 15], "texture": "#all"},
"down": {"uv": [3, 1, 11, 8], "texture": "#all"}
}
},
{
"from": [9, -1, 3],
"to": [16, 7, 10],
"rotation": {"angle": 22.5, "axis": "y", "origin": [12, 0, 7]},
"faces": {
"north": {"uv": [0, 9, 7, 16], "texture": "#all"},
"east": {"uv": [6, 9, 13, 16], "texture": "#all"},
"south": {"uv": [9, 9, 16, 16], "texture": "#all"},
"west": {"uv": [3, 9, 10, 16], "texture": "#all"},
"up": {"uv": [9, 3, 16, 10], "texture": "#all"},
"down": {"uv": [9, 6, 16, 13], "texture": "#all"}
}
}
]
}

View file

@ -0,0 +1,46 @@
{
"parent": "minecraft:block/cube_all",
"textures": {
"all": "block/stone"
},
"elements": [
{
"from": [1, -1, 1],
"to": [8, 7, 8],
"rotation": {"angle": -22.5, "axis": "y", "origin": [5, 0, 4]},
"faces": {
"north": {"uv": [8, 9, 15, 16], "texture": "#all"},
"east": {"uv": [8, 9, 15, 16], "texture": "#all"},
"south": {"uv": [1, 9, 8, 16], "texture": "#all"},
"west": {"uv": [1, 9, 8, 16], "texture": "#all"},
"up": {"uv": [1, 1, 8, 8], "texture": "#all"},
"down": {"uv": [1, 8, 8, 15], "texture": "#all"}
}
},
{
"from": [3, -2, 8],
"to": [11, 4, 15],
"faces": {
"north": {"uv": [5, 12, 13, 16], "texture": "#all"},
"east": {"uv": [1, 12, 8, 16], "texture": "#all"},
"south": {"uv": [3, 12, 11, 16], "texture": "#all"},
"west": {"uv": [8, 12, 15, 16], "texture": "#all"},
"up": {"uv": [3, 8, 11, 15], "texture": "#all"},
"down": {"uv": [3, 1, 11, 8], "texture": "#all"}
}
},
{
"from": [9, -1, 3],
"to": [16, 9, 10],
"rotation": {"angle": 22.5, "axis": "y", "origin": [12, 0, 7]},
"faces": {
"north": {"uv": [0, 7, 7, 16], "texture": "#all"},
"east": {"uv": [6, 7, 13, 16], "texture": "#all"},
"south": {"uv": [9, 7, 16, 16], "texture": "#all"},
"west": {"uv": [3, 7, 10, 16], "texture": "#all"},
"up": {"uv": [9, 3, 16, 10], "texture": "#all"},
"down": {"uv": [9, 6, 16, 13], "texture": "#all"}
}
}
]
}

View file

@ -0,0 +1,46 @@
{
"parent": "minecraft:block/cube_all",
"textures": {
"all": "block/stone"
},
"elements": [
{
"from": [1, -1, 1],
"to": [8, 9, 8],
"rotation": {"angle": -22.5, "axis": "y", "origin": [5, 0, 4]},
"faces": {
"north": {"uv": [8, 7, 15, 16], "texture": "#all"},
"east": {"uv": [8, 7, 15, 16], "texture": "#all"},
"south": {"uv": [1, 7, 8, 16], "texture": "#all"},
"west": {"uv": [1, 7, 8, 16], "texture": "#all"},
"up": {"uv": [1, 1, 8, 8], "texture": "#all"},
"down": {"uv": [1, 8, 8, 15], "texture": "#all"}
}
},
{
"from": [3, -2, 8],
"to": [11, 4, 15],
"faces": {
"north": {"uv": [5, 12, 13, 16], "texture": "#all"},
"east": {"uv": [1, 12, 8, 16], "texture": "#all"},
"south": {"uv": [3, 12, 11, 16], "texture": "#all"},
"west": {"uv": [8, 12, 15, 16], "texture": "#all"},
"up": {"uv": [3, 8, 11, 15], "texture": "#all"},
"down": {"uv": [3, 1, 11, 8], "texture": "#all"}
}
},
{
"from": [9, -1, 3],
"to": [16, 13, 10],
"rotation": {"angle": 22.5, "axis": "y", "origin": [12, 0, 7]},
"faces": {
"north": {"uv": [0, 3, 7, 16], "texture": "#all"},
"east": {"uv": [6, 3, 13, 16], "texture": "#all"},
"south": {"uv": [9, 3, 16, 16], "texture": "#all"},
"west": {"uv": [3, 3, 10, 16], "texture": "#all"},
"up": {"uv": [9, 3, 16, 10], "texture": "#all"},
"down": {"uv": [9, 6, 16, 13], "texture": "#all"}
}
}
]
}

View file

@ -0,0 +1,6 @@
{
"parent": "item/generated",
"textures": {
"layer0": "unicopia:item/pebbles"
}
}

View file

@ -0,0 +1,6 @@
{
"parent": "item/generated",
"textures": {
"layer0": "unicopia:item/rock"
}
}

View file

@ -0,0 +1,6 @@
{
"parent": "item/generated",
"textures": {
"layer0": "unicopia:item/rock_stew"
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

View file

@ -0,0 +1,6 @@
{
"replace": false,
"values": [
"unicopia:rocks"
]
}

View file

@ -79,7 +79,7 @@
"trigger": "minecraft:inventory_changed", "trigger": "minecraft:inventory_changed",
"conditions": { "conditions": {
"items": [ "items": [
{ "items": [ "unicopia:golden_apple" ] } { "items": [ "minecraft:golden_apple" ] }
] ]
} }
} }

View file

@ -0,0 +1,68 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1.0,
"bonus_rolls": 0.0,
"entries": [
{
"type": "minecraft:alternatives",
"children": [
{
"type": "minecraft:item",
"conditions": [
{
"condition": "minecraft:block_state_property",
"block": "unicopia:rocks",
"properties": {
"age": "7"
}
}
],
"name": "unicopia:rock"
},
{
"type": "minecraft:item",
"name": "unicopia:pebbles"
}
]
}
]
},
{
"rolls": 1.0,
"bonus_rolls": 0.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:pebbles"
}
],
"conditions": [
{
"condition": "minecraft:block_state_property",
"block": "unicopia:rocks",
"properties": {
"age": "7"
}
}
]
}
],
"functions": [
{
"function": "minecraft:explosion_decay"
}
]
}

View file

@ -0,0 +1,10 @@
{
"type": "minecraft:crafting_shapeless",
"ingredients": [
{ "item": "unicopia:rock" },
{ "item": "unicopia:rock" },
{ "item": "unicopia:rock" },
{ "item": "minecraft:bowl" }
],
"result": { "item": "unicopia:rock_stew" }
}