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

+4 -4
View File
@@ -4,10 +4,10 @@ org.gradle.jvmargs=-Xmx1G
# Fabric Properties
# check these on https://fabricmc.net/use
# or better: https://modmuss50.me/fabric.html
minecraft_version=21w38a
yarn_mappings=21w38a+build.2
loader_version=0.11.7
fabric_version=0.40.4+1.18
minecraft_version=21w40a
yarn_mappings=21w40a+build.6
loader_version=0.12.1
fabric_version=0.40.8+1.18
# Mod Properties
mod_version = 1.4.47
@@ -23,6 +23,7 @@ import net.minecraft.world.biome.BuiltinBiomes;
import net.minecraft.world.gen.feature.size.TwoLayersFeatureSize;
import net.minecraft.world.gen.foliage.BlobFoliagePlacer;
import net.minecraft.world.gen.foliage.LargeOakFoliagePlacer;
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.chunk.StructureConfig;
@@ -34,6 +35,7 @@ import net.minecraft.world.gen.feature.SimpleRandomFeatureConfig;
import net.minecraft.world.gen.feature.StructureFeature;
import net.minecraft.world.gen.feature.StructurePoolFeatureConfig;
import net.minecraft.world.gen.feature.TreeFeatureConfig;
import net.minecraft.world.gen.random.RandomSeed;
import net.minecraft.world.gen.stateprovider.BlockStateProvider;
import net.minecraft.world.gen.treedecorator.BeehiveTreeDecorator;
import net.minecraft.world.gen.trunk.LargeOakTrunkPlacer;
@@ -202,7 +204,7 @@ public class FeatureGenerator
long seed = world.getSeed();
ChunkGenerator generator = world.getChunkManager().getChunkGenerator();
StructureConfig params = generator.getStructuresConfig().getForType(structure);
ChunkRandom chunkRandom = new ChunkRandom();
ChunkRandom chunkRandom = new ChunkRandom(new AtomicSimpleRandom(RandomSeed.getSeed()));
ChunkPos chunkPos = new ChunkPos(pos);
Biome biome = world.getBiome(new BlockPos(chunkPos.getStartX() + 9, 0, chunkPos.getStartZ() + 9));
ConfiguredStructureFeature<?, ?> configuredFeature = getDefaultFeature(structure, world, pos, false);
@@ -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;
}
}
@@ -1187,7 +1187,7 @@ public class WorldAccess {
int j = i + BiomeCoords.fromBlock(chunk.getHeight()) - 1;
int k = MathHelper.clamp(biomeY, i, j);
int l = chunk.getSectionIndex(BiomeCoords.toBlock(k));
chunk.getSection(l).method_38294().setSync(biomeX & 3, k & 3, biomeZ & 3, biome);
chunk.getSection(l).method_38294().set(biomeX & 3, k & 3, biomeZ & 3, biome);
} catch (Throwable var8) {
return Value.FALSE;
}