• Recently Browsing

    No registered users viewing this page.

  • Posts

    • Thanks everyone! I got things working with ease thanks to your help. Here's what my ModItemGroup class looks like now for future reference: public class ModItemGroup extends ItemGroup { private Supplier<ItemStack> displayStack; public static final ModItemGroup ACCESSORIES = new ModItemGroup("accessories", () -> new ItemStack(ModItems.SHACKLE.get())); private ModItemGroup(String label, Supplier<ItemStack> displayStack) { super(label); this.displayStack = displayStack; } @Override public ItemStack createIcon() { return displayStack.get(); } }  
    • Thanks, well that explains why it’s locking. Maybe there is some other way to accomplish what I want. I am trying to make a mod that makes it so farm animals (cows, sheep, pigs, and chickens) will only spawn near villages.    I was worried that if there are other animal mods installed, if I just denied those spawns in the village radius farm animals would be extremely rare, so I was trying to replace any non farm animal spawn near villages with farm animals, even at world creation when larger numbers of passive spawns are created.  The reason for the get in radius was so I could detect animal groups and replace them all with one type of animal. Is there possibly a way to detect when a spawn is part of a group of mobs? Or is there some other way to accomplish the spirit of what I’m trying to do, so that farm animals spawn in a good number near villages?
    • That is not what an asset is. You need to call IResourceManager#getAllResourceLocations which will give you a list of ResourceLocations. You can then use IResourceManager#getResource to get the resources for those. Just note that if multiple resource packs have the same resource (e.g. if a resource pack overwrites a vanilla texture) you will get that path multiple times (if I am reading the code correctly, do some experiments).
    • Hello! I'm trying to get all files from one asset. For example I have a asset like this: "textures/gui/.." and I want to have all files from this asset in a List. I don't know if it's enough to describe what I need, but I hope You can get the point.
    • So should I re-add the mod I removed? Or remove MrCrayfish's Vehicle Mod since I do already have Ultimate Cars mod. Because it works if I re-add the mod I removed, but I really don't want to re-add RoFl2Leather because it makes getting leather harder. But if I really have to, I will so all my work isn't to waste.
  • Topics

  • Who's Online (See full list)