-
Posts
687 -
Joined
-
Last visited
-
Days Won
10
Everything posted by Beethoven92
-
Post also your mod code please
-
Help with ItemStack values across classes [1.16.1]
Beethoven92 replied to Giga_5's topic in Modder Support
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)); -
Describe how you did setup your mod project environment please, for sure you missed some step
-
You're welcome, have a good dive into the vanilla sea ๐
-
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
-
Its inside the "forge(whatever version you are using)" recomp.jar / net / minecraft
-
Show how you are registering your blocks please
-
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
-
[1.16.1] Opening written book, and unexpected potion duplication
Beethoven92 replied to jackokring's topic in Modder Support
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 ๐ -
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.
-
[1.14] BlockState definition missing model for variant
Beethoven92 replied to nil's topic in Modder Support
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. -
How to add a new biome to the nether in 1.16+?
Beethoven92 replied to Beethoven92's topic in Modder Support
Awesome, thanks! -
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
-
Encounterred an error during the load_registries event
Beethoven92 replied to MrGreenyboy's topic in Modder Support
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 -
Encounterred an error during the load_registries event
Beethoven92 replied to MrGreenyboy's topic in Modder Support
Post again your blockstate json -
Encounterred an error during the load_registries event
Beethoven92 replied to MrGreenyboy's topic in Modder Support
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 -
Encounterred an error during the load_registries event
Beethoven92 replied to MrGreenyboy's topic in Modder Support
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. -
[1.15.2] Testing mod, Minecraft* will not start
Beethoven92 replied to TheThorneCorporation's topic in Modder Support
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 -
[1.15.2] Testing mod, Minecraft* will not start
Beethoven92 replied to TheThorneCorporation's topic in Modder Support
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. -
[1.15.2] Testing mod, Minecraft* will not start
Beethoven92 replied to TheThorneCorporation's topic in Modder Support
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 -
How does pathfinding work when the mob is in water?
Beethoven92 replied to Turtledove's topic in Modder Support
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! -
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