mappings
This commit is contained in:
1 parent
571a77ce64
commit
243c3290ae
6 files changed
+13
-13
No files matched your search
@@ -1,9 +1,9 @@
|
||||
package carpet.fakes;
|
||||
|
||||
import net.minecraft.class_5312;
|
||||
import net.minecraft.world.gen.feature.ConfiguredStructureFeature;
|
||||
import net.minecraft.world.gen.feature.StructureFeature;
|
||||
|
||||
public interface BiomeInterface
|
||||
{
|
||||
class_5312<?, ?> getConfiguredFeature(StructureFeature<?> arg);
|
||||
ConfiguredStructureFeature<?, ?> getConfiguredFeature(StructureFeature<?> arg);
|
||||
}
|
||||
@@ -6,7 +6,6 @@ import carpet.fakes.StructureFeatureInterface;
|
||||
import com.google.common.collect.ImmutableList;
|
||||
import com.google.common.collect.ImmutableMap;
|
||||
import net.minecraft.block.Blocks;
|
||||
import net.minecraft.class_5312;
|
||||
import net.minecraft.class_5314;
|
||||
import net.minecraft.server.world.ServerWorld;
|
||||
import net.minecraft.structure.StructureManager;
|
||||
@@ -32,6 +31,7 @@ import net.minecraft.world.gen.decorator.BeehiveTreeDecorator;
|
||||
import net.minecraft.world.gen.feature.BastionRemnantFeatureConfig;
|
||||
import net.minecraft.world.gen.feature.BoulderFeatureConfig;
|
||||
import net.minecraft.world.gen.feature.ConfiguredFeature;
|
||||
import net.minecraft.world.gen.feature.ConfiguredStructureFeature;
|
||||
import net.minecraft.world.gen.feature.DefaultFeatureConfig;
|
||||
import net.minecraft.world.gen.feature.Feature;
|
||||
import net.minecraft.world.gen.feature.FeatureConfig;
|
||||
@@ -140,7 +140,7 @@ public class FeatureGenerator
|
||||
ChunkRandom chunkRandom = new ChunkRandom();
|
||||
ChunkPos chunkPos = new ChunkPos(pos);
|
||||
Biome biome = biomeAccess.getBiome(new BlockPos(chunkPos.getStartX() + 9, 0, chunkPos.getStartZ() + 9));
|
||||
class_5312<?, ?> configuredFeature = ((BiomeInterface)biome).getConfiguredFeature(structure);
|
||||
ConfiguredStructureFeature<?, ?> configuredFeature = ((BiomeInterface)biome).getConfiguredFeature(structure);
|
||||
if (configuredFeature == null) return null;
|
||||
ChunkPos chunkPos2 = structure.method_27218(params, seed, chunkRandom, chunkPos.x, chunkPos.z); //find some chunk I guess
|
||||
if (chunkPos.x == chunkPos2.x && chunkPos.z == chunkPos2.z && ((StructureFeatureInterface)structure).shouldStartPublicAt(generator, generator.getBiomeSource(), seed, chunkRandom, chunkPos.x, chunkPos.z, biome, chunkPos, configuredFeature.field_24836)) // should start at
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
package carpet.mixins;
|
||||
|
||||
import carpet.fakes.BiomeInterface;
|
||||
import net.minecraft.class_5312;
|
||||
import net.minecraft.world.biome.Biome;
|
||||
import net.minecraft.world.gen.feature.ConfiguredStructureFeature;
|
||||
import net.minecraft.world.gen.feature.StructureFeature;
|
||||
import org.spongepowered.asm.mixin.Final;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
@@ -13,10 +13,10 @@ import java.util.Map;
|
||||
@Mixin(Biome.class)
|
||||
public class Biome_scarpetMixin implements BiomeInterface
|
||||
{
|
||||
@Shadow @Final private Map<StructureFeature<?>, class_5312<?, ?>> structureFeatures;
|
||||
@Shadow @Final private Map<StructureFeature<?>, ConfiguredStructureFeature<?, ?>> structureFeatures;
|
||||
|
||||
@Override
|
||||
public class_5312<?, ?> getConfiguredFeature(StructureFeature<?> arg)
|
||||
public ConfiguredStructureFeature<?, ?> getConfiguredFeature(StructureFeature<?> arg)
|
||||
{
|
||||
return structureFeatures.get(arg);
|
||||
}
|
||||
|
||||
@@ -44,11 +44,11 @@ public abstract class CoralBlockMixin implements Fertilizable
|
||||
CoralFeature coral;
|
||||
int variant = random.nextInt(3);
|
||||
if (variant == 0)
|
||||
coral = new CoralClawFeature(DefaultFeatureConfig.field_24893);
|
||||
coral = new CoralClawFeature(DefaultFeatureConfig.CODEC);
|
||||
else if (variant == 1)
|
||||
coral = new CoralTreeFeature(DefaultFeatureConfig.field_24893);
|
||||
coral = new CoralTreeFeature(DefaultFeatureConfig.CODEC);
|
||||
else
|
||||
coral = new CoralMushroomFeature(DefaultFeatureConfig.field_24893);
|
||||
coral = new CoralMushroomFeature(DefaultFeatureConfig.CODEC);
|
||||
|
||||
MaterialColor color = blockUnder.getTopMaterialColor(worldIn, pos);
|
||||
BlockState proper_block = blockUnder;
|
||||
|
||||
@@ -1195,7 +1195,7 @@ public class CarpetExpression
|
||||
String reqString = requested.getString();
|
||||
String structureName = FeatureGenerator.featureToStructure.get(reqString);
|
||||
if (structureName == null) throw new InternalExpressionException("Unknown structure: " + reqString);
|
||||
structure = StructureFeature.field_24842.get(structureName.toLowerCase(Locale.ROOT));
|
||||
structure = StructureFeature.STRUCTURES.get(structureName.toLowerCase(Locale.ROOT));
|
||||
if (structure == null) throw new InternalExpressionException("Unsupported structure: " + structureName);
|
||||
}
|
||||
if (lv.size() > locator.offset+1)
|
||||
@@ -1212,7 +1212,7 @@ public class CarpetExpression
|
||||
return (_c, _t) -> ret;
|
||||
}
|
||||
Map<Value, Value> ret = new HashMap<>();
|
||||
for(StructureFeature<?> str : StructureFeature.field_24842.values())
|
||||
for(StructureFeature<?> str : StructureFeature.STRUCTURES.values())
|
||||
{
|
||||
StructureStart start = FeatureGenerator.shouldStructureStartAt(world, pos, str, needSize);
|
||||
if (start == null) continue;
|
||||
|
||||
Reference in new issue
Block a user