1.16.2-pre1

This commit is contained in:
gnembon committed 2020-07-29 17:28:15 -03:00
1 parent 28857815e0
commit bab49be81e
10 files changed
+29 -22

No files matched your search

@@ -7,6 +7,7 @@ import com.mojang.serialization.Codec;
import net.minecraft.class_5434;
import net.minecraft.entity.EntityType;
import net.minecraft.world.biome.Biome;
import net.minecraft.world.biome.SpawnSettings;
import net.minecraft.world.gen.feature.BastionRemnantFeature;
import net.minecraft.world.gen.feature.StructurePoolFeatureConfig;
@@ -18,10 +19,10 @@ import java.util.List;
@Mixin(BastionRemnantFeature.class)
public abstract class BastionRemnantFeatureMixin extends class_5434
{
private static final List<Biome.SpawnEntry> spawnList = Lists.newArrayList(
new Biome.SpawnEntry(EntityType.PIGLIN_BRUTE, 5, 1, 2),
new Biome.SpawnEntry(EntityType.PIGLIN, 10, 2, 4),
new Biome.SpawnEntry(EntityType.HOGLIN, 2, 1, 2)
private static final List<SpawnSettings.SpawnEntry> spawnList = Lists.newArrayList(
new SpawnSettings.SpawnEntry(EntityType.PIGLIN_BRUTE, 5, 1, 2),
new SpawnSettings.SpawnEntry(EntityType.PIGLIN, 10, 2, 4),
new SpawnSettings.SpawnEntry(EntityType.HOGLIN, 2, 1, 2)
);
public BastionRemnantFeatureMixin(Codec<StructurePoolFeatureConfig> codec, int i, boolean bl, boolean bl2)
@@ -30,7 +31,7 @@ public abstract class BastionRemnantFeatureMixin extends class_5434
}
@Override
public List<Biome.SpawnEntry> getMonsterSpawns()
public List<SpawnSettings.SpawnEntry> getMonsterSpawns()
{
if (CarpetSettings.piglinsSpawningInBastions)
return spawnList;
@@ -7,6 +7,7 @@ import com.mojang.serialization.Codec;
import net.minecraft.entity.EntityType;
import net.minecraft.world.biome.Biome;
//import net.minecraft.world.gen.feature.AbstractTempleFeature;
import net.minecraft.world.biome.SpawnSettings;
import net.minecraft.world.gen.feature.DefaultFeatureConfig;
import net.minecraft.world.gen.feature.DesertPyramidFeature;
import net.minecraft.world.gen.feature.StructureFeature;
@@ -19,11 +20,11 @@ import java.util.List;
@Mixin(DesertPyramidFeature.class)
public abstract class DesertPyramidFeatureMixin extends StructureFeature<DefaultFeatureConfig>
{
private static final List<Biome.SpawnEntry> MONSTER_SPAWNS;
private static final List<SpawnSettings.SpawnEntry> MONSTER_SPAWNS;
static
{
MONSTER_SPAWNS = Lists.newArrayList(new Biome.SpawnEntry(EntityType.HUSK, 1, 1, 1));
MONSTER_SPAWNS = Lists.newArrayList(new SpawnSettings.SpawnEntry(EntityType.HUSK, 1, 1, 1));
}
public DesertPyramidFeatureMixin(Codec<DefaultFeatureConfig> codec)
@@ -33,7 +34,7 @@ public abstract class DesertPyramidFeatureMixin extends StructureFeature<Default
@Override
public List<Biome.SpawnEntry> getMonsterSpawns()
public List<SpawnSettings.SpawnEntry> getMonsterSpawns()
{
if (CarpetSettings.huskSpawningInTemples)
{
@@ -6,6 +6,7 @@ import com.google.common.collect.Lists;
import com.mojang.serialization.Codec;
import net.minecraft.entity.EntityType;
import net.minecraft.world.biome.Biome;
import net.minecraft.world.biome.SpawnSettings;
import net.minecraft.world.gen.feature.DefaultFeatureConfig;
import net.minecraft.world.gen.feature.EndCityFeature;
import net.minecraft.world.gen.feature.StructureFeature;
@@ -18,7 +19,7 @@ import java.util.List;
@Mixin(EndCityFeature.class)
public abstract class EndCityFeatureMixin extends StructureFeature<DefaultFeatureConfig>
{
private static final List<Biome.SpawnEntry> spawnList = Lists.newArrayList(new Biome.SpawnEntry(EntityType.SHULKER, 10, 4, 4));
private static final List<SpawnSettings.SpawnEntry> spawnList = Lists.newArrayList(new SpawnSettings.SpawnEntry(EntityType.SHULKER, 10, 4, 4));
public EndCityFeatureMixin(Codec<DefaultFeatureConfig> codec)
{
@@ -26,7 +27,7 @@ public abstract class EndCityFeatureMixin extends StructureFeature<DefaultFeatur
}
@Override
public List<Biome.SpawnEntry> getMonsterSpawns()
public List<SpawnSettings.SpawnEntry> getMonsterSpawns()
{
if (CarpetSettings.shulkerSpawningInEndCities)
return spawnList;
@@ -6,6 +6,7 @@ import net.minecraft.entity.SpawnGroup;
import net.minecraft.util.math.BlockPos;
//import net.minecraft.world.WorldAccess;
import net.minecraft.world.biome.Biome;
import net.minecraft.world.biome.SpawnSettings;
import net.minecraft.world.biome.source.BiomeSource;
import net.minecraft.world.gen.StructureAccessor;
import net.minecraft.world.gen.chunk.ChunkGenerator;
@@ -29,7 +30,7 @@ public abstract class FlatChunkGeneratorMixin extends ChunkGenerator
}
@Override
public List<Biome.SpawnEntry> getEntitySpawnList(Biome biome, StructureAccessor accessor, SpawnGroup group, BlockPos pos)
public List<SpawnSettings.SpawnEntry> getEntitySpawnList(Biome biome, StructureAccessor accessor, SpawnGroup group, BlockPos pos)
{
if (CarpetSettings.flatWorldStructureSpawning)
{
@@ -46,7 +46,7 @@ public class SpawnHelperMixin
@Shadow @Final private static SpawnGroup[] SPAWNABLE_GROUPS;
@Redirect(method = "canSpawn(Lnet/minecraft/server/world/ServerWorld;Lnet/minecraft/entity/SpawnGroup;Lnet/minecraft/world/gen/StructureAccessor;Lnet/minecraft/world/gen/chunk/ChunkGenerator;Lnet/minecraft/world/biome/Biome$SpawnEntry;Lnet/minecraft/util/math/BlockPos$Mutable;D)Z", at = @At(
@Redirect(method = "canSpawn(Lnet/minecraft/server/world/ServerWorld;Lnet/minecraft/entity/SpawnGroup;Lnet/minecraft/world/gen/StructureAccessor;Lnet/minecraft/world/gen/chunk/ChunkGenerator;Lnet/minecraft/world/biome/SpawnSettings$SpawnEntry;Lnet/minecraft/util/math/BlockPos$Mutable;D)Z", at = @At(
value = "INVOKE",
target = "Lnet/minecraft/server/world/ServerWorld;doesNotCollide(Lnet/minecraft/util/math/Box;)Z"
))
@@ -4,6 +4,7 @@ import carpet.CarpetSettings;
import net.minecraft.entity.SpawnGroup;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.biome.Biome;
import net.minecraft.world.biome.SpawnSettings;
import net.minecraft.world.biome.source.BiomeSource;
import net.minecraft.world.gen.StructureAccessor;
import net.minecraft.world.gen.chunk.ChunkGenerator;
@@ -28,7 +29,7 @@ public abstract class SurfaceChunkGenerator_husksSpawnMixin extends ChunkGenerat
}
@Inject(method = "getEntitySpawnList", at = @At("HEAD"), cancellable = true)
private void isInsidePyramid(Biome biome, StructureAccessor accessor, SpawnGroup group, BlockPos pos, CallbackInfoReturnable<List<Biome.SpawnEntry>> cir)
private void isInsidePyramid(Biome biome, StructureAccessor accessor, SpawnGroup group, BlockPos pos, CallbackInfoReturnable<List<SpawnSettings.SpawnEntry>> cir)
{
if (CarpetSettings.huskSpawningInTemples && group == SpawnGroup.MONSTER)
{