-
Posts
5161 -
Joined
-
Last visited
-
Days Won
76
Everything posted by Choonster
-
Was there one part in particular that you didn't understand?
-
You should be able to extend ItemPredicate, override ItemPredicate#test and then register it with ItemPredicates.register. You can then use this anywhere an item predicate is expected (e.g. in the inventory_changed trigger).
-
assets/minecraft/recipes in the forgeSrc-<forgeVersion>.jar referenced library. I don't fully understand what you're asking here. One JSON file is one recipe. You can have any number of recipes that output the same item. No, recipes and items are in completely separate registries; you can name your recipe whatever you want. Minecraft uses the registry name of the output item for most of its recipes, it only uses a longer name when there are multiple recipes for the same item.
-
Which version of Minecraft are you using? In 1.11+, ItemStacks can no longer be null; the default value is now the empty ItemStack (ItemStack#isEmpty). The ItemStack.EMPTY field contains an ItemStack that's always empty.
-
You can add your own recipe and ingredient types to the JSON system, I explain this here.
-
It looks like FML wasn't launched properly, so FMLSanityChecker.fmlLocation was null. How did you set up your workspace and run the game? If you follow these instructions, the workspace should be set up properly and your IDE run configurations should use GradleStart and GradleStartServer, which ensure that FML is launched properly.
-
Recipes are in a Forge registry, so use the corresponding registry event to register them. Ideally, recipes should be added through the JSON system where possible rather than being added in code.
-
I'm not sure what's going on in your workspace. Try setting some breakpoints and stepping through ForgeHooks.loadAdvancements and AdvancementList#loadAdvancements in the debugger to see what's happening with your mod's advancements.
-
These are the errors I get when both advancements are missing the description element:
-
What's the 1.10.2 equivalent of StatCollector.translateToLocal
Choonster replied to Is.M.L's topic in Modder Support
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. -
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.
-
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.
-
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.
-
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?
Choonster replied to witherlord00's topic in Modder Support
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
Choonster replied to mysticalherobine's topic in Modder Support
Use RenderItem#getItemModelWithOverrides to get the IBakedModel for an ItemStack. -
How do decompile and deobfuscate Minecraft code?
Choonster replied to s1320dazkj02's topic in Modder Support
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. -
This is a syntax error, not a missing entry. Post the mopi:crafting recipe file.
-
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
Choonster replied to Alekseyev's topic in Modder Support
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.- 1 reply
-
- 1
-
It's handled in WorldEntitySpawner.
-
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.
-
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
Choonster replied to Sataniq's topic in Modder Support
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.