Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Choonster

Moderators
  • Joined

  • Last visited

Everything posted by Choonster

  1. 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.
  2. 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.
  3. 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.
  4. 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.
  5. mopi:crafting is expanded to assets/mopi/recipes/crafting.json, the mod ID isn't included in the file name.
  6. You'll probably need to replace the WorldProvider and BiomeProvider for The End, like BoP does for The Nether here.
  7. Use RenderItem#getItemModelWithOverrides to get the IBakedModel for an ItemStack.
  8. 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.
  9. This is a syntax error, not a missing entry. Post the mopi:crafting recipe file.
  10. 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.
  11. 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.
  12. It's handled in WorldEntitySpawner.
  13. 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.
  14. 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).
  15. 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.
  16. 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.
  17. 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.
  18. 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.
  19. 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).
  20. 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.
  21. Return true from Block#onBlockActivated when an action was performed to prevent Item#onItemUse/Item#onItemRightClick from being called.
  22. 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.
  23. 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.
  24. 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:

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.