Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 02/20/20 in all areas

  1. I want to add a custom biome which is made by 1 block. However I can't change stone layer. How do I do it? @SubscribeEvent public static void onRegisterBiome(RegistryEvent.Register<Biome> event) { TEST_BIOME.setRegistryName("test_biome"); ForgeRegistries.BIOMES.register(TEST_BIOME); BiomeDictionary.addTypes(TEST_BIOME, BiomeDictionary.Type.PLAINS); BiomeManager.addSpawnBiome(TEST_BIOME); } public class TestBiome extends Biome { public TestBiome() { super((new Builder()).surfaceBuilder(SurfaceBuilder.DEFAULT, new SurfaceBuilderConfig(TestMod.TEST_BLOCK.getDefaultState(), TestMod.TEST_BLOCK.getDefaultState(), TestMod.TEST_BLOCK.getDefaultState())).precipitation(RainType.RAIN).category(Category.PLAINS).depth(0.125F).scale(0.05F).temperature(0.8F).downfall(0.4F).waterColor(4159204).waterFogColor(329011).parent((String) null)); DefaultBiomeFeatures.addCarvers(this); DefaultBiomeFeatures.addLakes(this); this.addSpawn(EntityClassification.CREATURE, new SpawnListEntry(EntityType.SHEEP, 12, 4, 4)); this.addSpawn(EntityClassification.CREATURE, new SpawnListEntry(EntityType.PIG, 10, 4, 4)); this.addSpawn(EntityClassification.CREATURE, new SpawnListEntry(EntityType.CHICKEN, 10, 4, 4)); this.addSpawn(EntityClassification.CREATURE, new SpawnListEntry(EntityType.COW, 8, 4, 4)); this.addSpawn(EntityClassification.CREATURE, new SpawnListEntry(EntityType.HORSE, 5, 2, 6)); this.addSpawn(EntityClassification.CREATURE, new SpawnListEntry(EntityType.DONKEY, 1, 1, 3)); this.addSpawn(EntityClassification.AMBIENT, new SpawnListEntry(EntityType.BAT, 10, 8, 8)); this.addSpawn(EntityClassification.MONSTER, new SpawnListEntry(EntityType.SPIDER, 100, 4, 4)); this.addSpawn(EntityClassification.MONSTER, new SpawnListEntry(EntityType.ZOMBIE, 95, 4, 4)); this.addSpawn(EntityClassification.MONSTER, new SpawnListEntry(EntityType.ZOMBIE_VILLAGER, 5, 1, 1)); this.addSpawn(EntityClassification.MONSTER, new SpawnListEntry(EntityType.SKELETON, 100, 4, 4)); this.addSpawn(EntityClassification.MONSTER, new SpawnListEntry(EntityType.CREEPER, 100, 4, 4)); this.addSpawn(EntityClassification.MONSTER, new SpawnListEntry(EntityType.SLIME, 100, 4, 4)); this.addSpawn(EntityClassification.MONSTER, new SpawnListEntry(EntityType.ENDERMAN, 10, 1, 4)); this.addSpawn(EntityClassification.MONSTER, new SpawnListEntry(EntityType.WITCH, 5, 1, 1)); } } It's solved by using OverworldGenSettings#setDefaultBlock.
    1 point
  2. 100% sure all world generation events get loaded in FMLCommonSetupEvent. Try moving FantasyOreGen.generateOre() into setup in Main. Works for me with my custom structure generation.
    1 point
  3. Forge still has to do work even without any mods installed. Arguments about efficiency are rarely fruitful, a few extra seconds of loading for hours of extra content shouldn't be a dealbreaker.
    1 point
  4. 1 point
  5. Brewing recipes can't be made with json at this time. This is a known/open issue, hopefully it gets worked on so ugly hacks don't have to be used to add brewing recipes https://github.com/MinecraftForge/MinecraftForge/issues/5814 In the meantime I found this link with some info on getting around it: https://www.minecraftforge.net/forum/topic/73496-1132-alternative-to-potionbrewingaddmix-solved/
    1 point
  6. Look at usages of both and gain a good understanding of what they’re used for and their differences
    1 point
  7. Experience, really. The longer you've worked with programming, the easier it becomes to follow the paths of code, to guess where to start looking, and of course understanding the code that you are looking at. When I run into something I don't know/can't immediately figure out, I search google and/or here, using class/method names, full/partial error messages that I may get. Sometimes just typing in "minecraft forge <what i want to do>" will yield results. It's pretty amazing the amount of questions that get asked on here that are literally less than 2 pages of google/forums searching away! And when that doesn't work, coming here with a link to code, full logs, and a decent description of what has been tried and what the end goal is, will typically get answers. As long as you aren't asking basic Java questions, and it's current forge related stuff, people here are pretty helpful when you ask the right questions.
    1 point
  8. File corruption with techne example : LegR = new ModelRenderer(this, 46, 0); LegR.addBox(0F, 0F, 0F, 4, 16, 4); // The variables names should begin with a lower case letter LegR.setRotationPoint(1F, 8F, -2F); LegR.setTextureSize(64, 64); LegR.mirror = true; // Miror texture should be after the initialization setRotation(LegR, 0F, 0F, 0F); The reason that your animation doesn't work is because your event is fired once, but the method setLivingAnimation is fired every render tick.
    1 point
  9. Use the same logger. Use LogManager.getLogger() and then apply your own config for your mod (via the package name).
    0 points
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.