1.15 pre2 - 4

This commit is contained in:
gnembon committed 2019-11-28 11:43:55 -04:00
1 parent 9146556803
commit 6497200dac
6 files changed
+6 -6

No files matched your search

@@ -66,7 +66,7 @@ public class FeatureGenerator
return new VanillaLayeredBiomeSource(new VanillaLayeredBiomeSourceConfig(w.getLevelProperties()))
{
@Override
public Biome getStoredBiome(int i, int j, int k)
public Biome getBiomeForNoiseGen(int i, int j, int k)
{
return biome;
}
@@ -6,7 +6,7 @@ import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.MathHelper;
import net.minecraft.world.World;
import net.minecraft.world.biome.Biome;
import net.minecraft.world.biome.BiomeArray;
import net.minecraft.world.biome.source.BiomeArray;
import org.spongepowered.asm.mixin.Final;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Shadow;
@@ -32,6 +32,6 @@ public abstract class FloatingIslandsChunkGeneratorMixin extends SurfaceChunkGen
return Feature.END_CITY.getMonsterSpawns();
}
}
return this.world.method_23753(blockPos_1).getEntitySpawnList(entityCategory_1);
return this.world.getBiome(blockPos_1).getEntitySpawnList(entityCategory_1);
}
}
@@ -23,7 +23,7 @@ public abstract class SaplingBlockMixin
cancellable = true)
private void onGenerate(ServerWorld serverWorld_1, BlockPos blockPos_1, BlockState blockState_1, Random random_1, CallbackInfo ci)
{
if(CarpetSettings.desertShrubs && serverWorld_1.method_23753(blockPos_1) == Biomes.DESERT && !BlockSaplingHelper.hasWater(serverWorld_1, blockPos_1))
if(CarpetSettings.desertShrubs && serverWorld_1.getBiome(blockPos_1) == Biomes.DESERT && !BlockSaplingHelper.hasWater(serverWorld_1, blockPos_1))
{
serverWorld_1.setBlockState(blockPos_1, Blocks.DEAD_BUSH.getDefaultState(), 3);
ci.cancel();
@@ -116,7 +116,7 @@ public abstract class StructureFeatureMixin implements StructureFeatureInterface
return structurestart;
}
}
Biome biome_1 = generator.getBiomeSource().getStoredBiome((chunkpos.getStartX() + 9) >> 2, 0, (chunkpos.getStartZ() + 9) >> 2 );
Biome biome_1 = generator.getBiomeSource().getBiomeForNoiseGen((chunkpos.getStartX() + 9) >> 2, 0, (chunkpos.getStartZ() + 9) >> 2 );
StructureStart structurestart1 = getStructureStartFactory().create((StructureFeature)(Object)this, chunkpos.x, chunkpos.z, BlockBox.empty(),0,generator.getSeed());
structurestart1.initialize(generator, ((ServerWorld)worldIn).getStructureManager() , chunkpos.x, chunkpos.z, biome_1);
structurestart = structurestart1.hasChildren() ? structurestart1 : StructureStart.DEFAULT;
@@ -1147,7 +1147,7 @@ public class CarpetExpression
BlockValue.LocatorResult locator = BlockValue.fromParams(cc, lv, 0);
ServerWorld world = cc.s.getWorld();
BlockPos pos = locator.block.getPos();
Biome biome = world.method_23753(pos);
Biome biome = world.getBiome(pos);
Value res = new StringValue(biome.getTranslationKey().replaceFirst("^biome\\.minecraft\\.", ""));
return (_c, _t) -> res;
});