Skip to content

Commit

Permalink
Worldgen & crop fixes (#10609)
Browse files Browse the repository at this point in the history
* Improve structures

loottables etc

* don't spawn error
  • Loading branch information
Raycoms authored Jan 20, 2025
1 parent 13d7447 commit e5f06a0
Show file tree
Hide file tree
Showing 21 changed files with 15 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/main/java/com/minecolonies/core/items/ItemCrop.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
import com.minecolonies.api.util.MessageUtils;
import com.minecolonies.api.util.constant.TranslationConstants;
import com.minecolonies.core.blocks.MinecoloniesCropBlock;
import com.minecolonies.core.blocks.MinecoloniesFarmland;
import net.minecraft.ChatFormatting;
import net.minecraft.core.BlockPos;
import net.minecraft.core.Holder;
import net.minecraft.network.chat.Component;
import net.minecraft.tags.TagKey;
Expand All @@ -16,6 +18,7 @@
import net.minecraft.world.item.context.BlockPlaceContext;
import net.minecraft.world.level.Level;
import net.minecraft.world.level.biome.Biome;
import net.minecraft.world.level.block.FarmBlock;
import net.minecraft.world.level.block.state.BlockState;
import net.minecraft.world.phys.shapes.CollisionContext;
import org.jetbrains.annotations.NotNull;
Expand Down Expand Up @@ -52,7 +55,9 @@ protected boolean canPlace(BlockPlaceContext ctx, @NotNull BlockState state)
Player player = ctx.getPlayer();
if (!player.isCreative())
{
if (ctx.getLevel().isClientSide)
final BlockPos clickedPos = ctx.getClickedPos().below();
final BlockState worldState = ctx.getLevel().getBlockState(clickedPos);
if (ctx.getLevel().isClientSide && (worldState.getBlock() instanceof MinecoloniesFarmland || worldState.getBlock() instanceof FarmBlock))
{
MessageUtils.format(Component.translatable("com.minecolonies.core.crop.cantplant")).sendTo(player);
}
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,15 @@
"projection": "rigid",
"element_type": "minecraft:single_pool_element"
}
},
{
"weight": 1,
"element": {
"location": "minecolonies:camps/big_amazon_pyramid",
"processors": "minecolonies:placeholder_replacement",
"projection": "rigid",
"element_type": "minecraft:single_pool_element"
}
}
]
}

0 comments on commit e5f06a0

Please sign in to comment.