mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-17 11:05:40 +00:00
Initial 1.16.2 Update
This commit is contained in:
1 parent
a3c4ffd2c1
commit
fe43088c96
233 files changed
+1644
-2297
No files matched your search
@@ -221,7 +221,7 @@ public class DataGeneratorTest
|
||||
{
|
||||
add(Blocks.STONE, "Stone");
|
||||
add(Items.DIAMOND, "Diamond");
|
||||
add(Biomes.BEACH, "Beach");
|
||||
//add(Biomes.BEACH, "Beach");
|
||||
add(Effects.POISON, "Poison");
|
||||
add(Enchantments.SHARPNESS, "Sharpness");
|
||||
add(EntityType.CAT, "Cat");
|
||||
@@ -273,8 +273,8 @@ public class DataGeneratorTest
|
||||
}
|
||||
|
||||
private static final Set<String> IGNORED_MODELS = ImmutableSet.of("test_generated_model", "test_block_model",
|
||||
"fishing_rod", "fishing_rod_cast" // Vanilla doesn't generate these yet, so they don't match due to having the minecraft domain
|
||||
);
|
||||
"fishing_rod", "fishing_rod_cast" // Vanilla doesn't generate these yet, so they don't match due to having the minecraft domain
|
||||
);
|
||||
|
||||
@Override
|
||||
public void act(DirectoryCache cache) throws IOException
|
||||
@@ -652,23 +652,23 @@ public class DataGeneratorTest
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
JsonElement generatedTextures = generated.remove("textures");
|
||||
JsonElement vanillaTextures = existing.remove("textures");
|
||||
if (generatedTextures == null && vanillaTextures != null) {
|
||||
ret.add("Model " + loc + " is missing textures");
|
||||
ret.add("Model " + loc + " is missing textures");
|
||||
} else if (generatedTextures != null && vanillaTextures == null) {
|
||||
ret.add("Model " + loc + " has textures when vanilla equivalent does not");
|
||||
ret.add("Model " + loc + " has textures when vanilla equivalent does not");
|
||||
} else if (generatedTextures != null) { // Both must be non-null
|
||||
for (Map.Entry<String, JsonElement> e : generatedTextures.getAsJsonObject().entrySet()) {
|
||||
String vanillaTexture = vanillaTextures.getAsJsonObject().get(e.getKey()).getAsString();
|
||||
if (!e.getValue().getAsString().equals(vanillaTexture)) {
|
||||
ret.add("Texture for variable '" + e.getKey() + "' for model " + loc + " does not match vanilla equivalent");
|
||||
}
|
||||
}
|
||||
if (generatedTextures.getAsJsonObject().size() != vanillaTextures.getAsJsonObject().size()) {
|
||||
ret.add("Model " + loc + " is missing textures from vanilla equivalent");
|
||||
}
|
||||
for (Map.Entry<String, JsonElement> e : generatedTextures.getAsJsonObject().entrySet()) {
|
||||
String vanillaTexture = vanillaTextures.getAsJsonObject().get(e.getKey()).getAsString();
|
||||
if (!e.getValue().getAsString().equals(vanillaTexture)) {
|
||||
ret.add("Texture for variable '" + e.getKey() + "' for model " + loc + " does not match vanilla equivalent");
|
||||
}
|
||||
}
|
||||
if (generatedTextures.getAsJsonObject().size() != vanillaTextures.getAsJsonObject().size()) {
|
||||
ret.add("Model " + loc + " is missing textures from vanilla equivalent");
|
||||
}
|
||||
}
|
||||
|
||||
if (!existing.equals(generated)) {
|
||||
|
||||
@@ -1,55 +0,0 @@
|
||||
package net.minecraftforge.debug.world;
|
||||
|
||||
import net.minecraft.world.biome.Biome;
|
||||
import net.minecraft.world.biome.Biome.Category;
|
||||
import net.minecraft.world.biome.Biome.RainType;
|
||||
import net.minecraft.world.biome.BiomeAmbience;
|
||||
import net.minecraft.world.biome.MoodSoundAmbience;
|
||||
import net.minecraft.world.gen.surfacebuilders.SurfaceBuilder;
|
||||
import net.minecraftforge.common.BiomeManager;
|
||||
import net.minecraftforge.common.BiomeManager.BiomeEntry;
|
||||
import net.minecraftforge.common.BiomeManager.BiomeType;
|
||||
import net.minecraftforge.eventbus.api.IEventBus;
|
||||
import net.minecraftforge.fml.RegistryObject;
|
||||
import net.minecraftforge.fml.common.Mod;
|
||||
import net.minecraftforge.fml.event.lifecycle.FMLCommonSetupEvent;
|
||||
import net.minecraftforge.fml.javafmlmod.FMLJavaModLoadingContext;
|
||||
import net.minecraftforge.registries.DeferredRegister;
|
||||
import net.minecraftforge.registries.ForgeRegistries;
|
||||
|
||||
@Mod(value = ModdedOverworldBiomesTest.MOD_ID)
|
||||
public class ModdedOverworldBiomesTest
|
||||
{
|
||||
public static final String MOD_ID = "modded_overworld_biomes_test";
|
||||
public static final boolean ENABLE = true;
|
||||
|
||||
private static DeferredRegister<Biome> BIOMES = DeferredRegister.create(ForgeRegistries.BIOMES, MOD_ID);
|
||||
private static RegistryObject<Biome> redBiome = BIOMES.register("red_biome", () -> new Biome(new Biome.Builder()
|
||||
.surfaceBuilder(SurfaceBuilder.DEFAULT, SurfaceBuilder.GRASS_DIRT_GRAVEL_CONFIG).precipitation(RainType.RAIN)
|
||||
.depth(1f).scale(1f).temperature(1f).downfall(1f).category(Category.PLAINS)
|
||||
.func_235097_a_(new BiomeAmbience.Builder().func_235246_b_(4159204).func_235248_c_(329011)
|
||||
.func_235239_a_(12638463).func_235243_a_(MoodSoundAmbience.field_235027_b_).func_235238_a_())
|
||||
.parent((String) null))
|
||||
{
|
||||
@Override
|
||||
public int getGrassColor(double posX, double posZ)
|
||||
{
|
||||
return 0xff0000;
|
||||
}
|
||||
});
|
||||
|
||||
public ModdedOverworldBiomesTest()
|
||||
{
|
||||
if (ENABLE) {
|
||||
FMLJavaModLoadingContext.get().getModEventBus().addListener(this::setup);
|
||||
IEventBus modBus = FMLJavaModLoadingContext.get().getModEventBus();
|
||||
BIOMES.register(modBus);
|
||||
}
|
||||
}
|
||||
|
||||
private void setup(final FMLCommonSetupEvent event)
|
||||
{
|
||||
BiomeManager.addBiome(BiomeType.WARM, new BiomeEntry(redBiome.get(), 200));
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user