Biome generator fix

This commit is contained in:
paulevsGitch 2020-11-13 20:43:22 +03:00
parent 8bdfbb65fa
commit 24c501ce13
6 changed files with 5 additions and 20 deletions

View file

@ -7,7 +7,6 @@ import java.util.Random;
import net.fabricmc.api.EnvType; import net.fabricmc.api.EnvType;
import net.fabricmc.api.Environment; import net.fabricmc.api.Environment;
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings; import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
import net.minecraft.block.Block; import net.minecraft.block.Block;
import net.minecraft.block.BlockRenderType; import net.minecraft.block.BlockRenderType;
import net.minecraft.block.BlockState; import net.minecraft.block.BlockState;
@ -37,7 +36,6 @@ import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.Direction; import net.minecraft.util.math.Direction;
import net.minecraft.world.BlockView; import net.minecraft.world.BlockView;
import net.minecraft.world.World; import net.minecraft.world.World;
import ru.betterend.blocks.basis.BaseBlockWithEntity; import ru.betterend.blocks.basis.BaseBlockWithEntity;
import ru.betterend.blocks.entities.EndStoneSmelterBlockEntity; import ru.betterend.blocks.entities.EndStoneSmelterBlockEntity;

View file

@ -14,7 +14,6 @@ import net.minecraft.resource.ResourceManager;
import net.minecraft.tag.Tag; import net.minecraft.tag.Tag;
import net.minecraft.tag.TagGroupLoader; import net.minecraft.tag.TagGroupLoader;
import net.minecraft.util.Identifier; import net.minecraft.util.Identifier;
import ru.betterend.util.TagHelper; import ru.betterend.util.TagHelper;
@Mixin(TagGroupLoader.class) @Mixin(TagGroupLoader.class)

View file

@ -81,7 +81,7 @@ public class EndBiomes {
biomeRegistry.forEach((biome) -> { biomeRegistry.forEach((biome) -> {
if (biome.getCategory() == Category.THEEND) { if (biome.getCategory() == Category.THEEND) {
Identifier id = biomeRegistry.getId(biome); Identifier id = biomeRegistry.getId(biome);
if (!ID_MAP.containsKey(id) && !LAND_BIOMES.containsImmutable(id) && !VOID_BIOMES.containsImmutable(id)) { if (!LAND_BIOMES.containsImmutable(id) && !VOID_BIOMES.containsImmutable(id)) {
JsonObject config = configs.get(id.getNamespace()); JsonObject config = configs.get(id.getNamespace());
if (config == null) { if (config == null) {
config = loadJsonConfig(id.getNamespace()); config = loadJsonConfig(id.getNamespace());
@ -97,7 +97,6 @@ public class EndBiomes {
isVoid = JsonFactory.getString(element.getAsJsonObject(), "type", "land").equals("void"); isVoid = JsonFactory.getString(element.getAsJsonObject(), "type", "land").equals("void");
} }
EndBiome endBiome = new EndBiome(id, biome, fog, chance); EndBiome endBiome = new EndBiome(id, biome, fog, chance);
System.out.println("Adding: " + id + " " + chance);
if (isVoid) { if (isVoid) {
VOID_BIOMES.addBiomeMutable(endBiome); VOID_BIOMES.addBiomeMutable(endBiome);
} }
@ -109,9 +108,6 @@ public class EndBiomes {
} }
}); });
System.out.println("Land");
LAND_BIOMES.debug();
CLIENT.clear(); CLIENT.clear();
} }

View file

@ -111,10 +111,6 @@ public class EndBiome {
genChance += chance; genChance += chance;
return genChance; return genChance;
} }
public String debug() {
return this.mcID + " " + this.genChanceUnmutable + " " + this.genChance;
}
public Biome getBiome() { public Biome getBiome() {
return biome; return biome;

View file

@ -85,8 +85,10 @@ public class BetterEndBiomeSource extends BiomeSource {
mapLand.clearCache(); mapLand.clearCache();
mapVoid.clearCache(); mapVoid.clearCache();
} }
String space = endBiome.getID().getNamespace();
System.out.println(endBiome.getID()); if (space.equals("byg")) {
System.out.println(biomeX * 4 + " 100 " + biomeZ * 4);
}
return biomeRegistry.get(endBiome.getID());//EndBiomes.getActualBiome(endBiome); return biomeRegistry.get(endBiome.getID());//EndBiomes.getActualBiome(endBiome);
} }

View file

@ -48,12 +48,6 @@ public class BiomePicker {
public List<EndBiome> getBiomes() { public List<EndBiome> getBiomes() {
return biomes; return biomes;
} }
public void debug() {
for (EndBiome b: biomes) {
System.out.println(b.debug());
}
}
public boolean containsImmutable(Identifier id) { public boolean containsImmutable(Identifier id) {
return immutableIDs.contains(id); return immutableIDs.contains(id);