Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Several fixes for bottles and mod compilationn errors #10126

Merged
merged 3 commits into from
Aug 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ isFMLLibrary=false

extendDefaultSourceSetConfiguration=true
mainExcludedResources=assets/minecolonies/lang/manual_en_us.json;assets/minecolonies/lang/default.json;assets/minecolonies/lang/quests.json
usesResourceDataExpansionFromProjectKeys=true

usesMergableTranslations=true
translationMergeSources[0]=src/main/resources/assets/minecolonies/lang/manual_en_us.json
Expand Down
12 changes: 6 additions & 6 deletions src/main/java/com/minecolonies/core/items/ItemLargeBottle.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
import net.minecraft.world.entity.LivingEntity;
import net.minecraft.world.entity.animal.Cow;
import net.minecraft.world.entity.player.Player;
import net.minecraft.world.item.*;
import net.minecraft.world.item.Item;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.level.ClipContext;
import net.minecraft.world.level.Level;
import net.minecraft.world.phys.BlockHitResult;
Expand All @@ -39,11 +40,11 @@ public ItemLargeBottle(@NotNull final Properties builder)
@Override
public InteractionResult interactLivingEntity(@NotNull final ItemStack stack, @NotNull final Player player, @NotNull final LivingEntity entity, @NotNull final InteractionHand hand)
{
if (entity instanceof Cow && !entity.isBaby()) {
if (entity instanceof Cow && !entity.isBaby())
{
player.playSound(SoundEvents.COW_MILK, 1.0F, 1.0F);
InventoryUtils.addItemStackToItemHandler(new InvWrapper(player.getInventory()), ModItems.large_milk_bottle.getDefaultInstance());
stack.shrink(1);
final ItemStack newStack = ModItems.large_milk_bottle.getDefaultInstance();
InventoryUtils.addItemStackToItemHandler(new InvWrapper(player.getInventory()), newStack);
return InteractionResult.SUCCESS;
}
return super.interactLivingEntity(stack, player, entity, hand);
Expand All @@ -68,9 +69,8 @@ public InteractionResultHolder<ItemStack> use(@NotNull final Level level, final
if (level.getFluidState(blockpos).is(FluidTags.WATER))
{
level.playSound(player, player.getX(), player.getY(), player.getZ(), SoundEvents.BOTTLE_FILL, SoundSource.NEUTRAL, 1.0F, 1.0F);
InventoryUtils.addItemStackToItemHandler(new InvWrapper(player.getInventory()), ModItems.large_water_bottle.getDefaultInstance());
itemstack.shrink(1);
final ItemStack newStack = ModItems.large_water_bottle.getDefaultInstance();
InventoryUtils.addItemStackToItemHandler(new InvWrapper(player.getInventory()), newStack);
return InteractionResultHolder.success(itemstack);
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/main/resources/META-INF/mods.toml
Original file line number Diff line number Diff line change
Expand Up @@ -80,12 +80,12 @@ MineColonies is a colony simulator within Minecraft! There are numerous types of
[[dependencies.minecolonies]]
modId="journeymap"
mandatory=false
versionRange="[${project.jmapVersion},)"
versionRange="[${jmapVersion},)"
ordering="NONE"
side="BOTH"
[[dependencies.minecolonies]]
modId="dynamictrees"
mandatory=false
versionRange="[${project.dynamicTreesVersion},)"
versionRange="[${dynamicTreesVersion},)"
ordering="NONE"
side="BOTH"