mirror of
https://github.com/PolyhedralDev/Terra.git
synced 2025-07-03 00:15:35 +00:00
Fix up merge
This commit is contained in:
parent
a58b2a5193
commit
16d8e8f29d
@ -1,4 +1,4 @@
|
||||
package com.dfsek.terra.bukkit.nms.v1_20_R2.config;
|
||||
package com.dfsek.terra.bukkit.nms.v1_21.config;
|
||||
|
||||
import com.dfsek.tectonic.api.config.template.annotations.Default;
|
||||
import com.dfsek.tectonic.api.config.template.annotations.Value;
|
@ -1,4 +1,4 @@
|
||||
package com.dfsek.terra.bukkit.nms.v1_20_R2.config;
|
||||
package com.dfsek.terra.bukkit.nms.v1_21.config;
|
||||
|
||||
import com.dfsek.tectonic.api.config.template.annotations.Default;
|
||||
import com.dfsek.tectonic.api.config.template.annotations.Value;
|
@ -1,4 +1,4 @@
|
||||
package com.dfsek.terra.bukkit.nms.v1_20_R2.config;
|
||||
package com.dfsek.terra.bukkit.nms.v1_21.config;
|
||||
|
||||
import com.dfsek.tectonic.api.config.template.annotations.Default;
|
||||
import com.dfsek.tectonic.api.config.template.annotations.Value;
|
||||
@ -6,6 +6,7 @@ import com.dfsek.tectonic.api.config.template.object.ObjectTemplate;
|
||||
import com.mojang.brigadier.StringReader;
|
||||
import com.mojang.brigadier.exceptions.CommandSyntaxException;
|
||||
import net.minecraft.commands.arguments.ParticleArgument;
|
||||
import net.minecraft.core.HolderLookup.Provider;
|
||||
import net.minecraft.core.registries.BuiltInRegistries;
|
||||
import net.minecraft.world.level.biome.AmbientParticleSettings;
|
||||
|
||||
@ -26,7 +27,8 @@ public class BiomeParticleConfigTemplate implements ObjectTemplate<AmbientPartic
|
||||
}
|
||||
|
||||
try {
|
||||
return new AmbientParticleSettings(ParticleArgument.readParticle(new StringReader(particle), BuiltInRegistries.PARTICLE_TYPE.asLookup()), probability);
|
||||
return new AmbientParticleSettings(ParticleArgument.readParticle(new StringReader(particle),
|
||||
(Provider) BuiltInRegistries.PARTICLE_TYPE.asLookup()), probability);
|
||||
} catch(CommandSyntaxException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
package com.dfsek.terra.bukkit.nms.v1_20_R2.config;
|
||||
package com.dfsek.terra.bukkit.nms.v1_21.config;
|
||||
|
||||
import com.dfsek.tectonic.api.config.template.annotations.Default;
|
||||
import com.dfsek.tectonic.api.config.template.annotations.Value;
|
@ -1,4 +1,4 @@
|
||||
package com.dfsek.terra.bukkit.nms.v1_20_R2.config;
|
||||
package com.dfsek.terra.bukkit.nms.v1_21.config;
|
||||
|
||||
import com.dfsek.tectonic.api.config.template.annotations.Default;
|
||||
import com.dfsek.tectonic.api.config.template.annotations.Value;
|
@ -1,4 +1,4 @@
|
||||
package com.dfsek.terra.bukkit.nms.v1_20_R2.config;
|
||||
package com.dfsek.terra.bukkit.nms.v1_21.config;
|
||||
|
||||
import com.dfsek.tectonic.api.config.template.annotations.Default;
|
||||
import com.dfsek.tectonic.api.config.template.annotations.Value;
|
@ -1,4 +1,4 @@
|
||||
package com.dfsek.terra.bukkit.nms.v1_20_R2.config;
|
||||
package com.dfsek.terra.bukkit.nms.v1_21.config;
|
||||
|
||||
import com.dfsek.tectonic.api.config.template.annotations.Default;
|
||||
import com.dfsek.tectonic.api.config.template.annotations.Value;
|
@ -1,4 +1,4 @@
|
||||
package com.dfsek.terra.bukkit.nms.v1_20_R2.config;
|
||||
package com.dfsek.terra.bukkit.nms.v1_21.config;
|
||||
|
||||
import com.dfsek.tectonic.api.config.template.annotations.Default;
|
||||
import com.dfsek.tectonic.api.config.template.annotations.Value;
|
@ -1,4 +1,4 @@
|
||||
package com.dfsek.terra.bukkit.nms.v1_20_R2.config;
|
||||
package com.dfsek.terra.bukkit.nms.v1_21.config;
|
||||
|
||||
import com.dfsek.tectonic.api.config.template.annotations.Default;
|
||||
import com.dfsek.tectonic.api.config.template.annotations.Value;
|
||||
@ -33,16 +33,8 @@ public class SpawnSettingsTemplate implements ObjectTemplate<MobSpawnSettings> {
|
||||
MobSpawnSettings.Builder builder = new MobSpawnSettings.Builder();
|
||||
for(SpawnTypeConfig spawn : spawns) {
|
||||
MobCategory group = spawn.getGroup();
|
||||
if (spawn.getEntries() != null) {
|
||||
for(SpawnerData entry : spawn.getEntries()) {
|
||||
builder.addSpawn(group, entry);
|
||||
}
|
||||
} else if (spawn.getEntry() != null) {
|
||||
if(!used) {
|
||||
logger.warn("The entry sub-field of spawns is deprecated. " +
|
||||
"It is recommended to use the entries sub-field instead.");
|
||||
used = true;
|
||||
}
|
||||
for(SpawnerData entry : spawn.getEntries()) {
|
||||
builder.addSpawn(group, entry);
|
||||
}
|
||||
}
|
||||
for(SpawnCostConfig cost : costs) {
|
@ -1,4 +1,4 @@
|
||||
package com.dfsek.terra.bukkit.nms.v1_20_R2.config;
|
||||
package com.dfsek.terra.bukkit.nms.v1_21.config;
|
||||
|
||||
import com.dfsek.tectonic.api.config.template.annotations.Default;
|
||||
import com.dfsek.tectonic.api.config.template.annotations.Value;
|
||||
@ -17,11 +17,6 @@ public class SpawnTypeConfig implements ObjectTemplate<SpawnTypeConfig> {
|
||||
@Default
|
||||
private List<SpawnerData> entries = null;
|
||||
|
||||
@Value("entry")
|
||||
@Default
|
||||
@Deprecated
|
||||
private SpawnerData entry = null;
|
||||
|
||||
public MobCategory getGroup() {
|
||||
return group;
|
||||
}
|
||||
@ -30,11 +25,6 @@ public class SpawnTypeConfig implements ObjectTemplate<SpawnTypeConfig> {
|
||||
return entries;
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public SpawnerData getEntry() {
|
||||
return entry;
|
||||
}
|
||||
|
||||
@Override
|
||||
public SpawnTypeConfig get() {
|
||||
return this;
|
@ -1,4 +1,4 @@
|
||||
package com.dfsek.terra.bukkit.nms.v1_20_R2.config;
|
||||
package com.dfsek.terra.bukkit.nms.v1_21.config;
|
||||
|
||||
import com.dfsek.tectonic.api.config.template.ConfigTemplate;
|
||||
import com.dfsek.tectonic.api.config.template.annotations.Default;
|
@ -1,4 +1,4 @@
|
||||
package com.dfsek.terra.bukkit.nms.v1_20_R2.config;
|
||||
package com.dfsek.terra.bukkit.nms.v1_21.config;
|
||||
|
||||
import com.dfsek.tectonic.api.config.template.annotations.Default;
|
||||
import com.dfsek.tectonic.api.config.template.annotations.Value;
|
Loading…
x
Reference in New Issue
Block a user