Skip to content

Commit

Permalink
Merge branch 'version/main' into feature/diseases_datapack
Browse files Browse the repository at this point in the history
# Conflicts:
#	src/main/java/com/minecolonies/api/compatibility/CompatibilityManager.java
#	src/main/java/com/minecolonies/api/configuration/ServerConfiguration.java
#	src/main/java/com/minecolonies/api/entity/citizen/citizenhandlers/ICitizenDiseaseHandler.java
#	src/main/java/com/minecolonies/apiimp/initializer/InteractionValidatorInitializer.java
#	src/main/java/com/minecolonies/core/colony/buildings/workerbuildings/BuildingHospital.java
#	src/main/java/com/minecolonies/core/entity/ai/minimal/EntityAISickTask.java
#	src/main/java/com/minecolonies/core/entity/ai/workers/service/EntityAIWorkHealer.java
#	src/main/java/com/minecolonies/core/entity/citizen/citizenhandlers/CitizenDiseaseHandler.java
#	src/main/java/com/minecolonies/core/event/FMLEventHandler.java
  • Loading branch information
Thodor12 committed Nov 28, 2024
2 parents 1b7a69a + 8a5def5 commit c3b8c18
Show file tree
Hide file tree
Showing 110 changed files with 1,184 additions and 983 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ mappingsVersion=1.20.1

dataGeneratorsVersion=1.19.3-0.1.54-ALPHA
blockUI_version=1.20.1-1.0.139-BETA
structurize_version=1.20.1-1.0.740-BETA
structurize_version=1.20.1-1.0.759-snapshot
domumOrnamentumVersion=1.20.1-1.0.184-BETA
multiPistonVersion=1.20-1.2.30-ALPHA

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"pools": [
{
"bonus_rolls": 0.0,
"entries": [
{
"type": "minecraft:item",
"name": "minecraft:coal_ore",
"weight": 64
},
{
"type": "minecraft:item",
"name": "minecraft:copper_ore",
"weight": 48
}
],
"rolls": 1.0
}
],
"random_sequence": "minecolonies:loot_tables/miner/lucky_ore1"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"pools": [
{
"bonus_rolls": 0.0,
"entries": [
{
"type": "minecraft:item",
"name": "minecraft:coal_ore",
"weight": 64
},
{
"type": "minecraft:item",
"name": "minecraft:copper_ore",
"weight": 48
},
{
"type": "minecraft:item",
"name": "minecraft:iron_ore",
"weight": 32
},
{
"type": "minecraft:item",
"name": "minecraft:gold_ore",
"weight": 16
}
],
"rolls": 1.0
}
],
"random_sequence": "minecolonies:loot_tables/miner/lucky_ore2"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{
"pools": [
{
"bonus_rolls": 0.0,
"entries": [
{
"type": "minecraft:item",
"name": "minecraft:coal_ore",
"weight": 64
},
{
"type": "minecraft:item",
"name": "minecraft:copper_ore",
"weight": 48
},
{
"type": "minecraft:item",
"name": "minecraft:iron_ore",
"weight": 32
},
{
"type": "minecraft:item",
"name": "minecraft:gold_ore",
"weight": 16
},
{
"type": "minecraft:item",
"name": "minecraft:redstone_ore",
"weight": 8
},
{
"type": "minecraft:item",
"name": "minecraft:lapis_ore",
"weight": 4
}
],
"rolls": 1.0
}
],
"random_sequence": "minecolonies:loot_tables/miner/lucky_ore3"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
{
"pools": [
{
"bonus_rolls": 0.0,
"entries": [
{
"type": "minecraft:item",
"name": "minecraft:coal_ore",
"weight": 64
},
{
"type": "minecraft:item",
"name": "minecraft:copper_ore",
"weight": 48
},
{
"type": "minecraft:item",
"name": "minecraft:iron_ore",
"weight": 32
},
{
"type": "minecraft:item",
"name": "minecraft:gold_ore",
"weight": 16
},
{
"type": "minecraft:item",
"name": "minecraft:redstone_ore",
"weight": 8
},
{
"type": "minecraft:item",
"name": "minecraft:lapis_ore",
"weight": 4
},
{
"type": "minecraft:item",
"name": "minecraft:diamond_ore",
"weight": 2
},
{
"type": "minecraft:item",
"name": "minecraft:emerald_ore"
}
],
"rolls": 1.0
}
],
"random_sequence": "minecolonies:loot_tables/miner/lucky_ore4"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
{
"pools": [
{
"bonus_rolls": 0.0,
"entries": [
{
"type": "minecraft:item",
"name": "minecraft:coal_ore",
"weight": 64
},
{
"type": "minecraft:item",
"name": "minecraft:copper_ore",
"weight": 48
},
{
"type": "minecraft:item",
"name": "minecraft:iron_ore",
"weight": 32
},
{
"type": "minecraft:item",
"name": "minecraft:gold_ore",
"weight": 16
},
{
"type": "minecraft:item",
"name": "minecraft:redstone_ore",
"weight": 8
},
{
"type": "minecraft:item",
"name": "minecraft:lapis_ore",
"weight": 4
},
{
"type": "minecraft:item",
"name": "minecraft:diamond_ore",
"weight": 2
},
{
"type": "minecraft:item",
"name": "minecraft:emerald_ore"
}
],
"rolls": 1.0
}
],
"random_sequence": "minecolonies:loot_tables/miner/lucky_ore5"
}
Original file line number Diff line number Diff line change
@@ -1,15 +1,7 @@
{
"values": [
{
"id": "waystones:waystone",
"required": false
},
{
"id": "waystones:sandy_waystone",
"required": false
},
{
"id": "waystones:mossy_waystone",
"id": "#waystones:waystones",
"required": false
}
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
"values": [
"#minecraft:logs",
"#minecolonies:mangrove_tree",
"minecraft:mushroom_stem"
"minecraft:mushroom_stem",
{
"id": "#productivebees:nests/wood_nests",
"required": false
}
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@
"minecolonies:yogurt_with_berries",
"minecolonies:mutton_dinner",
"minecolonies:tortillas",
"minecolonies:apple_pie",
"minecolonies:spicy_eggplant"
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"values": [
"minecraft:poisonous_potato",
"minecraft:chicken",
"minecraft:spider_eye",
"minecraft:rotten_flesh"
]
}
12 changes: 7 additions & 5 deletions src/main/java/com/minecolonies/api/colony/ICitizenData.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,7 @@
import com.minecolonies.api.colony.jobs.IJob;
import com.minecolonies.api.entity.citizen.AbstractEntityCitizen;
import com.minecolonies.api.entity.citizen.VisibleCitizenStatus;
import com.minecolonies.api.entity.citizen.citizenhandlers.ICitizenFoodHandler;
import com.minecolonies.api.entity.citizen.citizenhandlers.ICitizenHappinessHandler;
import com.minecolonies.api.entity.citizen.citizenhandlers.ICitizenMournHandler;
import com.minecolonies.api.entity.citizen.citizenhandlers.ICitizenSkillHandler;
import com.minecolonies.api.entity.citizen.citizenhandlers.*;
import com.minecolonies.api.quests.IQuestGiver;
import com.minecolonies.api.quests.IQuestParticipant;
import com.minecolonies.api.util.Tuple;
Expand All @@ -18,7 +15,10 @@
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

import java.util.*;
import java.util.List;
import java.util.Optional;
import java.util.Random;
import java.util.UUID;

public interface ICitizenData extends ICivilianData, IQuestGiver, IQuestParticipant
{
Expand Down Expand Up @@ -151,6 +151,8 @@ public interface ICitizenData extends ICivilianData, IQuestGiver, IQuestParticip
*/
ICitizenSkillHandler getCitizenSkillHandler();

ICitizenDiseaseHandler getCitizenDiseaseHandler();

/**
* Schedule restart and cleanup.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ public interface ICivilianData extends ICitizen, INBTSerializable<CompoundTag>
/**
* Tick the data to update values.
*/
void update();
void update(final int tickRate);

/**
* Trigger a possible interaction.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ default ICitizenData spawnOrCreateCitizen(final ICitizenData data, @NotNull fina
/**
* Tick the citizen data of all active citizens.
*/
boolean tickCitizenData();
boolean tickCitizenData(int tickRate);

/**
* Call this to set all the citizens in the colony to mourn or not.
Expand Down
Loading

0 comments on commit c3b8c18

Please sign in to comment.