Jump to content

The_Wabbit

Members
  • Posts

    36
  • Joined

  • Last visited

Converted

  • Gender
    Undisclosed
  • Personal Text
    I am new!

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

The_Wabbit's Achievements

Tree Puncher

Tree Puncher (2/8)

5

Reputation

  1. Forge adds two new ITag (tag) collections to the base set provided by Minecraft: enchantments and potions. There seems to be all the bits necessary to add additional collections. My questions are: Is this something that's ok to do in general? (ya it's modding and I can do whatever but I'm just askin'...) How would I get the registry recognized by Forge (i.e. do I mimic what is being done in GameData for Forge's own custom registries...using tagFolder to specify the new datapack location). Note that I know how to get at the registry using Forge, but I need Forge to know it's there... Background: What are you doing exactly? I'd like to add an effects collection as many many Effects do not have brewable potions and I'd like a way to get at those in a data-driven way (rather than hard-coding for each mod)...for example to have a collection of effects like 'poisons', 'thirst', 'blindness', etc. Also looking into damage sources and armor materials... Code reference: net.minecraftforge.registries.GameData (see the creation of enchantments and potions items)
  2. For 1.16.x custom loot conditions and loot functions require registration of matching LootConditionType and LootFunctionType. There are no hooks via Forge registry events and using the builtin registry directly (sample how below) doesn't work (tried doing before registry events and after...nada). Registry.register(Registry.LOOT_CONDITION_TYPE, <my_name>, new LootConditionType(<my_serializer>)) This is probably staring me right in the eyeball, but I can't see it. Any directions/samples would be appreciated.
  3. Maybe check out code for Quark's shulker tooltips and Silent Chaos's Equipment tooltips (both on CurseForge with github source). Both mods seem to change the tooltips to include textures so they might help you narrow down the render code searching.
  4. Try changing the ForgeFlowingFluid.Properties as well. In particular, the tickRate which affects how fast the fluid appears to flow. See how LavaFluid is setup to match.
  5. Perhaps you can try looking at how the Culinary Construct Mod does its dynamic sandwich itemstack rendering: https://github.com/TheIllusiveC4/CulinaryConstruct.git. HTH
  6. DeferredWorkQueue is flagged as deprecated. Is it still the best way to do this?
  7. You might want to check the VillagerTradesEvent event and the BasicTrade class it refers to. Seems to be Forge devs indicating how you can do what you seem to want to do. There is even a WandererTradesEvent for the wandering trader as that is distinct from regular trading.
  8. Check your TAN config files. Most likely it's referring to a modded item or block that you're not loading or you have a typo somewhere.
  9. Hmm..so I can just check for instanceof BucketItem instead of UniversalBucket and use getFluid...but From the vanilla code, BucketItem requires an item instance per fluid (the fluid is tracked by the item as an instance field). This is not quite the same as the old UniversalBucket which was a single item that changed itemstack NBT data to reflect different fluids...Does your reply mean modded fluids need a unique BucketItem instance too?
  10. Maybe I'm just really blind, but as far as I can tell there is no replacement for the UniversalBucket item with the new Forge Fluid system (as of 1.14.4-28.0.83). So how does one identify a "bucket of some other mod's fluidy stuff" from say a custom recipe? Is the new (and only) way to test for capabilities on ItemStack now (so every mod has it's own version of a universal bucket)? Just checking if UniversalBucket is a delayed feature or has been removed permanently.
  11. My mods.toml looks similar to yours. Best I can tell from the Forge debug logging: the initial construction of mods is done in parallel, independent of that particular mods.toml setting. For example some real IDE outputs (extendedfoodpantry wants to be loaded AFTER vanillafoodpantry per its mods.toml file). [09Aug2019 08:48:11.748] [Client thread/DEBUG] [net.minecraftforge.fml.ModList/LOADING]: Dispatching parallel event LifecycleEvent:CONSTRUCT [09Aug2019 08:48:11.752] [Client thread/TRACE] [net.minecraftforge.fml.loading.ModJarURLHandler/CORE]: Loading modjar...SNIPPED [09Aug2019 08:48:12.047] [modloading-worker-3/DEBUG] [net.minecraftforge.fml.javafmlmod.FMLModContainer/LOADING]: Loading mod instance extendedfoodpantry of type...SNIPPED [09Aug2019 08:48:12.049] [modloading-worker-3/TRACE] [net.minecraftforge.fml.loading.ModJarURLHandler/CORE]: Loading modjar...SNIPPED [09Aug2019 08:48:12.074] [modloading-worker-1/DEBUG] [net.minecraftforge.fml.javafmlmod.FMLModContainer/LOADING]: Loading mod instance vanillafoodpantry of type...SNIPPED [09Aug2019 08:48:12.077] [modloading-worker-1/TRACE] [net.minecraftforge.fml.loading.ModJarURLHandler/CORE]: Loading modjar...SNIPPED [09Aug2019 08:48:12.080] [modloading-worker-2/DEBUG] [net.minecraftforge.fml.javafmlmod.FMLModContainer/LOADING]: Loading mod instance upsizer of type...SNIPPED [09Aug2019 08:48:12.080] [modloading-worker-2/TRACE] [net.minecraftforge.fml.loading.ModJarURLHandler/CORE]: Loading modjar...SNIPPED Notice the separate modloading-worker-xxx threads. The mods.toml ordering may only apply to event notification ordering after the mod's instance has been constructed (the ordering of which is undefined). The lesson here might be to put any ordering-dependent referential code into an event callback, not your constructor. Will close this thread once I've tried that...
  12. I'm trying to understand all the bits that you can declare in your mods.toml file and can't seem to get the ordering option for a dependency to have any meaning. I have a mod "B" that depends on mod "A" so I assumed (uh-oh) that if I put "A" as a required dependency for "B" that it would be loaded after; I made the BMod.Amod 'ordering' field equal 'AFTER' as shown below. However, after some testing it seems that things get loaded in any which way as "B" would be created before "A" (I put a hard dependency in B's constructor to use an object created in A's constructor as a test; also logging). I see no reference to the IModInfo.getOrdering method in the Forge code either. I have tried changing the order in the dependency (BMod.AMod) to 'BEFORE' and that didn't seem to have any effect. Has anyone tried using dependencies/ordering=AFTER (like for libraries or mod extensions where you really need the first mod created first)? # Find more information on toml format here: https://github.com/toml-lang/toml modLoader="javafml" loaderVersion="[25,)" #(25 is current forge version) updateJSONURL="http://blabla.org/files/mcmods/versions/b.json" issueTrackerURL="https://github.com/muserid/bproject/issues" displayURL="https://minecraft.curseforge.com/projects/b-mod" credits="Forge, Donald Trump's Hair" authors="The_Wabbit" # Mod List (usually just the one) [[mods]] modId="b" version="1.0b1" displayName="Bestest Mod Ever" # Mod description (multi line!) description=''' Something witty said here ''' # Dependency: BMod.Forge [[dependencies.BMod]] modId="forge" mandatory=true versionRange="[25,)" ordering="NONE" side="BOTH" # Dependency: BMod.Minecraft [[dependencies.BMod]] modId="minecraft" mandatory=true versionRange="[1.14.3,1.15)" ordering="NONE" side="BOTH" # Dependency: BMod.AMod [[dependencies.BMod]] modId="a" mandatory=true versionRange="[1.0.0b5,2.0)" ordering="AFTER" side="BOTH"
  13. I had this "No blocks of any kind drop anything" happen to me a few times -- turned out to be a bad tag file that just caused the entire datapack loading (including loottables) init to abort...no warning that this had occured until i noticed that error in log file. Perhaps check for similar occurance
  14. If you only need to use addMix there is also a non-reflection alternative that uses a brewing recipe via BrewingRecipeRegistry.addRecipe(...). Note there is a bug (1.14.3) in the Forge default BrewingRecipe so you should roll your own fixing the following in the isInput method like: public class ModBrewingRecipe extends BrewingRecipe { public ModBrewingRecipe(ItemStack input, Ingredient ingredient, ItemStack output) { super(input,ingredient,output); } @Override public boolean isInput(ItemStack stack) { return ItemStack.areItemsEqual(super.getInput(),stack); //THIS IS BROKEN in super 1.14.3 } } Pass in filled in potion itemstacks (see PotionUtils.addPotionToItemStack) for the input and outputs (eg Awkward potion -> Your potion)
  15. This was registered as an issue. Probably pretty low on the devs priority list for 1.14 just yet though. https://github.com/MinecraftForge/MinecraftForge/issues/5814
×
×
  • Create New...

Important Information

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