Skip to content

Commit

Permalink
Merge branch 'version/main' into feature/rebalance-disabled-recipes
Browse files Browse the repository at this point in the history
  • Loading branch information
uecasm authored Oct 5, 2024
2 parents dc3c387 + 7066c5c commit 459f633
Show file tree
Hide file tree
Showing 105 changed files with 465 additions and 302 deletions.
6 changes: 4 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,10 @@ crowdinId=minecolonies
usesDatagen=true
usesOptifine=false
useDefaultTestSystem=false
runtimeSourceSets=api;main
librarySourceSets=api;main;datagen;
projectHasApi=false
runtimeSourceSets=main
librarySourceSets=main;datagen;
primaryJarClassifier=

extendDefaultSourceSetConfiguration=true
mainExcludedResources=assets/minecolonies/lang/manual_en_us.json;assets/minecolonies/lang/default.json;assets/minecolonies/lang/quests.json
Expand Down
9 changes: 0 additions & 9 deletions gradle/dependencies.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,26 +18,17 @@ repositories {
}

dependencies {
apiCompileOnly (fg.deobf("com.ldtteam:domum_ornamentum:${project.domumOrnamentumVersion}:universal")){
transitive = false
}
compileOnly (fg.deobf("com.ldtteam:domum_ornamentum:${project.domumOrnamentumVersion}:universal")){
transitive = false
}
runtimeOnly (fg.deobf("com.ldtteam:domum_ornamentum:${project.domumOrnamentumVersion}:universal")){
transitive = false
}

apiImplementation (fg.deobf("com.ldtteam:blockui:${project.blockUI_version}")){
transitive = false
}
implementation (fg.deobf("com.ldtteam:blockui:${project.blockUI_version}")){
transitive = false
}

apiImplementation (fg.deobf("com.ldtteam:structurize:${project.structurize_version}")){
transitive = false
}
implementation (fg.deobf("com.ldtteam:structurize:${project.structurize_version}")){
transitive = false
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,8 @@
"com.minecolonies.research.combat.captainoftheguard.name": "Captain of the Guard",
"com.minecolonies.research.combat.captaintraining.name": "Captain Training",
"com.minecolonies.research.combat.cleave.name": "Cleave",
"com.minecolonies.research.combat.coffee.name": "Coffee",
"com.minecolonies.research.combat.coffee.subtitle": "Keeps guards awake",
"com.minecolonies.research.combat.deadlyaim.name": "Deadly Aim",
"com.minecolonies.research.combat.deadlyaim.subtitle": "Just don't aim at me!",
"com.minecolonies.research.combat.diamondskin.name": "Diamond Skin",
Expand Down Expand Up @@ -228,6 +230,7 @@
"com.minecolonies.research.effects.fleeingspeedaddition.description": "Fleeing Guards Gain Swiftness %2$s",
"com.minecolonies.research.effects.gravedecaybonus.description": "Citizen Graves Take %s More Minutes to Decay",
"com.minecolonies.research.effects.growthmultiplier.description": "Child Growth Rate +%3$s%%",
"com.minecolonies.research.effects.guardcrit.description": "Guards have a chance to score critical hits",
"com.minecolonies.research.effects.happinessmultiplier.description": "Citizen Happiness +%3$s%%",
"com.minecolonies.research.effects.healingsaturationlimitaddition.description": "Healing Saturation Min %s",
"com.minecolonies.research.effects.healthaddition.description": "Citizen HP +%s",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
"branch": "minecolonies:combat",
"effects": [
{
"minecolonies:effects/sleeplessmultiplier": 1
"minecolonies:effects/guardcrit": 1
}
],
"exclusiveChildResearch": true,
"icon": "minecraft:lime_bed",
"icon": "minecraft:iron_sword",
"requirements": [
{
"building": "guardtower",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"branch": "minecolonies:combat",
"effects": [
{
"minecolonies:effects/sleeplessmultiplier": 1
}
],
"icon": "minecraft:lime_bed",
"parentResearch": "minecolonies:combat/tactictraining",
"requirements": [
{
"type": "minecolonies:item_list",
"item": {
"items": [
"minecraft:golden_carrot"
]
},
"quantity": 4
}
],
"researchLevel": 2,
"subtitle": "com.minecolonies.research.combat.coffee.subtitle"
}
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
{
"effect": true
"effect": true,
"levels": [
5.0
]
}
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
{
"effect": true
"effect": true,
"levels": [
5.0
]
}
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
{
"effect": true
"effect": true,
"levels": [
5.0
]
}
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
{
"effect": true
"effect": true,
"levels": [
5.0
]
}
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
{
"effect": true
"effect": true,
"levels": [
5.0
]
}
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
{
"effect": true
"effect": true,
"levels": [
5.0
]
}
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
{
"effect": true
"effect": true,
"levels": [
5.0
]
}
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
{
"effect": true
"effect": true,
"levels": [
5.0
]
}
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
{
"effect": true
"effect": true,
"levels": [
5.0
]
}
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
{
"effect": true
"effect": true,
"levels": [
5.0
]
}
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
{
"effect": true
"effect": true,
"levels": [
5.0
]
}
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
{
"effect": true
"effect": true,
"levels": [
5.0
]
}
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
{
"effect": true
"effect": true,
"levels": [
5.0
]
}
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
{
"effect": true
"effect": true,
"levels": [
5.0
]
}
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
{
"effect": true
"effect": true,
"levels": [
5.0
]
}
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
{
"effect": true
"effect": true,
"levels": [
5.0
]
}
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
{
"effect": true
"effect": true,
"levels": [
5.0
]
}
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
{
"effect": true
"effect": true,
"levels": [
5.0
]
}
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
{
"effect": true
"effect": true,
"levels": [
5.0
]
}
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
{
"effect": true
"effect": true,
"levels": [
5.0
]
}
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
{
"effect": true
"effect": true,
"levels": [
5.0
]
}
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
{
"effect": true
"effect": true,
"levels": [
5.0
]
}
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
{
"effect": true
"effect": true,
"levels": [
5.0
]
}
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
{
"effect": true
"effect": true,
"levels": [
5.0
]
}
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
{
"effect": true
"effect": true,
"levels": [
5.0
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"effect": true,
"levels": [
0.2,
0.3,
0.4,
0.5
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public interface IResearchEffectManager
* or zero, if no matching effect is present.
*
* @param id the id of the effect.
* @return the strength of the effect, or zero if it isn't present.
* @return the strength of the effect, 1 by default for researches effects which do not have values configured, or zero if it isn't present.
*/
double getEffectStrength(final ResourceLocation id);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@ public final class ResearchConstants
public static final ResourceLocation CRUSHING_11 = new ResourceLocation(Constants.MOD_ID, "effects/crushing11unlock");
public static final ResourceLocation ARCHER_USE_ARROWS = new ResourceLocation(Constants.MOD_ID, "effects/consumearrowsunlock");
public static final ResourceLocation KNIGHT_TAUNT = new ResourceLocation(Constants.MOD_ID, "effects/knighttauntmobsunlock");
public static final ResourceLocation GUARD_CRIT = new ResourceLocation(Constants.MOD_ID, "effects/guardcrit");
public static final ResourceLocation FIRE_RES = new ResourceLocation(Constants.MOD_ID, "effects/minerfireresunlock");
public static final ResourceLocation ARROW_PIERCE = new ResourceLocation(Constants.MOD_ID, "effects/piercingarrowsunlock");
public static final ResourceLocation PLANTATION_LARGE = new ResourceLocation(Constants.MOD_ID, "effects/plantationlarge");
Expand Down
18 changes: 17 additions & 1 deletion src/main/java/com/minecolonies/api/util/EntityUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import com.minecolonies.api.items.ModTags;
import com.minecolonies.core.entity.pathfinding.SurfaceType;
import net.minecraft.core.BlockPos;
import net.minecraft.core.Direction;
import net.minecraft.tags.BlockTags;
import net.minecraft.util.Mth;
import net.minecraft.world.entity.Entity;
Expand All @@ -25,6 +26,7 @@
import java.util.function.Predicate;
import java.util.stream.Collectors;

import static com.minecolonies.api.util.BlockPosUtil.HORIZONTAL_DIRS;
import static net.minecraft.world.entity.EntitySelector.NO_SPECTATORS;

/**
Expand Down Expand Up @@ -172,7 +174,21 @@ public static boolean solidOrLiquid(@NotNull final Level world, @NotNull final B
@Nullable
public static BlockPos getSpawnPoint(final Level world, final BlockPos nearPoint)
{
return BlockPosUtil.findAround(world, nearPoint, SCAN_RADIUS, SCAN_RADIUS, (w, p) -> checkValidSpawn(w, p, 2));
return BlockPosUtil.findAround(world, nearPoint, SCAN_RADIUS, SCAN_RADIUS, (w, p) -> {
if (checkValidSpawn(w, p, 2))
{
// Also find a valid neighbouring space, to decrease stuck chance
for (final Direction dir : HORIZONTAL_DIRS)
{
if (checkValidSpawn(w, p.relative(dir, 1), 2))
{
return true;
}
}
}

return false;
});
}


Expand Down
Loading

0 comments on commit 459f633

Please sign in to comment.