Jump to content

Beethoven92

Members
  • Posts

    687
  • Joined

  • Last visited

  • Days Won

    10

Everything posted by Beethoven92

  1. Post also your mod code please
  2. Doesn't this#getItem() work, in place of 'it' when you need to pass the ItemStack you want? At this line: this.world.addEntity(new ItemEntity(this.world, this.getPosX(), this.getPosY(), this.getPosZ(), it));
  3. Describe how you did setup your mod project environment please, for sure you missed some step
  4. You're welcome, have a good dive into the vanilla sea ๐Ÿ˜
  5. This ^ , if you are using IntelliJ. Inside External Libraries you should see a file named like that or similar: forge-1.16.1-32.0.98-mapped_snapshot_20200723-1.16.1-recomp.jar. This is how mine looks because i am using the latest versions of forge, but if you are using 1.15 it should not look too different. Of course the numbers in your file name will match the version of forge you are using
  6. Its inside the "forge(whatever version you are using)" recomp.jar / net / minecraft
  7. Show how you are registering your blocks please
  8. When you setup your mod project with gradlew commands, as part of the setup process the vanilla code is also deobfuscated and made accessible to you. If you are using Eclipse IDE for example you can find all vanilla classes under 'Project and External Dependencies', once you setup and import your mod project in the IDE
  9. Offtopic: may i suggest you to organize better your mod code in different packages and classes? Right now its pretty messy, and its really small right now, but if you'll expand it and add more stuff i am 100% sure you won't be able to even remember where some things are placed or which portions of code are related to others. Just a suggestion, feel free to accept it or not ๐Ÿ˜‰
  10. Just create your custom biome extending it from Biome class and register it like you would do with any other registry object (use DeferredRegister). After that use BiomeManager#addBiome to make it generating in the overworld. You should also specify which type(s) your biome belongs to by using BiomeDictionary#addTypes. This won't work for nether or end biomes at the moment, but the forge guys are working on it. Be careful, you have to use this or a newest build of the mdk, since in previous version there was a bug preventing biomes from generating correctly: Build: 1.16.1-32.0.86 - Mon Jul 27 22:56:16 GMT 2020 lex: Fix Biome generation error.
  11. If you add a comma at the end of the last block (the "axis = x"), it expects there is another variant after that, which in your case there is not.
  12. What the title says, just wondering if there is a way to add a new biome to the nether without creating a custom world type, which is the way biome o' plenty is doing that (to pick one). Its simple to do that with the overworld dimension, but i really cannot get it to work with the nether...Thank you very much
  13. It is still missing a closing bracket, you see? You are now closing the "" block correctly, but still the "variants" block misses its closing bracket. Suggestion, just count your brackets, there should never be an odd number of them. Also the package name needs to be blockstates
  14. Post again your blockstate json
  15. The only thing i can see right now is that you are missing a closing bracket "}" in your blockstate file, at this line: "":{ "model": "tutorialmod:block/example_block" Without it your json file will not be valid
  16. Show your block's blockstate and model jsons file please. Anyway if you are using 1.16.1 registering things with DeferredRegister is (in my opinion) far simpler than using registry events, and probably less prone to errors like the one you encountered.
  17. You could try to run 'clean' in your gradle tasks, and then run genIDERuns again. If that doesn't work maybe your best bet at this point is to start a new fresh project and see if you still run into this issue
  18. The mod.toml file looks fine, and so your mod main class... "examplemod.png" doesn't really matter, and as far as i know you can leave [dependencies.examplemod] as it is and your mod should run without problems. I tested this on 1.16.1 and the mod is loading correctly, but you can try to change "examplemod" in the dependencies to your mod ID and see if it loads, i doubt this is the issue though.
  19. Have you forgot to add the @Mod annotation on top of your mod main class? Without it basically Forge won't recognize your mod as a loadable mod
  20. As far as i know zombies just stop moving and sink when in water, so its a pretty different behaviour to what you are trying to achieve there. I think you should take a look at the SpiderEntity class, for example, as the spider will continue chasing you even when in water. Look also at SwimGoal, NearestAttackableTargetGoal and MeleeAttackGoal classes (which are part of the spider behaviour) to see how they deal with a mob chasing its target while also swimming in water. Anyway, in case that i am completely missing the point or that you already explored the above classes, please, post your entity class code!
  21. Hello, so, my goal is to add new biomes to default minecraft dimensions, without having to create a new world type like mods such as biomes o' plenty are doing. I looked at the way other mods that simply add their biomes to the default world generation (Traverse, Atmospheric...) are doing the trick, and in fact it seems a fairly simple task. The problem is that these mod are still in 1.15+, and doing the same in 1.16 seems to not produce the desired result. The same code does compile without errors in 1.16 but my custom biome simply isn't showing up during default world generation. My biome is registered and created correctly though, because i am able to select it in the single-biome world type and generate a world with it. It also shows up in the list of available biomes when i try the /locatebiome command, but it always says that it could not find it within reasonable distance, no matter how far i go around the world. This is my Biome manager class: package mod.beethoven92.testmod116.init; import mod.beethoven92.testmod116.Reference; import mod.beethoven92.testmod116.world.biome.TestBiome; import net.minecraft.world.biome.Biome; import net.minecraftforge.common.BiomeDictionary; import net.minecraftforge.common.BiomeDictionary.Type; import net.minecraftforge.common.BiomeManager; import net.minecraftforge.eventbus.api.IEventBus; import net.minecraftforge.fml.RegistryObject; import net.minecraftforge.registries.DeferredRegister; import net.minecraftforge.registries.ForgeRegistries; public class ModBiomes { public static final DeferredRegister<Biome> BIOMES = DeferredRegister.create(ForgeRegistries.BIOMES, Reference.MOD_ID); public static final RegistryObject<Biome> TEST_BIOME = BIOMES.register("test_biome", TestBiome::new); public static void register(IEventBus modEventBus) { BIOMES.register(modEventBus); } public static void setupBiomes() { BiomeManager.addBiome(BiomeManager.BiomeType.COOL, new BiomeManager.BiomeEntry(TEST_BIOME.get(), 10)); BiomeDictionary.addTypes(TEST_BIOME.get(), Type.PLAINS, Type.OVERWORLD); } } My custom biome: package mod.beethoven92.testmod116.world.biome; import net.minecraft.entity.EntityClassification; import net.minecraft.entity.EntityType; import net.minecraft.world.biome.Biome; import net.minecraft.world.biome.BiomeAmbience; import net.minecraft.world.biome.MoodSoundAmbience; import net.minecraft.world.gen.surfacebuilders.SurfaceBuilder; public class TestBiome extends Biome { public TestBiome() { super((new Biome.Builder()). surfaceBuilder(SurfaceBuilder.DEFAULT, SurfaceBuilder.GRASS_DIRT_GRAVEL_CONFIG). precipitation(Biome.RainType.RAIN). category(Biome.Category.PLAINS). depth(0.1F). scale(0.2F). temperature(0.7F). downfall(0.8F). func_235097_a_((new BiomeAmbience.Builder()). setWaterColor(7098023). setWaterFogColor(14733798). setFogColor(16627961). setMoodSound(MoodSoundAmbience.field_235027_b_). build()). parent((String)null)); this.addSpawn(EntityClassification.CREATURE, new Biome.SpawnListEntry(EntityType.BEE, 12, 2, 4)); } } And finally my main class: package mod.beethoven92.testmod116; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.eventbus.api.EventPriority; import net.minecraftforge.eventbus.api.IEventBus; import net.minecraftforge.eventbus.api.SubscribeEvent; import net.minecraftforge.fml.common.Mod; import net.minecraftforge.fml.event.lifecycle.FMLClientSetupEvent; import net.minecraftforge.fml.event.lifecycle.FMLCommonSetupEvent; import net.minecraftforge.fml.event.server.FMLServerStartingEvent; import net.minecraftforge.fml.javafmlmod.FMLJavaModLoadingContext; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import mod.beethoven92.testmod116.init.ModBiomes; import mod.beethoven92.testmod116.init.ModBlocks; import mod.beethoven92.testmod116.init.ModItems; @Mod(Reference.MOD_ID) public class TestMod116 { public static final Logger LOGGER = LogManager.getLogger(Reference.MOD_ID); public TestMod116() { IEventBus modEventBus = FMLJavaModLoadingContext.get().getModEventBus(); modEventBus.addListener(this::clientSetup); modEventBus.addListener(EventPriority.LOWEST, this::commonSetup); //Registering deferred registers to the mod bus ModBlocks.register(modEventBus); ModItems.register(modEventBus); ModBiomes.register(modEventBus); MinecraftForge.EVENT_BUS.register(this); } private void commonSetup(final FMLCommonSetupEvent event) { ModBiomes.setupBiomes(); } private void clientSetup(final FMLClientSetupEvent event) { } @SubscribeEvent public void onServerStarting(FMLServerStartingEvent event) { } } which is the way i have seen other mods dealing with this. It just doesn't seem to work, and i really don't know what i am missing here. Any help is welcome! Thank you very much /// EDIT: solved in the newer versions of Forge
×
×
  • Create New...

Important Information

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