StartupEvents.registry("item", (e) => {
  Platform.mods.kubejs.name = "Society";

  e.create("society:iron_sea_coin").texture("society:item/iron_sea_coin");
  e.create("society:gold_sea_coin").texture("society:item/gold_sea_coin");
  e.create("society:neptunium_sea_coin")
    .texture("society:item/neptunium_sea_coin")
    .glow(true);
  e.create("society:unholy_contract").texture("society:item/unholy_contract");
  e.create("society:gourmand_contract").texture(
    "society:item/gourmand_contract"
  );
  e.create("society:aquamagical_dust")
    .texture("society:item/aquamagical_dust")
    .glow(true);
  e.create("society:aquamagical_essence")
    .texture("society:item/aquamagical_essence")
    .glow(true);
  e.create("society:aquamagical_crystal")
    .texture("society:item/aquamagical_crystal")
    .glow(true);
  e.create("society:sea_coin_fragments").texture(
    "society:item/sea_coin_fragments"
  );
  e.create("herbalbrews:water_cup")
    .texture("society:item/water_cup")
    .maxStackSize(16);
  e.create("society:message_in_a_bottle")
    .texture("society:item/message_in_a_bottle")
    .glow(true);
  e.create("aquaculture:neptuna")
    .food((food) => {
      food.hunger(20).saturation(2).meat();
    })
    .texture("society:item/neptuna")
    .glow(true);

  // Chum
  e.create("society:bucket_of_black_tiger_shrimp_chum")
    .texture("society:item/bucket_of_black_tiger_shrimp_chum")
    .unstackable()
    .maxDamage(18);
  e.create("society:bucket_of_thrasher_chum")
    .texture("society:item/bucket_of_thrasher_chum")
    .unstackable()
    .maxDamage(18);
  e.create("society:bucket_of_book_chum")
    .texture("society:item/bucket_of_book_chum")
    .unstackable()
    .maxDamage(9);
  e.create("society:bucket_of_meat_chum")
    .texture("society:item/bucket_of_meat_chum")
    .unstackable()
    .maxDamage(18);
});

StartupEvents.registry("fluid", (e) => {
  e.create("aquaculture:molten_neptunium")
    .thickTexture(0x17f4b8)
    .bucketColor(0x17f4b8)
    .displayName("Molten Neptunium")
    .tag("aquaculture:molten_neptunium");

  e.create("biomancy:blood")
    .thickTexture(0x99130c)
    .bucketColor(0x99130c)
    .displayName("Blood")
    .tag("biomancy:blood");

  e.create("vinery:white_grape_juice")
    .thickTexture(0xbdd9b2)
    .bucketColor(0xbdd9b2)
    .displayName("White Grape Juice")
    .tag("vinery:white_grape_juice");

  e.create("vinery:white_jungle_grape_juice")
    .thickTexture(0x1c744c)
    .bucketColor(0x1c744c)
    .displayName("White Jungle Grape Juice")
    .tag("vinery:white_jungle_grape_juice");

  e.create("vinery:white_savanna_grape_juice")
    .thickTexture(0x648454)
    .bucketColor(0x648454)
    .displayName("White Savanna Grape Juice")
    .tag("vinery:white_savanna_grape_juice");

  e.create("vinery:white_taiga_grape_juice")
    .thickTexture(0x549c6c)
    .bucketColor(0x549c6c)
    .displayName("White Taiga Grape Juice")
    .tag("vinery:white_taiga_grape_juice");

  e.create("vinery:red_grape_juice")
    .thickTexture(0x6c3c74)
    .bucketColor(0x6c3c74)
    .displayName("Red Grape Juice")
    .tag("vinery:red_grape_juice");

  e.create("vinery:red_jungle_grape_juice")
    .thickTexture(0x44144c)
    .bucketColor(0x44144c)
    .displayName("Red Jungle Grape Juice")
    .tag("vinery:red_jungle_grape_juice");

  e.create("vinery:red_savanna_grape_juice")
    .thickTexture(0x3c2474)
    .bucketColor(0x3c2474)
    .displayName("Red Savanna Grape Juice")
    .tag("vinery:red_savanna_grape_juice");

  e.create("vinery:red_taiga_grape_juice")
    .thickTexture(0x693468)
    .bucketColor(0x693468)
    .displayName("Red Taiga Grape Juice")
    .tag("vinery:red_taiga_grape_juice");

  e.create("nethervinery:crimson_grape_juice")
    .thickTexture(0xf10959)
    .bucketColor(0xf10959)
    .displayName("Crimson Grape Juice")
    .tag("nethervinery:crimson_grape_juice");

  e.create("nethervinery:warped_grape_juice")
    .thickTexture(0x2cbcba)
    .bucketColor(0x2cbcba)
    .displayName("Warped Grape Juice")
    .tag("nethervinery:warped_grape_juice");
});

ItemEvents.modification((e) => {
  e.modify("minecraft:flint_and_steel", (item) => {
    item.maxDamage = -1;
  });
  e.modify("biomancy:despoil_sickle", (item) => {
    item.maxDamage = 3000;
  });
  e.modify("society:aquamagical_dust", (item) => {
    item.rarity = "rare";
  });
  e.modify("society:aquamagical_essence", (item) => {
    item.rarity = "rare";
  });
  e.modify("society:aquamagical_crystal", (item) => {
    item.rarity = "rare";
  });
});
