update mappings and 21w40a, apparently.

This commit is contained in:
gnembon committed 2021-10-12 23:54:25 -03:00
1 parent 6a03675b4f
commit cfaf596c29
9 files changed
+30 -26

No files matched your search

@@ -36,7 +36,7 @@ public abstract class FlatChunkGeneratorMixin extends ChunkGenerator
if (!CarpetSettings.flatWorldStructureSpawning) return super.getEntitySpawnList(biome, accessor, group, pos);
// vanila noise one
if (accessor.getStructureAt(pos, true, StructureFeature.SWAMP_HUT).hasChildren()) {
if (accessor.getStructureAt(pos, StructureFeature.SWAMP_HUT).hasChildren()) {
if (group == SpawnGroup.MONSTER) {
return SwampHutFeature.MONSTER_SPAWNS;
}
@@ -47,15 +47,15 @@ public abstract class FlatChunkGeneratorMixin extends ChunkGenerator
}
if (group == SpawnGroup.MONSTER) {
if (accessor.getStructureAt(pos, false, StructureFeature.PILLAGER_OUTPOST).hasChildren()) {
if (accessor.getStructureAt(pos, StructureFeature.PILLAGER_OUTPOST).hasChildren()) {
return PillagerOutpostFeature.MONSTER_SPAWNS;
}
if (accessor.getStructureAt(pos, false, StructureFeature.MONUMENT).hasChildren()) {
if (accessor.getStructureAt(pos, StructureFeature.MONUMENT).hasChildren()) {
return OceanMonumentFeature.MONSTER_SPAWNS;
}
if (accessor.getStructureAt(pos, true, StructureFeature.FORTRESS).hasChildren()) {
if (accessor.getStructureAt(pos, StructureFeature.FORTRESS).hasChildren()) {
return NetherFortressFeature.MONSTER_SPAWNS;
}
}
@@ -66,27 +66,27 @@ public abstract class FlatChunkGeneratorMixin extends ChunkGenerator
{
if (CarpetSettings.huskSpawningInTemples)
{
if (accessor.getStructureAt(pos, true, StructureFeature.DESERT_PYRAMID).hasChildren())
if (accessor.getStructureAt(pos, StructureFeature.DESERT_PYRAMID).hasChildren())
{
return CustomSpawnLists.PYRAMID_SPAWNS;
}
}
if (CarpetSettings.shulkerSpawningInEndCities)
{
if (accessor.getStructureAt(pos, true, StructureFeature.END_CITY).hasChildren())
if (accessor.getStructureAt(pos, StructureFeature.END_CITY).hasChildren())
{
return CustomSpawnLists.SHULKER_SPAWNS;
}
}
if (CarpetSettings.piglinsSpawningInBastions)
{
if (accessor.getStructureAt(pos, true, StructureFeature.BASTION_REMNANT).hasChildren())
if (accessor.getStructureAt(pos, StructureFeature.BASTION_REMNANT).hasChildren())
{
return CustomSpawnLists.BASTION_SPAWNS;
}
}
}
return (group == SpawnGroup.UNDERGROUND_WATER_CREATURE || group == SpawnGroup.AXOLOTLS) && accessor.getStructureAt(pos, false, StructureFeature.MONUMENT).hasChildren() ? SpawnSettings.EMPTY_ENTRY_POOL : super.getEntitySpawnList(biome, accessor, group, pos);
return (group == SpawnGroup.UNDERGROUND_WATER_CREATURE || group == SpawnGroup.AXOLOTLS) && accessor.getStructureAt(pos, StructureFeature.MONUMENT).hasChildren() ? SpawnSettings.EMPTY_ENTRY_POOL : super.getEntitySpawnList(biome, accessor, group, pos);
}
@@ -17,6 +17,6 @@ public class HuskEntityMixin
private static boolean isSkylightOrTempleVisible(ServerWorldAccess serverWorldAccess, BlockPos pos)
{
return serverWorldAccess.isSkyVisible(pos) ||
(CarpetSettings.huskSpawningInTemples && (((ServerWorld)serverWorldAccess).getStructureAccessor().getStructureAt(pos, false, StructureFeature.DESERT_PYRAMID).hasChildren()));
(CarpetSettings.huskSpawningInTemples && (((ServerWorld)serverWorldAccess).getStructureAccessor().getStructureAt(pos, StructureFeature.DESERT_PYRAMID).hasChildren()));
}
}
@@ -17,7 +17,7 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
@Mixin(LivingEntity.class)
public abstract class LivingEntity_creativeFlyMixin extends Entity
{
@Shadow public float flyingSpeed;
@Shadow public float airStrafingSpeed;
public LivingEntity_creativeFlyMixin(EntityType<?> type, World world)
{
@@ -44,7 +44,7 @@ public abstract class LivingEntity_creativeFlyMixin extends Entity
{
PlayerEntity self = (PlayerEntity)(Object)(this);
if (self.getAbilities().flying && !onGround)
cir.setReturnValue(flyingSpeed* (float)CarpetSettings.creativeFlySpeed);
cir.setReturnValue( airStrafingSpeed* (float)CarpetSettings.creativeFlySpeed);
}
}
}
@@ -37,7 +37,7 @@ public abstract class NoiseChunkGenerator_husksSpawnMixin extends ChunkGenerator
{
if (CarpetSettings.huskSpawningInTemples)
{
if (accessor.getStructureAt(pos, true, StructureFeature.DESERT_PYRAMID).hasChildren())
if (accessor.getStructureAt(pos, StructureFeature.DESERT_PYRAMID).hasChildren())
{
cir.setReturnValue(CustomSpawnLists.PYRAMID_SPAWNS);
return;
@@ -45,7 +45,7 @@ public abstract class NoiseChunkGenerator_husksSpawnMixin extends ChunkGenerator
}
if (CarpetSettings.shulkerSpawningInEndCities)
{
if (accessor.getStructureAt(pos, true, StructureFeature.END_CITY).hasChildren())
if (accessor.getStructureAt(pos, StructureFeature.END_CITY).hasChildren())
{
cir.setReturnValue(CustomSpawnLists.SHULKER_SPAWNS);
return;
@@ -53,7 +53,7 @@ public abstract class NoiseChunkGenerator_husksSpawnMixin extends ChunkGenerator
}
if (CarpetSettings.piglinsSpawningInBastions)
{
if (accessor.getStructureAt(pos, true, StructureFeature.BASTION_REMNANT).hasChildren())
if (accessor.getStructureAt(pos, StructureFeature.BASTION_REMNANT).hasChildren())
{
cir.setReturnValue(CustomSpawnLists.BASTION_SPAWNS);
}
@@ -19,12 +19,14 @@ import net.minecraft.world.biome.source.BiomeCoords;
import net.minecraft.world.biome.source.BiomeSource;
import net.minecraft.world.chunk.Chunk;
import net.minecraft.world.chunk.ChunkStatus;
import net.minecraft.world.gen.random.AtomicSimpleRandom;
import net.minecraft.world.gen.random.ChunkRandom;
import net.minecraft.world.gen.chunk.ChunkGenerator;
import net.minecraft.world.gen.feature.ConfiguredStructureFeature;
import net.minecraft.world.gen.feature.DefaultFeatureConfig;
import net.minecraft.world.gen.feature.FeatureConfig;
import net.minecraft.world.gen.feature.StructureFeature;
import net.minecraft.world.gen.random.RandomSeed;
import org.spongepowered.asm.mixin.Final;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Shadow;
@@ -134,7 +136,7 @@ public abstract class StructureFeatureMixin<C extends FeatureConfig> implements
// config = (C) new DefaultFeatureConfig();
class_6626 lv = new class_6626();
field_34929.generatePieces(lv, config, new class_6622.class_6623(worldIn.getRegistryManager(), generator, worldIn.getStructureManager(), chunkpos, b -> true, worldIn, Util.make(new ChunkRandom(), (chunkRandomx) -> {
field_34929.generatePieces(lv, config, new class_6622.class_6623(worldIn.getRegistryManager(), generator, worldIn.getStructureManager(), chunkpos, b -> true, worldIn, Util.make(new ChunkRandom(new AtomicSimpleRandom(RandomSeed.getSeed())), (chunkRandomx) -> {
chunkRandomx.setCarverSeed(worldIn.getSeed(), chunkpos.x, chunkpos.z);
}), worldIn.getSeed()));
StructureStart<C> structurestart1 = new StructureStart<>(thiss, chunkpos, 0, lv.method_38714());
@@ -99,10 +99,10 @@ public abstract class WorldChunk_movableTEMixin extends Chunk implements WorldCh
{
Block newBlock = newBlockState.getBlock();
Block oldBlock = oldBlockState.getBlock();
((Heightmap) this.field_34541.get(Heightmap.Type.MOTION_BLOCKING)).trackUpdate(x, y, z, newBlockState);
((Heightmap) this.field_34541.get(Heightmap.Type.MOTION_BLOCKING_NO_LEAVES)).trackUpdate(x, y, z, newBlockState);
((Heightmap) this.field_34541.get(Heightmap.Type.OCEAN_FLOOR)).trackUpdate(x, y, z, newBlockState);
((Heightmap) this.field_34541.get(Heightmap.Type.WORLD_SURFACE)).trackUpdate(x, y, z, newBlockState);
((Heightmap) this.heightmaps.get(Heightmap.Type.MOTION_BLOCKING)).trackUpdate(x, y, z, newBlockState);
((Heightmap) this.heightmaps.get(Heightmap.Type.MOTION_BLOCKING_NO_LEAVES)).trackUpdate(x, y, z, newBlockState);
((Heightmap) this.heightmaps.get(Heightmap.Type.OCEAN_FLOOR)).trackUpdate(x, y, z, newBlockState);
((Heightmap) this.heightmaps.get(Heightmap.Type.WORLD_SURFACE)).trackUpdate(x, y, z, newBlockState);
boolean boolean_3 = chunkSection.isEmpty();
if (boolean_2 != boolean_3)
{
@@ -156,7 +156,7 @@ public abstract class WorldChunk_movableTEMixin extends Chunk implements WorldCh
newBlockState.onBlockAdded(this.world, blockPos_1, oldBlockState, boolean_1); //This can call setblockstate! (e.g. hopper does)
}
this.field_34537 = true; // shouldSave
this.needsSaving = true; // shouldSave
return oldBlockState;
}
}