diff --git a/src/main/java/com/megatrex4/ukrainian_dlight/UkrainianDelight.java b/src/main/java/com/megatrex4/ukrainian_dlight/UkrainianDelight.java index 1d340c8..b5791aa 100644 --- a/src/main/java/com/megatrex4/ukrainian_dlight/UkrainianDelight.java +++ b/src/main/java/com/megatrex4/ukrainian_dlight/UkrainianDelight.java @@ -9,6 +9,11 @@ import net.fabricmc.fabric.api.blockrenderlayer.v1.BlockRenderLayerMap; import net.minecraft.client.render.RenderLayer; +import net.minecraft.entity.damage.DamageType; +import net.minecraft.registry.Registry; +import net.minecraft.registry.RegistryKey; +import net.minecraft.registry.RegistryKeys; +import net.minecraft.util.Identifier; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -16,9 +21,12 @@ public class UkrainianDelight implements ModInitializer { public static final String MOD_ID = "ukrainian_delight"; public static final Logger LOGGER = LoggerFactory.getLogger(MOD_ID); + public static final RegistryKey GLASS_DAMAGE = RegistryKey.of(RegistryKeys.DAMAGE_TYPE, new Identifier("ukrainian_delight", "glass_damage")); @Override public void onInitialize() { + RegistryKey GLASS_DAMAGE; + FoodBlocks.registerFoodBlocks(); ModBlock.registerModBlocks(); ModItems.registerModItems(); @@ -27,7 +35,7 @@ public void onInitialize() { BlockRenderLayerMap.INSTANCE.putBlock(FoodBlocks.JAR, RenderLayer.getCutout()); BlockRenderLayerMap.INSTANCE.putBlock(FoodBlocks.APPLE_JAM, RenderLayer.getCutout()); - BlockRenderLayerMap.INSTANCE.putBlock(FoodBlocks.CANNED_TOMATOES, RenderLayer.getCutout()); + BlockRenderLayerMap.INSTANCE.putBlock(FoodBlocks.JARRED_TOMATOES, RenderLayer.getCutout()); LOGGER.info("Hello Fabric world it's " + MOD_ID + "!"); diff --git a/src/main/java/com/megatrex4/ukrainian_dlight/block/FoodBlocks.java b/src/main/java/com/megatrex4/ukrainian_dlight/block/FoodBlocks.java index 71655ab..29d56b3 100644 --- a/src/main/java/com/megatrex4/ukrainian_dlight/block/FoodBlocks.java +++ b/src/main/java/com/megatrex4/ukrainian_dlight/block/FoodBlocks.java @@ -1,8 +1,8 @@ package com.megatrex4.ukrainian_dlight.block; import com.megatrex4.ukrainian_dlight.UkrainianDelight; -import com.megatrex4.ukrainian_dlight.item.FoodBlockItem; -import com.megatrex4.ukrainian_dlight.item.ModFoodComponents; +import com.megatrex4.ukrainian_dlight.item.FoodBlockComponents; +import com.megatrex4.ukrainian_dlight.item.FoodBlockItem; // Import the FoodBlockItem class import net.minecraft.block.Block; import net.minecraft.item.BlockItem; import net.minecraft.item.FoodComponent; @@ -13,11 +13,10 @@ public class FoodBlocks { - // New Jar Blocks public static final Block JAR = registerBlock("jar", new JarBlock(), null); - public static final Block APPLE_JAM = registerBlock("apple_jam", new JarBlock(), ModFoodComponents.APPLE_JAM); - public static final Block CANNED_TOMATOES = registerBlock("canned_tomatoes", new JarBlock(), ModFoodComponents.CANNED_TOMATOES); + public static final Block APPLE_JAM = registerBlock("apple_jam", new JarBlock(), FoodBlockComponents.APPLE_JAM); + public static final Block JARRED_TOMATOES = registerBlock("jarred_tomatoes", new JarBlock(), FoodBlockComponents.JARRED_TOMATOES); private static Block registerBlock(String name, Block block, FoodComponent foodComponent){ registerBlockItem(name, block, foodComponent); diff --git a/src/main/java/com/megatrex4/ukrainian_dlight/block/JarBlock.java b/src/main/java/com/megatrex4/ukrainian_dlight/block/JarBlock.java index 55d797c..6ebd8c5 100644 --- a/src/main/java/com/megatrex4/ukrainian_dlight/block/JarBlock.java +++ b/src/main/java/com/megatrex4/ukrainian_dlight/block/JarBlock.java @@ -5,17 +5,28 @@ import net.minecraft.block.BlockState; import net.minecraft.block.Blocks; import net.minecraft.block.ShapeContext; +import net.minecraft.entity.Entity; +import net.minecraft.entity.damage.DamageSource; +import net.minecraft.entity.damage.DamageType; import net.minecraft.entity.player.PlayerEntity; import net.minecraft.item.ItemPlacementContext; import net.minecraft.item.ItemStack; +import net.minecraft.particle.BlockStateParticleEffect; +import net.minecraft.particle.ParticleTypes; +import net.minecraft.registry.RegistryKey; +import net.minecraft.registry.RegistryKeys; import net.minecraft.sound.BlockSoundGroup; import net.minecraft.sound.SoundCategory; import net.minecraft.sound.SoundEvents; import net.minecraft.state.StateManager; +import net.minecraft.state.property.DirectionProperty; import net.minecraft.state.property.IntProperty; import net.minecraft.util.ActionResult; import net.minecraft.util.Hand; +import net.minecraft.util.Identifier; +import net.minecraft.util.hit.BlockHitResult; import net.minecraft.util.math.BlockPos; +import net.minecraft.util.math.Direction; import net.minecraft.util.shape.VoxelShape; import net.minecraft.world.BlockView; import net.minecraft.world.World; @@ -23,11 +34,16 @@ import java.util.HashMap; import java.util.Map; +import static com.megatrex4.ukrainian_dlight.UkrainianDelight.GLASS_DAMAGE; + public class JarBlock extends Block { - public static final IntProperty JARS = IntProperty.of("jars", 1, 4); // Adjusted range to 1-4 for handling all jars + public static final IntProperty JARS = IntProperty.of("jars", 1, 4); + public static final DirectionProperty FACING = DirectionProperty.of("facing", Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST); private static final Map SHAPES = new HashMap<>(); private static final ThreadLocal isRemovingJar = ThreadLocal.withInitial(() -> false); + + static { SHAPES.put(1, Block.createCuboidShape(6, 0, 6, 10, 8, 10)); SHAPES.put(2, Block.createCuboidShape(1, 0, 3, 14, 8, 12)); @@ -37,12 +53,12 @@ public class JarBlock extends Block { public JarBlock() { super(FabricBlockSettings.copyOf(Blocks.GLASS).strength(0.2F).nonOpaque().sounds(BlockSoundGroup.GLASS)); - this.setDefaultState(this.stateManager.getDefaultState().with(JARS, 1)); // Start with 1 jar + this.setDefaultState(this.stateManager.getDefaultState().with(JARS, 1).with(FACING, Direction.NORTH)); // Start with 1 jar facing north } @Override protected void appendProperties(StateManager.Builder builder) { - builder.add(JARS); + builder.add(JARS, FACING); } @Override @@ -52,12 +68,12 @@ public VoxelShape getOutlineShape(BlockState state, BlockView view, BlockPos pos @Override public BlockState getPlacementState(ItemPlacementContext ctx) { - // Check if the player is sneaking (crouching) - return ctx.getPlayer().isSneaking() ? this.getDefaultState().with(JARS, 1) : null; + Direction facing = ctx.getHorizontalPlayerFacing().getOpposite(); + return ctx.getPlayer().isSneaking() ? this.getDefaultState().with(JARS, 1).with(FACING, facing) : null; // Set the facing direction based on player placement } @Override - public ActionResult onUse(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, net.minecraft.util.hit.BlockHitResult hit) { + public ActionResult onUse(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockHitResult hit) { int currentJars = state.get(JARS); ItemStack heldItem = player.getStackInHand(hand); @@ -104,4 +120,39 @@ private void dropJarItem(World world, BlockPos pos, int count) { Block.dropStack(world, pos, jarItemStack); } } + + @Override + public void onLandedUpon(World world, BlockState state, BlockPos pos, Entity entity, float fallDistance) { + this.tryBreakJar(world, state, pos, entity, 0.3); // 30% chance + super.onLandedUpon(world, state, pos, entity, fallDistance); + + } + + private void tryBreakJar(World world, BlockState state, BlockPos pos, Entity entity, double breakChance) { + if (this.breaksJar(world, entity)) { + if (!world.isClient && world.random.nextDouble() < breakChance) { + this.breakJar(world, pos, state); + entity.damage(world.getDamageSources().create(GLASS_DAMAGE), 2.0F); + } + } + } + + + private void breakJar(World world, BlockPos pos, BlockState state) { + world.playSound(null, pos, SoundEvents.BLOCK_GLASS_BREAK, SoundCategory.BLOCKS, 0.7F, 0.9F + world.random.nextFloat() * 0.2F); + int currentJars = state.get(JARS); + if (currentJars <= 1) { + isRemovingJar.set(true); // Set flag to avoid dropping items + world.breakBlock(pos, false); + isRemovingJar.set(false); // Reset flag after breaking + } else { + world.setBlockState(pos, state.with(JARS, currentJars - 1), 2); + world.syncWorldEvent(2001, pos, Block.getRawIdFromState(state)); + world.addParticle(new BlockStateParticleEffect(ParticleTypes.BLOCK, Blocks.GLASS.getDefaultState()), pos.getX() + 0.5, pos.getY() + 1.0, pos.getZ() + 0.5, 0.0, 0.0, 0.0); // Glass break particles + } + } + + private boolean breaksJar(World world, Entity entity) { + return entity instanceof PlayerEntity; + } } diff --git a/src/main/java/com/megatrex4/ukrainian_dlight/item/FoodBlockComponents.java b/src/main/java/com/megatrex4/ukrainian_dlight/item/FoodBlockComponents.java new file mode 100644 index 0000000..95062f0 --- /dev/null +++ b/src/main/java/com/megatrex4/ukrainian_dlight/item/FoodBlockComponents.java @@ -0,0 +1,12 @@ +package com.megatrex4.ukrainian_dlight.item; + +import net.minecraft.entity.effect.StatusEffectInstance; +import net.minecraft.entity.effect.StatusEffects; +import net.minecraft.item.FoodComponent; + +public class FoodBlockComponents { + public static final FoodComponent APPLE_JAM = new FoodComponent.Builder().hunger(4).saturationModifier(0.3f).build(); + public static final FoodComponent JARRED_TOMATOES = new FoodComponent.Builder().hunger(6).saturationModifier(0.6f) + .statusEffect(new StatusEffectInstance(StatusEffects.REGENERATION, 3*20, 3), 1.0f).build(); + +} diff --git a/src/main/java/com/megatrex4/ukrainian_dlight/item/FoodBlockItem.java b/src/main/java/com/megatrex4/ukrainian_dlight/item/FoodBlockItem.java index f169bbd..3aa2021 100644 --- a/src/main/java/com/megatrex4/ukrainian_dlight/item/FoodBlockItem.java +++ b/src/main/java/com/megatrex4/ukrainian_dlight/item/FoodBlockItem.java @@ -1,12 +1,55 @@ package com.megatrex4.ukrainian_dlight.item; +import com.megatrex4.ukrainian_dlight.util.StatusEffectUtil; +import com.mojang.datafixers.util.Pair; +import net.minecraft.block.Block; +import net.minecraft.client.item.TooltipContext; +import net.minecraft.entity.effect.StatusEffectInstance; import net.minecraft.item.BlockItem; import net.minecraft.item.FoodComponent; import net.minecraft.item.Item; -import net.minecraft.block.Block; +import net.minecraft.item.ItemStack; +import net.minecraft.text.Text; +import net.minecraft.util.Formatting; +import net.minecraft.world.World; + +import java.time.Duration; +import java.util.List; public class FoodBlockItem extends BlockItem { + private final FoodComponent foodComponent; + public FoodBlockItem(Block block, FoodComponent foodComponent) { super(block, new Item.Settings().food(foodComponent)); + this.foodComponent = foodComponent; } + + @Override + public void appendTooltip(ItemStack stack, World world, List tooltip, TooltipContext context) { + super.appendTooltip(stack, world, tooltip, context); + + // Add food component tooltip + if (foodComponent != null) { + // Check for status effects and add them to the tooltip + if (!foodComponent.getStatusEffects().isEmpty()) { + for (Pair effect : foodComponent.getStatusEffects()) { + StatusEffectInstance instance = effect.getFirst(); + String effectName = instance.getEffectType().getName().getString(); + int duration = effect.getFirst().getDuration() / 20; + int amplifier = effect.getFirst().getAmplifier() + 1; + String amplifierString = StatusEffectUtil.formatAmplifier(amplifier); + String durationString = formatDuration(duration); + tooltip.add(Text.translatable(effectName).append(Text.of(amplifierString)).append(Text.of(" (" + durationString + ") ")).formatted(Formatting.BLUE)); + } + } + } + } + + private static String formatDuration(int duration) { + int minutes = duration / 60; + int seconds = duration % 60; + + return String.format("%d:%02d", minutes, seconds); + } + } diff --git a/src/main/java/com/megatrex4/ukrainian_dlight/item/ModFoodComponents.java b/src/main/java/com/megatrex4/ukrainian_dlight/item/ModFoodComponents.java index 86f9adc..7937931 100644 --- a/src/main/java/com/megatrex4/ukrainian_dlight/item/ModFoodComponents.java +++ b/src/main/java/com/megatrex4/ukrainian_dlight/item/ModFoodComponents.java @@ -11,9 +11,6 @@ public class ModFoodComponents { public static final StatusEffect COMFORT = EffectsRegistry.COMFORT.get(); public static final StatusEffect NOURISHMENT = EffectsRegistry.NOURISHMENT.get(); - public static final FoodComponent APPLE_JAM = new FoodComponent.Builder().hunger(4).saturationModifier(0.3f).build(); - public static final FoodComponent CANNED_TOMATOES = new FoodComponent.Builder().hunger(6).saturationModifier(0.6f).build(); - // MEALS public static final FoodComponent VARENYK = new FoodComponent.Builder() .hunger(6) diff --git a/src/main/java/com/megatrex4/ukrainian_dlight/item/ModItemGroups.java b/src/main/java/com/megatrex4/ukrainian_dlight/item/ModItemGroups.java index 5850578..d193f48 100644 --- a/src/main/java/com/megatrex4/ukrainian_dlight/item/ModItemGroups.java +++ b/src/main/java/com/megatrex4/ukrainian_dlight/item/ModItemGroups.java @@ -32,7 +32,7 @@ public class ModItemGroups { .entries((displayContext, entries) -> { entries.add(FoodBlocks.JAR); entries.add(FoodBlocks.APPLE_JAM); - entries.add(FoodBlocks.CANNED_TOMATOES); + entries.add(FoodBlocks.JARRED_TOMATOES); entries.add(ModBlock.SALT_BLOCK); entries.add(ModItems.SALT); diff --git a/src/main/java/com/megatrex4/ukrainian_dlight/item/ToolTipHelper.java b/src/main/java/com/megatrex4/ukrainian_dlight/item/ToolTipHelper.java index 55935aa..2f40709 100644 --- a/src/main/java/com/megatrex4/ukrainian_dlight/item/ToolTipHelper.java +++ b/src/main/java/com/megatrex4/ukrainian_dlight/item/ToolTipHelper.java @@ -28,29 +28,21 @@ public ToolTipHelper(Settings settings) { public void appendTooltip(ItemStack stack, @Nullable World world, List tooltip, TooltipContext context) { super.appendTooltip(stack, world, tooltip, context); - FoodComponent foodComponent = this.getFoodComponent(); - - if (foodComponent != null && !foodComponent.getStatusEffects().isEmpty()) { - addFoodEffectTooltip(stack, tooltip, foodComponent.getStatusEffects()); - } - } - - public static void addFoodEffectTooltip(ItemStack itemStack, List tooltip, List> effects) { - if (effects.isEmpty()) { - tooltip.add(Text.translatable("tooltip.ukrainian_delight.no_effects").formatted(Formatting.GRAY)); - } else { - for (Pair pair : effects) { - StatusEffectInstance effect = pair.getFirst(); - String name = effect.getEffectType().getTranslationKey(); - int duration = effect.getDuration() / 20; // Convert ticks to seconds - int amplifier = effect.getAmplifier() + 1; - String amplifierString = StatusEffectUtil.formatAmplifier(amplifier); - String durationString = formatDuration(duration); - - Text tooltipText = Text.translatable(name).formatted(Formatting.BLUE).append(Text.of(amplifierString)) - .append(Text.of(" (" + durationString + ") ")); - - tooltip.add(tooltipText); + FoodComponent foodComponent = stack.getItem().getFoodComponent(); + + // Add food component tooltip + if (foodComponent != null) { + // Check for status effects and add them to the tooltip + if (!foodComponent.getStatusEffects().isEmpty()) { + for (Pair effect : foodComponent.getStatusEffects()) { + StatusEffectInstance instance = effect.getFirst(); + String effectName = instance.getEffectType().getTranslationKey(); + int duration = instance.getDuration() / 20; + int amplifier = instance.getAmplifier() + 1; + String amplifierString = StatusEffectUtil.formatAmplifier(amplifier); + String durationString = formatDuration(duration); + tooltip.add(Text.translatable(effectName).append(Text.of(amplifierString)).append(Text.of(" (" + durationString + ") ")).formatted(Formatting.BLUE)); + } } } } diff --git a/src/main/resources/assets/ukrainian_delight/blockstates/apple_jam.json b/src/main/resources/assets/ukrainian_delight/blockstates/apple_jam.json index 4a2280b..571cfe0 100644 --- a/src/main/resources/assets/ukrainian_delight/blockstates/apple_jam.json +++ b/src/main/resources/assets/ukrainian_delight/blockstates/apple_jam.json @@ -1,8 +1,28 @@ { "variants": { - "jars=1": { "model": "ukrainian_delight:block/jars/one_jar_apple_jam" }, - "jars=2": { "model": "ukrainian_delight:block/jars/two_jar_apple_jam" }, - "jars=3": { "model": "ukrainian_delight:block/jars/three_jar_apple_jam" }, - "jars=4": { "model": "ukrainian_delight:block/jars/four_jar_apple_jam" } + "jars=1": [ + { "model": "ukrainian_delight:block/jars/one_jar_apple_jam" }, + { "model": "ukrainian_delight:block/jars/one_jar_apple_jam", "y": 90 }, + { "model": "ukrainian_delight:block/jars/one_jar_apple_jam", "y": 180 }, + { "model": "ukrainian_delight:block/jars/one_jar_apple_jam", "y": 270 } + ], + "jars=2": [ + { "model": "ukrainian_delight:block/jars/two_jar_apple_jam" }, + { "model": "ukrainian_delight:block/jars/two_jar_apple_jam", "y": 90 }, + { "model": "ukrainian_delight:block/jars/two_jar_apple_jam", "y": 180 }, + { "model": "ukrainian_delight:block/jars/two_jar_apple_jam", "y": 270 } + ], + "jars=3": [ + { "model": "ukrainian_delight:block/jars/three_jar_apple_jam" }, + { "model": "ukrainian_delight:block/jars/three_jar_apple_jam", "y": 90 }, + { "model": "ukrainian_delight:block/jars/three_jar_apple_jam", "y": 180 }, + { "model": "ukrainian_delight:block/jars/three_jar_apple_jam", "y": 270 } + ], + "jars=4": [ + { "model": "ukrainian_delight:block/jars/four_jar_apple_jam" }, + { "model": "ukrainian_delight:block/jars/four_jar_apple_jam", "y": 90 }, + { "model": "ukrainian_delight:block/jars/four_jar_apple_jam", "y": 180 }, + { "model": "ukrainian_delight:block/jars/four_jar_apple_jam", "y": 270 } + ] } } diff --git a/src/main/resources/assets/ukrainian_delight/blockstates/canned_tomatoes.json b/src/main/resources/assets/ukrainian_delight/blockstates/canned_tomatoes.json deleted file mode 100644 index b552396..0000000 --- a/src/main/resources/assets/ukrainian_delight/blockstates/canned_tomatoes.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "variants": { - "jars=1": { "model": "ukrainian_delight:block/jars/one_jar_canned_tomatoes" }, - "jars=2": { "model": "ukrainian_delight:block/jars/two_jar_canned_tomatoes" }, - "jars=3": { "model": "ukrainian_delight:block/jars/three_jar_canned_tomatoes" }, - "jars=4": { "model": "ukrainian_delight:block/jars/four_jar_canned_tomatoes" } - } -} diff --git a/src/main/resources/assets/ukrainian_delight/blockstates/jar.json b/src/main/resources/assets/ukrainian_delight/blockstates/jar.json index 502e5f4..98a54f8 100644 --- a/src/main/resources/assets/ukrainian_delight/blockstates/jar.json +++ b/src/main/resources/assets/ukrainian_delight/blockstates/jar.json @@ -1,8 +1,28 @@ { "variants": { - "jars=1": { "model": "ukrainian_delight:block/jars/one_jar" }, - "jars=2": { "model": "ukrainian_delight:block/jars/two_jar" }, - "jars=3": { "model": "ukrainian_delight:block/jars/three_jar" }, - "jars=4": { "model": "ukrainian_delight:block/jars/four_jar" } + "jars=1": [ + { "model": "ukrainian_delight:block/jars/one_jar", "particles": "minecraft:block/glass" }, + { "model": "ukrainian_delight:block/jars/one_jar", "y": 90, "particles": "minecraft:block/glass" }, + { "model": "ukrainian_delight:block/jars/one_jar", "y": 180, "particles": "minecraft:block/glass" }, + { "model": "ukrainian_delight:block/jars/one_jar", "y": 270, "particles": "minecraft:block/glass" } + ], + "jars=2": [ + { "model": "ukrainian_delight:block/jars/two_jar", "particles": "minecraft:block/glass" }, + { "model": "ukrainian_delight:block/jars/two_jar", "y": 90, "particles": "minecraft:block/glass" }, + { "model": "ukrainian_delight:block/jars/two_jar", "y": 180, "particles": "minecraft:block/glass" }, + { "model": "ukrainian_delight:block/jars/two_jar", "y": 270, "particles": "minecraft:block/glass" } + ], + "jars=3": [ + { "model": "ukrainian_delight:block/jars/three_jar", "particles": "minecraft:block/glass" }, + { "model": "ukrainian_delight:block/jars/three_jar", "y": 90, "particles": "minecraft:block/glass" }, + { "model": "ukrainian_delight:block/jars/three_jar", "y": 180, "particles": "minecraft:block/glass" }, + { "model": "ukrainian_delight:block/jars/three_jar", "y": 270, "particles": "minecraft:block/glass" } + ], + "jars=4": [ + { "model": "ukrainian_delight:block/jars/four_jar", "particles": "minecraft:block/glass" }, + { "model": "ukrainian_delight:block/jars/four_jar", "y": 90, "particles": "minecraft:block/glass" }, + { "model": "ukrainian_delight:block/jars/four_jar", "y": 180, "particles": "minecraft:block/glass" }, + { "model": "ukrainian_delight:block/jars/four_jar", "y": 270, "particles": "minecraft:block/glass" } + ] } } diff --git a/src/main/resources/assets/ukrainian_delight/blockstates/jarred_tomatoes.json b/src/main/resources/assets/ukrainian_delight/blockstates/jarred_tomatoes.json new file mode 100644 index 0000000..461d773 --- /dev/null +++ b/src/main/resources/assets/ukrainian_delight/blockstates/jarred_tomatoes.json @@ -0,0 +1,28 @@ +{ + "variants": { + "jars=1": [ + { "model": "ukrainian_delight:block/jars/one_jar_jarred_tomatoes" }, + { "model": "ukrainian_delight:block/jars/one_jar_jarred_tomatoes", "y": 90 }, + { "model": "ukrainian_delight:block/jars/one_jar_jarred_tomatoes", "y": 180 }, + { "model": "ukrainian_delight:block/jars/one_jar_jarred_tomatoes", "y": 270 } + ], + "jars=2": [ + { "model": "ukrainian_delight:block/jars/two_jar_jarred_tomatoes" }, + { "model": "ukrainian_delight:block/jars/two_jar_jarred_tomatoes", "y": 90 }, + { "model": "ukrainian_delight:block/jars/two_jar_jarred_tomatoes", "y": 180 }, + { "model": "ukrainian_delight:block/jars/two_jar_jarred_tomatoes", "y": 270 } + ], + "jars=3": [ + { "model": "ukrainian_delight:block/jars/three_jar_jarred_tomatoes" }, + { "model": "ukrainian_delight:block/jars/three_jar_jarred_tomatoes", "y": 90 }, + { "model": "ukrainian_delight:block/jars/three_jar_jarred_tomatoes", "y": 180 }, + { "model": "ukrainian_delight:block/jars/three_jar_jarred_tomatoes", "y": 270 } + ], + "jars=4": [ + { "model": "ukrainian_delight:block/jars/four_jar_jarred_tomatoes" }, + { "model": "ukrainian_delight:block/jars/four_jar_jarred_tomatoes", "y": 90 }, + { "model": "ukrainian_delight:block/jars/four_jar_jarred_tomatoes", "y": 180 }, + { "model": "ukrainian_delight:block/jars/four_jar_jarred_tomatoes", "y": 270 } + ] + } +} diff --git a/src/main/resources/assets/ukrainian_delight/lang/en_us.json b/src/main/resources/assets/ukrainian_delight/lang/en_us.json index adca2d6..8057db8 100644 --- a/src/main/resources/assets/ukrainian_delight/lang/en_us.json +++ b/src/main/resources/assets/ukrainian_delight/lang/en_us.json @@ -1,10 +1,10 @@ { - "_comment": "groups", + "_comment1": "groups", "itemgroup.meals_ukrainian_delight": "Ukrainian Delight", "itemgroup.ingredients_ukrainian_delight": "Ukrainian Delight Ingredients", "rei.ukrainian_delight": "Ukrainian Delight", - "_comment": "ingredients", + "_comment2": "ingredients", "item.ukrainian_delight.horseradish": "Horseradish", "item.ukrainian_delight.salt": "Salt", "item.ukrainian_delight.cucumber": "Cucumber", @@ -13,21 +13,21 @@ "item.ukrainian_delight.apple_slice": "Apple Slice", "item.ukrainian_delight.dried_apple_slice": "Dried Apple Slice", - "_comment": "meals", + "_comment3": "meals", "item.ukrainian_delight.varenyk": "Varenyk", "item.ukrainian_delight.borscht": "Borscht", "item.ukrainian_delight.lean_borscht": "Lean Borscht", "item.ukrainian_delight.homemade_sausage": "Homemade Sausage", - "_comment": "jars", + "_comment4": "jars", "block.ukrainian_delight.jar": "Jar", + "block.ukrainian_delight.apple_jam": "Apple Jam", + "block.ukrainian_delight.jarred_tomatoes": "Jarred Tomatoes", - - - "_comment": "blocks", + "_comment5": "blocks", "block.ukrainian_delight.salt_block": "Salt Block", - "_comment": "advancements", + "_comment6": "advancements", "ukrainian_delight.advancement.root": "Ukrainian Delight", "ukrainian_delight.advancement.root.desc": "The power of Ukrainian delicacies!", @@ -36,7 +36,8 @@ "ukrainian_delight.advancement.lean_borscht": "The same, but with mushrooms!", "ukrainian_delight.advancement.lean_borscht.desc": "Cook lean borscht", - "_comment": "tooltip", + "_comment7": "misc", + "death.attack.glass_damage": "%s was not careful with glass", "tooltip.ukrainian_delight.no_effects": "No effects", "amplifier.none": "", diff --git a/src/main/resources/assets/ukrainian_delight/lang/uk_ua.json b/src/main/resources/assets/ukrainian_delight/lang/uk_ua.json index cf7f1e3..c360198 100644 --- a/src/main/resources/assets/ukrainian_delight/lang/uk_ua.json +++ b/src/main/resources/assets/ukrainian_delight/lang/uk_ua.json @@ -19,10 +19,15 @@ "item.ukrainian_delight.lean_borscht": "Пісний борщ", "item.ukrainian_delight.homemade_sausage": "Домашня ковбаса", - "_comment4": "blocks", + "_comment4": "jars", + "block.ukrainian_delight.jar": "Банка", + "block.ukrainian_delight.apple_jam": "Яблучне варення", + "block.ukrainian_delight.jarred_tomatoes": "Консервовані помідори", + + "_comment5": "blocks", "block.ukrainian_delight.salt_block": "Солевий блок", - "_comment5": "advancements", + "_comment6": "advancements", "ukrainian_delight.advancement.root": "Українська насолода", "ukrainian_delight.advancement.root.desc": "Сила українських смаколиків!", @@ -31,19 +36,7 @@ "ukrainian_delight.advancement.lean_borscht": "Те саме тільки з грибами", "ukrainian_delight.advancement.lean_borscht.desc": "Зваріть пісний борщ", - "_comment6": "tooltip", - "tooltip.ukrainian_delight.no_effects": "Немає ефектів", - - "amplifier.none": "", - "amplifier.1": "", - "amplifier.2": " II", - "amplifier.3": " III", - "amplifier.4": " IV", - "amplifier.5": " V", - "amplifier.6": " VI", - "amplifier.7": " VII", - "amplifier.8": " VIII", - "amplifier.9": " IX", - "amplifier.10": " X" + "_comment7": "misc", + "death.attack.glass_damage": "%s був не обережний зі склом" } \ No newline at end of file diff --git a/src/main/resources/assets/ukrainian_delight/models/block/jars/four_jar_canned_tomatoes.json b/src/main/resources/assets/ukrainian_delight/models/block/jars/four_jar_jarred_tomatoes.json similarity index 99% rename from src/main/resources/assets/ukrainian_delight/models/block/jars/four_jar_canned_tomatoes.json rename to src/main/resources/assets/ukrainian_delight/models/block/jars/four_jar_jarred_tomatoes.json index 00d1c78..3eea00d 100644 --- a/src/main/resources/assets/ukrainian_delight/models/block/jars/four_jar_canned_tomatoes.json +++ b/src/main/resources/assets/ukrainian_delight/models/block/jars/four_jar_jarred_tomatoes.json @@ -1,7 +1,7 @@ { "credit": "Made with Blockbench", "textures": { - "inside": "ukrainian_delight:block/jars/canned_tomatoes", + "inside": "ukrainian_delight:block/jars/jarred_tomatoes", "outside": "ukrainian_delight:block/jars/jar", "particle": "ukrainian_delight:block/jars/jar" }, diff --git a/src/main/resources/assets/ukrainian_delight/models/block/jars/one_jar_canned_tomatoes.json b/src/main/resources/assets/ukrainian_delight/models/block/jars/one_jar_jarred_tomatoes.json similarity index 97% rename from src/main/resources/assets/ukrainian_delight/models/block/jars/one_jar_canned_tomatoes.json rename to src/main/resources/assets/ukrainian_delight/models/block/jars/one_jar_jarred_tomatoes.json index bfebe25..3d2e2ca 100644 --- a/src/main/resources/assets/ukrainian_delight/models/block/jars/one_jar_canned_tomatoes.json +++ b/src/main/resources/assets/ukrainian_delight/models/block/jars/one_jar_jarred_tomatoes.json @@ -1,7 +1,7 @@ { "credit": "Made with Blockbench", "textures": { - "inside": "ukrainian_delight:block/jars/canned_tomatoes", + "inside": "ukrainian_delight:block/jars/jarred_tomatoes", "outside": "ukrainian_delight:block/jars/jar", "particle": "ukrainian_delight:block/jars/jar" }, diff --git a/src/main/resources/assets/ukrainian_delight/models/block/jars/three_jar_canned_tomatoes.json b/src/main/resources/assets/ukrainian_delight/models/block/jars/three_jar_jarred_tomatoes.json similarity index 98% rename from src/main/resources/assets/ukrainian_delight/models/block/jars/three_jar_canned_tomatoes.json rename to src/main/resources/assets/ukrainian_delight/models/block/jars/three_jar_jarred_tomatoes.json index 8043880..bf15faa 100644 --- a/src/main/resources/assets/ukrainian_delight/models/block/jars/three_jar_canned_tomatoes.json +++ b/src/main/resources/assets/ukrainian_delight/models/block/jars/three_jar_jarred_tomatoes.json @@ -1,7 +1,7 @@ { "credit": "Made with Blockbench", "textures": { - "inside": "ukrainian_delight:block/jars/canned_tomatoes", + "inside": "ukrainian_delight:block/jars/jarred_tomatoes", "outside": "ukrainian_delight:block/jars/jar", "particle": "ukrainian_delight:block/jars/jar" }, diff --git a/src/main/resources/assets/ukrainian_delight/models/block/jars/two_jar_canned_tomatoes.json b/src/main/resources/assets/ukrainian_delight/models/block/jars/two_jar_jarred_tomatoes.json similarity index 98% rename from src/main/resources/assets/ukrainian_delight/models/block/jars/two_jar_canned_tomatoes.json rename to src/main/resources/assets/ukrainian_delight/models/block/jars/two_jar_jarred_tomatoes.json index 6970451..8eb446e 100644 --- a/src/main/resources/assets/ukrainian_delight/models/block/jars/two_jar_canned_tomatoes.json +++ b/src/main/resources/assets/ukrainian_delight/models/block/jars/two_jar_jarred_tomatoes.json @@ -1,7 +1,7 @@ { "credit": "Made with Blockbench", "textures": { - "inside": "ukrainian_delight:block/jars/canned_tomatoes", + "inside": "ukrainian_delight:block/jars/jarred_tomatoes", "outside": "ukrainian_delight:block/jars/jar", "particle": "ukrainian_delight:block/jars/jar" }, diff --git a/src/main/resources/assets/ukrainian_delight/textures/block/jars/canned_tomatoes.png b/src/main/resources/assets/ukrainian_delight/textures/block/jars/canned_tomatoes.png deleted file mode 100644 index d3d4cbd..0000000 Binary files a/src/main/resources/assets/ukrainian_delight/textures/block/jars/canned_tomatoes.png and /dev/null differ diff --git a/src/main/resources/assets/ukrainian_delight/textures/block/jars/jar.png b/src/main/resources/assets/ukrainian_delight/textures/block/jars/jar.png index f85d46c..1cec1ab 100644 Binary files a/src/main/resources/assets/ukrainian_delight/textures/block/jars/jar.png and b/src/main/resources/assets/ukrainian_delight/textures/block/jars/jar.png differ diff --git a/src/main/resources/assets/ukrainian_delight/textures/block/jars/jarred_tomatoes.png b/src/main/resources/assets/ukrainian_delight/textures/block/jars/jarred_tomatoes.png new file mode 100644 index 0000000..8617984 Binary files /dev/null and b/src/main/resources/assets/ukrainian_delight/textures/block/jars/jarred_tomatoes.png differ diff --git a/src/main/resources/assets/ukrainian_delight/textures/item/apple_jam.png b/src/main/resources/assets/ukrainian_delight/textures/item/apple_jam.png index e11bd8d..108baf3 100644 Binary files a/src/main/resources/assets/ukrainian_delight/textures/item/apple_jam.png and b/src/main/resources/assets/ukrainian_delight/textures/item/apple_jam.png differ diff --git a/src/main/resources/assets/ukrainian_delight/textures/item/canned_tomatoes.png b/src/main/resources/assets/ukrainian_delight/textures/item/canned_tomatoes.png deleted file mode 100644 index f5d454d..0000000 Binary files a/src/main/resources/assets/ukrainian_delight/textures/item/canned_tomatoes.png and /dev/null differ diff --git a/src/main/resources/assets/ukrainian_delight/textures/item/homemade_sausage.png b/src/main/resources/assets/ukrainian_delight/textures/item/homemade_sausage.png index 4a547c4..6b7c6c1 100644 Binary files a/src/main/resources/assets/ukrainian_delight/textures/item/homemade_sausage.png and b/src/main/resources/assets/ukrainian_delight/textures/item/homemade_sausage.png differ diff --git a/src/main/resources/assets/ukrainian_delight/textures/item/jar.png b/src/main/resources/assets/ukrainian_delight/textures/item/jar.png index 04a851d..9928be7 100644 Binary files a/src/main/resources/assets/ukrainian_delight/textures/item/jar.png and b/src/main/resources/assets/ukrainian_delight/textures/item/jar.png differ diff --git a/src/main/resources/assets/ukrainian_delight/textures/item/jarred_tomatoes.png b/src/main/resources/assets/ukrainian_delight/textures/item/jarred_tomatoes.png new file mode 100644 index 0000000..743a584 Binary files /dev/null and b/src/main/resources/assets/ukrainian_delight/textures/item/jarred_tomatoes.png differ diff --git a/src/main/resources/data/ukrainian_delight/damage_type/glass_damage.json b/src/main/resources/data/ukrainian_delight/damage_type/glass_damage.json new file mode 100644 index 0000000..fd428ad --- /dev/null +++ b/src/main/resources/data/ukrainian_delight/damage_type/glass_damage.json @@ -0,0 +1,5 @@ +{ + "exhaustion": 0.1, + "message_id": "glass_damage", + "scaling": "when_caused_by_living_non_player" +}