Jump to content

77inthebag

Members
  • Posts

    10
  • Joined

  • Last visited

Posts posted by 77inthebag

  1. Usually, in 1.12.2, I could easily add seeds through MinecraftForge.addGrassSeed(...), but I am trying to figure out the 1.14 alternative to this. I have tried injecting the Minecraft blocks/grass loottable, but this causes cross mod incompatibility if another mod injects grass as well.

     

    Does anyone have any insight on how I can get seeds dropping from grass again and not have incompatibility?

     

    This is the code I am using to inject. Perhaps there is an error in the way I am doing this.

     
     
     
     
    Spoiler

    private static ResourceLocation grass = new ResourceLocation("minecraft", "blocks/grass");

        @SubscribeEvent
        public static void onLootLoad(LootTableLoadEvent event) 
        {

            if (event.getName().equals(grass)) 
            {
                if (Config.grass_drops.get() == true)
                event.getTable().addPool(LootPool.builder().addEntry(TableLootEntry.builder(new ResourceLocation(FutureOfUs.MOD_ID, "blocks/grass"))).build());
            }
        }

     

×
×
  • Create New...

Important Information

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