diff --git a/assets/models/hay_bale.bbmodel b/assets/models/hay_bale.bbmodel new file mode 100644 index 00000000..7328ccde --- /dev/null +++ b/assets/models/hay_bale.bbmodel @@ -0,0 +1 @@ +{"meta":{"format_version":"4.5","model_format":"java_block","box_uv":false},"name":"hay_bale_bse","parent":"","ambientocclusion":true,"front_gui_light":false,"visible_box":[1,1,0],"variable_placeholders":"","variable_placeholder_buttons":[],"unhandled_root_fields":{},"resolution":{"width":16,"height":16},"elements":[{"name":"bottom_south_east","box_uv":false,"rescale":false,"locked":false,"render_order":"default","allow_mirror_modeling":true,"from":[8,0,8],"to":[16,8,16],"autouv":0,"color":2,"origin":[0,0,0],"faces":{"north":{"uv":[0,8,8,16],"texture":0},"east":{"uv":[0,8,8,16],"texture":1},"south":{"uv":[8,8,16,16],"texture":1},"west":{"uv":[8,8,16,16],"texture":0},"up":{"uv":[8,8,16,16],"texture":0},"down":{"uv":[8,0,16,8],"texture":0}},"type":"cube","uuid":"523f4164-daa5-4b79-eec7-013710b7ae88"},{"name":"bottom_north_west","box_uv":false,"rescale":false,"locked":false,"render_order":"default","allow_mirror_modeling":true,"from":[0,0,0],"to":[8,8,8],"autouv":0,"color":2,"origin":[0,0,0],"faces":{"north":{"uv":[8,8,16,16],"texture":1},"east":{"uv":[8,8,16,16],"texture":0},"south":{"uv":[0,8,8,16],"texture":0},"west":{"uv":[0,8,8,16],"texture":1},"up":{"uv":[0,0,8,8],"texture":0},"down":{"uv":[0,8,8,16],"texture":0}},"type":"cube","uuid":"1fd288fe-a293-1ca2-a5b7-15d602eb44f6"},{"name":"top_south_east","box_uv":false,"rescale":false,"locked":false,"render_order":"default","allow_mirror_modeling":true,"from":[8,8,8],"to":[16,16,16],"autouv":0,"color":2,"origin":[0,0,0],"faces":{"north":{"uv":[0,0,8,8],"texture":0},"east":{"uv":[0,0,8,8],"texture":1},"south":{"uv":[8,0,16,8],"texture":1},"west":{"uv":[8,0,16,8],"texture":0},"up":{"uv":[8,8,16,16],"texture":0},"down":{"uv":[8,0,16,8],"texture":0}},"type":"cube","uuid":"4f48967d-c722-5593-6f77-079ee47d08af"},{"name":"top_north_west","box_uv":false,"rescale":false,"locked":false,"render_order":"default","allow_mirror_modeling":true,"from":[0,8,0],"to":[8,16,8],"autouv":0,"color":2,"origin":[0,0,0],"faces":{"north":{"uv":[8,0,16,8],"texture":1},"east":{"uv":[8,0,16,8],"texture":0},"south":{"uv":[0,0,8,8],"texture":0},"west":{"uv":[0,0,8,8],"texture":1},"up":{"uv":[0,0,8,8],"texture":0},"down":{"uv":[0,8,8,16],"texture":0}},"type":"cube","uuid":"c4356ab3-a7a5-43e5-489a-9ebb52492675"},{"name":"bottom_south_west","box_uv":false,"rescale":false,"locked":false,"render_order":"default","allow_mirror_modeling":true,"from":[0,0,8],"to":[8,8,16],"autouv":0,"color":2,"origin":[0,0,0],"faces":{"north":{"uv":[8,8,16,16],"texture":0},"east":{"uv":[0,8,8,16],"texture":0},"south":{"uv":[0,8,8,16],"texture":1},"west":{"uv":[8,8,16,16],"texture":1},"up":{"uv":[0,8,8,16],"texture":0},"down":{"uv":[0,0,8,8],"texture":0}},"type":"cube","uuid":"d07d02d7-5ab9-0026-b3ed-029701536cf6"},{"name":"bottom_north_east","box_uv":false,"rescale":false,"locked":false,"render_order":"default","allow_mirror_modeling":true,"from":[8,0,0],"to":[16,8,8],"autouv":0,"color":2,"origin":[0,0,0],"faces":{"north":{"uv":[0,8,8,16],"texture":1},"east":{"uv":[8,8,16,16],"texture":1},"south":{"uv":[8,8,16,16],"texture":0},"west":{"uv":[0,8,8,16],"texture":0},"up":{"uv":[8,0,16,8],"texture":0},"down":{"uv":[8,8,16,16],"texture":0}},"type":"cube","uuid":"d10fb8d4-fe44-ca10-77f0-63b32855f5d6"},{"name":"top_south_west","box_uv":false,"rescale":false,"locked":false,"render_order":"default","allow_mirror_modeling":true,"from":[0,8,8],"to":[8,16,16],"autouv":0,"color":2,"origin":[0,0,0],"faces":{"north":{"uv":[8,0,16,8],"texture":0},"east":{"uv":[0,0,8,8],"texture":0},"south":{"uv":[0,0,8,8],"texture":1},"west":{"uv":[8,0,16,8],"texture":1},"up":{"uv":[0,8,8,16],"texture":0},"down":{"uv":[0,0,8,8],"texture":0}},"type":"cube","uuid":"b9c9d695-4003-c9e6-efbb-9a75c658b47e"},{"name":"top_north_east","box_uv":false,"rescale":false,"locked":false,"render_order":"default","allow_mirror_modeling":true,"from":[8,8,0],"to":[16,16,8],"autouv":0,"color":2,"origin":[0,0,0],"faces":{"north":{"uv":[0,0,8,8],"texture":1},"east":{"uv":[8,0,16,8],"texture":1},"south":{"uv":[8,0,16,8],"texture":0},"west":{"uv":[0,0,8,8],"texture":0},"up":{"uv":[8,0,16,8],"texture":0},"down":{"uv":[8,8,16,16],"texture":0}},"type":"cube","uuid":"20a14bb3-edf7-1ae1-132e-ef3d56d84f67"}],"outliner":["523f4164-daa5-4b79-eec7-013710b7ae88","4f48967d-c722-5593-6f77-079ee47d08af","d10fb8d4-fe44-ca10-77f0-63b32855f5d6","20a14bb3-edf7-1ae1-132e-ef3d56d84f67","d07d02d7-5ab9-0026-b3ed-029701536cf6","b9c9d695-4003-c9e6-efbb-9a75c658b47e","1fd288fe-a293-1ca2-a5b7-15d602eb44f6","c4356ab3-a7a5-43e5-489a-9ebb52492675"],"textures":[{"path":"/home/sollace/Desktop/hay_block_top.png","name":"hay_block_top.png","folder":"blocks","namespace":"minecraft","id":"top","particle":false,"render_mode":"default","render_sides":"auto","frame_time":1,"frame_order_type":"loop","frame_order":"","frame_interpolate":false,"visible":true,"mode":"bitmap","saved":true,"uuid":"f73f23e2-d591-dd05-db6f-60869e1592c7","relative_path":"../../../../../../../Desktop/hay_block_top.png","source":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAVVJREFUOE9tkyFOBEEQRWvckEAyuBWYFSRgCQgk3IgDcAKC4wo4rgBIxBIsJIg1iHVsAgnjhryevE6xTJvd6ar69ev/6ub+thte3yJmXR+c1bqNn++I+V5f/nuMm8Mvd83VRTccHUd8rvrYnbWRwUhafrQVjAJBDw/Gmubuuh3sMt+PWL5HASKY79df4x2xl+eRIeCFgXRBJXh+1sfTog2+ZSQTm/C9tR3R3Fx2AzPzwZkqMtkRpM84VQNpcUkiRTCRetbi9KSPh8dRmz8aMF+3858+oBQJZpPCABFVX/s2rWJuNNHKPFLRAHTVpxgWdFPA3FEm5FUbcwIBmHDcDxhk+opITmGgaHqrrapO1zyC+1H3gE66QDDPTFLeVGjneBFRilNWyirvCXmAolHdRH3O6wttHw06ObuuVQ1y0ua2EXM/cMojSMNzZi5fWX7KWdwppxjjF8NCOiclFu9xAAAAAElFTkSuQmCC"},{"path":"/home/sollace/Desktop/hay_block_side.png","name":"hay_block_side.png","folder":"blocks","namespace":"minecraft","id":"side","particle":true,"render_mode":"default","render_sides":"auto","frame_time":1,"frame_order_type":"loop","frame_order":"","frame_interpolate":false,"visible":true,"mode":"bitmap","saved":true,"uuid":"1cf36f16-9f26-3125-d49c-45217088cbc7","relative_path":"../../../../../../../Desktop/hay_block_side.png","source":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAV1JREFUOE+VU7tOQkEUPGtiuAokeCExNIpBK2x9tITK7/EHqCmJv2DlNxhblZqORK2MiVxJBLmEhDVzktkclopt9p7X7OzcWde7bfiL6wMZDsfSalVl8Pwj7U5FXl4zjZn//pxKrV5aixunRXF33SNvGzFwdZmuARymBfnKFgpIIBx0crwrDgz2yytBE05AgYyQe/tYCup/vzs6gBg7l7u/Ofc+8ZJNckkrSSgg5ppNF1IsFTbq6NcrkCJPxAmgbPOMyYDMggaxSBTz6XGilGNAArmH/pnH3QEAVa36EPN9NFNtbN2KugGAAQvEwRiIfQqAASa23QMAqJNyDGivEDNUH8TOs+rjV0JALDoVPqHort9uehTpAZc7GedzqSZ7An8wtj34pm+CE5GE2+yiA7Fjxc5EXgFoUTTR1tYw9AEPsdYOTuQAH419E3xs1qnoh3aBgR20otKRVn2+Vuz/aIRXgq2GkfcAAAAASUVORK5CYII="}]} \ No newline at end of file diff --git a/assets/models/hay_bale.json b/assets/models/hay_bale.json new file mode 100644 index 00000000..a2ce1538 --- /dev/null +++ b/assets/models/hay_bale.json @@ -0,0 +1,113 @@ +{ + "textures": { + "top": "blocks/hay_block_top", + "particle": "blocks/hay_block_side", + "side": "blocks/hay_block_side" + }, + "elements": [ + { + "name": "bottom_south_east", + "from": [8, 0, 8], + "to": [16, 8, 16], + "faces": { + "north": {"uv": [0, 8, 8, 16], "texture": "#top"}, + "east": {"uv": [0, 8, 8, 16], "texture": "#side"}, + "south": {"uv": [8, 8, 16, 16], "texture": "#side"}, + "west": {"uv": [8, 8, 16, 16], "texture": "#top"}, + "up": {"uv": [8, 8, 16, 16], "texture": "#top"}, + "down": {"uv": [8, 0, 16, 8], "texture": "#top"} + } + }, + { + "name": "top_south_east", + "from": [8, 8, 8], + "to": [16, 16, 16], + "faces": { + "north": {"uv": [0, 0, 8, 8], "texture": "#top"}, + "east": {"uv": [0, 0, 8, 8], "texture": "#side"}, + "south": {"uv": [8, 0, 16, 8], "texture": "#side"}, + "west": {"uv": [8, 0, 16, 8], "texture": "#top"}, + "up": {"uv": [8, 8, 16, 16], "texture": "#top"}, + "down": {"uv": [8, 0, 16, 8], "texture": "#top"} + } + }, + { + "name": "bottom_north_east", + "from": [8, 0, 0], + "to": [16, 8, 8], + "faces": { + "north": {"uv": [0, 8, 8, 16], "texture": "#side"}, + "east": {"uv": [8, 8, 16, 16], "texture": "#side"}, + "south": {"uv": [8, 8, 16, 16], "texture": "#top"}, + "west": {"uv": [0, 8, 8, 16], "texture": "#top"}, + "up": {"uv": [8, 0, 16, 8], "texture": "#top"}, + "down": {"uv": [8, 8, 16, 16], "texture": "#top"} + } + }, + { + "name": "top_north_east", + "from": [8, 8, 0], + "to": [16, 16, 8], + "faces": { + "north": {"uv": [0, 0, 8, 8], "texture": "#side"}, + "east": {"uv": [8, 0, 16, 8], "texture": "#side"}, + "south": {"uv": [8, 0, 16, 8], "texture": "#top"}, + "west": {"uv": [0, 0, 8, 8], "texture": "#top"}, + "up": {"uv": [8, 0, 16, 8], "texture": "#top"}, + "down": {"uv": [8, 8, 16, 16], "texture": "#top"} + } + }, + { + "name": "bottom_south_west", + "from": [0, 0, 8], + "to": [8, 8, 16], + "faces": { + "north": {"uv": [8, 8, 16, 16], "texture": "#top"}, + "east": {"uv": [0, 8, 8, 16], "texture": "#top"}, + "south": {"uv": [0, 8, 8, 16], "texture": "#side"}, + "west": {"uv": [8, 8, 16, 16], "texture": "#side"}, + "up": {"uv": [0, 8, 8, 16], "texture": "#top"}, + "down": {"uv": [0, 0, 8, 8], "texture": "#top"} + } + }, + { + "name": "top_south_west", + "from": [0, 8, 8], + "to": [8, 16, 16], + "faces": { + "north": {"uv": [8, 0, 16, 8], "texture": "#top"}, + "east": {"uv": [0, 0, 8, 8], "texture": "#top"}, + "south": {"uv": [0, 0, 8, 8], "texture": "#side"}, + "west": {"uv": [8, 0, 16, 8], "texture": "#side"}, + "up": {"uv": [0, 8, 8, 16], "texture": "#top"}, + "down": {"uv": [0, 0, 8, 8], "texture": "#top"} + } + }, + { + "name": "bottom_north_west", + "from": [0, 0, 0], + "to": [8, 8, 8], + "faces": { + "north": {"uv": [8, 8, 16, 16], "texture": "#side"}, + "east": {"uv": [8, 8, 16, 16], "texture": "#top"}, + "south": {"uv": [0, 8, 8, 16], "texture": "#top"}, + "west": {"uv": [0, 8, 8, 16], "texture": "#side"}, + "up": {"uv": [0, 0, 8, 8], "texture": "#top"}, + "down": {"uv": [0, 8, 8, 16], "texture": "#top"} + } + }, + { + "name": "top_north_west", + "from": [0, 8, 0], + "to": [8, 16, 8], + "faces": { + "north": {"uv": [8, 0, 16, 8], "texture": "#side"}, + "east": {"uv": [8, 0, 16, 8], "texture": "#top"}, + "south": {"uv": [0, 0, 8, 8], "texture": "#top"}, + "west": {"uv": [0, 0, 8, 8], "texture": "#side"}, + "up": {"uv": [0, 0, 8, 8], "texture": "#top"}, + "down": {"uv": [0, 8, 8, 16], "texture": "#top"} + } + } + ] +} \ No newline at end of file diff --git a/src/main/java/com/minelittlepony/unicopia/ability/EarthPonyGrowAbility.java b/src/main/java/com/minelittlepony/unicopia/ability/EarthPonyGrowAbility.java index f02ee066..b1dcf2a5 100644 --- a/src/main/java/com/minelittlepony/unicopia/ability/EarthPonyGrowAbility.java +++ b/src/main/java/com/minelittlepony/unicopia/ability/EarthPonyGrowAbility.java @@ -12,6 +12,7 @@ import com.minelittlepony.unicopia.UTags; import com.minelittlepony.unicopia.ability.data.Hit; import com.minelittlepony.unicopia.ability.data.Pos; import com.minelittlepony.unicopia.block.UBlocks; +import com.minelittlepony.unicopia.block.state.StateUtil; import com.minelittlepony.unicopia.entity.player.Pony; import com.minelittlepony.unicopia.particle.MagicParticleEffect; import com.minelittlepony.unicopia.particle.ParticleUtils; @@ -29,7 +30,6 @@ import net.minecraft.item.BoneMealItem; import net.minecraft.item.ItemStack; import net.minecraft.item.Items; import net.minecraft.particle.ParticleTypes; -import net.minecraft.state.property.Property; import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.Direction; import net.minecraft.util.math.Vec3d; @@ -233,16 +233,7 @@ public class EarthPonyGrowAbility implements Ability { } public BlockState getResult(World world, BlockPos pos) { - BlockState input = world.getBlockState(pos); - BlockState output = this.output; - for (var property : input.getProperties()) { - output = copyProperty(input, output, property); - } - return output; - } - - private > BlockState copyProperty(BlockState from, BlockState to, Property property) { - return to.withIfExists(property, from.get(property)); + return StateUtil.copyState(world.getBlockState(pos), output); } record Result (TransmutationRecipe recipe, Set matchedLocations) { diff --git a/src/main/java/com/minelittlepony/unicopia/block/EdibleBlock.java b/src/main/java/com/minelittlepony/unicopia/block/EdibleBlock.java new file mode 100644 index 00000000..b4f0a5d2 --- /dev/null +++ b/src/main/java/com/minelittlepony/unicopia/block/EdibleBlock.java @@ -0,0 +1,214 @@ +package com.minelittlepony.unicopia.block; + +import java.util.ArrayList; +import java.util.List; +import java.util.function.Function; + +import org.jetbrains.annotations.Nullable; + +import com.minelittlepony.unicopia.USounds; +import com.minelittlepony.unicopia.block.state.StateUtil; +import com.minelittlepony.unicopia.entity.player.Pony; + +import net.fabricmc.fabric.api.event.player.UseBlockCallback; +import net.fabricmc.fabric.api.registry.FlammableBlockRegistry; +import net.minecraft.block.Block; +import net.minecraft.block.BlockState; +import net.minecraft.block.Blocks; +import net.minecraft.block.HayBlock; +import net.minecraft.block.ShapeContext; +import net.minecraft.entity.player.PlayerEntity; +import net.minecraft.item.ItemStack; +import net.minecraft.item.Items; +import net.minecraft.registry.Registries; +import net.minecraft.sound.SoundCategory; +import net.minecraft.state.StateManager; +import net.minecraft.state.property.BooleanProperty; +import net.minecraft.util.ActionResult; +import net.minecraft.util.Hand; +import net.minecraft.util.Identifier; +import net.minecraft.util.Util; +import net.minecraft.util.hit.BlockHitResult; +import net.minecraft.util.math.BlockPos; +import net.minecraft.util.math.Vec3d; +import net.minecraft.util.shape.VoxelShape; +import net.minecraft.util.shape.VoxelShapes; +import net.minecraft.world.BlockView; +import net.minecraft.world.World; + +public class EdibleBlock extends HayBlock { + private static final List REGISTRY = new ArrayList<>(); + + static final BooleanProperty TOP_NORTH_EAST = BooleanProperty.of("top_north_east"); + static final BooleanProperty TOP_NORTH_WEST = BooleanProperty.of("top_north_west"); + static final BooleanProperty TOP_SOUTH_EAST = BooleanProperty.of("top_south_east"); + static final BooleanProperty TOP_SOUTH_WEST = BooleanProperty.of("top_south_west"); + + static final BooleanProperty BOTTOM_NORTH_EAST = BooleanProperty.of("bottom_north_east"); + static final BooleanProperty BOTTOM_NORTH_WEST = BooleanProperty.of("bottom_north_west"); + static final BooleanProperty BOTTOM_SOUTH_EAST = BooleanProperty.of("bottom_south_east"); + static final BooleanProperty BOTTOM_SOUTH_WEST = BooleanProperty.of("bottom_south_west"); + + // [up/down][north/south][west/east] + private static final BooleanProperty[] SEGMENTS = { + BOTTOM_NORTH_WEST, + BOTTOM_NORTH_EAST, + BOTTOM_SOUTH_WEST, + BOTTOM_SOUTH_EAST, + TOP_NORTH_WEST, + TOP_NORTH_EAST, + TOP_SOUTH_WEST, + TOP_SOUTH_EAST + }; + private static final VoxelShape[] SHAPES = { + Block.createCuboidShape(0, 0, 0, 8, 8, 8), + Block.createCuboidShape(8, 0, 0, 16, 8, 8), + Block.createCuboidShape(0, 0, 8, 8, 8, 16), + Block.createCuboidShape(8, 0, 8, 16, 8, 16), + Block.createCuboidShape(0, 8, 0, 8, 16, 8), + Block.createCuboidShape(8, 8, 0, 16, 16, 8), + Block.createCuboidShape(0, 8, 8, 8, 16, 16), + Block.createCuboidShape(8, 8, 8, 16, 16, 16) + }; + private static final Function SHAPE_CACHE = Util.memoize(state -> { + @Nullable + VoxelShape shape = null; + for (int i = 0; i < SEGMENTS.length; i++) { + if (state.get(SEGMENTS[i])) { + shape = shape == null ? SHAPES[i] : VoxelShapes.union(shape, SHAPES[i]); + } + } + return shape == null ? VoxelShapes.fullCube() : shape.simplify(); + }); + + static void bootstrap() { + UseBlockCallback.EVENT.register((PlayerEntity player, World world, Hand hand, BlockHitResult hitResult) -> { + if (!Pony.of(player).getSpecies().isEquine() + || (player.shouldCancelInteraction() && (!player.getMainHandStack().isEmpty() || !player.getOffHandStack().isEmpty()))) { + return ActionResult.PASS; + } + + BlockPos pos = hitResult.getBlockPos(); + BlockState state = world.getBlockState(pos); + + for (EdibleBlock edibleBlock : REGISTRY) { + Block match = edibleBlock.getBaseBlock(); + if (match != Blocks.AIR && state.isOf(match)) { + ActionResult result = StateUtil.copyState(state, edibleBlock.getDefaultState()).onUse(world, player, hand, hitResult); + + if (result.isAccepted()) { + return result; + } + } + } + + return ActionResult.PASS; + }); + } + + private final Identifier baseBlock; + + public EdibleBlock(Identifier baseBlock, boolean register) { + super(Settings.copy(Blocks.HAY_BLOCK)); + for (BooleanProperty segment : SEGMENTS) { + setDefaultState(getDefaultState().with(segment, true)); + } + this.baseBlock = baseBlock; + if (register) { + REGISTRY.add(this); + FlammableBlockRegistry.getDefaultInstance().add(this, 60, 20); + } + } + + public Block getBaseBlock() { + return Registries.BLOCK.get(baseBlock); + } + + @Override + public String getTranslationKey() { + return getBaseBlock().getTranslationKey(); + } + + @Override + protected void appendProperties(StateManager.Builder builder) { + super.appendProperties(builder); + builder.add(SEGMENTS); + } + + @Override + public VoxelShape getOutlineShape(BlockState state, BlockView world, BlockPos pos, ShapeContext context) { + return SHAPE_CACHE.apply(state); + } + + @Override + @Deprecated + public ActionResult onUse(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockHitResult hit) { + if (player.isSpectator()) { + return ActionResult.FAIL; + } + + ItemStack stack = player.getStackInHand(hand); + if (stack.isOf(Items.WHEAT)) { + BooleanProperty segment = getHitCorner(hit, 1); + + if (!state.get(segment)) { + stack.decrement(1); + if (!world.isClient) { + state = state.with(segment, true); + if (SHAPE_CACHE.apply(state) == VoxelShapes.fullCube()) { + state = StateUtil.copyState(state, getBaseBlock().getDefaultState()); + } + world.setBlockState(pos, state); + } + world.playSound(player, pos, this.getSoundGroup(state).getPlaceSound(), SoundCategory.BLOCKS); + + return ActionResult.SUCCESS; + } + + return ActionResult.FAIL; + } + + BooleanProperty corner = getHitCorner(hit, -1); + + if (!state.get(corner)) { + return ActionResult.PASS; + } + + if (!(player.isCreative() || player.getHungerManager().isNotFull()) || !player.isSneaking()) { + return ActionResult.FAIL; + } + + if (!world.isClient) { + state = state.with(corner, false); + if (SHAPE_CACHE.apply(state) == VoxelShapes.fullCube()) { + world.removeBlock(pos, false); + } else { + world.setBlockState(pos, state); + } + } + player.playSound(USounds.Vanilla.ENTITY_GENERIC_EAT, 1, 1); + if (world.random.nextInt(10) == 0) { + player.playSound(USounds.Vanilla.ENTITY_PLAYER_BURP, 1, player.getSoundPitch()); + } + player.getHungerManager().add(4, 2.3F); + return ActionResult.SUCCESS; + } + + static BooleanProperty getHitCorner(BlockHitResult hit, int direction) { + Vec3d pos = hit.getPos().add(Vec3d.of(hit.getSide().getVector()).multiply(direction * 0.001F)); + + BlockPos bPos = hit.getBlockPos(); + + return SEGMENTS[ + (4 * getIndex(pos.y, bPos.getY())) + + (2 * getIndex(pos.z, bPos.getZ())) + + (1 - getIndex(pos.x, bPos.getX())) + ]; + } + + static int getIndex(double axisHit, int tile) { + axisHit = Math.abs(axisHit); + tile = Math.abs(tile); + return axisHit - ((int)axisHit) > 0.5 ? 1 : 0; + } +} diff --git a/src/main/java/com/minelittlepony/unicopia/block/UBlocks.java b/src/main/java/com/minelittlepony/unicopia/block/UBlocks.java index 7fc8d666..af03300f 100644 --- a/src/main/java/com/minelittlepony/unicopia/block/UBlocks.java +++ b/src/main/java/com/minelittlepony/unicopia/block/UBlocks.java @@ -29,6 +29,7 @@ import com.minelittlepony.unicopia.server.world.UTreeGen; import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings; import net.fabricmc.fabric.api.registry.FlammableBlockRegistry; import net.fabricmc.fabric.api.registry.StrippableBlockRegistry; +import net.fabricmc.loader.api.FabricLoader; import net.minecraft.block.*; import net.minecraft.block.AbstractBlock.Settings; import net.minecraft.block.entity.BlockEntityType; @@ -224,6 +225,8 @@ public interface UBlocks { Block CRYSTAL_DOOR = register("crystal_door", new CrystalDoorBlock(Settings.copy(Blocks.IRON_DOOR), UWoodTypes.CRYSTAL), ItemGroups.FUNCTIONAL); Block CLOUD_DOOR = register("cloud_door", new CloudDoorBlock(Settings.copy(CLOUD), CLOUD.getDefaultState(), UWoodTypes.CLOUD), ItemGroups.FUNCTIONAL); + EdibleBlock HAY_BLOCK = register("hay_block", new EdibleBlock(new Identifier("hay_block"), true)); + private static T register(String name, T item) { return register(Unicopia.id(name), item); } @@ -247,10 +250,15 @@ public interface UBlocks { if (block instanceof CloudLike || block instanceof SlimePustuleBlock || block instanceof PileBlock) { SEMI_TRANSPARENT_BLOCKS.add(block); } + return Registry.register(Registries.BLOCK, id, block); } static void bootstrap() { + if (FabricLoader.getInstance().isModLoaded("farmersdelight")) { + register("rice_block", new EdibleBlock(new Identifier("farmersdelight", "rice_bale"), true)); + register("straw_block", new EdibleBlock(new Identifier("farmersdelight", "straw_bale"), true)); + } BlockEntityTypeSupportHelper.of(BlockEntityType.SIGN).addSupportedBlocks(PALM_SIGN, PALM_WALL_SIGN); BlockEntityTypeSupportHelper.of(BlockEntityType.HANGING_SIGN).addSupportedBlocks(PALM_HANGING_SIGN, PALM_WALL_HANGING_SIGN); @@ -276,5 +284,6 @@ public interface UBlocks { FlammableBlockRegistry.getDefaultInstance().add(BANANAS, 5, 20); UBlockEntities.bootstrap(); + EdibleBlock.bootstrap(); } } diff --git a/src/main/java/com/minelittlepony/unicopia/block/cloud/PoreousCloudBlock.java b/src/main/java/com/minelittlepony/unicopia/block/cloud/PoreousCloudBlock.java index 5e17ca06..15303184 100644 --- a/src/main/java/com/minelittlepony/unicopia/block/cloud/PoreousCloudBlock.java +++ b/src/main/java/com/minelittlepony/unicopia/block/cloud/PoreousCloudBlock.java @@ -4,6 +4,8 @@ import java.util.function.Supplier; import org.jetbrains.annotations.Nullable; +import com.minelittlepony.unicopia.block.state.StateUtil; + import net.minecraft.block.BlockState; import net.minecraft.server.world.ServerWorld; import net.minecraft.util.math.BlockPos; @@ -22,7 +24,7 @@ public class PoreousCloudBlock extends CloudBlock implements Soakable { @Override public BlockState getStateWithMoisture(BlockState state, int moisture) { if (moisture <= 0) { - return Soakable.copyProperties(state, getDefaultState()); + return StateUtil.copyState(state, getDefaultState()); } return soggyBlock == null ? null : soggyBlock.get().getStateWithMoisture(state, moisture); } diff --git a/src/main/java/com/minelittlepony/unicopia/block/cloud/PoreousCloudStairsBlock.java b/src/main/java/com/minelittlepony/unicopia/block/cloud/PoreousCloudStairsBlock.java index 6733ee2d..3ee498a1 100644 --- a/src/main/java/com/minelittlepony/unicopia/block/cloud/PoreousCloudStairsBlock.java +++ b/src/main/java/com/minelittlepony/unicopia/block/cloud/PoreousCloudStairsBlock.java @@ -4,6 +4,8 @@ import java.util.function.Supplier; import org.jetbrains.annotations.Nullable; +import com.minelittlepony.unicopia.block.state.StateUtil; + import net.minecraft.block.BlockState; public class PoreousCloudStairsBlock extends CloudStairsBlock implements Soakable { @@ -19,7 +21,7 @@ public class PoreousCloudStairsBlock extends CloudStairsBlock implements Soakabl @Override public BlockState getStateWithMoisture(BlockState state, int moisture) { if (moisture <= 0) { - return Soakable.copyProperties(state, getDefaultState()); + return StateUtil.copyState(state, getDefaultState()); } return soggyBlock.get().getStateWithMoisture(state, moisture); } diff --git a/src/main/java/com/minelittlepony/unicopia/block/cloud/Soakable.java b/src/main/java/com/minelittlepony/unicopia/block/cloud/Soakable.java index e800bbf8..94ce19e8 100644 --- a/src/main/java/com/minelittlepony/unicopia/block/cloud/Soakable.java +++ b/src/main/java/com/minelittlepony/unicopia/block/cloud/Soakable.java @@ -15,7 +15,6 @@ import net.minecraft.server.world.ServerWorld; import net.minecraft.sound.SoundCategory; import net.minecraft.sound.SoundEvents; import net.minecraft.state.property.IntProperty; -import net.minecraft.state.property.Property; import net.minecraft.util.ActionResult; import net.minecraft.util.Hand; import net.minecraft.util.Util; @@ -105,15 +104,4 @@ public interface Soakable { world.setBlockState(pos, soakable.getStateWithMoisture(state, newMoisture)); world.playSound(null, pos, SoundEvents.ENTITY_SALMON_FLOP, SoundCategory.BLOCKS, 1, (float)world.random.nextTriangular(0.5, 0.3F)); } - - @Nullable - @SuppressWarnings({ "rawtypes", "unchecked" }) - static BlockState copyProperties(BlockState from, @Nullable BlockState to) { - if (to != null) { - for (Property property : from.getProperties()) { - to = to.withIfExists(property, from.get(property)); - } - } - return to; - } } diff --git a/src/main/java/com/minelittlepony/unicopia/block/cloud/SoggyCloudBlock.java b/src/main/java/com/minelittlepony/unicopia/block/cloud/SoggyCloudBlock.java index e508b96a..5f769024 100644 --- a/src/main/java/com/minelittlepony/unicopia/block/cloud/SoggyCloudBlock.java +++ b/src/main/java/com/minelittlepony/unicopia/block/cloud/SoggyCloudBlock.java @@ -4,6 +4,8 @@ import java.util.function.Supplier; import org.jetbrains.annotations.Nullable; +import com.minelittlepony.unicopia.block.state.StateUtil; + import net.minecraft.block.Block; import net.minecraft.block.BlockState; import net.minecraft.entity.player.PlayerEntity; @@ -43,9 +45,9 @@ public class SoggyCloudBlock extends CloudBlock implements Soakable { @Override public BlockState getStateWithMoisture(BlockState state, int moisture) { if (moisture <= 0) { - return Soakable.copyProperties(state, dryBlock.get().getDefaultState()); + return StateUtil.copyState(state, dryBlock.get().getDefaultState()); } - return Soakable.copyProperties(state, getDefaultState()).with(MOISTURE, moisture); + return StateUtil.copyState(state, getDefaultState()).with(MOISTURE, moisture); } @Override diff --git a/src/main/java/com/minelittlepony/unicopia/block/cloud/SoggyCloudSlabBlock.java b/src/main/java/com/minelittlepony/unicopia/block/cloud/SoggyCloudSlabBlock.java index d074b2cb..7595c2b1 100644 --- a/src/main/java/com/minelittlepony/unicopia/block/cloud/SoggyCloudSlabBlock.java +++ b/src/main/java/com/minelittlepony/unicopia/block/cloud/SoggyCloudSlabBlock.java @@ -4,6 +4,8 @@ import java.util.function.Supplier; import org.jetbrains.annotations.Nullable; +import com.minelittlepony.unicopia.block.state.StateUtil; + import net.minecraft.block.Block; import net.minecraft.block.BlockState; import net.minecraft.entity.player.PlayerEntity; @@ -43,9 +45,9 @@ public class SoggyCloudSlabBlock extends CloudSlabBlock { @Override public BlockState getStateWithMoisture(BlockState state, int moisture) { if (moisture <= 0) { - return Soakable.copyProperties(state, dryBlock.get().getDefaultState()); + return StateUtil.copyState(state, dryBlock.get().getDefaultState()); } - return Soakable.copyProperties(state, getDefaultState()).with(MOISTURE, moisture); + return StateUtil.copyState(state, getDefaultState()).with(MOISTURE, moisture); } @Override diff --git a/src/main/java/com/minelittlepony/unicopia/block/cloud/SoggyCloudStairsBlock.java b/src/main/java/com/minelittlepony/unicopia/block/cloud/SoggyCloudStairsBlock.java index 495c0f37..9e51e398 100644 --- a/src/main/java/com/minelittlepony/unicopia/block/cloud/SoggyCloudStairsBlock.java +++ b/src/main/java/com/minelittlepony/unicopia/block/cloud/SoggyCloudStairsBlock.java @@ -4,6 +4,8 @@ import java.util.function.Supplier; import org.jetbrains.annotations.Nullable; +import com.minelittlepony.unicopia.block.state.StateUtil; + import net.minecraft.block.Block; import net.minecraft.block.BlockState; import net.minecraft.item.ItemStack; @@ -36,8 +38,8 @@ public class SoggyCloudStairsBlock extends CloudStairsBlock implements Soakable @Override public BlockState getStateWithMoisture(BlockState state, int moisture) { if (moisture <= 0) { - return Soakable.copyProperties(state, dryBlock.get().getDefaultState()); + return StateUtil.copyState(state, dryBlock.get().getDefaultState()); } - return Soakable.copyProperties(state, getDefaultState()).with(MOISTURE, moisture); + return StateUtil.copyState(state, getDefaultState()).with(MOISTURE, moisture); } } diff --git a/src/main/java/com/minelittlepony/unicopia/block/state/StateChange.java b/src/main/java/com/minelittlepony/unicopia/block/state/StateChange.java index 72e7b9e4..972eef4f 100644 --- a/src/main/java/com/minelittlepony/unicopia/block/state/StateChange.java +++ b/src/main/java/com/minelittlepony/unicopia/block/state/StateChange.java @@ -11,7 +11,6 @@ import com.minelittlepony.unicopia.Unicopia; import net.minecraft.block.Block; import net.minecraft.block.BlockState; -import net.minecraft.state.property.Property; import net.minecraft.util.Identifier; import net.minecraft.util.JsonHelper; import net.minecraft.registry.Registries; @@ -50,7 +49,7 @@ public abstract class StateChange { return state; } return Registries.BLOCK.getOrEmpty(id).map(Block::getDefaultState) - .map(newState -> merge(newState, state)) + .map(newState -> StateUtil.copyState(state, newState)) .orElse(state); } }; @@ -101,17 +100,4 @@ public abstract class StateChange { return serializer.apply(json); }).orElseThrow(() -> new IllegalArgumentException("Invalid action " + action)); } - - private static BlockState merge(BlockState into, BlockState from) { - for (var property : from.getProperties()) { - if (into.contains(property)) { - into = copy(into, from, property); - } - } - return into; - } - - private static > BlockState copy(BlockState to, BlockState from, Property property) { - return to.with(property, from.get(property)); - } } diff --git a/src/main/java/com/minelittlepony/unicopia/block/state/StateUtil.java b/src/main/java/com/minelittlepony/unicopia/block/state/StateUtil.java new file mode 100644 index 00000000..42334368 --- /dev/null +++ b/src/main/java/com/minelittlepony/unicopia/block/state/StateUtil.java @@ -0,0 +1,19 @@ +package com.minelittlepony.unicopia.block.state; + +import org.jetbrains.annotations.Nullable; + +import net.minecraft.block.BlockState; +import net.minecraft.state.property.Property; + +public interface StateUtil { + @SuppressWarnings({ "unchecked", "rawtypes" }) + static BlockState copyState(BlockState from, @Nullable BlockState to) { + if (to == null) { + return to; + } + for (var property : from.getProperties()) { + to = to.withIfExists((Property)property, from.get(property)); + } + return to; + } +} diff --git a/src/main/resources/assets/unicopia/blockstates/hay_block.json b/src/main/resources/assets/unicopia/blockstates/hay_block.json new file mode 100644 index 00000000..1378545e --- /dev/null +++ b/src/main/resources/assets/unicopia/blockstates/hay_block.json @@ -0,0 +1,31 @@ +{ + "multipart": [ + { "apply": { "model": "unicopia:block/hay_bale_bne", "x": 90, "y": 90 }, "when": { "axis": "x", "bottom_south_west": true } }, + { "apply": { "model": "unicopia:block/hay_bale_bnw", "x": 90, "y": 90 }, "when": { "axis": "x", "bottom_north_west": true } }, + { "apply": { "model": "unicopia:block/hay_bale_bse", "x": 90, "y": 90 }, "when": { "axis": "x", "top_south_west": true } }, + { "apply": { "model": "unicopia:block/hay_bale_bsw", "x": 90, "y": 90 }, "when": { "axis": "x", "top_north_west": true } }, + { "apply": { "model": "unicopia:block/hay_bale_tne", "x": 90, "y": 90 }, "when": { "axis": "x", "bottom_south_east": true } }, + { "apply": { "model": "unicopia:block/hay_bale_tnw", "x": 90, "y": 90 }, "when": { "axis": "x", "bottom_north_east": true } }, + { "apply": { "model": "unicopia:block/hay_bale_tse", "x": 90, "y": 90 }, "when": { "axis": "x", "top_south_east": true } }, + { "apply": { "model": "unicopia:block/hay_bale_tsw", "x": 90, "y": 90 }, "when": { "axis": "x", "top_north_east": true } }, + + { "apply": { "model": "unicopia:block/hay_bale_bne" }, "when": { "axis": "y", "bottom_north_east": true } }, + { "apply": { "model": "unicopia:block/hay_bale_bnw" }, "when": { "axis": "y", "bottom_north_west": true } }, + { "apply": { "model": "unicopia:block/hay_bale_bse" }, "when": { "axis": "y", "bottom_south_east": true } }, + { "apply": { "model": "unicopia:block/hay_bale_bsw" }, "when": { "axis": "y", "bottom_south_west": true } }, + { "apply": { "model": "unicopia:block/hay_bale_tne" }, "when": { "axis": "y", "top_north_east": true } }, + { "apply": { "model": "unicopia:block/hay_bale_tnw" }, "when": { "axis": "y", "top_north_west": true } }, + { "apply": { "model": "unicopia:block/hay_bale_tse" }, "when": { "axis": "y", "top_south_east": true } }, + { "apply": { "model": "unicopia:block/hay_bale_tsw" }, "when": { "axis": "y", "top_south_west": true } }, + + + { "apply": { "model": "unicopia:block/hay_bale_bne", "x": 90 }, "when": { "axis": "z", "bottom_south_east": true } }, + { "apply": { "model": "unicopia:block/hay_bale_bnw", "x": 90 }, "when": { "axis": "z", "bottom_south_west": true } }, + { "apply": { "model": "unicopia:block/hay_bale_bse", "x": 90 }, "when": { "axis": "z", "top_south_east": true } }, + { "apply": { "model": "unicopia:block/hay_bale_bsw", "x": 90 }, "when": { "axis": "z", "top_south_west": true } }, + { "apply": { "model": "unicopia:block/hay_bale_tne", "x": 90 }, "when": { "axis": "z", "bottom_north_east": true } }, + { "apply": { "model": "unicopia:block/hay_bale_tnw", "x": 90 }, "when": { "axis": "z", "bottom_north_west": true } }, + { "apply": { "model": "unicopia:block/hay_bale_tse", "x": 90 }, "when": { "axis": "z", "top_north_east": true } }, + { "apply": { "model": "unicopia:block/hay_bale_tsw", "x": 90 }, "when": { "axis": "z", "top_north_west": true } } + ] +} diff --git a/src/main/resources/assets/unicopia/blockstates/rice_block.json b/src/main/resources/assets/unicopia/blockstates/rice_block.json new file mode 100644 index 00000000..61251408 --- /dev/null +++ b/src/main/resources/assets/unicopia/blockstates/rice_block.json @@ -0,0 +1,31 @@ +{ + "multipart": [ + { "apply": { "model": "unicopia:block/rice_bale_bne", "x": 90, "y": 90 }, "when": { "axis": "x", "bottom_south_west": true } }, + { "apply": { "model": "unicopia:block/rice_bale_bnw", "x": 90, "y": 90 }, "when": { "axis": "x", "bottom_north_west": true } }, + { "apply": { "model": "unicopia:block/rice_bale_bse", "x": 90, "y": 90 }, "when": { "axis": "x", "top_south_west": true } }, + { "apply": { "model": "unicopia:block/rice_bale_bsw", "x": 90, "y": 90 }, "when": { "axis": "x", "top_north_west": true } }, + { "apply": { "model": "unicopia:block/rice_bale_tne", "x": 90, "y": 90 }, "when": { "axis": "x", "bottom_south_east": true } }, + { "apply": { "model": "unicopia:block/rice_bale_tnw", "x": 90, "y": 90 }, "when": { "axis": "x", "bottom_north_east": true } }, + { "apply": { "model": "unicopia:block/rice_bale_tse", "x": 90, "y": 90 }, "when": { "axis": "x", "top_south_east": true } }, + { "apply": { "model": "unicopia:block/rice_bale_tsw", "x": 90, "y": 90 }, "when": { "axis": "x", "top_north_east": true } }, + + { "apply": { "model": "unicopia:block/rice_bale_bne" }, "when": { "axis": "y", "bottom_north_east": true } }, + { "apply": { "model": "unicopia:block/rice_bale_bnw" }, "when": { "axis": "y", "bottom_north_west": true } }, + { "apply": { "model": "unicopia:block/rice_bale_bse" }, "when": { "axis": "y", "bottom_south_east": true } }, + { "apply": { "model": "unicopia:block/rice_bale_bsw" }, "when": { "axis": "y", "bottom_south_west": true } }, + { "apply": { "model": "unicopia:block/rice_bale_tne" }, "when": { "axis": "y", "top_north_east": true } }, + { "apply": { "model": "unicopia:block/rice_bale_tnw" }, "when": { "axis": "y", "top_north_west": true } }, + { "apply": { "model": "unicopia:block/rice_bale_tse" }, "when": { "axis": "y", "top_south_east": true } }, + { "apply": { "model": "unicopia:block/rice_bale_tsw" }, "when": { "axis": "y", "top_south_west": true } }, + + + { "apply": { "model": "unicopia:block/rice_bale_bne", "x": 90 }, "when": { "axis": "z", "bottom_south_east": true } }, + { "apply": { "model": "unicopia:block/rice_bale_bnw", "x": 90 }, "when": { "axis": "z", "bottom_south_west": true } }, + { "apply": { "model": "unicopia:block/rice_bale_bse", "x": 90 }, "when": { "axis": "z", "top_south_east": true } }, + { "apply": { "model": "unicopia:block/rice_bale_bsw", "x": 90 }, "when": { "axis": "z", "top_south_west": true } }, + { "apply": { "model": "unicopia:block/rice_bale_tne", "x": 90 }, "when": { "axis": "z", "bottom_north_east": true } }, + { "apply": { "model": "unicopia:block/rice_bale_tnw", "x": 90 }, "when": { "axis": "z", "bottom_north_west": true } }, + { "apply": { "model": "unicopia:block/rice_bale_tse", "x": 90 }, "when": { "axis": "z", "top_north_east": true } }, + { "apply": { "model": "unicopia:block/rice_bale_tsw", "x": 90 }, "when": { "axis": "z", "top_north_west": true } } + ] +} diff --git a/src/main/resources/assets/unicopia/blockstates/straw_block.json b/src/main/resources/assets/unicopia/blockstates/straw_block.json new file mode 100644 index 00000000..4f1da006 --- /dev/null +++ b/src/main/resources/assets/unicopia/blockstates/straw_block.json @@ -0,0 +1,31 @@ +{ + "multipart": [ + { "apply": { "model": "unicopia:block/straw_bale_bne", "x": 90, "y": 90 }, "when": { "axis": "x", "bottom_south_west": true } }, + { "apply": { "model": "unicopia:block/straw_bale_bnw", "x": 90, "y": 90 }, "when": { "axis": "x", "bottom_north_west": true } }, + { "apply": { "model": "unicopia:block/straw_bale_bse", "x": 90, "y": 90 }, "when": { "axis": "x", "top_south_west": true } }, + { "apply": { "model": "unicopia:block/straw_bale_bsw", "x": 90, "y": 90 }, "when": { "axis": "x", "top_north_west": true } }, + { "apply": { "model": "unicopia:block/straw_bale_tne", "x": 90, "y": 90 }, "when": { "axis": "x", "bottom_south_east": true } }, + { "apply": { "model": "unicopia:block/straw_bale_tnw", "x": 90, "y": 90 }, "when": { "axis": "x", "bottom_north_east": true } }, + { "apply": { "model": "unicopia:block/straw_bale_tse", "x": 90, "y": 90 }, "when": { "axis": "x", "top_south_east": true } }, + { "apply": { "model": "unicopia:block/straw_bale_tsw", "x": 90, "y": 90 }, "when": { "axis": "x", "top_north_east": true } }, + + { "apply": { "model": "unicopia:block/straw_bale_bne" }, "when": { "axis": "y", "bottom_north_east": true } }, + { "apply": { "model": "unicopia:block/straw_bale_bnw" }, "when": { "axis": "y", "bottom_north_west": true } }, + { "apply": { "model": "unicopia:block/straw_bale_bse" }, "when": { "axis": "y", "bottom_south_east": true } }, + { "apply": { "model": "unicopia:block/straw_bale_bsw" }, "when": { "axis": "y", "bottom_south_west": true } }, + { "apply": { "model": "unicopia:block/straw_bale_tne" }, "when": { "axis": "y", "top_north_east": true } }, + { "apply": { "model": "unicopia:block/straw_bale_tnw" }, "when": { "axis": "y", "top_north_west": true } }, + { "apply": { "model": "unicopia:block/straw_bale_tse" }, "when": { "axis": "y", "top_south_east": true } }, + { "apply": { "model": "unicopia:block/straw_bale_tsw" }, "when": { "axis": "y", "top_south_west": true } }, + + + { "apply": { "model": "unicopia:block/straw_bale_bne", "x": 90 }, "when": { "axis": "z", "bottom_south_east": true } }, + { "apply": { "model": "unicopia:block/straw_bale_bnw", "x": 90 }, "when": { "axis": "z", "bottom_south_west": true } }, + { "apply": { "model": "unicopia:block/straw_bale_bse", "x": 90 }, "when": { "axis": "z", "top_south_east": true } }, + { "apply": { "model": "unicopia:block/straw_bale_bsw", "x": 90 }, "when": { "axis": "z", "top_south_west": true } }, + { "apply": { "model": "unicopia:block/straw_bale_tne", "x": 90 }, "when": { "axis": "z", "bottom_north_east": true } }, + { "apply": { "model": "unicopia:block/straw_bale_tnw", "x": 90 }, "when": { "axis": "z", "bottom_north_west": true } }, + { "apply": { "model": "unicopia:block/straw_bale_tse", "x": 90 }, "when": { "axis": "z", "top_north_east": true } }, + { "apply": { "model": "unicopia:block/straw_bale_tsw", "x": 90 }, "when": { "axis": "z", "top_north_west": true } } + ] +} diff --git a/src/main/resources/assets/unicopia/models/block/hay_bale_bne.json b/src/main/resources/assets/unicopia/models/block/hay_bale_bne.json new file mode 100644 index 00000000..7453b2e9 --- /dev/null +++ b/src/main/resources/assets/unicopia/models/block/hay_bale_bne.json @@ -0,0 +1,22 @@ +{ + "textures": { + "top": "block/hay_block_top", + "particle": "block/hay_block_side", + "side": "block/hay_block_side" + }, + "elements": [ + { + "name": "bottom_north_east", + "from": [8, 0, 0], + "to": [16, 8, 8], + "faces": { + "north": {"uv": [0, 8, 8, 16], "texture": "#side"}, + "east": {"uv": [8, 8, 16, 16], "texture": "#side"}, + "south": {"uv": [8, 8, 16, 16], "texture": "#top"}, + "west": {"uv": [0, 8, 8, 16], "texture": "#top"}, + "up": {"uv": [8, 0, 16, 8], "texture": "#top"}, + "down": {"uv": [8, 8, 16, 16], "texture": "#top"} + } + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/unicopia/models/block/hay_bale_bnw.json b/src/main/resources/assets/unicopia/models/block/hay_bale_bnw.json new file mode 100644 index 00000000..6cde59a7 --- /dev/null +++ b/src/main/resources/assets/unicopia/models/block/hay_bale_bnw.json @@ -0,0 +1,22 @@ +{ + "textures": { + "top": "block/hay_block_top", + "particle": "block/hay_block_side", + "side": "block/hay_block_side" + }, + "elements": [ + { + "name": "bottom_north_west", + "from": [0, 0, 0], + "to": [8, 8, 8], + "faces": { + "north": {"uv": [8, 8, 16, 16], "texture": "#side"}, + "east": {"uv": [8, 8, 16, 16], "texture": "#top"}, + "south": {"uv": [0, 8, 8, 16], "texture": "#top"}, + "west": {"uv": [0, 8, 8, 16], "texture": "#side"}, + "up": {"uv": [0, 0, 8, 8], "texture": "#top"}, + "down": {"uv": [0, 8, 8, 16], "texture": "#top"} + } + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/unicopia/models/block/hay_bale_bse.json b/src/main/resources/assets/unicopia/models/block/hay_bale_bse.json new file mode 100644 index 00000000..76ec139b --- /dev/null +++ b/src/main/resources/assets/unicopia/models/block/hay_bale_bse.json @@ -0,0 +1,22 @@ +{ + "textures": { + "top": "block/hay_block_top", + "particle": "block/hay_block_side", + "side": "block/hay_block_side" + }, + "elements": [ + { + "name": "bottom_south_east", + "from": [8, 0, 8], + "to": [16, 8, 16], + "faces": { + "north": {"uv": [0, 8, 8, 16], "texture": "#top"}, + "east": {"uv": [0, 8, 8, 16], "texture": "#side"}, + "south": {"uv": [8, 8, 16, 16], "texture": "#side"}, + "west": {"uv": [8, 8, 16, 16], "texture": "#top"}, + "up": {"uv": [8, 8, 16, 16], "texture": "#top"}, + "down": {"uv": [8, 0, 16, 8], "texture": "#top"} + } + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/unicopia/models/block/hay_bale_bsw.json b/src/main/resources/assets/unicopia/models/block/hay_bale_bsw.json new file mode 100644 index 00000000..ed4ade6d --- /dev/null +++ b/src/main/resources/assets/unicopia/models/block/hay_bale_bsw.json @@ -0,0 +1,22 @@ +{ + "textures": { + "top": "block/hay_block_top", + "particle": "block/hay_block_side", + "side": "block/hay_block_side" + }, + "elements": [ + { + "name": "bottom_south_west", + "from": [0, 0, 8], + "to": [8, 8, 16], + "faces": { + "north": {"uv": [8, 8, 16, 16], "texture": "#top"}, + "east": {"uv": [0, 8, 8, 16], "texture": "#top"}, + "south": {"uv": [0, 8, 8, 16], "texture": "#side"}, + "west": {"uv": [8, 8, 16, 16], "texture": "#side"}, + "up": {"uv": [0, 8, 8, 16], "texture": "#top"}, + "down": {"uv": [0, 0, 8, 8], "texture": "#top"} + } + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/unicopia/models/block/hay_bale_tne.json b/src/main/resources/assets/unicopia/models/block/hay_bale_tne.json new file mode 100644 index 00000000..d23896b4 --- /dev/null +++ b/src/main/resources/assets/unicopia/models/block/hay_bale_tne.json @@ -0,0 +1,22 @@ +{ + "textures": { + "top": "block/hay_block_top", + "particle": "block/hay_block_side", + "side": "block/hay_block_side" + }, + "elements": [ + { + "name": "top_north_east", + "from": [8, 8, 0], + "to": [16, 16, 8], + "faces": { + "north": {"uv": [0, 0, 8, 8], "texture": "#side"}, + "east": {"uv": [8, 0, 16, 8], "texture": "#side"}, + "south": {"uv": [8, 0, 16, 8], "texture": "#top"}, + "west": {"uv": [0, 0, 8, 8], "texture": "#top"}, + "up": {"uv": [8, 0, 16, 8], "texture": "#top"}, + "down": {"uv": [8, 8, 16, 16], "texture": "#top"} + } + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/unicopia/models/block/hay_bale_tnw.json b/src/main/resources/assets/unicopia/models/block/hay_bale_tnw.json new file mode 100644 index 00000000..b465617c --- /dev/null +++ b/src/main/resources/assets/unicopia/models/block/hay_bale_tnw.json @@ -0,0 +1,22 @@ +{ + "textures": { + "top": "block/hay_block_top", + "particle": "block/hay_block_side", + "side": "block/hay_block_side" + }, + "elements": [ + { + "name": "top_north_west", + "from": [0, 8, 0], + "to": [8, 16, 8], + "faces": { + "north": {"uv": [8, 0, 16, 8], "texture": "#side"}, + "east": {"uv": [8, 0, 16, 8], "texture": "#top"}, + "south": {"uv": [0, 0, 8, 8], "texture": "#top"}, + "west": {"uv": [0, 0, 8, 8], "texture": "#side"}, + "up": {"uv": [0, 0, 8, 8], "texture": "#top"}, + "down": {"uv": [0, 8, 8, 16], "texture": "#top"} + } + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/unicopia/models/block/hay_bale_tse.json b/src/main/resources/assets/unicopia/models/block/hay_bale_tse.json new file mode 100644 index 00000000..64d34fa6 --- /dev/null +++ b/src/main/resources/assets/unicopia/models/block/hay_bale_tse.json @@ -0,0 +1,22 @@ +{ + "textures": { + "top": "block/hay_block_top", + "particle": "block/hay_block_side", + "side": "block/hay_block_side" + }, + "elements": [ + { + "name": "top_south_east", + "from": [8, 8, 8], + "to": [16, 16, 16], + "faces": { + "north": {"uv": [0, 0, 8, 8], "texture": "#top"}, + "east": {"uv": [0, 0, 8, 8], "texture": "#side"}, + "south": {"uv": [8, 0, 16, 8], "texture": "#side"}, + "west": {"uv": [8, 0, 16, 8], "texture": "#top"}, + "up": {"uv": [8, 8, 16, 16], "texture": "#top"}, + "down": {"uv": [8, 0, 16, 8], "texture": "#top"} + } + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/unicopia/models/block/hay_bale_tsw.json b/src/main/resources/assets/unicopia/models/block/hay_bale_tsw.json new file mode 100644 index 00000000..01f205b0 --- /dev/null +++ b/src/main/resources/assets/unicopia/models/block/hay_bale_tsw.json @@ -0,0 +1,22 @@ +{ + "textures": { + "top": "block/hay_block_top", + "particle": "block/hay_block_side", + "side": "block/hay_block_side" + }, + "elements": [ + { + "name": "top_south_west", + "from": [0, 8, 8], + "to": [8, 16, 16], + "faces": { + "north": {"uv": [8, 0, 16, 8], "texture": "#top"}, + "east": {"uv": [0, 0, 8, 8], "texture": "#top"}, + "south": {"uv": [0, 0, 8, 8], "texture": "#side"}, + "west": {"uv": [8, 0, 16, 8], "texture": "#side"}, + "up": {"uv": [0, 8, 8, 16], "texture": "#top"}, + "down": {"uv": [0, 0, 8, 8], "texture": "#top"} + } + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/unicopia/models/block/rice_bale_bne.json b/src/main/resources/assets/unicopia/models/block/rice_bale_bne.json new file mode 100644 index 00000000..3c280742 --- /dev/null +++ b/src/main/resources/assets/unicopia/models/block/rice_bale_bne.json @@ -0,0 +1,8 @@ +{ + "parent": "unicopia:block/hay_bale_bne", + "textures": { + "top": "farmersdelight:block/rice_bale_top", + "particle": "farmersdelight:block/rice_bale_side", + "side": "farmersdelight:block/rice_bale_side" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/unicopia/models/block/rice_bale_bnw.json b/src/main/resources/assets/unicopia/models/block/rice_bale_bnw.json new file mode 100644 index 00000000..9b3d6ce0 --- /dev/null +++ b/src/main/resources/assets/unicopia/models/block/rice_bale_bnw.json @@ -0,0 +1,8 @@ +{ + "parent": "unicopia:block/hay_bale_bnw", + "textures": { + "top": "farmersdelight:block/rice_bale_top", + "particle": "farmersdelight:block/rice_bale_side", + "side": "farmersdelight:block/rice_bale_side" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/unicopia/models/block/rice_bale_bse.json b/src/main/resources/assets/unicopia/models/block/rice_bale_bse.json new file mode 100644 index 00000000..6fd0b774 --- /dev/null +++ b/src/main/resources/assets/unicopia/models/block/rice_bale_bse.json @@ -0,0 +1,8 @@ +{ + "parent": "unicopia:block/hay_bale_bse", + "textures": { + "top": "farmersdelight:block/rice_bale_top", + "particle": "farmersdelight:block/rice_bale_side", + "side": "farmersdelight:block/rice_bale_side" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/unicopia/models/block/rice_bale_bsw.json b/src/main/resources/assets/unicopia/models/block/rice_bale_bsw.json new file mode 100644 index 00000000..c2ec227a --- /dev/null +++ b/src/main/resources/assets/unicopia/models/block/rice_bale_bsw.json @@ -0,0 +1,8 @@ +{ + "parent": "unicopia:block/hay_bale_bsw", + "textures": { + "top": "farmersdelight:block/rice_bale_top", + "particle": "farmersdelight:block/rice_bale_side", + "side": "farmersdelight:block/rice_bale_side" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/unicopia/models/block/rice_bale_tne.json b/src/main/resources/assets/unicopia/models/block/rice_bale_tne.json new file mode 100644 index 00000000..81eb613c --- /dev/null +++ b/src/main/resources/assets/unicopia/models/block/rice_bale_tne.json @@ -0,0 +1,8 @@ +{ + "parent": "unicopia:block/hay_bale_tne", + "textures": { + "top": "farmersdelight:block/rice_bale_top", + "particle": "farmersdelight:block/rice_bale_side", + "side": "farmersdelight:block/rice_bale_side" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/unicopia/models/block/rice_bale_tnw.json b/src/main/resources/assets/unicopia/models/block/rice_bale_tnw.json new file mode 100644 index 00000000..c4bef47d --- /dev/null +++ b/src/main/resources/assets/unicopia/models/block/rice_bale_tnw.json @@ -0,0 +1,8 @@ +{ + "parent": "unicopia:block/hay_bale_tnw", + "textures": { + "top": "farmersdelight:block/rice_bale_top", + "particle": "farmersdelight:block/rice_bale_side", + "side": "farmersdelight:block/rice_bale_side" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/unicopia/models/block/rice_bale_tse.json b/src/main/resources/assets/unicopia/models/block/rice_bale_tse.json new file mode 100644 index 00000000..f58ce7d1 --- /dev/null +++ b/src/main/resources/assets/unicopia/models/block/rice_bale_tse.json @@ -0,0 +1,8 @@ +{ + "parent": "unicopia:block/hay_bale_tse", + "textures": { + "top": "farmersdelight:block/rice_bale_top", + "particle": "farmersdelight:block/rice_bale_side", + "side": "farmersdelight:block/rice_bale_side" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/unicopia/models/block/rice_bale_tsw.json b/src/main/resources/assets/unicopia/models/block/rice_bale_tsw.json new file mode 100644 index 00000000..9608f77e --- /dev/null +++ b/src/main/resources/assets/unicopia/models/block/rice_bale_tsw.json @@ -0,0 +1,8 @@ +{ + "parent": "unicopia:block/hay_bale_tsw", + "textures": { + "top": "farmersdelight:block/rice_bale_top", + "particle": "farmersdelight:block/rice_bale_side", + "side": "farmersdelight:block/rice_bale_side" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/unicopia/models/block/straw_bale_bne.json b/src/main/resources/assets/unicopia/models/block/straw_bale_bne.json new file mode 100644 index 00000000..fef62f35 --- /dev/null +++ b/src/main/resources/assets/unicopia/models/block/straw_bale_bne.json @@ -0,0 +1,8 @@ +{ + "parent": "unicopia:block/hay_bale_bne", + "textures": { + "top": "farmersdelight:block/straw_bale_end", + "particle": "farmersdelight:block/straw_bale_side", + "side": "farmersdelight:block/straw_bale_side" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/unicopia/models/block/straw_bale_bnw.json b/src/main/resources/assets/unicopia/models/block/straw_bale_bnw.json new file mode 100644 index 00000000..a5b3162b --- /dev/null +++ b/src/main/resources/assets/unicopia/models/block/straw_bale_bnw.json @@ -0,0 +1,8 @@ +{ + "parent": "unicopia:block/hay_bale_bnw", + "textures": { + "top": "farmersdelight:block/straw_bale_end", + "particle": "farmersdelight:block/straw_bale_side", + "side": "farmersdelight:block/straw_bale_side" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/unicopia/models/block/straw_bale_bse.json b/src/main/resources/assets/unicopia/models/block/straw_bale_bse.json new file mode 100644 index 00000000..95d23675 --- /dev/null +++ b/src/main/resources/assets/unicopia/models/block/straw_bale_bse.json @@ -0,0 +1,8 @@ +{ + "parent": "unicopia:block/hay_bale_bse", + "textures": { + "top": "farmersdelight:block/straw_bale_end", + "particle": "farmersdelight:block/straw_bale_side", + "side": "farmersdelight:block/straw_bale_side" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/unicopia/models/block/straw_bale_bsw.json b/src/main/resources/assets/unicopia/models/block/straw_bale_bsw.json new file mode 100644 index 00000000..3a5ef025 --- /dev/null +++ b/src/main/resources/assets/unicopia/models/block/straw_bale_bsw.json @@ -0,0 +1,8 @@ +{ + "parent": "unicopia:block/hay_bale_bsw", + "textures": { + "top": "farmersdelight:block/straw_bale_end", + "particle": "farmersdelight:block/straw_bale_side", + "side": "farmersdelight:block/straw_bale_side" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/unicopia/models/block/straw_bale_tne.json b/src/main/resources/assets/unicopia/models/block/straw_bale_tne.json new file mode 100644 index 00000000..f8cc37a5 --- /dev/null +++ b/src/main/resources/assets/unicopia/models/block/straw_bale_tne.json @@ -0,0 +1,8 @@ +{ + "parent": "unicopia:block/hay_bale_tne", + "textures": { + "top": "farmersdelight:block/straw_bale_end", + "particle": "farmersdelight:block/straw_bale_side", + "side": "farmersdelight:block/straw_bale_side" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/unicopia/models/block/straw_bale_tnw.json b/src/main/resources/assets/unicopia/models/block/straw_bale_tnw.json new file mode 100644 index 00000000..1b06dba9 --- /dev/null +++ b/src/main/resources/assets/unicopia/models/block/straw_bale_tnw.json @@ -0,0 +1,8 @@ +{ + "parent": "unicopia:block/hay_bale_tnw", + "textures": { + "top": "farmersdelight:block/straw_bale_end", + "particle": "farmersdelight:block/straw_bale_side", + "side": "farmersdelight:block/straw_bale_side" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/unicopia/models/block/straw_bale_tse.json b/src/main/resources/assets/unicopia/models/block/straw_bale_tse.json new file mode 100644 index 00000000..44d1f681 --- /dev/null +++ b/src/main/resources/assets/unicopia/models/block/straw_bale_tse.json @@ -0,0 +1,8 @@ +{ + "parent": "unicopia:block/hay_bale_tse", + "textures": { + "top": "farmersdelight:block/straw_bale_end", + "particle": "farmersdelight:block/straw_bale_side", + "side": "farmersdelight:block/straw_bale_side" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/unicopia/models/block/straw_bale_tsw.json b/src/main/resources/assets/unicopia/models/block/straw_bale_tsw.json new file mode 100644 index 00000000..0c74b850 --- /dev/null +++ b/src/main/resources/assets/unicopia/models/block/straw_bale_tsw.json @@ -0,0 +1,8 @@ +{ + "parent": "unicopia:block/hay_bale_tsw", + "textures": { + "top": "farmersdelight:block/straw_bale_end", + "particle": "farmersdelight:block/straw_bale_side", + "side": "farmersdelight:block/straw_bale_side" + } +} \ No newline at end of file diff --git a/src/main/resources/data/c/tags/items/foraging/edibles_filling.json b/src/main/resources/data/c/tags/items/foraging/edibles_filling.json index c183c3fb..bc799386 100644 --- a/src/main/resources/data/c/tags/items/foraging/edibles_filling.json +++ b/src/main/resources/data/c/tags/items/foraging/edibles_filling.json @@ -1,6 +1,8 @@ { "replace": false, "values": [ - { "id": "farmersdelight:horse_feed", "required": false } + { "id": "farmersdelight:horse_feed", "required": false }, + { "id": "farmersdelight:rice_bale", "required": false }, + { "id": "farmersdelight:straw_bale", "required": false } ] } diff --git a/src/main/resources/data/minecraft/tags/blocks/mineable/hoe.json b/src/main/resources/data/minecraft/tags/blocks/mineable/hoe.json index ced25022..c6d84218 100644 --- a/src/main/resources/data/minecraft/tags/blocks/mineable/hoe.json +++ b/src/main/resources/data/minecraft/tags/blocks/mineable/hoe.json @@ -8,6 +8,9 @@ "unicopia:sweet_apple_leaves", "unicopia:sour_apple_leaves", "unicopia:golden_oak_leaves", - "unicopia:mango_leaves" + "unicopia:mango_leaves", + "unicopia:hay_block", + { "id": "unicopia:rice_block", "required": false }, + { "id": "unicopia:straw_block", "required": false } ] } diff --git a/src/main/resources/data/unicopia/loot_tables/blocks/hay_block.json b/src/main/resources/data/unicopia/loot_tables/blocks/hay_block.json new file mode 100644 index 00000000..cce83e89 --- /dev/null +++ b/src/main/resources/data/unicopia/loot_tables/blocks/hay_block.json @@ -0,0 +1,245 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "bonus_rolls": 0.0, + "conditions": [ + { + "block": "unicopia:gold_root", + "condition": "minecraft:block_state_property", + "properties": { + "top_north_east": "true" + } + } + ], + "entries": [ + { + "type": "minecraft:item", + "functions": [ + { + "enchantment": "minecraft:fortune", + "formula": "minecraft:binomial_with_bonus_count", + "function": "minecraft:apply_bonus", + "parameters": { + "extra": 3, + "probability": 0.5714286 + } + } + ], + "name": "minecraft:wheat" + } + ], + "rolls": 1.0 + }, + { + "bonus_rolls": 0.0, + "conditions": [ + { + "block": "unicopia:gold_root", + "condition": "minecraft:block_state_property", + "properties": { + "top_north_west": "true" + } + } + ], + "entries": [ + { + "type": "minecraft:item", + "functions": [ + { + "enchantment": "minecraft:fortune", + "formula": "minecraft:binomial_with_bonus_count", + "function": "minecraft:apply_bonus", + "parameters": { + "extra": 3, + "probability": 0.5714286 + } + } + ], + "name": "minecraft:wheat" + } + ], + "rolls": 1.0 + }, + { + "bonus_rolls": 0.0, + "conditions": [ + { + "block": "unicopia:gold_root", + "condition": "minecraft:block_state_property", + "properties": { + "top_south_east": "true" + } + } + ], + "entries": [ + { + "type": "minecraft:item", + "functions": [ + { + "enchantment": "minecraft:fortune", + "formula": "minecraft:binomial_with_bonus_count", + "function": "minecraft:apply_bonus", + "parameters": { + "extra": 3, + "probability": 0.5714286 + } + } + ], + "name": "minecraft:wheat" + } + ], + "rolls": 1.0 + }, + { + "bonus_rolls": 0.0, + "conditions": [ + { + "block": "unicopia:gold_root", + "condition": "minecraft:block_state_property", + "properties": { + "top_south_west": "true" + } + } + ], + "entries": [ + { + "type": "minecraft:item", + "functions": [ + { + "enchantment": "minecraft:fortune", + "formula": "minecraft:binomial_with_bonus_count", + "function": "minecraft:apply_bonus", + "parameters": { + "extra": 3, + "probability": 0.5714286 + } + } + ], + "name": "minecraft:wheat" + } + ], + "rolls": 1.0 + }, + { + "bonus_rolls": 0.0, + "conditions": [ + { + "block": "unicopia:gold_root", + "condition": "minecraft:block_state_property", + "properties": { + "bottom_north_east": "true" + } + } + ], + "entries": [ + { + "type": "minecraft:item", + "functions": [ + { + "enchantment": "minecraft:fortune", + "formula": "minecraft:binomial_with_bonus_count", + "function": "minecraft:apply_bonus", + "parameters": { + "extra": 3, + "probability": 0.5714286 + } + } + ], + "name": "minecraft:wheat" + } + ], + "rolls": 1.0 + }, + { + "bonus_rolls": 0.0, + "conditions": [ + { + "block": "unicopia:gold_root", + "condition": "minecraft:block_state_property", + "properties": { + "bottom_north_west": "true" + } + } + ], + "entries": [ + { + "type": "minecraft:item", + "functions": [ + { + "enchantment": "minecraft:fortune", + "formula": "minecraft:binomial_with_bonus_count", + "function": "minecraft:apply_bonus", + "parameters": { + "extra": 3, + "probability": 0.5714286 + } + } + ], + "name": "minecraft:wheat" + } + ], + "rolls": 1.0 + }, + { + "bonus_rolls": 0.0, + "conditions": [ + { + "block": "unicopia:gold_root", + "condition": "minecraft:block_state_property", + "properties": { + "bottom_south_east": "true" + } + } + ], + "entries": [ + { + "type": "minecraft:item", + "functions": [ + { + "enchantment": "minecraft:fortune", + "formula": "minecraft:binomial_with_bonus_count", + "function": "minecraft:apply_bonus", + "parameters": { + "extra": 3, + "probability": 0.5714286 + } + } + ], + "name": "minecraft:wheat" + } + ], + "rolls": 1.0 + }, + { + "bonus_rolls": 0.0, + "conditions": [ + { + "block": "unicopia:gold_root", + "condition": "minecraft:block_state_property", + "properties": { + "bottom_south_west": "true" + } + } + ], + "entries": [ + { + "type": "minecraft:item", + "functions": [ + { + "enchantment": "minecraft:fortune", + "formula": "minecraft:binomial_with_bonus_count", + "function": "minecraft:apply_bonus", + "parameters": { + "extra": 3, + "probability": 0.5714286 + } + } + ], + "name": "minecraft:wheat" + } + ], + "rolls": 1.0 + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/unicopia/tags/items/food_types/forage_edible_filling.json b/src/main/resources/data/unicopia/tags/items/food_types/forage_edible_filling.json index ce1ec0f6..5bf8d28d 100644 --- a/src/main/resources/data/unicopia/tags/items/food_types/forage_edible_filling.json +++ b/src/main/resources/data/unicopia/tags/items/food_types/forage_edible_filling.json @@ -3,7 +3,6 @@ "values": [ "minecraft:hay_block", "#minecraft:leaves", - "#c:foraging/edibles_filling", - { "id": "farmersdelight:rice_bale", "required": false } + "#c:foraging/edibles_filling" ] }