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.

Ugdhar

Moderators
  • Joined

  • Last visited

Everything posted by Ugdhar

  1. Thanks, I've been looking into this, and using the global_loot_test on github as an example. I'm using DeferredRegister, and adding it to the modbus in my mod constructor, and things seem all good, however I'm getting this error: DeferredRegister setup public static final DeferredRegister<GlobalLootModifierSerializer<?>> LOOT_MODIFIERS = new DeferredRegister<GlobalLootModifierSerializer<?>>(ForgeRegistries.LOOT_MODIFIER_SERIALIZERS, "bunchostuff"); public RegistryObject<GlobalLootModifierSerializer<?>> SINAITE_MODIFIER = LOOT_MODIFIERS.register("sinaite_modifier", () -> new SinaiteModifier.Serializer()); In my mod constructor: ModLootModifiers.LOOT_MODIFIERS.register(modEventBus); my loot modifier in data/bunchostuff/loot_modifiers/sinaite_modifier.json { "type": "bunchostuff:sinaite_modifier", "conditions": [ { "condition": "minecraft:match_tool", "predicate": { "item": "bunchostuff:sinaite_pickaxe" } } ] } and of course data/forge/loot_modifiers/global_loot_modifiers.json { "replace": false, "entries": [ "bunchostuff:sinaite_modifier" ] } Totally at a loss, everything looks right, debugging and stepping into it, the best I can come up with is something missing from conditions resulting in it being null, *edit: so it makes it here in LootModifierManager without any incident, as far as I can tell: return ForgeRegistries.LOOT_MODIFIER_SERIALIZERS.getValue(serializer).read(location, object, lootConditions); //line 139 but stepping into that, when it goes into ForgeRegistry, things just go null, despite checking serializer, location, object, and lootConditions, which all appear to have the correct stuff in them; both serializer and location are my modid:loot_modifier, object appears to be the entire json of my loot modifier, and lootConditions has MatchTool and the details of the tool I wanted it to match, so it seems to be finding that part. *end edit but it all looks right to me, and I can't see what's missing. I haven't made too many loot tables, so I'm sure I missed something or messed something up despite getting the basic idea of it. All I'm trying to do in the modifier is print to the log when the tool match is true. Modifier class if needed, but it's awful basic: package ugdhar.mod.bunchostuff.loot; import java.util.List; import com.google.gson.JsonObject; import net.minecraft.item.ItemStack; import net.minecraft.util.ResourceLocation; import net.minecraft.world.storage.loot.LootContext; import net.minecraft.world.storage.loot.conditions.ILootCondition; import net.minecraftforge.common.loot.GlobalLootModifierSerializer; import net.minecraftforge.common.loot.LootModifier; import ugdhar.mod.bunchostuff.BunchOStuff; public class SinaiteModifier extends LootModifier { public SinaiteModifier(ILootCondition[] conditionsIn) { super(conditionsIn); } @Override public List<ItemStack> doApply(List<ItemStack> generatedLoot, LootContext context) { BunchOStuff.LOGGER.info("Made it into the doApply method of our loot modifier!"); return generatedLoot; } public static class Serializer extends GlobalLootModifierSerializer<SinaiteModifier> { @Override public SinaiteModifier read(ResourceLocation name, JsonObject json, ILootCondition[] conditionsIn) { return new SinaiteModifier(conditionsIn); } } } *edit: This is with forge 1.15.2-31.1.44 and mappings from 20200413 Thanks for taking the time to check this out and give me pointers!
  2. Please show what you tried, screenshots/errors/logs. More information is needed
  3. 1.12 is no longer supported due to age. Please update to a modern (1.14.4/1.15.2) version to receive support. Even then, not sure how much spigot support can be received here. More information on supported versions can be found in the LTS link at the top of every page.
  4. 1.12 is no longer supported due to age. Please update to a modern (1.14.4/1.15.2) version to receive support. More information on supported versions can be found in the LTS link at the top of every page. *edit: I will say that the filenames of some of your mods indicate you downloaded them from risky websites like 9 minecraft or another non-reputable site. You should ONLY download mods from curseforge.com or directly from the mod author. More information on this and why it is bad, and a list of bad websites, can be found here: https://stopmodreposts.org/index.html
  5. Have you read the LTS link at the top of every page? That's from the devs on the subject.
  6. If you go to files.minecraftforge.net you will see that the forge versions are numbered like that, they do not have the same version numbers as Minecraft. Also, there are always logs, regardless of a crash, in your game directorys logs folder. Twitch does some funky stuff, but I think it still generates at least a latest.log which is probably better than nothing. Before that though, what exactly is your issue? Just that you see a strange looking version #? Or is something not working? The title says won't launch with mods, but you said you see it deep scan them, so I guess I'm confused. If that IS the case, then definitely post whatever logs you can find (even if there's no crash)
  7. They are still available, and as far as I know can be made to work. However no support is given for versions below 1.14.4, moderators lock threads and request the user upgrade if they wish to receive support. So development of anything < 1.14.4 and the dev is on their own, or free to look for support outside of forge's channels.
  8. Ugdhar replied to GabyTM's topic in Modder Support
    Well, that's a bit harsh for your first post The search on these forums are pretty good, and google works well too. MANY of the common questions have already been asked/answered, so searching here/google saves time waiting for an answer. Also, make sure to browse through the vanilla code for examples; find something in vanilla that does the same or similar as what you want, and go look at the code, gives great insight into how a bunch of things are done.
  9. You misunderstand me. I can get the itemstack, I know how But, how would this itemstack of a mined stone (resulting in an itemstack of cobblestone) differ from an itemstack of cobble someone threw? Or 2 different itemstacks of cobble from different pickaxes? I wish I knew how to rephrase my question to make it more clear.
  10. I believe the Trident uses an ItemStackTileEntityRenderer in package net.minecraft.client.renderer.tileentity;
  11. I guess i'm missing where the ItemStack lets me know it was a harvested block
  12. So it's easy enough to determine if the entity spawning is an ItemEntity, but how do I differentiate between the stone that I mined with the tool I'm using or the cobblestone someone standing next to me is throwing away? They both fire the event, and I can't see a way to determine between the two.
  13. Thanks for the reply I took a look at that, and I think it might be too broad, I wasn't descriptive enough about what I need I think. I need to be able to know when my tool breaks a block, and then either prevent the entity from spawning, or more or less immediately remove the entity, and put the corresponding item into the players inventory. I don't need to change what is dropping for loot, just manipulate the results as I hope I've described well enough. Still tinkering, I'll update if I figure something out, and certainly open to pointers/ideas!
  14. tick works for me: @Override public void tick(World worldIn, BlockPos pos, IFluidState state) { // TODO Auto-generated method stub super.tick(worldIn, pos, state); BunchOStuff.LOGGER.info("************FLOWING MUDDY WATER TICK ***********************"); } Are you using @Override?
  15. Really old versions of Minecraft are no longer supported. Please update to a modern (1.14.4/1.15.2) version to receive support. More information on supported versions can be found in the LTS link at the top of every page.
  16. I was wondering if anyone had any breadcrumbs I could follow to figure out how to manipulate the drop of a block after it has been destroyed (by a player, don't care about any other way), i.e. remove the drop entity from the world and place into players pack. I've looked into events, but there either isn't one, or I looked right past it, as well as methods to override in ToolItem. I'd like to be able to do this with any block and its drops, so overriding a method in Block didn't seem like the way to go. I haven't looked into if this is done using LootTables or not yet, since I only know basic loot tables so far, but I guess that's probably where I'll be looking next? Thanks for any pointers
  17. Are you running any resource packs? If so I would remove them and give it a try, since that's the only thing, as far as I can tell, that I can see in this log causing errors. I know these logs can get quite long, if that's not the whole thing you might want to try uploading it to a hosting site or a github gist or something, in case there's more than helps narrow it down.
  18. Unfortunately I do not think that is the proper log. What was the name of the file you got that information from? The file should be in your .minecraft/logs folder, and should be much longer than that.
  19. thanks, mind explaining why? I believe the simple version is because you have no control over when the static initializer is run in relation to when things are actually being/supposed to be registered, and aside from Blocks and Items being first/second, the registry events do not run in a specific order.
  20. 1.12 is no longer supported due to age. Please update to a modern (1.14.4/1.15.2) version to receive support. More information on supported versions can be found in the LTS link at the top of every page.
  21. Look up DeferredRegister, the class has comments that show how to use it, it makes it so much easier to register blocks/items, it's nearly foolproof. You won't even need to use the actual registry events.
  22. Yes, in your resources, but in assets/minecraft/loot_tables instead of your modid, and that should override vanilla loot tables. I have little experience with it, so I'm not sure what happens if multiple mods override a loot table. Look at vanilla loot tables for examples, they should be in the client-extra jar in your IDEs referenced libraries.
  23. Loot tables https://minecraft.gamepedia.com/Loot_table
  24. Make your own thread, and be more descriptive what your problem is. Posting logs as described in the EAQ helps.
  25. In your .minecraft (or if you changed the game directory, in there), there is a logs folder and it should contain debug.log

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.