mirror of
https://github.com/PolyhedralDev/Terra.git
synced 2026-05-20 00:30:20 +00:00
Merge branch 'master' into dev/7.0-2
This commit is contained in:
+16
@@ -38,6 +38,10 @@ public class VanillaBiomeProperties implements ConfigTemplate, Properties {
|
||||
@Default
|
||||
private Integer foliageColor = null;
|
||||
|
||||
@Value("colors.dry-foliage")
|
||||
@Default
|
||||
private Integer dryFoliageColor = null;
|
||||
|
||||
@Value("colors.sky")
|
||||
@Default
|
||||
private Integer skyColor = null;
|
||||
@@ -82,6 +86,10 @@ public class VanillaBiomeProperties implements ConfigTemplate, Properties {
|
||||
@Default
|
||||
private MusicSound music = null;
|
||||
|
||||
@Value("sound.music-volume")
|
||||
@Default
|
||||
private Float musicVolume = null;
|
||||
|
||||
@Value("spawning")
|
||||
@Default
|
||||
private SpawnSettings spawnSettings = null;
|
||||
@@ -111,6 +119,10 @@ public class VanillaBiomeProperties implements ConfigTemplate, Properties {
|
||||
return foliageColor;
|
||||
}
|
||||
|
||||
public Integer getDryFoliageColor() {
|
||||
return dryFoliageColor;
|
||||
}
|
||||
|
||||
public Integer getSkyColor() {
|
||||
return skyColor;
|
||||
}
|
||||
@@ -155,6 +167,10 @@ public class VanillaBiomeProperties implements ConfigTemplate, Properties {
|
||||
return music;
|
||||
}
|
||||
|
||||
public Float getMusicVolume() {
|
||||
return musicVolume;
|
||||
}
|
||||
|
||||
public SpawnSettings getSpawnSettings() {
|
||||
return spawnSettings;
|
||||
}
|
||||
|
||||
+8
@@ -72,6 +72,10 @@ public class VanillaWorldProperties implements ConfigTemplate, Properties {
|
||||
@Default
|
||||
private Float ambientLight = null;
|
||||
|
||||
@Value("minecraft.cloud-height")
|
||||
@Default
|
||||
private Integer cloudHeight = null;
|
||||
|
||||
@Value("minecraft.monster-settings")
|
||||
@Default
|
||||
private MonsterSettingsConfig monsterSettings = null;
|
||||
@@ -153,6 +157,10 @@ public class VanillaWorldProperties implements ConfigTemplate, Properties {
|
||||
return ambientLight;
|
||||
}
|
||||
|
||||
public Integer getCloudHeight() {
|
||||
return cloudHeight;
|
||||
}
|
||||
|
||||
public MonsterSettingsConfig getMonsterSettings() {
|
||||
return monsterSettings;
|
||||
}
|
||||
|
||||
-28
@@ -1,28 +0,0 @@
|
||||
package com.dfsek.terra.mod.mixin.fix;
|
||||
|
||||
import net.minecraft.entity.passive.BeeEntity.MoveToFlowerGoal;
|
||||
import net.minecraft.entity.passive.BeeEntity.MoveToHiveGoal;
|
||||
import net.minecraft.util.math.random.CheckedRandom;
|
||||
import net.minecraft.util.math.random.Random;
|
||||
import net.minecraft.world.World;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.injection.At;
|
||||
import org.spongepowered.asm.mixin.injection.Redirect;
|
||||
|
||||
import com.dfsek.terra.mod.CommonPlatform;
|
||||
|
||||
|
||||
/**
|
||||
* Bees spawning uses world.random without synchronization. This causes issues when spawning bees during world generation.
|
||||
*/
|
||||
@Mixin({
|
||||
MoveToHiveGoal.class,
|
||||
MoveToFlowerGoal.class
|
||||
})
|
||||
public class BeeMoveGoalsUnsynchronizedRandomAccessFix {
|
||||
@Redirect(method = "<init>",
|
||||
at = @At(value = "FIELD", target = "Lnet/minecraft/world/World;random:Lnet/minecraft/util/math/random/Random;"))
|
||||
public Random redirectRandomAccess(World instance) {
|
||||
return new CheckedRandom(CommonPlatform.get().getServer().getTicks()); // replace with new random seeded by tick time.
|
||||
}
|
||||
}
|
||||
@@ -35,9 +35,25 @@ public class BiomeUtil {
|
||||
.skyColor(Objects.requireNonNullElse(vanillaBiomeProperties.getSkyColor(), vanilla.getSkyColor()))
|
||||
.grassColorModifier(
|
||||
Objects.requireNonNullElse(vanillaBiomeProperties.getGrassColorModifier(), vanilla.getEffects().getGrassColorModifier()))
|
||||
.grassColor(Objects.requireNonNullElse(vanillaBiomeProperties.getGrassColor(),
|
||||
vanilla.getEffects().getGrassColor().orElseGet(() -> ((BiomeInvoker) ((Object) vanilla)).invokeGetDefaultGrassColor())))
|
||||
.foliageColor(Objects.requireNonNullElse(vanillaBiomeProperties.getFoliageColor(), vanilla.getFoliageColor()));
|
||||
.musicVolume(Objects.requireNonNullElse(vanillaBiomeProperties.getMusicVolume(), vanilla.getMusicVolume()));
|
||||
|
||||
if(vanillaBiomeProperties.getGrassColor() == null) {
|
||||
vanilla.getEffects().getGrassColor().ifPresent(effects::grassColor);
|
||||
} else {
|
||||
effects.grassColor(vanillaBiomeProperties.getGrassColor());
|
||||
}
|
||||
|
||||
if(vanillaBiomeProperties.getFoliageColor() == null) {
|
||||
vanilla.getEffects().getFoliageColor().ifPresent(effects::foliageColor);
|
||||
} else {
|
||||
effects.foliageColor(vanillaBiomeProperties.getFoliageColor());
|
||||
}
|
||||
|
||||
if(vanillaBiomeProperties.getDryFoliageColor() == null) {
|
||||
vanilla.getEffects().getDryFoliageColor().ifPresent(effects::dryFoliageColor);
|
||||
} else {
|
||||
effects.dryFoliageColor(vanillaBiomeProperties.getDryFoliageColor());
|
||||
}
|
||||
|
||||
if(vanillaBiomeProperties.getParticleConfig() == null) {
|
||||
vanilla.getEffects().getParticleConfig().ifPresent(effects::particleConfig);
|
||||
|
||||
@@ -51,6 +51,7 @@ public class DimensionUtil {
|
||||
: TagKey.of(RegistryKeys.BLOCK, vanillaWorldProperties.getInfiniburn()),
|
||||
vanillaWorldProperties.getEffects() == null ? defaultDimension.effects() : vanillaWorldProperties.getEffects(),
|
||||
vanillaWorldProperties.getAmbientLight() == null ? defaultDimension.ambientLight() : vanillaWorldProperties.getAmbientLight(),
|
||||
vanillaWorldProperties.getCloudHeight() == null ? defaultDimension.cloudHeight() : vanillaWorldProperties.getCloudHeight().describeConstable(),
|
||||
monsterSettings
|
||||
);
|
||||
}
|
||||
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"replace": false,
|
||||
"values": [
|
||||
"minecraft:snowy_taiga"
|
||||
]
|
||||
}
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"replace": false,
|
||||
"values": [
|
||||
"minecraft:old_growth_pine_taiga"
|
||||
]
|
||||
}
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"replace": false,
|
||||
"values": [
|
||||
"minecraft:old_growth_spruce_taiga"
|
||||
]
|
||||
}
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"replace": false,
|
||||
"values": [
|
||||
"minecraft:taiga"
|
||||
]
|
||||
}
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"replace": false,
|
||||
"values": [
|
||||
"#minecraft:is_jungle"
|
||||
]
|
||||
}
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"replace": false,
|
||||
"values": [
|
||||
"minecraft:grove"
|
||||
]
|
||||
}
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"replace": false,
|
||||
"values": [
|
||||
"#minecraft:is_savanna"
|
||||
]
|
||||
}
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"replace": false,
|
||||
"values": [
|
||||
"#minecraft:is_badlands"
|
||||
]
|
||||
}
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"replace": false,
|
||||
"values": [
|
||||
"minecraft:forest"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"assets": {
|
||||
"angry": "minecraft:entity/wolf/wolf_ashen_angry",
|
||||
"tame": "minecraft:entity/wolf/wolf_ashen_tame",
|
||||
"wild": "minecraft:entity/wolf/wolf_ashen"
|
||||
},
|
||||
"spawn_conditions": [
|
||||
{
|
||||
"condition": {
|
||||
"type": "minecraft:biome",
|
||||
"biomes": "#c:has_wolf_variant/ashen"
|
||||
},
|
||||
"priority": 1
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"assets": {
|
||||
"angry": "minecraft:entity/wolf/wolf_black_angry",
|
||||
"tame": "minecraft:entity/wolf/wolf_black_tame",
|
||||
"wild": "minecraft:entity/wolf/wolf_black"
|
||||
},
|
||||
"spawn_conditions": [
|
||||
{
|
||||
"condition": {
|
||||
"type": "minecraft:biome",
|
||||
"biomes": "#c:has_wolf_variant/black"
|
||||
},
|
||||
"priority": 1
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"assets": {
|
||||
"angry": "minecraft:entity/wolf/wolf_chestnut_angry",
|
||||
"tame": "minecraft:entity/wolf/wolf_chestnut_tame",
|
||||
"wild": "minecraft:entity/wolf/wolf_chestnut"
|
||||
},
|
||||
"spawn_conditions": [
|
||||
{
|
||||
"condition": {
|
||||
"type": "minecraft:biome",
|
||||
"biomes": "#c:has_wolf_variant/chestnut"
|
||||
},
|
||||
"priority": 1
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"assets": {
|
||||
"angry": "minecraft:entity/wolf/wolf_angry",
|
||||
"tame": "minecraft:entity/wolf/wolf_tame",
|
||||
"wild": "minecraft:entity/wolf/wolf"
|
||||
},
|
||||
"spawn_conditions": [
|
||||
{
|
||||
"condition": {
|
||||
"type": "minecraft:biome",
|
||||
"biomes": "#c:has_wolf_variant/pale"
|
||||
},
|
||||
"priority": 1
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"assets": {
|
||||
"angry": "minecraft:entity/wolf/wolf_rusty_angry",
|
||||
"tame": "minecraft:entity/wolf/wolf_rusty_tame",
|
||||
"wild": "minecraft:entity/wolf/wolf_rusty"
|
||||
},
|
||||
"spawn_conditions": [
|
||||
{
|
||||
"condition": {
|
||||
"type": "minecraft:biome",
|
||||
"biomes": "#c:has_wolf_variant/rusty"
|
||||
},
|
||||
"priority": 1
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"assets": {
|
||||
"angry": "minecraft:entity/wolf/wolf_snowy_angry",
|
||||
"tame": "minecraft:entity/wolf/wolf_snowy_tame",
|
||||
"wild": "minecraft:entity/wolf/wolf_snowy"
|
||||
},
|
||||
"spawn_conditions": [
|
||||
{
|
||||
"condition": {
|
||||
"type": "minecraft:biome",
|
||||
"biomes": "#c:has_wolf_variant/snowy"
|
||||
},
|
||||
"priority": 1
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"assets": {
|
||||
"angry": "minecraft:entity/wolf/wolf_spotted_angry",
|
||||
"tame": "minecraft:entity/wolf/wolf_spotted_tame",
|
||||
"wild": "minecraft:entity/wolf/wolf_spotted"
|
||||
},
|
||||
"spawn_conditions": [
|
||||
{
|
||||
"condition": {
|
||||
"type": "minecraft:biome",
|
||||
"biomes": "#c:has_wolf_variant/spotted"
|
||||
},
|
||||
"priority": 1
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"assets": {
|
||||
"angry": "minecraft:entity/wolf/wolf_striped_angry",
|
||||
"tame": "minecraft:entity/wolf/wolf_striped_tame",
|
||||
"wild": "minecraft:entity/wolf/wolf_striped"
|
||||
},
|
||||
"spawn_conditions": [
|
||||
{
|
||||
"condition": {
|
||||
"type": "minecraft:biome",
|
||||
"biomes": "#c:has_wolf_variant/striped"
|
||||
},
|
||||
"priority": 1
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"assets": {
|
||||
"angry": "minecraft:entity/wolf/wolf_woods_angry",
|
||||
"tame": "minecraft:entity/wolf/wolf_woods_tame",
|
||||
"wild": "minecraft:entity/wolf/wolf_woods"
|
||||
},
|
||||
"spawn_conditions": [
|
||||
{
|
||||
"condition": {
|
||||
"type": "minecraft:biome",
|
||||
"biomes": "#c:has_wolf_variant/woods"
|
||||
},
|
||||
"priority": 1
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -9,7 +9,6 @@
|
||||
"access.StateAccessor",
|
||||
"access.StructureAccessorAccessor",
|
||||
"access.VillagerTypeAccessor",
|
||||
"fix.BeeMoveGoalsUnsynchronizedRandomAccessFix",
|
||||
"generalize.ServerWorldMixin",
|
||||
"implementations.compat.GenerationSettingsFloraFeaturesMixin",
|
||||
"implementations.terra.BiomeMixin",
|
||||
|
||||
Reference in New Issue
Block a user