Jump to content

Sinhika

Members
  • Posts

    69
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by Sinhika

  1. I'm trying to get in contact with Wuppy29 to discuss one of his old mods, but the email addresses attached to his old website have garnered no response. I'm trying leaving an open issue on his GitHub, but nothing there has changed for 6 years, so I'm doubtful of a response. So, does anyone have a current contact for Wuppy29?
  2. No, they don't pay me enough to do that. And if its for a private server or small modpack, I suppose just replacing the loot table would work okay. If it's for a mod to be released to the wilds of CurseForge.... oy.
  3. Draco18s, you wrote the GlobalLootModifier code in Forge that solves this exact problem! Why are you recommending the bad vanilla solution? Replacing a vanilla loot table with one of your own breaks compatibility with any other mod that wants to tinker with the same loot table. We had that issue with mod shears and leaf blocks, remember?
  4. That does appear to have been the problem! Going on to test with some further refinements. Thank you.
  5. After explanations from Draco18s (which, with his permission, I have documented for future use here: How to use Global Loot Modifiers ), I have tried to implement a loot_modifier that looks for the modded shears items defined in my SimpleOres mod, and then regenerates the loot table as if they were silk touch items (or real minecraft:shears, I have tried both). The goal is to implement modded shears in a other-mod-friendly fashion; overriding vanilla loot tables, the only way I was able to do it previously, is extremely unfriendly to other mods. The mod source code in question is here: https://github.com/Sinhika/SimpleOres2 The loot modifier stuff is in https://github.com/Sinhika/SimpleOres2/blob/1.15/src/main/java/mod/alexndr/simpleores/helpers/SimpleOresLootModifiers.java (Don't want to clutter up this post with lots of source code). It is registered (along with everything else) in https://github.com/Sinhika/SimpleOres2/blob/1.15/src/main/java/mod/alexndr/simpleores/ModEventSubscriber.java I've cut down the loot_modifier/mod_shears_harvest.json to a minimal test case, like so: { "conditions": [ { "condition": "minecraft:match_tool", "predicate": { "item": "simpleores:copper_shears" } } ] } Based on the logs, or lack thereof, the function is being registered, but isn't being called when it ought to be. Can anyone see any reason why, when I whack a leaf block with the copper shears, the loot modifier function isn't being called?
  6. Still need some good explanations and/or working examples. Both are preferred.
  7. Can someone recommend a tutorial or good technical how-to on how to properly implement fluid containers in Forge mods these days? I understand the fluid subsystem has undergone a major overhaul since 1.12.2.
  8. Is there a minecraftforge discord server, or is the old #minecraftforge IRC chat still alive? Where do devs gather to talk modding issues these days?
  9. The wonder of open source code is that you can freely copy and modify it, though I will note that most licenses, like my LGPL-3.0 licensed code, do require attribution. The problem of open source code is that you can freely copy and implement other people's mistakes. The above code is incorrect, and will only generate ore in vanilla biomes, as I finally figured out after bug reports from users. Iterate over the Forge biome register, NOT the vanilla BiomeManager. For example, if you have an ore that should generate in all overworld-type biomes, code like this works: public class OreGeneration { // Vein/Chunk Count, MinHeight, MaxHeightBase, MaxHeight private static final CountRangeConfig copper_cfg = new CountRangeConfig(15, 40, 0, 128); private static final int copper_veinsize = 7; public static void setupOreGen() { for (Biome biome: ForgeRegistries.BIOMES.getValues()) { // we have no End or Nether ores, so skip those. if ( biome.getCategory() == Biome.Category.THEEND || biome.getCategory() == Biome.Category.NETHER) { continue; } // Overworld-type Ore generation if (SimpleOresConfig.enableCopperOre) { biome.addFeature( GenerationStage.Decoration.UNDERGROUND_ORES, Biome.createDecoratedFeature(Feature.ORE, new OreFeatureConfig( OreFeatureConfig.FillerBlockType.NATURAL_STONE, ModBlocks.copper_ore.getDefaultState(), copper_veinsize), Placement.COUNT_RANGE, copper_cfg)); } // end if copper_ore } // end for biomes } // end setupOreGen() } // end class This is, of course, a very stripped-down example. The full mod is here, for those that want to study the code: https://github.com/Sinhika/SimpleOres2
  10. LivingHurtEvent does not appear to be working. However, LIvingAttackEvent does work for apparently everything LivingHurtEvent should have covered. Also, it is important to pay attention to the parameters on Annotations, such as "receiveCanceled=true".
  11. I am implementing a custom armor that prevents fall damage when full suit is worn. To do so, I am trying to catch the LivingHurtEvent and cancel it if the DamageSource is FALL and the right armor is being worn by the player. HOWEVER... I can't seem to get the event to fire no matter what bus I subscribe to. Is the event actually implemented in the current version of Forge? It is documented in the source. Also, how do you tell which bus (MOD or FORGE) a given event is sent out on? Source code at https://github.com/Sinhika/Netherrocks , branch 1.14.
  12. Apparently poking the Hand is more effective. Forge builds 27.0.26 and up now have it.
  13. I quite agree. We used to be able to just call setHarvestLevel(), but that went away for no explicable reason.
  14. That sort-of makes sense. Minecraft now expects server-side "assets" to be in a data pack, not a resource pack, and so recipes go in "data", not "assets". Possibly the model or blockstate loader was being confused by the recipe jsons with the same name as blockstates or items? That would be an interesting bug to suss out. What he said. You are using no-longer-supported ore dict entries with minecraft:shaped recipes, which never supported oredict recipes in the first place. All recipes are now "minecraft:something" and use tags to support what we used the old ore dictionary for. Just remember to add forge: domain tags for new ores and ingots if you add any.
  15. Trying to run Forge for Minecraft 1.12.2 on Minecraft 1.14.3 just isn't going to work. Period. ETA: never mind, I was confused by the misleading title.
  16. We need a better way to do this. One of the problems I foresaw above has already come to pass: conflicting mod shears' drop tables. Help? ETA: Thread about that problem:
  17. Yes, please, me too--I would desperately like a better solution for making modded shears work than overriding the vanilla drop tables, since that doesn't play well with other mods. Previous thread on the topic:
  18. Yes, in the meantime, I had to do some horrible kludging to make the copper buckets in Simple Ores kinda/sorta work. (Had to abuse the BucketItem class, subclass it, and disallow empty bucket stacking to get copper buckets back). That is to say, none of the Fluid stuff is really working, including UniversalBucket.
  19. Repeating what I added to the bug report on GitHub:
  20. Oh hey, I just posted a bug report to the MinecraftForge GitHub about this.
  21. It's a clumsy hack, but you can just override the vanilla loot tables with your own copies of them. I edited the "oak_leaves" loot table to add my mod shears. I'll have to edit all the other leaf loot tables as well. Unfortunately, this solution doesn't make my mod shears work on anyone else's leaves, nor do any other mod shears work on minecraft leaves unless they make the same override tables. It's not an ideal solution. Ideally, we'd have a shears tooltype that would dictate behavior on shear-harvestable things, not have to specify every single scythe, shear, sickle or kama in Every Single Leaf, Grass, Fern, other vegetation loot table. Tags would seem a solution to this, except the "item" predicates in loot table conditions don't seem to recognize tags.
  22. Also, does anyone know if there's anything being done at the Forge end about this?
  23. Also thanks again, for tripping over this change and finding out about it and the solution before I did, or this would have been my post. ?
×
×
  • Create New...

Important Information

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