Remove now fixed flatWorldStructureSpawning rule and cleanup some unused mixins
This commit is contained in:
6 files changed
-115
No files matched your search
@@ -13,7 +13,6 @@ import carpet.utils.SpawnChunks;
|
|||||||
import net.fabricmc.loader.api.FabricLoader;
|
import net.fabricmc.loader.api.FabricLoader;
|
||||||
import net.minecraft.commands.CommandSourceStack;
|
import net.minecraft.commands.CommandSourceStack;
|
||||||
import net.minecraft.core.BlockPos;
|
import net.minecraft.core.BlockPos;
|
||||||
import net.minecraft.core.registries.BuiltInRegistries;
|
|
||||||
import net.minecraft.core.registries.Registries;
|
import net.minecraft.core.registries.Registries;
|
||||||
import net.minecraft.resources.ResourceLocation;
|
import net.minecraft.resources.ResourceLocation;
|
||||||
import net.minecraft.server.MinecraftServer;
|
import net.minecraft.server.MinecraftServer;
|
||||||
@@ -898,12 +897,6 @@ public class CarpetSettings
|
|||||||
|
|
||||||
@Rule(desc = "Spawning requires much less CPU and Memory", category = OPTIMIZATION)
|
@Rule(desc = "Spawning requires much less CPU and Memory", category = OPTIMIZATION)
|
||||||
public static boolean lagFreeSpawning = false;
|
public static boolean lagFreeSpawning = false;
|
||||||
|
|
||||||
@Rule(
|
|
||||||
desc = "Allows structure mobs to spawn in flat worlds",
|
|
||||||
category = {EXPERIMENTAL, CREATIVE}
|
|
||||||
)
|
|
||||||
public static boolean flatWorldStructureSpawning = false;
|
|
||||||
|
|
||||||
@Rule(
|
@Rule(
|
||||||
desc = "Increases for testing purposes number of blue skulls shot by the wither",
|
desc = "Increases for testing purposes number of blue skulls shot by the wither",
|
||||||
|
|||||||
@@ -1,7 +0,0 @@
|
|||||||
package carpet.fakes;
|
|
||||||
|
|
||||||
import net.minecraft.world.level.levelgen.feature.ConfiguredFeature;
|
|
||||||
|
|
||||||
public interface PlacedFeatureInterface {
|
|
||||||
//ConfiguredFeature<?, ?> getRawFeature();
|
|
||||||
}
|
|
||||||
@@ -1,82 +0,0 @@
|
|||||||
package carpet.mixins;
|
|
||||||
|
|
||||||
import net.minecraft.core.HolderSet;
|
|
||||||
import net.minecraft.core.Registry;
|
|
||||||
import net.minecraft.world.level.levelgen.structure.StructureSet;
|
|
||||||
import org.spongepowered.asm.mixin.Mixin;
|
|
||||||
|
|
||||||
import net.minecraft.world.level.biome.BiomeSource;
|
|
||||||
import net.minecraft.world.level.chunk.ChunkGenerator;
|
|
||||||
import net.minecraft.world.level.levelgen.FlatLevelSource;
|
|
||||||
|
|
||||||
@Mixin(FlatLevelSource.class) // YEET
|
|
||||||
public abstract class FlatLevelSource_structuresMixin extends ChunkGenerator
|
|
||||||
{
|
|
||||||
public FlatLevelSource_structuresMixin(BiomeSource biomeSource) {
|
|
||||||
super(biomeSource);
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
@Override
|
|
||||||
public WeightedRandomList<MobSpawnSettings.SpawnerData> getMobsAt(Holder<Biome> biome, StructureFeatureManager accessor, MobCategory group, BlockPos pos)
|
|
||||||
{
|
|
||||||
if (!CarpetSettings.flatWorldStructureSpawning) return super.getMobsAt(biome, accessor, group, pos);
|
|
||||||
|
|
||||||
// vanila noise one
|
|
||||||
if (accessor.getStructureAt(pos, StructureFeature.SWAMP_HUT).isValid()) {
|
|
||||||
if (group == MobCategory.MONSTER) {
|
|
||||||
return SwamplandHutFeature.SWAMPHUT_ENEMIES;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (group == MobCategory.CREATURE) {
|
|
||||||
return SwamplandHutFeature.SWAMPHUT_ANIMALS;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (group == MobCategory.MONSTER) {
|
|
||||||
if (accessor.getStructureAt(pos, StructureFeature.PILLAGER_OUTPOST).isValid()) {
|
|
||||||
return PillagerOutpostFeature.OUTPOST_ENEMIES;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (accessor.getStructureAt(pos, StructureFeature.OCEAN_MONUMENT).isValid()) {
|
|
||||||
return OceanMonumentFeature.MONUMENT_ENEMIES;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (accessor.getStructureAt(pos, StructureFeature.NETHER_BRIDGE).isValid()) {
|
|
||||||
return NetherFortressFeature.FORTRESS_ENEMIES;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// carpet spawns
|
|
||||||
if (group == MobCategory.MONSTER)
|
|
||||||
{
|
|
||||||
if (CarpetSettings.huskSpawningInTemples)
|
|
||||||
{
|
|
||||||
if (accessor.getStructureAt(pos, StructureFeature.DESERT_PYRAMID).isValid())
|
|
||||||
{
|
|
||||||
return CustomSpawnLists.PYRAMID_SPAWNS;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (CarpetSettings.shulkerSpawningInEndCities)
|
|
||||||
{
|
|
||||||
if (accessor.getStructureAt(pos, StructureFeature.END_CITY).isValid())
|
|
||||||
{
|
|
||||||
return CustomSpawnLists.SHULKER_SPAWNS;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (CarpetSettings.piglinsSpawningInBastions)
|
|
||||||
{
|
|
||||||
if (accessor.getStructureAt(pos, StructureFeature.BASTION_REMNANT).isValid())
|
|
||||||
{
|
|
||||||
return CustomSpawnLists.BASTION_SPAWNS;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return (group == MobCategory.UNDERGROUND_WATER_CREATURE || group == MobCategory.AXOLOTLS) && accessor.getStructureAt(pos, StructureFeature.OCEAN_MONUMENT).isValid() ? MobSpawnSettings.EMPTY_MOB_LIST : super.getMobsAt(biome, accessor, group, pos);
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
*/
|
|
||||||
}
|
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
package carpet.mixins;
|
|
||||||
|
|
||||||
import carpet.fakes.PlacedFeatureInterface;
|
|
||||||
import org.spongepowered.asm.mixin.Final;
|
|
||||||
import org.spongepowered.asm.mixin.Mixin;
|
|
||||||
import org.spongepowered.asm.mixin.Shadow;
|
|
||||||
|
|
||||||
import java.util.function.Supplier;
|
|
||||||
import net.minecraft.world.level.levelgen.feature.ConfiguredFeature;
|
|
||||||
import net.minecraft.world.level.levelgen.placement.PlacedFeature;
|
|
||||||
|
|
||||||
@Mixin(PlacedFeature.class)
|
|
||||||
public class PlacedFeature_scarpetMixin implements PlacedFeatureInterface {
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,7 +1,5 @@
|
|||||||
package carpet.script.utils;
|
package carpet.script.utils;
|
||||||
|
|
||||||
import carpet.fakes.PlacedFeatureInterface;
|
|
||||||
import carpet.script.value.BlockValue;
|
|
||||||
import carpet.script.value.ListValue;
|
import carpet.script.value.ListValue;
|
||||||
import carpet.script.value.NumericValue;
|
import carpet.script.value.NumericValue;
|
||||||
import carpet.script.value.StringValue;
|
import carpet.script.value.StringValue;
|
||||||
|
|||||||
@@ -81,14 +81,12 @@
|
|||||||
"Level_scarpetPlopMixin",
|
"Level_scarpetPlopMixin",
|
||||||
"WorldGenRegion_scarpetPlopMixin",
|
"WorldGenRegion_scarpetPlopMixin",
|
||||||
"StructurePiece_scarpetPlopMixin",
|
"StructurePiece_scarpetPlopMixin",
|
||||||
"PlacedFeature_scarpetMixin",
|
|
||||||
"PieceGeneratorSupplier_plopMixin",
|
"PieceGeneratorSupplier_plopMixin",
|
||||||
"ServerGamePacketListenerImpl_scarpetEventsMixin",
|
"ServerGamePacketListenerImpl_scarpetEventsMixin",
|
||||||
"ServerPlayerGameMode_scarpetEventsMixin",
|
"ServerPlayerGameMode_scarpetEventsMixin",
|
||||||
"Player_parrotMixin",
|
"Player_parrotMixin",
|
||||||
"SaplingBlock_desertShrubsMixin",
|
"SaplingBlock_desertShrubsMixin",
|
||||||
"EntityMixin",
|
"EntityMixin",
|
||||||
"FlatLevelSource_structuresMixin",
|
|
||||||
"ChunkGenerator_scarpetMixin",
|
"ChunkGenerator_scarpetMixin",
|
||||||
"Guardian_renewableSpongesMixin",
|
"Guardian_renewableSpongesMixin",
|
||||||
"Husk_templesMixin",
|
"Husk_templesMixin",
|
||||||
|
|||||||
Reference in new issue
Block a user