Choonster
Moderators
-
Joined
-
Last visited
-
Currently
Viewing Forum: Modder Support
Everything posted by Choonster
-
What's the 1.10.2 equivalent of StatCollector.translateToLocal
The 1.10-final branch Botania does have the Buildcraft API in src/api/java. StatCollector was renamed to net.minecraft.util.text.translation.I18n. This is deprecated because translation should be handled on the client using the net.minecraft.client.resources.I18n class or by sending a TextComponentTranslation.
-
Add and Remove Advancements
I copied your advancements into my mod, modified them to use vanilla items and my mod ID for the parent advancements and then ran the game. When I loaded a world, I got an error saying that both advancements were missing a description element in the display object.
-
1.11.2 Forge Fluid Blockstate.json
Where do you call BlockHandler.registerFluidModel from? ModelLoader methods need to be called in preInit or ModelRegistryEvent. Model registration must be done in a client-only class. Block and Item registration must be done in common code. You should use the registry events to register your Blocks, Items and other IForgeRegistryEntry implementations. This will make it easier to update to 1.12+, where GameRegistry.register is private.
-
Add and Remove Advancements
Just create an advancement with no parent and it will become the root of a new tab. The JSON format is documented on the wiki. The display element controls how the advancement (and the tab if it's a root) is displayed. Yes, Forge will traverse every file in your mod's advancements directory and every subdirectory of it.
-
How do recipes work in 1.12
mopi:crafting is expanded to assets/mopi/recipes/crafting.json, the mod ID isn't included in the file name.
-
[1.11.2]Adding new Biomes to the End/Sky dimension?
You'll probably need to replace the WorldProvider and BiomeProvider for The End, like BoP does for The Nether here.
-
[1.12] [Solved] Get IBakedModel from ItemStack
Use RenderItem#getItemModelWithOverrides to get the IBakedModel for an ItemStack.
-
How do decompile and deobfuscate Minecraft code?
Your IDE project will have forgeSrc-<forge_version>.jar as a referenced library, this contains the Minecraft and Forge classes. It should also have the source JAR (forgeSrc-<forge_version>-sources.jar) attached. If it hasn't and your IDE asks you to attach sources, the source JAR will be in the same directory as the regular JAR.
-
How do recipes work in 1.12
This is a syntax error, not a missing entry. Post the mopi:crafting recipe file.
-
Add and Remove Advancements
If your advancement should be the root of a new tab, don't specify the parent element in the JSON file at all. If you specify the parent element, use an advancement that exists. If you specify the parent element and the specified advancement doesn't exist, AdvancementList#loadAdvancements will ignore your advancement.
-
[1.12] Set new variables per player on first time entering a world
Use the Capability System to store this data on the player. Subscribe to PlayerEvent.PlayerLoggedInEvent to detect when a player logs in. If they haven't received the prompt before, open the appropriate GUI for them.
-
Where is Natural Mob Spawning Handled?
It's handled in WorldEntitySpawner.
-
Add and Remove Advancements
It depends where you need it. For WorldEvent.Load, use WorldEvent#getWorld to get the World. Most other places will have a World argument/field available. If World#isRemote is false, you're on the logical server and the World is a WorldServer. If you really don't have a World/WorldServer available, use DimensionManager.getWorld to get the WorldServer for dimension 0.
-
Block Transform doesnt work.
- Add and Remove Advancements
If you look at the usages of MinecraftServer#reload, you'll see that it's called from CommandReload#execute (i.e. the /reload command) and from Minecraft#refreshResources (i.e. the method used to reload resource packs). It's only called from Minecraft#refreshResources when there's an integrated server running (i.e. single player or the LAN host).- [1.12] Okay, this recipe system is ridiculous
You can see the encoding of a file on the right-hand side of the bottom status bar. I'm not sure what the problem is, so I'll need to debug it locally. Please create a Git repository for your mod, push it to a site like GitHub and link it here. Look at my mod and its .gitignore file for an example of the repository structure to use and the files to include.- [1.12] Okay, this recipe system is ridiculous
I'm not too sure what's wrong, then. Are those definitely nested directories and not just a single directory with dots in the name? Is the lang file encoded in UTF-8? Are there any errors in the log? Try rebuilding your project in your IDE and re-running Minecraft, it's possible that it may be using and old/broken copy of your lang file.- [1.12] Okay, this recipe system is ridiculous
Not with the vanilla crafting table. Either add some intermediate product so you don't have 10 ingredients in a recipe (e.g. 5 copper coins become a stack of coins and 2 stacks become a silver coin) or create your own machine that can handle the required recipes.- [1.12] Okay, this recipe system is ridiculous
We'll need a bit more detail than this. Does the unlocalised name displayed in-game match the unlocalised name in the lang file? What's the exact name of your lang file? Do you have a pack.mcmeta file and if so, what's pack_version set to? If you have a pack.mcmeta file with pack_version set to 3 (which you should do), Minecraft will load all assets with lowercase names. This means your lang files should be en_us.lang, fr_fr.lang, etc. If pack_version is set to 2 or you don't have a pack.mcmeta file, Forge will wrap your mod's resource pack in LegacyV2Adapeter which loads lang files with the old mixed-case names, e.g. en_US.lang, fr_FR.lang, etc.- [1.12] Okay, this recipe system is ridiculous
Use the ResourceLocation(String, String) constructor to specify the domain (mod ID) and path (name) components of the ResourceLocation separately. You only need to combine them with a colon when specifying a ResourceLocation in a string (e.g. an item registry name in a recipe file). The vanilla crafting system has always ignored the stack size of ingredients, a recipe can only consume one item per slot. I noticed in your previous post that you're registering the recipe in postInit, but it should be done in the registry event (as I said in my initial reply).- [1.12] Okay, this recipe system is ridiculous
It's the same as GameRegistry.addShapelessRecipe: name is the registry name and group is the recipe book group. We could help you fix this if you posted your JSON file and the errors. It works perfectly fine with mods. If there are specific bugs you've encountered, report them so they can be fixed.- [1.12] Right Click Help
Return true from Block#onBlockActivated when an action was performed to prevent Item#onItemUse/Item#onItemRightClick from being called.- Block Transform doesnt work.
That will just rotate your model by 90 degrees about the x axis; for anything more complex than 90-degree rotations about the x and y axes you need to use TRSRTransformations.- Add and Remove Advancements
No, advancements are loaded when the server starts (WorldServer#init, called from MinecraftServer#loadAllWorlds) and when it's asked to reload them (MinecraftServer#reload). WorldEvent.Load will be fired for dimension 0 just after the initial load, but there's currently no event fired for the reload. This PR adds an event for the reload, but it's not likely to be merged until the author documents the event.- [1.12] Okay, this recipe system is ridiculous
Instead of storing a collection of items and comparing the contents of a the crafting grid against them, recipes now store a collection of Ingredient objects and ask each one whether the contents of the crafting grid match. Recipes are now stored in a Forge registry, so each one has a unique registry name. This also means that they should be registered in the corresponding registry event using IForgeRegistry#register. GameRegistry.addShapedRecipe works much like it did before, but now it requires you to specify the registry name (the first parameter) an optional recipe book group (the second parameter). Recipes with the same group will be shown together in the recipe book. The vararg parameter should contain the shape strings followed by the character and ingredient pairs, just like before. The ingredients can be ItemStacks, Items, Blocks, Strings (for ore dictionary matching) or Ingredients. I highly recommend learning the JSON system. If you're getting errors that you don't understand, post them along with your JSON files and we can try to help you. That's not quite what the OP is looking for. Forge already allows you to specify conditions for a recipe that can disable it at load time, that class allows you to specify conditions for an individual ingredient. diesieben07 explains how to create your own conditions here: - Add and Remove Advancements
IPS spam blocked by CleanTalk.
Important Information
By using this site, you agree to our Terms of Use.