This commit is contained in:
gnembon committed 2020-05-13 16:58:12 -03:00
1 parent 903fe1e31a
commit dfd88b7142
23 files changed
+86 -100

No files matched your search

@@ -1,14 +1,13 @@
package carpet.mixins;
import carpet.CarpetSettings;
import net.minecraft.class_5284;
import net.minecraft.entity.SpawnGroup;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.IWorld;
import net.minecraft.world.biome.Biome;
import net.minecraft.world.biome.source.BiomeSource;
import net.minecraft.world.gen.StructureAccessor;
import net.minecraft.world.gen.chunk.FloatingIslandsChunkGenerator;
import net.minecraft.world.gen.chunk.FloatingIslandsChunkGeneratorConfig;
import net.minecraft.world.gen.chunk.SurfaceChunkGenerator;
import net.minecraft.world.gen.feature.Feature;
import org.spongepowered.asm.mixin.Mixin;
@@ -16,23 +15,23 @@ import org.spongepowered.asm.mixin.Mixin;
import java.util.List;
@Mixin(FloatingIslandsChunkGenerator.class)
public abstract class FloatingIslandsChunkGeneratorMixin extends SurfaceChunkGenerator<FloatingIslandsChunkGeneratorConfig>
public abstract class FloatingIslandsChunkGeneratorMixin extends SurfaceChunkGenerator<class_5284> //FloatingIslandsChunkGeneratorConfig
{
public FloatingIslandsChunkGeneratorMixin(IWorld iWorld_1, BiomeSource biomeSource_1, int int_1, int int_2, int int_3, FloatingIslandsChunkGeneratorConfig chunkGeneratorConfig_1, boolean boolean_1)
public FloatingIslandsChunkGeneratorMixin(BiomeSource biomeSource, long l, class_5284 arg, int i, int j, int k, boolean bl)
{
super(iWorld_1, biomeSource_1, int_1, int_2, int_3, chunkGeneratorConfig_1, boolean_1);
super(biomeSource, l, arg, i, j, k, bl);
}
@Override
public List<Biome.SpawnEntry> getEntitySpawnList(StructureAccessor arg, SpawnGroup category, BlockPos pos)
public List<Biome.SpawnEntry> getEntitySpawnList(Biome biome, StructureAccessor structureAccessor, SpawnGroup category, BlockPos pos)
{
if (CarpetSettings.shulkerSpawningInEndCities && SpawnGroup.MONSTER == category)
{
if (Feature.END_CITY.isInsideStructure(this.world, arg, pos))
if (Feature.END_CITY.isInsideStructure(structureAccessor, pos))
{
return Feature.END_CITY.getMonsterSpawns();
}
}
return this.world.getBiome(pos).getEntitySpawnList(category);
return super.getEntitySpawnList(biome, structureAccessor, category, pos);
}
}