Skip to content

Commit

Permalink
Merge branch 'version/main' into feature/teach-requests2
Browse files Browse the repository at this point in the history
  • Loading branch information
marchermans authored Nov 19, 2024
2 parents b0601f0 + 280f23b commit 78e7fa3
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ public class ServerConfiguration extends AbstractConfiguration
public final ForgeConfigSpec.IntValue maxTreeSize;
public final ForgeConfigSpec.BooleanValue noSupplyPlacementRestrictions;
public final ForgeConfigSpec.BooleanValue skyRaiders;
public final ForgeConfigSpec.BooleanValue convertZombieVillagerToVisitor;

/* --------------------------------------------------------------------------- *
* ------------------- ######## Research settings ######## ------------------- *
Expand Down Expand Up @@ -147,6 +148,7 @@ protected ServerConfiguration(final ForgeConfigSpec.Builder builder)
maxTreeSize = defineInteger(builder, "maxtreesize", 400, 1, 1000);
noSupplyPlacementRestrictions = defineBoolean(builder, "nosupplyplacementrestrictions", false);
skyRaiders = defineBoolean(builder, "skyraiders", false);
convertZombieVillagerToVisitor = defineBoolean(builder, "convertzombievillagertovisitor", true);

swapToCategory(builder, "research");
researchCreativeCompletion = defineBoolean(builder, "researchcreativecompletion", true);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -801,7 +801,7 @@ public static void onCropTrample(BlockEvent.FarmlandTrampleEvent event)
public static void onEntityConverted(@NotNull final LivingConversionEvent.Pre event)
{
LivingEntity entity = event.getEntity();
if (entity instanceof ZombieVillager && event.getOutcome() == EntityType.VILLAGER)
if (MineColonies.getConfig().getServer().convertZombieVillagerToVisitor.get() && entity instanceof ZombieVillager && event.getOutcome() == EntityType.VILLAGER)
{
final Level world = entity.getCommandSenderWorld();
final IColony colony = IColonyManager.getInstance().getIColony(world, entity.blockPosition());
Expand Down
2 changes: 2 additions & 0 deletions src/main/resources/assets/minecolonies/lang/manual_en_us.json
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,8 @@
"minecolonies.config.nosupplyplacementrestrictions.comment": "Disables supply camp placing restrictions, intended for skyworlds and similar",
"minecolonies.config.skyraiders": "Enable raiders to spawn in the sky",
"minecolonies.config.skyraiders.comment": "Raiders will spawn in the sky if this is enabled",
"minecolonies.config.convertzombievillagertovisitor": "Enable zombie villager convert to visitor",
"minecolonies.config.convertzombievillagertovisitor.comment": "Zombie villager when converted will be transformed into visitor if this is enabled",
"minecolonies.config.disableemptycolonies": "Disable Empty Colonies",
"minecolonies.config.disableemptycolonies.comment": "Will stop empty colonies from being generated in the world - Needs world Reload",
"minecolonies.config.averageemptycolonydistance": "Average Empty Colony Distance - Needs Complete Restart",
Expand Down

0 comments on commit 78e7fa3

Please sign in to comment.